Skip to content

Commit

Permalink
fix: Set tokenizer.model_max_length if it is None
Browse files Browse the repository at this point in the history
  • Loading branch information
saattrupdan committed Nov 28, 2022
1 parent 150724f commit c57f874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scandinli/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def train(config: DictConfig) -> None:
)

# Ensure that `model_max_length` is set
if tokenizer.model_max_length > 100_000:
if tokenizer.model_max_length > 100_000 or tokenizer.model_max_length is None:
tokenizer.model_max_length = 512

# Tokenize the dataset
Expand Down

0 comments on commit c57f874

Please sign in to comment.