transformers
111462db - Fix Llama4 text models with `attention_chunk_size=None` (Llama Guard 4) (#50763)

Commit
21 hours ago
Fix Llama4 text models with `attention_chunk_size=None` (Llama Guard 4) (#50763) * Fix Llama4 text models with attention_chunk_size=None Llama Guard 4 sets attention_chunk_size to None, but the RoPE layers were still typed as chunked_attention, so building the cache or the chunked mask failed. Only mark layers as chunked when a chunk size is set, and only build the chunked mask when a layer uses it. * Build the chunked mask lazily like laguna; drop the standalone test
Author
Parents
Loading