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
originally from email:
Hello there!
First of all, Im a huge fan of unsloth studio and as of now only ever used the web GUI version. I recently was trying to fully finetune models like qwen3.5, qwen1.5 and one of my own models with custom architecture. Now it always gives me this error: Model is in bfloat16 precision but you want to use float16 precision. Set fp16 to False and bf16 to True That is quite annoying because it doesnt even make sense, my config file has torch_dtype set to float16, when I set it to bfloat16 it gives me the same error. What do I do now? How can I fix it or is this a known issue? Im not sure where I should set fp16 to false and bf16 to true either.
Thanks, with love
An anonymous user from the web
Hi @shimmyshimmer, thanks for reporting this! The issue is a bug in unsloth's RL training code. When doing full fine-tuning (FFT) with a bfloat16 model, the code validates the fp16/bf16 settings in TrainingArguments before it has a chance to correct them automatically. So if your TrainingArguments happens to have fp16=True (which is a common default), it raises that error even though the code would have fixed it for you downstream.
The fix is to skip this validation when full finetuning is active, since the corrective logic already handles bfloat16 models correctly by disabling autocasting entirely. A PR with the fix should be up soon. In the meantime, you can work around it by explicitly setting fp16=False and bf16=False in your TrainingArguments when doing full finetuning.
Hope that helps!
Activity
InfoSage05 commentedon Jul 2, 2026
Hi @shimmyshimmer, thanks for reporting this! The issue is a bug in unsloth's RL training code. When doing full fine-tuning (FFT) with a bfloat16 model, the code validates the fp16/bf16 settings in
TrainingArgumentsbefore it has a chance to correct them automatically. So if yourTrainingArgumentshappens to havefp16=True(which is a common default), it raises that error even though the code would have fixed it for you downstream.The fix is to skip this validation when full finetuning is active, since the corrective logic already handles bfloat16 models correctly by disabling autocasting entirely. A PR with the fix should be up soon. In the meantime, you can work around it by explicitly setting
fp16=Falseandbf16=Falsein yourTrainingArgumentswhen doing full finetuning.Hope that helps!
Fix: skip fp16/bf16 validation for full finetuning in RL trainers
Guard Windows ROCm torchao override skip (#6837)