flpelerin commited on
Commit
87a4d20
·
1 Parent(s): 29a6938
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -44,7 +44,7 @@ def process_function(examples):
44
  examples['text'],
45
  padding='max_length', # Fixed padding
46
  truncation=True,
47
- max_length=seq_length # Fixed max length
48
  )
49
 
50
  tokenized_datasets = dataset.map(process_function, batched=True)
 
44
  examples['text'],
45
  padding='max_length', # Fixed padding
46
  truncation=True,
47
+ max_length=(seq_length * batch_size) # Fixed max length
48
  )
49
 
50
  tokenized_datasets = dataset.map(process_function, batched=True)