Downloads · 30 days
7
4% of all-time downloads
Venkateshwarlu1/distilled-qwen-1.5b-dolly
distilled-qwen-1.5b-dolly is a machine learning model from Venkateshwarlu1. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Knowledge-distilled student model trained via teacher-student distillation.
Downloads · 30 days
7
4% of all-time downloads
All-time downloads
179
Public
Repo size
9.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors37 MB · 76%
From the Hugging Face model README
Knowledge-distilled student model trained via teacher-student distillation.
Qwen/Qwen2.5-1.5B-InstructQwen/Qwen2.5-7B-Instructdatabricks/databricks-dolly-15kThis repository contains LoRA adapter weights. Load it with the base model using PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-1.5B-Instruct",
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", trust_remote_code=True)
# Load adapter
model = PeftModel.from_pretrained(base, "Venkateshwarlu1/distilled-qwen-1.5b-dolly")
model = model.merge_and_unload() # optional: merge for inference
model.eval()
# Generate
prompt = "Explain machine learning in simple terms."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=150, do_sample=True, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Qwen/Qwen2.5-7B-InstructQwen/Qwen2.5-1.5B-Instructalpha * CE + beta * KL(teacher || student) with temperature scalingIf you use this model, please cite the original Qwen paper and the distillation dataset.