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 llama.py

Daniel Han0cab91489370
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 1a700c62da0..ab90d2cbb18 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -2308,7 +2308,7 @@ class FastLlamaModel:
vllm_fast_generate = model.fast_generate
vllm_fast_generate_batches = model.fast_generate_batches
- if len(modules_to_save) != 0:
+ if modules_to_save is not None:
raise NotImplementedError("Unsloth: Currently fast inference does not work with training embeddings or lm_head.")
if bias != "none":