Skip to content

Commit 8682754

Browse files
author
Steven I Reeves
authored
Reducing training and validation steps (huggingface#8)
1 parent bd12e8b commit 8682754

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gpt2-tf2/gpt2_train_distributed.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_dataset(fil):
5050

5151
def tokenize(data, tokenizer, truncate=False):
5252
if truncate:
53-
data = tokenizer(data[:1000], return_tensors='tf', padding=True, truncation=True)
53+
data = tokenizer(data[:100], return_tensors='tf', padding=True, truncation=True)
5454
else:
5555
data = tokenizer(data, return_tensors='tf', padding=True, truncation=True)
5656
return tf.data.Dataset.from_tensor_slices((dict(data), data['input_ids']))

0 commit comments

Comments
 (0)