qwen3.5-4b-prune_width_ffn15_lora_kd
compressed LLM with knowledge distillation
2 min read
This model is the result of a language compression and knowledge distillation experiment (where a smaller model is trained to mimic the responses of a larger teacher model). It is based on a pruned version of mrysh/qwen3.5-4b-prune_width_ffn15 with its MLP (multilayer perceptron) width reduced by 15%, which was then fine-tuned using LoRA (a small adjustable add-on over the base model) on a 20-million-token corpus. After training, the LoRA weights were merged back into the model, resulting in a standard checkpoint with a smaller disk footprint and the architecture of the original pruned model. The model is useful for researchers and developers looking for faster and more compact LLM versions to run on limited resources.
Key features
- Knowledge distillation: KL-divergence was used to align the token distribution of the pruned model with the original
Qwen/Qwen3.5-4B. - High-quality training data: Utilized texts from FineWeb-Edu, OpenAssistant dialogues, and specialized prompts from the BFCL and MedQA benchmarks.
- Reduced size: Weighs 7.74 GB on disk (compared to 8.41 GB for the original) while maintaining the identical structure of the pruned version.
- High speed: Single-user generation speed reaches 79.6 tokens per second on an L40 GPU via vLLM.
What you can do
- Pipeline integration: Use the model as a lighter replacement for the base Qwen3.5-4B for text tasks.
- Feature testing: Test function-calling performance using the BFCL benchmark.
- Service deployment: Deploy the model via vLLM for fast inference in bots and applications.
Example
Load the model the standard way, just like the base Qwen3.5-4B, taking into account the modified layer widths:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "mrysh/qwen3.5-4b-prune_width_ffn15_lora_kd"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)Read more
Details• Benchmarks: BFCL (total) — 86.4% (original is 88.0%); MedQA — 61.5% (original is 70.8%, pruned without distillation is 56.5%); Hiring bias — 81.9%.
• Hardware requirements: Disk size 7.74 GB, speed 79.6 tokens/s (vLLM, L40).
• Training details: LoRA (rank 64, alpha 128) on all linear layers of the text decoder, 606 optimizer steps, LR 0.0001 with cosine decay.
• Limitations: Tests were conducted with thinking mode disabled and greedy decoding; results reflect behavior on specific training datasets.










Comments