You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An officially supported task in the examples folder
My own task or dataset (give details below)
Reproduction
I encountered a troubling issue while running the XPO program: the first 500 steps ran smoothly, but suddenly, an error occurred in the middle, as shown below:
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
21%|█████████████████▎ | 499/2361 [7:31:45<28:06:19, 54.34s/it]Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
21%|█████████████████▎ | 500/2361 [7:32:39<28:04:17, 54.30s/it]Traceback (most recent call last):
File "/llm-align/trl/xpo.py", line 118, in<module>trainer.train()
File "/llm-align/miniconda3/envs/trl/lib/python3.10/site-packages/transformers/trainer.py", line 2112, in train
return inner_training_loop(
File "/llm-align/miniconda3/envs/trl/lib/python3.10/site-packages/transformers/trainer.py", line 2533, in _inner_training_loop
self.control = self.callback_handler.on_step_end(args, self.state, self.control)
File "/llm-align/miniconda3/envs/trl/lib/python3.10/site-packages/transformers/trainer_callback.py", line 496, in on_step_end
return self.call_event("on_step_end", args, state, control)
File "/llm-align/miniconda3/envs/trl/lib/python3.10/site-packages/transformers/trainer_callback.py", line 518, in call_event
result = getattr(callback, event)(
File "/llm-align/trl/trl/trainer/callbacks.py", line 404, in on_step_end
tokenizer = kwargs["tokenizer"]
KeyError: 'tokenizer'
Prior to this, the LogCompletionsCallback function was running normally and produced the following records:
[
{
"prompt": "create a table with 5 meals per day for 2 days, this is prepared for a 20 year old female. \nit sould be vegan, i should not contain nuts.\nshow a table with the meal, description, calorie count \nshow it in this style:\nDay n\nMeal n: meal name\n\nn ingredient\nn ingredient\nn ingredient\nn calories"
},
{
"prompt": "In this task you will be given a list of integers. You should find the maximum absolute difference between 2 integers in the list. The absolute difference is the absolute value of one integer subtracted by another. The output should be a single integer which is the largest possible absolute distance.\nQ: [31, 28, -27]\nA:"
},
...
]
Could you please advise on how to resolve this bug? Thanks
dataset=load_dataset('json', data_files={'train': '/llm-align/ultrafeedback-prompt-train.json',
'test': '/llm-align/ultrafeedback-prompt-test.json'}) # use local datasettrainer=XPOTrainer(
model=model,
ref_model=ref_model,
reward_model=reward_model,
args=training_args,
train_dataset=dataset['train'],
eval_dataset=dataset['test'],
processing_class=tokenizer,
peft_config=get_peft_config(model_config), # add this line
)
model.save_pretrained(training_args.output_dir) # save lora model
Expected behavior
NO
The text was updated successfully, but these errors were encountered:
System Info
Information
Tasks
examples
folderReproduction
I encountered a troubling issue while running the XPO program: the first 500 steps ran smoothly, but suddenly, an error occurred in the middle, as shown below:
Prior to this, the LogCompletionsCallback function was running normally and produced the following records:
I use trl-lib/ultrafeedback-prompt](https://huggingface.co/datasets/trl-lib/ultrafeedback-prompt) prompt only dataset like this:
Could you please advise on how to resolve this bug? Thanks
More Info
my script is:
and I revise the offcial xpo.py as fllow:
Expected behavior
NO
The text was updated successfully, but these errors were encountered: