Skip to content

[quantization] Support int16->mxint8 Quantize - #1077

Open
mhs4670go wants to merge 5 commits into
Samsung:mainfrom
mhs4670go:mx
Open

mhs4670go wants to merge 5 commits into
Samsung:mainfrom
mhs4670go:mx

Conversation

@mhs4670go

Copy link
Copy Markdown
Contributor

This commit supports int16->mxint8 Quantize.

TICO-DCO-1.0-Signed-off-by: seongwoo mhs4670go@naver.com

Keep logical requantization across affine/MX views and reuse block-preserving axis mapping. Validate both MX BMM operands and supported formats before dtype shortcuts; preserve MX linear output conversion to the INT16 residual stream.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
Return fresh contiguous eager and fake outputs with canonical strides, including partial blocks, singleton and empty dimensions. Preserve residual users and export-only logical MX operators without performing quantization in fake kernels.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
Keep producer-owned affine KV storage and independent affine reads from main. Align current V to the read grid, concatenate complete attention V, then apply sequence-axis MXINT8 once. Preserve affine computation and storage returns, restrict unsupported MX cache policies, and persist MX compute policy in cache observer state.

Cover actual cached adapter calibration, both layouts and shared consumers, mixed-policy state restoration, S=32 prefill and 31+1 decode Circle storage interfaces, and exact eager/export parity. The built-in reference still explicitly rejects unsupported MX value codecs.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
Apply the past observer only to existing KV. Keep current V on its producer grid and apply MX once to the full concatenated V, without adding read-grid rounding or clipping to current tokens.

Reuse FoldQuantOps float-input preservation for incompatible affine concat domains before MX, including intervening views. Retain each source qparam through explicit Dequantize inputs and keep the same-domain integer concat and affine compute paths unchanged. Add numerical Circle-prefix and actual Gemma4 regressions for independent grids, current outliers, cached calibration, and storage preservation.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
Apply the formatting required by the current main branch after rebasing the MX changes. Keep all test behavior and assertions unchanged.

TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>

This branch has not been deployed

No deployments
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.

1 participant