#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.

Stars
1.6k
License
MIT
Last commit
Nov 2026
Last release
Aug 2026
Language
Python
Stars, last 29 weeks+34
6 May 2026: 1,604 stars13 May 2026: 1,606 stars20 May 2026: 1,607 stars27 May 2026: 1,610 stars3 Jun 2026: 1,610 stars10 Jun 2026: 1,613 stars17 Jun 2026: 1,614 stars24 Jun 2026: 1,614 stars1 Jul 2026: 1,614 stars8 Jul 2026: 1,615 stars15 Jul 2026: 1,619 stars22 Jul 2026: 1,619 stars29 Jul 2026: 1,620 stars5 Aug 2026: 1,621 stars12 Aug 2026: 1,625 stars19 Aug 2026: 1,626 stars26 Aug 2026: 1,628 stars2 Sept 2026: 1,629 stars9 Sept 2026: 1,629 stars16 Sept 2026: 1,629 stars23 Sept 2026: 1,632 stars30 Sept 2026: 1,632 stars7 Oct 2026: 1,633 stars14 Oct 2026: 1,633 stars21 Oct 2026: 1,635 stars28 Oct 2026: 1,635 stars4 Nov 2026: 1,635 stars11 Nov 2026: 1,636 stars18 Nov 2026: 1,637 stars25 Nov 2026: 1,638 stars

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
Also in Training and fine-tuning
RankProjectScore
#65deepmd-kitTrain and fine-tune machine-learning interatomic potentials for molecular dynamics2.1k starsLGPL-3.056 out of 100
#66lightly-trainPython library for pretraining, distilling and fine-tuning computer vision models1.7k starsAGPL-3.056 out of 100
#68nanochatMinimal PyTorch codebase to train and chat with a small GPT-2-class LLM61k starsMIT55 out of 100
#69alignment-handbookTraining scripts and YAML recipes for SFT, DPO and ORPO of LLMs5.7k starsApache-2.055 out of 100
#70xtunerTraining engine for fine-tuning and RL of large MoE and dense LLMs5.2k starsApache-2.055 out of 100