Update CSM for faster inference (no compile) (#2865)

This commit is contained in:
DoubleMathew 2025-07-02 18:59:56 -05:00 committed by GitHub
commit b347ec5ae4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -561,6 +561,7 @@ class FastModel(FastBaseModel):
raise RuntimeError("Unsloth: Cohere's Command model only works on transformers >= 4.50.0." + NIGHTLY)
# Sesame
elif "csm-1b" in lowered_model_name:
os.environ["UNSLOTH_COMPILE_DISABLE"] = "1" # Inference is too slow
os.environ["UNSLOTH_DISABLE_STATIC_GENERATION"] = "1" # Sesame fails
os.environ["UNSLOTH_FORCE_CUSTOM_DTYPE"] = \
"all;torch.float32;torch.float16;"\