mod gemma
This commit is contained in:
parent
b0525e303d
commit
b9d7a7adc5
6
gemma.py
6
gemma.py
|
|
@ -65,7 +65,7 @@ lora_config = LoraConfig(
|
|||
model = get_peft_model(model, lora_config)
|
||||
|
||||
# 7️⃣ Tokenizacja danych
|
||||
max_length = 128
|
||||
max_length = 1024
|
||||
|
||||
def tokenize_function(examples):
|
||||
return tokenizer(
|
||||
|
|
@ -85,10 +85,10 @@ training_args = TrainingArguments(
|
|||
eval_steps=500, # Ewaluacja co 500 kroków
|
||||
save_strategy="steps", # Zapis modelu co określoną liczbę kroków
|
||||
save_steps=500, # Zapis modelu co 500 kroków
|
||||
learning_rate=2e-5,
|
||||
learning_rate=1e-5,
|
||||
per_device_train_batch_size=2,
|
||||
per_device_eval_batch_size=2,
|
||||
num_train_epochs=5,
|
||||
num_train_epochs=32,
|
||||
weight_decay=0.01,
|
||||
load_best_model_at_end=True, # Wczytaj najlepszy model na końcu
|
||||
metric_for_best_model="loss", # Kryterium wyboru najlepszego modelu
|
||||
|
|
|
|||
Loading…
Reference in New Issue