How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="LoneStriker/DeepMagic-Coder-7b-GPTQ")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("LoneStriker/DeepMagic-Coder-7b-GPTQ")
model = AutoModelForCausalLM.from_pretrained("LoneStriker/DeepMagic-Coder-7b-GPTQ")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

DeepMagic-Coder-7b

Alternate version:

image/jpeg

This is an extremely successful merge of the deepseek-coder-6.7b-instruct and Magicoder-S-DS-6.7B models, bringing an uplift in overall coding performance without any compromise to the models integrity (at least with limited testing).

This is the first of my models to use the merge-kits task_arithmetic merging method. The method is detailed bellow, and its clearly very usefull for merging ai models that were fine-tuned from a common base:

Task Arithmetic:

Computes "task vectors" for each model by subtracting a base model. 
Merges the task vectors linearly and adds back the base. 
Works great for models that were fine tuned from a common ancestor. 
Also a super useful mental framework for several of the more involved 
merge methods.

The original models used in this merge can be found here:

The Merge was created using Mergekit and the paremeters can be found bellow:

models:
  - model: deepseek-ai_deepseek-coder-6.7b-instruct
    parameters:
      weight: 1
  - model: ise-uiuc_Magicoder-S-DS-6.7B
    parameters:
      weight: 1
merge_method: task_arithmetic
base_model: ise-uiuc_Magicoder-S-DS-6.7B
parameters:
  normalize: true
  int8_mask: true
dtype: float16
Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support