mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
fix tokenizer pad token generation warning
This commit is contained in:
parent
9960917b6a
commit
290fab575a
2 changed files with 3 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue