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.

Disable Flex Attention

Daniel Han6a1bef2c4ae5
diff --git a/unsloth/kernels/flex_attention.py b/unsloth/kernels/flex_attention.py
index 2fba359b776..08426b69e06 100644
--- a/unsloth/kernels/flex_attention.py
+++ b/unsloth/kernels/flex_attention.py
@@ -31,7 +31,7 @@ try:
create_block_mask as _create_block_mask,
)
_flex_attention = torch.compile(_flex_attention, dynamic = True, options = torch_compile_options)
- HAS_FLEX_ATTENTION = True
+ HAS_FLEX_ATTENTION = False
except:
HAS_FLEX_ATTENTION = False
pass