llama : place Gemma 4 assistant attention heads with the shared target KV for -sm tensor (#33659)
The Gemma 4 assistant (MTP) model reads the KV cache of the last target layer
with own KV of each SWA type. With -sm tensor, the meta split rotation of the
assistant's attention heads was computed from its own layer index, while the
target's KV cache used the target's layer index, so for single-KV-head layers
the query heads and the KV ended up on different devices:
GGML_ASSERT(all_axes_none_or_mirrored) failed (FLASH_ATTN_EXT)
For Gemma 4 targets, count the layers with own KV from the end, so the KV of
the last layer of each SWA type always gets rotation 0, and use rotation 0 for
the assistant's attention tensors.
Fixes #33572
Assisted-by: Claude Opus 5.5