unsloth/tests/utils
google-labs-jules[bot] 76376d37f0 Fix attention masking with Flash Attention Dense backend
Modified `select_attention_backend` to prioritize SDPA when an attention mask is provided, bypassing `FLASH_DENSE` which ignores arbitrary attention masks (supporting only causal masks). This fixes a regression where padded tokens were attended to during inference or standard SFT with padding.

Updated all model files (`llama.py`, `cohere.py`, `gemma2.py`, `mistral.py`, `qwen3.py`, `falcon_h1.py`, `granite.py`) to propagate the presence of an attention mask to the backend selection logic.
2025-12-06 03:10:38 +00:00
..
__init__.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
aime_eval.md reroute merge logic language models + comprehensive tests + eval kits (#2673) 2025-06-02 20:32:57 -07:00
aime_eval.py Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
cleanup_utils.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
data_utils.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
hf_utils.py Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" 2025-12-01 07:24:58 -08:00
ocr_eval.md Fix Typos in Documentation and Comments (#2721) 2025-06-17 04:34:51 -07:00
ocr_eval.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
os_utils.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
perplexity_eval.md reroute merge logic language models + comprehensive tests + eval kits (#2673) 2025-06-02 20:32:57 -07:00
perplexity_eval.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00
test_attention_masks.py Fix attention masking with Flash Attention Dense backend 2025-12-06 03:10:38 +00:00
test_packing.py Fix attention masking with Flash Attention Dense backend 2025-12-06 03:10:38 +00:00
test_qat.py Revert "[FIX] Vllm guided decoding params (#3662)" 2025-12-01 05:43:45 -08:00