Skip to content

Rope Fix for single subfunction signature#816

Open
abhishek-singh591 wants to merge 25 commits intoquic:mainfrom
abhishek-singh591:rope_fix
Open

Rope Fix for single subfunction signature#816
abhishek-singh591 wants to merge 25 commits intoquic:mainfrom
abhishek-singh591:rope_fix

Conversation

@abhishek-singh591
Copy link
Contributor

@abhishek-singh591 abhishek-singh591 commented Feb 26, 2026

Summary

This PR introduces the Rotary Position Embedding (RoPE) fix, ensuring that models generate a single unified subfunction signature during ONNX export.

Models Status After Applying the Fix

Models now producing a single subfunction signature

All causal LMs tested in the associated test file are functioning correctly, except those listed below.

Models still producing two different subfunction signatures

The following models continue to emit multiple subfunction signatures and require additional investigation:

  • Phi-1
  • StarCoder2
  • CodeGen

Models with issues unrelated to the RoPE fix

These models have separate problems that need to be addressed independently:

  • Granite-MoE
  • GPT-OSS
  • Mixtral

Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
@abhishek-singh591 abhishek-singh591 marked this pull request as draft February 27, 2026 06:59
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
@vbaddi
Copy link
Contributor

vbaddi commented Mar 4, 2026

nit: pls run the lint and format.
Can we move this from draft to review-ready stage and check the CI status? @quic-rishinr

Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
@abhishek-singh591 abhishek-singh591 marked this pull request as ready for review March 18, 2026 18:40
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
all_self_attentions = () if output_attentions else None
all_hidden_states = () if output_hidden_states else None

rotary_emb = QEffFalconRotaryEmbedding(config=self.config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move out of forward method and put it in qeff_init of QEffFalconModel class?

Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants