Skip to content

Fix GatherBlockQuantized node to support symmetric quantized LM_HEAD#1951

Merged
baijumeswani merged 1 commit into
mainfrom
sushraja-msft-gatherblockquantized-symmetric
Jan 22, 2026
Merged

Fix GatherBlockQuantized node to support symmetric quantized LM_HEAD#1951
baijumeswani merged 1 commit into
mainfrom
sushraja-msft-gatherblockquantized-symmetric

Conversation

@sushraja-msft
Copy link
Copy Markdown
Contributor

Today models created with

python -m onnxruntime_genai.models.builder -p int4 -e webgpu --extra_options shared_embeddings=true int4_algo_config=rtn_last int4_is_symmetric=true

have invalid GatherBlockQuanntized nodes because the zero point attribute of the node points to a non-existent tensor lm_head.MatMul.weight_zp.

This change fixes builder.py, so that we are selective about adding that attribute to the GatherBlockQuantized node.

Today models created with 

python -m onnxruntime_genai.models.builder -p int4 -e webgpu --extra_options shared_embeddings=true int4_algo_config=rtn_last int4_is_symmetric=true

have invalid GatherBlockQuanntized nodes because the zero point attribute of the node points to a non-existent tensor lm_head.MatMul.weight_zp. 

This change fixes builder.py, so that we are selective about adding that attribute to the GatherBlockQuantized node.
@baijumeswani baijumeswani merged commit 6cf92ae into main Jan 22, 2026
15 checks passed
@baijumeswani baijumeswani deleted the sushraja-msft-gatherblockquantized-symmetric branch January 22, 2026 02:43
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