Skip to content

Commit

Permalink
Add model_max_length to AutoTokenizer (#3342)
Browse files Browse the repository at this point in the history
  • Loading branch information
chongshenng authored Apr 26, 2024
1 parent f0fe549 commit 55a28eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/quickstart-huggingface/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def load_data(partition_id):
# Divide data: 80% train, 20% test
partition_train_test = partition.train_test_split(test_size=0.2, seed=42)

tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT)
tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT, model_max_length=512)

def tokenize_function(examples):
return tokenizer(examples["text"], truncation=True)
Expand Down

0 comments on commit 55a28eb

Please sign in to comment.