fix tokenizer pad token generation warning

This commit is contained in:
51616 2024-12-24 13:44:51 +00:00
parent 9960917b6a
commit 290fab575a
2 changed files with 3 additions and 0 deletions

View file

@ -16,6 +16,8 @@ remove_unused_columns: false
# w/o this the trainer stores logits of all sample in memory...
batch_eval_metrics: true
per_device_train_batch_size: 128
per_device_eval_batch_size: 128
optim: schedule_free_adamw
learning_rate: 0.0001
lr_scheduler_type: "constant_with_warmup"

View file

@ -33,6 +33,7 @@ def get_model_and_tokenizer(
)
tokenizer = get_tokenizer(model_name_or_path, tokenizer_kwargs, peft_config, train)
model.config.pad_token_id = tokenizer.pad_token_id
model.generation_config.pad_token_id = tokenizer.pad_token_id
return model, tokenizer