Downloads · 30 days
0
VoCuc/qwen2.5-1.5b-amid-feature
qwen2.5-1.5b-amid-feature is a text generation model from VoCuc. Use it when you need the model to write or continue text. It is set up for peft.
Student distilled from Qwen2.5-14B-Instruct (teacher) into Qwen2.5-1.5B-Instruct (student) with the AMiD (alpha-mixture assistant distribution) knowledge-distillation framework.
Downloads · 30 days
0
Access
Public
Updated Jul 11, 2026
Repo size
516 MB
Likes
0
Public
Click a slice to open those files.
.bin504 MB · 97%
From the Hugging Face model README
Student distilled from Qwen2.5-14B-Instruct (teacher) into Qwen2.5-1.5B-Instruct (student) with the AMiD (alpha-mixture assistant distribution) knowledge-distillation framework.
AMiD AB-divergence (div=ab, order=pr, alpha=0.5, lambda=0.5) plus a hidden-state feature-matching MSE: student layers [8,13,18,23] are mapped through learned linear projectors (1536 -> 5120) onto teacher layers [14,22,31,40]. On-policy student-gen with replay buffer.
Reproducibility note: the feature-loss loop in
f_base_finetune.pyoriginally passed the layer-index lists into the projector instead of the hidden-state tensors at those layers (TypeError: linear(): input must be Tensor, not int). This run applied the fix: index the captured hidden states (s_hidden[s_idx],teacher_outputs.hidden_states[t_idx]) and compute the MSE in fp32.
| Teacher | Qwen/Qwen2.5-14B-Instruct (14.8B) |
| Student base | Qwen/Qwen2.5-1.5B-Instruct (1.5B) |
| Data | UltraInteract - 79,751 prompts (200 held out for dev) |
| Epochs / optimizer steps | 3 / 7476 |
| LR / schedule | 1e-4, cosine, weight decay 1e-2, grad clip 1.0 |
| Batch | 8 x grad-accum 2 x 2 GPUs |
| LoRA | r=16, alpha=128, dropout=0.05 |
| Precision | bf16 student (DeepSpeed ZeRO-1), fp16 teacher |
| Hardware | 4x NVIDIA H200 NVL |
| Final dev ROUGE-L | 7.7272 |
lora_adapter/)from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-1.5B-Instruct", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "VoCuc/qwen2.5-1.5b-amid-feature", subfolder="lora_adapter")
model = model.merge_and_unload() # <- reconstructs the merged model exactly
tok = AutoTokenizer.from_pretrained("VoCuc/qwen2.5-1.5b-amid-feature")
model.safetensors is present)from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("VoCuc/qwen2.5-1.5b-amid-feature", dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("VoCuc/qwen2.5-1.5b-amid-feature")
The merged weights are exactly Qwen2.5-1.5B-Instruct + this LoRA adapter, so the two paths above
are equivalent. training_args.json and training_log.txt hold the full config and training log.