How yan-gao-gy/muti-teacherkd works
This repository implements multi-teacher knowledge distillation for joint CTC/attention speech recognition. The user workflow prepares Common Voice manifests, runs teacher inference and stores predictions, then trains and evaluates a student using those predictions. Student training supports average, top-1, top-k, and WER-weighted teacher selection. The graph preserves the documented stages and artifact handoff; source excerpts do not expose every internal call, so unsampled implementation details are not inferred.
Main entry points: train_kd.py Student training · save_teachers.py Teacher inference · common_voice_prepare.py Manifest preparation · save_teachers.yaml Teacher settings
Components 15
Speech data
- Manifest preparation
common_voice_prepare.py - Dataset CSVs
Teacher inference
- Teacher data pipeline
save_teachers.py - Teacher inference
save_teachers.py - Teacher predictions
Student distillation
- Student data pipeline
train_kd.py - WER teacher selection
train_kd.py - Student training
train_kd.py - WER and CER evaluation
train_kd.py
Experiment settings
- Teacher settings
hparams/save_teachers.yaml - Training settings
hparams/train_kd.yaml
Other components
- Experimenter
- Common Voice data
- Teacher checkpoints
- Trained student
Connections 18
- Experimenter → Manifest preparation: prepares data
README.md - Common Voice data → Manifest preparation: provides recordings
common_voice_prepare.py - Manifest preparation → Dataset CSVs: writes manifests
common_voice_prepare.py - Dataset CSVs → Teacher data pipeline: loads data
save_teachers.py - Dataset CSVs → Student data pipeline: loads matching data
README.md - Experimenter → Teacher inference: runs inference
README.md - Teacher checkpoints → Teacher inference: provides checkpoints
README.md - Teacher data pipeline → Teacher inference: supplies batches
save_teachers.py - Teacher inference → Teacher predictions: stores outputs
save_teachers.py - Teacher predictions → Student data pipeline: loads predictions
README.md - Experimenter → Student training: trains student
README.md - Student data pipeline → Student training: supplies batches
train_kd.py - Student training → WER teacher selection: selects teachers
train_kd.py - WER teacher selection → Student training: weights teacher losses
train_kd.py - Student training → WER and CER evaluation: evaluates outputs
train_kd.py - Student training → Trained student: trains model
README.md - Teacher settings → Teacher inference: configures run
README.md - Training settings → Student training: sets strategy
README.md