transformers
a804c74a - Fix `AttributeError` on `s_aux=None` in `flash_attention_forward` (#45589)

Commit
92 days ago
Fix `AttributeError` on `s_aux=None` in `flash_attention_forward` (#45589) Guard `s_aux` cast in `flash_attention_forward` for sink-less models `flash_attention_forward` unconditionally called `s_aux.to(query.dtype)`, which crashed with `AttributeError: 'NoneType' object has no attribute 'to'` for models that don't use attention sinks (e.g. Gemma). Mirrors the parallel guard added in #40434 for `flash_paged.py`. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
Parents
Loading