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. |
||
|---|---|---|
| .. | ||
| qlora | ||
| saving | ||
| utils | ||
| __init__.py | ||
| test_model_registry.py | ||