Downloads · 30 days
12
24% of all-time downloads
Vinitha2004/qwen2.5-coder-3b-instruct-awq-final-working_draft
qwen2.5-coder-3b-instruct-awq-final-working_draft is a machine learning model from Vinitha2004. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
This is a knowledge-distilled version of Qwen2.5-Coder-3B-Instruct-AWQ, trained using knowledge distillation from Qwen2.5-Coder-7B-Instruct-AWQ.
Downloads · 30 days
12
24% of all-time downloads
All-time downloads
50
Public
Repo size
131 MB
Likes
0
Public
Click a slice to open those files.
.safetensors360 MB · 79%
From the Hugging Face model README
This is a knowledge-distilled version of Qwen2.5-Coder-3B-Instruct-AWQ, trained using knowledge distillation from Qwen2.5-Coder-7B-Instruct-AWQ.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-3B-Instruct-AWQ",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-3B-Instruct-AWQ")
# Load distilled adapter
model = PeftModel.from_pretrained(base_model, "Vinitha2004/qwen2.5-coder-3b-instruct-awq-final-working_draft")
# Generate code
input_text = "Original Code:\ndef add(a, b):\n return a + b\n\nUpdate Snippet:\n// ... existing code ...\ndef add(a: int, b: int) -> int:\n// ... existing code ...\n\nUpdated Code:\n"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
This distilled model retains the knowledge from the 7B teacher model while being significantly more efficient:
Trained on 5000 code editing examples from custom dataset.
adapter_config.json: LoRA configurationadapter_model.safetensors: Trained LoRA weights (59MB)