Skip to content

Commit f2b65ec

Browse files
Replace null tokenizer with a teacher tokenizer
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
1 parent 99400f3 commit f2b65ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/puzzletron/mbridge_distillation/distill_hf_keval.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ def _build_model_provider(hf_path):
221221
wandb_exp_name=args.wandb_exp_name,
222222
),
223223
tokenizer=TokenizerConfig(
224-
tokenizer_type="NullTokenizer", vocab_size=distill_provider.vocab_size
224+
tokenizer_type="HuggingFaceTokenizer",
225+
# Use teacher tokenizer as the source of knowledge; fallback to student if teacher unavailable
226+
# In distillation, both models should use the same tokenizer to process the same input
227+
tokenizer_model=args.teacher_hf_path,
228+
vocab_size=distill_provider.vocab_size,
225229
),
226230
checkpoint=CheckpointConfig(
227231
save_interval=args.eval_interval,

0 commit comments

Comments
 (0)