wlabchoi commited on
Commit
80fd90a
·
verified ·
1 Parent(s): dc45fe9

Upload train_qwen3_distillation.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. train_qwen3_distillation.py +1 -1
train_qwen3_distillation.py CHANGED
@@ -191,7 +191,7 @@ class MiniLLMTrainer(Trainer):
191
  teacher_logits = teacher_outputs.logits
192
 
193
  # Teacher token sampling (key part of MiniLLM)
194
- if self.use_teacher_sampling and self.training:
195
  # Sample from teacher's softmax distribution
196
  teacher_probs = F.softmax(teacher_logits / self.temperature, dim=-1)
197
  # Sample tokens: [batch, seq_len]
 
191
  teacher_logits = teacher_outputs.logits
192
 
193
  # Teacher token sampling (key part of MiniLLM)
194
+ if self.use_teacher_sampling and model.training:
195
  # Sample from teacher's softmax distribution
196
  teacher_probs = F.softmax(teacher_logits / self.temperature, dim=-1)
197
  # Sample tokens: [batch, seq_len]