Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions unsloth/models/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,11 @@ def from_pretrained(

if transformers_version < Version("4.53.0"):
raise RuntimeError("Unsloth: Gemma 3N only works on transformers >= 4.53.0" + LATEST)
elif "falcon-h1" in lowered_model_name:
os.environ["UNSLOTH_FORCE_CUSTOM_DTYPE"] = \
"float16;torch.float32;torch.float16;"\
"if name.endswith(('q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj', 'head')): module.to(torch.float16);"
os.environ["TRITON_F32_DEFAULT"] = "ieee"
Comment thread
danielhanchen marked this conversation as resolved.
else:
for check_model_name in DISABLE_COMPILE_MODEL_NAMES:
if check_model_name in lowered_model_name:
Expand Down