Update trainingscript.py

This commit is contained in:
Andrii Pervashov 2024-10-11 07:22:38 +00:00
parent f640bd9d1a
commit 9568905b57

View File

@ -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"]