Fix config stamping when SDPA is not supported

When supports_sdpa=False and the attention hierarchy selected sdpa,
the kwarg was deleted but config._attn_implementation remained as
"sdpa". Stamp it to "eager" for consistency before deleting the kwarg.
This commit is contained in:
Daniel Han 2026-03-31 17:29:07 +00:00
commit 405bb58284

View file

@ -639,6 +639,7 @@ class FastBaseModel:
print(
f"Unsloth: {model_type_arch.title()} does not support SDPA - switching to fast eager."
)
_set_attn_impl(auto_config, "eager")
del kwargs["attn_implementation"]
bnb_config = None