#Colab Qwen3 phone deployment

9 messages · Page 1 of 1 (latest)

uncut lodge
#

When I run this colab notebook https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen3_(0_6B)-Phone_Deployment.ipynb with a Tesla T4 Google Colab instance as the documentation says, it breaks in the trainer = SFTTrainer(...) block because it says that T4 doesn't support bf16 precision, if I force it to fp16 in the block it says I'm trying to use fp16 precision with a bf16 model and it breaks, I also tried forcing dtype = torch.float16 in the model loading block, but nothing works.

TypeError Traceback (most recent call last)
/tmp/ipykernel_5419/3950185139.py in <cell line: 0>()
2
3 # creo el trainer
----> 4 trainer = SFTTrainer(

first error:
ValueError: bf16 mixed precision requires PyTorch >= 1.10 and a supported device.

second error:
TypeError: Unsloth: Model is in bfloat16 precision but you want to use float16 precision. Set fp16 to False and bf16 to True

limber hinge
#

will reply soon onces ive tested

uncut lodge
#

ok, tysm!

limber hinge
#

ran into the same error with the t4 gpu, and it is true that the model doesnt support fp16, only supports bfloat16, swapped to A100 and it works, since t4 doesnt support bfloat16 youll have to used paid gpu in colab. redbharold You could also try a local gpu if you have one and if they support bfloat16 but i would need to look into that as im not sure which cards support bfloat16, if you send me the name of the card you have locally if you have one i can look that up for you if youd like 🙂 hope this helps

uncut lodge
#

yes that is what I was suspecting, I was confused by the fact that the documentation said specifically that the code works on a T4

#

that is unfortunate, but thank you for the help!

limber hinge
#

and sorry that it didnt work, hope you find a way that works for ya

uncut lodge
#

No worries, have a good day!