Practical overview
When it fits
Use it when you need a code-based reference for reproducing the repository’s BERT distillation workflow for German-to-English translation research.
Who it is for
- Researchers studying BERT knowledge distillation for text generation.
- Developers reproducing or adapting the repository’s German-to-English machine-translation experiments.
Documented uses
- Prepare the project’s German-to-English experiment data.
- Fine-tune a multilingual BERT teacher and extract hidden states and top-k logits.
- Train a sequence-to-sequence translation model using BERT-derived knowledge.
- Run inference on the development split and save experiment outputs.
Requirements & limits
The repository is publicly available under the MIT license. The documented setup targets Ubuntu 18.04 with an Nvidia GPU and Docker.
- The documented pipeline requires an Nvidia GPU, Nvidia driver and nvidia-docker alongside Docker.
- The authors say they do not plan to support other operating systems or CPU-only machines.
- The repository includes a modified OpenNMT-py submodule and recommends Docker for reproducibility.
- The README’s memory guidance is based on testing with one Nvidia Titan RTX GPU with 24 GB RAM.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the IWSLT German-to-English data
Use the repository setup script to download raw data and preprocess it into the project’s expected data folders.
Before you start
- Ubuntu 18.04 with an Nvidia GPU, as the documented test environment.
- Docker, an Nvidia driver and nvidia-docker.
- The repository cloned with its submodule.
Steps
Clone the repository and submodule using the documented recursive clone command.
Run
source scripts/setup.shto download and preprocess the data.Use the generated
/dumpcontents as the preprocessed data mounted by the project container.
Expected outcome
The data folder contains downloaded and preprocessed German-to-English experiment files for later training and inference stages.
Guide limitations
- The authors do not plan to support other operating systems or CPU-only machines.
- The README recommends Docker for reproducibility and says non-Docker installations will not receive official troubleshooting support.
Run the documented distillation and translation workflow
Train the documented German-to-English model with BERT-derived knowledge and run development-set inference.
Before you start
- Prepared data from the project setup script.
- Docker, an Nvidia driver and nvidia-docker on the documented Ubuntu/Nvidia setup.
- The repository and its modified OpenNMT-py submodule.
Steps
Launch the container with
source launch_container.sh.Inside the container, run the documented C-MLM fine-tuning command.
Extract teacher hidden states and top-k logits with the documented
dump_teacher_hiddens.pyanddump_teacher_topk.pycommands.Run the documented
opennmt/train.pycommand with BERT knowledge distillation enabled.Run
./run_mt.sh /output/ 100000 dev 5 0.6to translate the development split.
Expected outcome
The workflow produces a trained translation experiment and writes development-split inference results under the experiment output directory.
Guide limitations
- The README reports testing on a single Nvidia Titan RTX with 24 GB RAM; it suggests reducing batch size and increasing gradient accumulation if out of memory.
- The documented environment does not include CPU-only or other-operating-system support.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- ChenRocks/Distill-BERT-Textgen · Official homepage title · retained in its source language

