Skip to content

Commit

Permalink
[s2s/distill] hparams.tokenizer_name = hparams.teacher (#8382)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShichaoSun authored Nov 10, 2020
1 parent aec51e5 commit ae1cb4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/seq2seq/distillation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(self, hparams):
)
if hparams.length_penalty != -1:
student.config.length_penalty = hparams.length_penalty
hparams.tokenizer_name = hparams.teacher # Use teacher's tokenizer
super().__init__(hparams, model=student, config=student.config)
model_type = student.config.model_type
self.e_layer_ids, self.d_layer_ids = e_layer_ids, d_layer_ids # type: List[int], List[int]
Expand Down

0 comments on commit ae1cb4e

Please sign in to comment.