Skip to content

Commit

Permalink
Reducing training and validation steps (huggingface#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenireeves authored Jul 22, 2021
1 parent bd12e8b commit 8682754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gpt2-tf2/gpt2_train_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_dataset(fil):

def tokenize(data, tokenizer, truncate=False):
if truncate:
data = tokenizer(data[:1000], return_tensors='tf', padding=True, truncation=True)
data = tokenizer(data[:100], return_tensors='tf', padding=True, truncation=True)
else:
data = tokenizer(data, return_tensors='tf', padding=True, truncation=True)
return tf.data.Dataset.from_tensor_slices((dict(data), data['input_ids']))
Expand Down

0 comments on commit 8682754

Please sign in to comment.