-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'TrainingArguments' object has no attribute 'packing' #qlora, STFTrainer #unsloth #31280
Comments
Hi + from trl import SFTConfig
trainer = SFTTrainer(
model=model,
tokenizer=tokenizer,
train_dataset=train_data,
dataset_text_field="text",
max_seq_length=max_seq_length,
dataset_num_proc=2,
packing=False, # Can make training 5x faster for short sequences.
- args=TrainingArguments(
+ args=SFTConfig(
per_device_train_batch_size=2,
gradient_accumulation_steps=4,
warmup_steps=5,
max_steps=60, # Set num_train_epochs = 1 for full training runs
learning_rate=2e-4,
fp16=not is_bfloat16_supported(),
bf16=is_bfloat16_supported(),
logging_steps=1,
optim="adamw_8bit",
weight_decay=0.01,
lr_scheduler_type="linear",
seed=3407,
save_steps=1,
output_dir=output_dir,
),
) I will make sure |
It worked with SFTConfig. Thank you for your support! |
This issue seems to appear again in version 0.9.6. Is it that we have decided to not be backward compatible on this? cc. @younesbelkada |
Moving this to TRL as @younesbelkada is no longer with HF and they'll have the best knowledge of any changes or updates that have occurred |
Actually - seems like I can't move the issue there. Perhaps @lewtun would know? |
@Vincent-Li-9701 can you please share a reproducible example in e.g. a Google Colab? |
System Info
I use the SFTTrainer for my qlora fine-tuning for Mistral Instruct 2 model. I use unsloth to make my training faster. I have run the code multiple times before but today I got the AttributeError: 'TrainingArguments' object has no attribute 'packing' error immediatly.
Are there anyone who got the same error and know the solution?
Thank a lot!
I run my code on colab -T4
I have used the following libraries:
my error explanation also:
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
My code should run without error which is AttributeError: 'TrainingArguments' object has no attribute 'packing'
The text was updated successfully, but these errors were encountered: