unsloth/unsloth/models
Daniel Han 6f3e52bbcf Prefer flex attention when available (#3979)
* Enable flex attention by default

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Avoid dropping flex attention when SDPA unsupported

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-05 03:19:04 -08:00
..
__init__.py add FastSentenceTransformer for easily finetuning SentenceTransformer models (#3719) 2026-01-22 07:35:55 -08:00
_utils.py Prefer flex attention when available (#3979) 2026-02-05 03:19:04 -08:00
cohere.py Improve TRL compatibility and GRPO state restore 2026-01-05 07:02:36 +00:00
dpo.py Formatting & bug fixes (#3563) 2025-11-07 06:00:22 -08:00
falcon_h1.py Fix correctness bugs across multiple model files (#3813) 2026-01-01 02:36:33 -08:00
gemma.py Improve TRL compatibility and GRPO state restore 2026-01-05 07:02:36 +00:00
gemma2.py Improve TRL compatibility and GRPO state restore 2026-01-05 07:02:36 +00:00
granite.py Improve TRL compatibility and GRPO state restore 2026-01-05 07:02:36 +00:00
llama.py Prefer flex attention when available (#3979) 2026-02-05 03:19:04 -08:00
llama4.py Qwen 3 2025-05-02 03:09:44 -07:00
loader.py Use standard gradient checkpointing for small sequence lengths (#3867) 2026-02-02 23:57:09 -08:00
loader_utils.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-01-08 04:15:17 +00:00
mapper.py FunctionGemma 2025-12-18 09:27:46 -08:00
mistral.py Fix Boolean value of Tensor ambiguity error in mistral.py (#3790) 2025-12-28 21:30:55 -08:00
qwen2.py Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
qwen3.py SFT sample packing (#3566) 2025-12-09 17:36:45 -08:00
qwen3_moe.py Fix correctness bugs across multiple model files (#3813) 2026-01-01 02:36:33 -08:00
rl.py Trl 0.27.0 update (#3965) 2026-02-04 23:01:16 -08:00
rl_replacements.py Trl 0.27.0 update (#3965) 2026-02-04 23:01:16 -08:00
sentence_transformer.py add FastSentenceTransformer for easily finetuning SentenceTransformer models (#3719) 2026-01-22 07:35:55 -08:00
vision.py Prefer flex attention when available (#3979) 2026-02-05 03:19:04 -08:00