Papers › torchdistill: A Modular, Configuration-Driven Framework for Knowledge Distillation

torchdistill: A Modular, Configuration-Driven Framework for Knowledge Distillation

25 Nov 2020arXiv:2011.12913archive 2025-07-28

Yoshitomo Matsubara

While knowledge distillation (transfer) has been attracting attentions from the research community, the recent development in the fields has heightened the need for reproducible studies and highly generalized frameworks to lower barriers to such high-quality, reproducible deep learning research. Several researchers voluntarily published frameworks used in their knowledge distillation studies to help other interested researchers reproduce their original work. Such frameworks, however, are usually neither well generalized nor maintained, thus researchers are still required to write a lot of code to refactor/build on the frameworks for introducing new methods, models, datasets and designing experiments. In this paper, we present our developed open-source framework built on PyTorch and dedicated for knowledge distillation studies. The framework is designed to enable users to design experiments by declarative PyYAML configuration files, and helps researchers complete the recently proposed ML Code Completeness Checklist. Using the developed framework, we demonstrate its various efficient training strategies, and implement a variety of knowledge distillation methods. We also reproduce some of their original experimental results on the ImageNet and COCO datasets presented at major machine learning conferences such as ICLR, NeurIPS, CVPR and ECCV, including recent state-of-the-art methods. All the source code, configurations, log files and trained model weights are publicly available at https://github.com/yoshitomo-matsubara/torchdistill .

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2011.12913")

Code

Syntology Ran 10 of 26 code samples harvested from 1 repository linked to this paper; 16 have no recorded run. Of those that ran: 10 ran · our draft was wrong.

By repository: official repository: 26 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yoshitomo-matsubara/torchdistill officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

26 samples harvested; 10 ran; 0 honoured the contract we drafted; 16 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran · our draft was wrong
16unverified

Licence: 0 of the 26 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from yoshitomo-matsubara/torchdistill. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

_resolve_module_path_flag yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · c3ed65ba6ea90613 · report
build_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · 3254f2af805330f9 · report
get_device_index yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · 87b46952aaf35391 · report
get_proc_config yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · fd6d7563a4a31ea5 · report
register_forward_hook_with_dict yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · 4b491e5e58b0f881 · report
register_post_epoch_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · c92bc6d24855c49a · report
register_post_forward_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · 7c61d41d0c3e500d · report
register_pre_epoch_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · b354561e7df46cce · report
register_pre_forward_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · 6a583218d3dff95c · report
set_hooks yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository ran · our draft was wrong MIT (permissive) · f44f1f4a4378af5a · report
DistillationBox yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 5e932d9e557d1152 · report
ForwardHookManager yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 733dc5424bd2b106 · report
_extract_module yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 62cb0c77042128ad · report
clear_io_dict yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 3f67b3fedf426f90 · report
clear_io_dict_values yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 0b996e294219e230 · report
default_post_epoch_process_with_teacher yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 7b5cddaa746c727a · report
default_post_forward_process yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 25556f7f6770ba26 · report
default_pre_epoch_process_with_teacher yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 4d443b9aef2436a9 · report
default_pre_forward_process yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · aaa26d595f56f023 · report
get_forward_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · d6b164151ea048bc · report
get_post_epoch_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · c2780237c1682ad8 · report
get_post_forward_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · e78710c20c16f470 · report
get_pre_epoch_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · d75c1131fcde7500 · report
get_pre_forward_proc_func yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 7f13327e06b694aa · report
update_io_dict yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 3933a969d27c0f3a · report
wrap_model yoshitomo-matsubara/torchdistill/torchdistill/core/distillation.py official repository unverified MIT (permissive) · 0c2e416b9fd8f9e7 · report

Tasks

Image ClassificationInstance SegmentationKnowledge DistillationModel CompressionNeural Network CompressionObject Detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet ResNet-18 (PAD-L2 w/ ResNet-34 teacher) Top 1 Accuracy 71.71% #1005 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (FT w/ ResNet-34 teacher) Top 1 Accuracy 71.56% #1008 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (KD w/ ResNet-34 teacher) Top 1 Accuracy 71.37% #1011 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (L2 w/ ResNet-34 teacher) Top 1 Accuracy 71.08% #1014 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (CRD w/ ResNet-34 teacher) Top 1 Accuracy 70.93% #1016 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (tf-KD w/ ResNet-18 teacher) Top 1 Accuracy 70.52% #1020 of 1060 Archive leaderboard report
Image Classification ImageNet ResNet-18 (SSKD w/ ResNet-34 teacher) Top 1 Accuracy 70.09% #1024 of 1060 Archive leaderboard report
Instance Segmentation COCO test-dev Mask R-CNN (Bottleneck-injected ResNet-50, FPN) mask AP 33.6 #101 of 112 Archive leaderboard report
Object Detection COCO test-dev Mask R-CNN (Bottleneck-injected ResNet-50, FPN) box mAP 36.9 #220 of 225 Archive leaderboard report
Object Detection COCO test-dev Faster R-CNN (Bottleneck-injected ResNet-50 and FPN) box mAP 35.9 #225 of 225 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Knowledge Distillation

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections