Skip to content

Commit

Permalink
Abstractive: Always create tokenizer (Fixes #44)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHousen committed Feb 9, 2021
1 parent 28f1fc2 commit 9294897
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/abstractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def __init__(self, hparams):
gradient_checkpointing=self.hparams.gradient_checkpointing,
)

self.tokenizer = AutoTokenizer.from_pretrained(
self.hparams.model_name_or_path, use_fast=True
)
self.tokenizer = AutoTokenizer.from_pretrained(
self.hparams.model_name_or_path, use_fast=True
)

if self.hparams.model_max_length:
self.tokenizer.model_max_length = self.hparams.model_max_length
Expand Down

0 comments on commit 9294897

Please sign in to comment.