Update tasks/text.py
Browse files- tasks/text.py +3 -0
tasks/text.py
CHANGED
@@ -81,10 +81,13 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
81 |
model = model.half()
|
82 |
model.eval()
|
83 |
|
|
|
|
|
84 |
trainer = Trainer(
|
85 |
model=model,
|
86 |
# args=training_args,
|
87 |
tokenizer=tokenizer
|
|
|
88 |
)
|
89 |
|
90 |
trainer.args.per_device_eval_batch_size = 4
|
|
|
81 |
model = model.half()
|
82 |
model.eval()
|
83 |
|
84 |
+
data_collator = DataCollatorWithPadding(tokenizer)
|
85 |
+
|
86 |
trainer = Trainer(
|
87 |
model=model,
|
88 |
# args=training_args,
|
89 |
tokenizer=tokenizer
|
90 |
+
data_collator=data_collator
|
91 |
)
|
92 |
|
93 |
trainer.args.per_device_eval_batch_size = 4
|