You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]Support for repeat_interleave operation to enable Grouped Query Attention (GQA) #198
The PyTorchSim MLIR backend does not support the repeat_interleave
operation, which is required for Grouped Query Attention (GQA) used in
modern LLMs like Mixtral 8x7B and Llama 2. In GQA, the number of KV heads
(n_local_heads) is smaller than the number of Q heads (n_head), and
repeat_interleave is used to expand K/V tensors to match Q's head count
(e.g., k.repeat_interleave(n_head // n_local_heads, dim=1)).
The error occurs in PyTorchSimFrontend/mlir/mlir_common.py at line 682-683
in the extract_dividers function, which raises NotImplementedError("Not
supporting this view operation...!") when encountering index expressions
with multiple free symbols. The repeat_interleave operation generates a
FloorDiv indexing pattern (e.g., index // 4 for 4x repetition) that the
current implementation cannot handle.
Current workaround: Set n_local_heads = -1 (which defaults to n_head),
effectively disabling GQA and using standard Multi-Head Attention (MHA).
This loses the memory efficiency benefits of GQA (4-8x KV cache
reduction).
Affected models: Mixtral 8x7B, Llama 2 70B, and other models using GQA.
Thank you very much for your interest and for providing such a detailed, high-quality bug report.
We really appreciate the effort you put into identifying the specific cause in the MLIR backend.
I wanted to let you know that our team is currently looking into this issue.
We'll make sure to keep you updated on our progress.
Thank you for your patience and for helping us improve PyTorchSim!
Activity
YWHyuk commentedon Dec 22, 2025
Hi @Dignity-ghost,
Thank you very much for your interest and for providing such a detailed, high-quality bug report.
We really appreciate the effort you put into identifying the specific cause in the MLIR backend.
I wanted to let you know that our team is currently looking into this issue.
We'll make sure to keep you updated on our progress.
Thank you for your patience and for helping us improve PyTorchSim!
Merge pull request #221 from PSAL-POSTECH/develop
[CI] Register 5 previously-uncovered tests in pytorchsim_test.yml
[CI] Register 5 previously-uncovered tests in pytorchsim_test.yml
[CI] Register 5 previously-uncovered tests in pytorchsim_test.yml
[CI] Register 5 previously-uncovered tests in pytorchsim_test.yml