Papers › MiniPLM: Knowledge Distillation for Pre-Training Language Models

MiniPLM: Knowledge Distillation for Pre-Training Language Models

22 Oct 2024arXiv:2410.17215archive 2025-07-28

Yuxian Gu, Hao Zhou, Fandong Meng, Jie zhou, Minlie Huang

Knowledge distillation (KD) is widely used to train small, high-performing student language models (LMs) using large teacher LMs. While effective in fine-tuning, KD during pre-training faces challenges in efficiency, flexibility, and effectiveness. Existing methods either incur high computational costs due to online teacher inference, require tokenization matching between teacher and student LMs, or risk losing the difficulty and diversity of the teacher-generated training data. To address these issues, we propose MiniPLM, a KD framework for pre-training LMs by refining the training data distribution with the teacher's knowledge. For efficiency, MiniPLM performs offline teacher LM inference, allowing KD for multiple student LMs without adding training-time costs. For flexibility, MiniPLM operates solely on the training corpus, enabling KD across model families. For effectiveness, MiniPLM leverages the differences between large and small LMs to enhance the difficulty and diversity of the training data, helping student LMs acquire versatile and sophisticated knowledge. Extensive experiments demonstrate that MiniPLM boosts the student LMs' performance on 9 widely used downstream tasks, improves the language modeling capabilities, and reduces pre-training computation. The benefit of MiniPLM extends to large pre-training scales, evidenced by the extrapolation of the scaling curves. Further analysis reveals that MiniPLM supports KD across model families and enhances the utilization of pre-training data. Our model, code, and data are available at https://github.com/thu-coai/MiniPLM.

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="2410.17215")

Code

Syntology Ran 0 of 12 code samples harvested from 1 repository linked to this paper; 12 have no recorded run.

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

thu-coai/miniplm officialmentioned in papermentioned on GitHubpytorchMIT 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

12 samples harvested; 0 ran; 0 honoured the contract we drafted; 12 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.

12unverified

Licence: 0 of the 12 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 thu-coai/MiniPLM. “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.

add_data_args thu-coai/MiniPLM/arguments.py official repository unverified MIT (permissive) · 30b0df65999d2740 · report
add_model_args thu-coai/MiniPLM/arguments.py official repository unverified MIT (permissive) · 0bc5687474aef13d · report
add_runtime_args thu-coai/MiniPLM/arguments.py official repository unverified MIT (permissive) · 12b30d3c2c4c55cf · report
best_fitting_dtype thu-coai/MiniPLM/data_utils/indexed_dataset.py official repository unverified MIT (permissive) · b3338fae912274b3 · report
code thu-coai/MiniPLM/data_utils/distributed_indexed.py official repository unverified MIT (permissive) · 18d94355ea8f1c39 · report
data_file_path thu-coai/MiniPLM/data_utils/distributed_indexed.py official repository unverified MIT (permissive) · bdf28f9492a770dc · report
get_distribution thu-coai/MiniPLM/utils.py official repository unverified MIT (permissive) · ae64ae2a98def56a · report
index_file_path thu-coai/MiniPLM/data_utils/distributed_indexed.py official repository unverified MIT (permissive) · 8b1a74a6db32c163 · report
infer_dataset_impl thu-coai/MiniPLM/data_utils/indexed_dataset.py official repository unverified MIT (permissive) · 8c2ad3ddcd7a09d7 · report
make_builder thu-coai/MiniPLM/data_utils/indexed_dataset.py official repository unverified MIT (permissive) · fa072231e5230b82 · report
sample thu-coai/MiniPLM/utils.py official repository unverified MIT (permissive) · 7fa1678cee06fa0a · report
sample_from_draft_model thu-coai/MiniPLM/utils.py official repository unverified MIT (permissive) · 22469ee6c0ed3e2a · report

Tasks

DiversityKnowledge DistillationLanguage ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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