Downloads · 30 days
0
ZixiQi/DeepSeek-V3-Toy-Distillation
DeepSeek-V3-Toy-Distillation is a machine learning model from ZixiQi. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A comprehensive setup for distilling the DeepSeekMini model using Mistral as the teacher, with realistic datasets and proper monitoring.
Downloads · 30 days
0
Access
Public
Updated Sep 24, 2025
Repo size
13.5 GB
Likes
0
Public
Click a slice to open those files.
.safetensors13.5 GB · 99%
From the Hugging Face model README
A comprehensive setup for distilling the DeepSeekMini model using Mistral as the teacher, with realistic datasets and proper monitoring.
python train_realistic.py --sample_data --scale quick_test --output_dir ./models/deepseekmini-sample
python train_realistic.py --prepare_data --scale small_scale --output_dir ./models/deepseekmini-distilled
python evaluate_model.py --model_path ./models/deepseekmini-distilled
| Scale | Steps | Batch Size | Time Est. | Description |
|---|---|---|---|---|
quick_test | 100 | 2 | ~25min | Quick verification run |
small_scale | 1,000 | 4 | ~7h | Initial quality improvement |
medium_scale | 5,000 | 8 | ~62h | Good quality results |
full_scale | 20,000 | 16 | ~500h | Best quality (production) |
The training automatically downloads and prepares high-quality datasets:
python train_realistic.py \
--scale medium_scale \
--max_steps 3000 \
--batch_size 6 \
--learning_rate 1e-5 \
--data_jsonl ./datasets/custom_data.jsonl \
--output_dir ./models/custom-distilled
python evaluate_model.py \
--model_path ./models/deepseekmini-distilled \
--compare_with /home/user/DeepSeekMini
python prepare_datasets.py --output_dir ./datasets --max_samples 15000
distill/
├── distill.py # Core distillation logic (fixed for DeepSeek)
├── train_realistic.py # Enhanced training script
├── prepare_datasets.py # Dataset preparation
├── evaluate_model.py # Model evaluation
├── datasets/ # Downloaded datasets
│ ├── alpaca.jsonl
│ ├── open_orca.jsonl
│ ├── dolly.jsonl
│ ├── oasst1.jsonl
│ └── combined_training_data.jsonl
└── models/ # Trained models
└── deepseekmini-distilled/
├── config.json
├── pytorch_model.bin
├── tokenizer.json
└── training_summary.json
quick_test or small_scale first to verify everything worksOut of Memory (OOM):
# Reduce batch size and increase gradient accumulation
python train_realistic.py --scale small_scale --batch_size 2 --gradient_accumulation_steps 8
Slow Training:
# Enable gradient checkpointing to trade compute for memory
python train_realistic.py --gradient_checkpointing
Poor Quality Results:
After training, you should see:
small_scale to medium_scale for better qualityEach training run creates a training_summary.json with:
Happy distilling! 🎉