Closed reihig-ut closed 1 month ago
Thanks for pointing this out, #2248 will fix it
Thank you for your PR!
I retried the reproduction process on branch kto-conv-data-support
, I got this error:
/home/hoge/miniconda3/envs/run_kto/lib/python3.11/site-packages/trl/trainer/kto_trainer.py:479: UserWarning: When using DPODataCollatorWithPadding, you should set `max_length` in the KTOTrainer's init it will be set to `512` by default, but you should do it yourself in the future.
warnings.warn(
/home/hoge/miniconda3/envs/run_kto/lib/python3.11/site-packages/trl/trainer/kto_trainer.py:489: UserWarning: When using DPODataCollatorWithPadding, you should set `max_prompt_length` in the KTOTrainer's init it will be set to `128` by default, but you should do it yourself in the future.
warnings.warn(
/home/hoge/miniconda3/envs/run_kto/lib/python3.11/site-packages/trl/trainer/kto_trainer.py:519: UserWarning: When using DPODataCollatorWithPadding, you should set `remove_unused_columns=False` in your KTOConfig we have set it for you, but you should do it yourself in the future.
warnings.warn(
Traceback (most recent call last):
File "/home/hoge/project/test/trl/examples/scripts/kto.py", line 97, in <module>
trainer = KTOTrainer(
^^^^^^^^^^^
File "/home/hoge/miniconda3/envs/run_kto/lib/python3.11/site-packages/trl/trainer/kto_trainer.py", line 721, in __init__
super().__init__(
TypeError: Trainer.__init__() got an unexpected keyword argument 'processing_class'
Changing processing_class
to tokenizer
worked for me.
should be fixed now in main with latest transformer release
How much memory it needs to run the KTO script ? is using the KTO script must have a GPU memory more than 24G? i use the 4090 with 24G memory failed.
System Info
Information
Tasks
examples
folderReproduction
The script is the same as written in
examples/scripts/kto.py
.Then it says
I think
format_dataset
function inexamples/scripts/kto.py
is not sufficient to support the default datasettrl-lib/kto-mix-14k
, which possibly contains some examples withlen(example["completion"]) == 1
.Expected behavior
The script completes training.