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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Patch FalconH1RMSNorm to fix float64 compilation crash on Intel Arc DG2 (#6691)
Anmol Mishra3e43ed7b4afc
diff --git a/unsloth/models/falcon_h1.py b/unsloth/models/falcon_h1.pyindex b940c95c686..05bfd2ebb3c 100644--- a/unsloth/models/falcon_h1.py+++ b/unsloth/models/falcon_h1.py@@ -37,6 +37,8 @@ try:FalconH1DecoderLayer,FalconH1Model,FalconH1ForCausalLM,+ FalconH1RMSNorm,+ FalconH1RMSNormGated,FalconHybridMambaAttentionDynamicCache,)except:@@ -677,6 +679,18 @@ def fix_prepare_inputs_for_generation(module):module.prepare_inputs_for_generation = _fast_prepare_inputs_for_generation+class Unsloth_FalconH1RMSNorm(FalconH1RMSNorm):+ """fast_rms_layernorm (compiler-disabled, fp32 eps) avoids the float64 torch.compile RMSNorm kernel that fails on Intel Arc DG2 (issue #6555)."""++ def forward(self, hidden_states):+ return fast_rms_layernorm(self, hidden_states, gemma = False)+++def patch_falcon_h1_rms_layernorm():+ import transformers.models.falcon_h1.modeling_falcon_h1+ transformers.models.falcon_h1.modeling_falcon_h1.FalconH1RMSNorm = Unsloth_FalconH1RMSNorm++class FastFalconH1Model(FastLlamaModel):@staticmethoddef pre_patch():@@ -708,6 +722,8 @@ class FastFalconH1Model(FastLlamaModel):transformers.models.falcon_h1.modeling_falcon_h1.FalconH1RotaryEmbedding = (LlamaRotaryEmbedding)+ # Avoids the float64 RMSNorm compile kernel that fails on Intel Arc DG2 (issue #6555).+ patch_falcon_h1_rms_layernorm()return@staticmethod