Issue with Deprecated Arguments in AutoTrain Advanced for LLaMA 3 (70B) - DPO

#59
by GuusBouwensNL - opened

Hello Hugging Face Community,

I am currently fine-tuning a LLaMA 3 model using AutoTrain Advanced on the Hugging Face platform. However, I encountered an issue related to deprecated arguments. Here are the details of my setup and the error messages:

  • Base Model: meta-llama/Meta-Llama-3-70B-Instruct
  • Task: LLM DPO
  • Hardware: Local/Space -> 4xL4
  • Parameter Mode: Full

Error Message:

INFO     | 2024-06-28 12:25:00 | autotrain.trainers.clm.train_clm_dpo:train:57 - Using PEFT, model_ref will be set to None
INFO     | 2024-06-28 12:25:00 | autotrain.trainers.clm.train_clm_dpo:train:78 - model dtype: torch.float16
INFO     | 2024-06-28 12:25:00 | autotrain.trainers.clm.train_clm_dpo:train:95 - creating trainer
/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py:100: FutureWarning: Deprecated argument(s) used in '__init__': max_length, max_prompt_length. Will not be supported from version '1.0.0'.

Deprecated positional argument(s) used in DPOTrainer, please use the DPOConfig to set these arguments instead.
  warnings.warn(message, FutureWarning)
ERROR    | 2024-06-28 12:25:01 | autotrain.trainers.common:wrapper:120 - train has failed due to an exception: Traceback (most recent call last):
  File "/app/env/lib/python3.10/site-packages/autotrain/trainers/common.py", line 117, in wrapper
    return func(*args, **kwargs)
  File "/app/env/lib/python3.10/site-packages/autotrain/trainers/clm/__main__.py", line 38, in train
    train_dpo(config)
  File "/app/env/lib/python3.10/site-packages/autotrain/trainers/clm/train_clm_dpo.py", line 103, in train
    trainer = DPOTrainer(
  File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "/app/env/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 174, in __init__
    if args.model_init_kwargs is None:
AttributeError: 'TrainingArguments' object has no attribute 'model_init_kwargs'

Request for Assistance:

I am seeking guidance on how to properly configure the DPOTrainer using the DPOConfig within the AutoTrain Advanced interface or through a custom configuration file. Specifically, how can I resolve the deprecated argument issue (max_length, max_prompt_length) and the model_init_kwargs attribute error?

Here is a screenshot of my current setup in AutoTrain Advanced:

image.png

Thank you in advance for your help!

Best regards,
Guus Bouwens

GuusBouwensNL changed discussion status to closed
GuusBouwensNL changed discussion status to open

@GuusBouwensNL Did you ever find a solution to this problem? I am currently facing the same exact issue with Llama 3.1 8B DPO

downgrading trl==0.8.1 works for me

Sign up or log in to comment