-
Notifications
You must be signed in to change notification settings - Fork 0
mlx distillation explained.stub
Nicolas Cravino edited this page Apr 11, 2026
·
3 revisions
id: mlx-distillation-explained name: MLX Distillation Explained repo_path: /sessions/charming-sleepy-ritchie/repos/mlx-distillation-explained remote_url: https://github.com/sw30labs/mlx-distillation-explained.git primary_language: Python framework: MLX + LangGraph ingested: 2026-04-11 last_commit_date: 2026-04-11
Educational PoC demonstrating model distillation from Claude Sonnet (teacher) to Llama 3.1 8B (student) via LoRA fine-tuning on Apple Silicon. Full pipeline with verification gates between steps.
LangGraph-orchestrated 5-step pipeline (run_pipeline.py) with verification gates:
- Extract Teacher Examples: Query Claude Sonnet for high-quality examples
- Eval Baseline: Evaluate student (Llama 3.1 8B) performance before distillation
- LoRA Fine-Tune: Apply LoRA adapter on Apple Silicon
- Eval Adapted: Evaluate student performance post-fine-tuning
- Benchmark Report: Generate comparison report
Each step has individual scripts for standalone execution.
- Teacher Model: Claude Sonnet via Anthropic API
- Student Model: Llama 3.1 8B via mlx-lm
- Fine-Tuning: LoRA adapters via MLX
- Orchestration: LangGraph StateGraph
- Verification: Gates between steps
mlx, mlx-lm, mlx-vlm, anthropic, python-dotenv, pyyaml, langgraph, langchain-core, openpyxl
python, mlx, apple-silicon, local-inference, lora, distillation, langgraph
- qwenbench-mlx — benchmarking MLX models