Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

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

DoubleMathewbd32b2fd66a3
diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py
index a95a54b59dd..683f2b1872b 100644
--- a/unsloth/models/loader.py
+++ b/unsloth/models/loader.py
@@ -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;"\