#6767th of 126 in Training and fine-tuning
torchdistill
YAML-configured PyTorch framework for knowledge distillation experiments
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts torchdistill on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.torchdistill is on your watch list. Its new releases and problems show there.
- Stars
- 1.6k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Aug 2026
- Language
- Python
1,604 on 6 May 20261,638 on 25 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
torchdistill is a PyTorch library for knowledge distillation where experiments are declared in a PyYAML config instead of Python code. A ForwardHookManager extracts intermediate representations from teacher and student models by module path, so models need not be reimplemented. It also trains models without a teacher by omitting teacher entries, and ships example scripts for image classification, detection, segmentation and GLUE/NLP tasks.
Who it is for: ML researchers running reproducible distillation experiments in PyTorch
Strengths
- Experiments defined in one YAML file; custom modules need no edits to the package
- Forward hooks extract intermediate features by module path without changing forward
- Sample configs for many published methods (KD, FitNet, AT, RKD, PKT and others)
- Imports teacher models from PyTorch Hub, e.g. timm; PyTorch Ecosystem member since Dec 2023
Weaknesses
- Deeply nested YAML with import_call tags is verbose and takes time to learn
- Examples centre on vision and encoder NLP; LLM coverage is one causal LM/Alpaca example
- Training library only; no serving, UI or deployment tooling
- Requires Python 3.9+ and PyTorch; installing from source is marked not recommended
What it needs
- GPU optional
- Needs PyTorch, torchvision, Hugging Face Transformers, PyYAML
- Models: torchvision models, PyTorch Hub models, timm, Hugging Face Transformers
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in Training and fine-tuning
See all 126| Rank | Project | Score |
|---|---|---|
| #65 | deepmd-kitTrain and fine-tune machine-learning interatomic potentials for molecular dynamics | 56 out of 100 |
| #66 | lightly-trainPython library for pretraining, distilling and fine-tuning computer vision models | 56 out of 100 |
| #68 | nanochatMinimal PyTorch codebase to train and chat with a small GPT-2-class LLM | 55 out of 100 |
| #69 | alignment-handbookTraining scripts and YAML recipes for SFT, DPO and ORPO of LLMs | 55 out of 100 |
| #70 | xtunerTraining engine for fine-tuning and RL of large MoE and dense LLMs | 55 out of 100 |