Update trainingscript.py
This commit is contained in:
parent
f640bd9d1a
commit
9568905b57
@ -18,7 +18,6 @@ def preprocess_function(examples):
|
|||||||
before_list.append('')
|
before_list.append('')
|
||||||
after_list.append('')
|
after_list.append('')
|
||||||
|
|
||||||
# Токенизация с ограничением по длине
|
|
||||||
model_inputs = tokenizer(before_list, padding="max_length", truncation=True, max_length=512)
|
model_inputs = tokenizer(before_list, padding="max_length", truncation=True, max_length=512)
|
||||||
labels = tokenizer(after_list, padding="max_length", truncation=True, max_length=512)
|
labels = tokenizer(after_list, padding="max_length", truncation=True, max_length=512)
|
||||||
model_inputs["labels"] = labels["input_ids"]
|
model_inputs["labels"] = labels["input_ids"]
|
||||||
|
Loading…
Reference in New Issue
Block a user