A version-specific clarification for @jacobvinje and future readers: in Transformers 4.48.3, seeing LlamaAttention in print(model) does not by itself mean SDPA is disabled.
In that version, LlamaAttention.forward selects its attention function internally using self.config._attn_implementation. The implementation is visible in the v4.48.3 source.
For an existing loaded model, this is a useful first check:
print(model.config._attn_implementation)
That reports the configured implementation, not proof of the GPU kernel actually executed. In this version, requesting output_attentions=True with SDPA triggers an eager-attention fallback. A profiler is needed to verify the executed operations and any memory implications.
So the unchanged class name is consistent with SDPA being selected; it is not, on its own, a reproducible backend failure. This clarification does not establish the cause of the separate memory issue you reported.
For a fuller explanation, I also maintain a free Transformer guide (English and Spanish). The KV-cache chapter explains the memory budget and why fitting in memory, retaining attention mass and preserving task quality are separate questions.