[s2s/distill] hparams.tokenizer_name = hparams.teacher (#8382)

This commit is contained in:
Shichao Sun 2020-11-10 22:32:01 +08:00 committed by GitHub
parent aec51e5696
commit ae1cb4ec22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class BartSummarizationDistiller(SummarizationModule):
)
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]