Skip to content

Support centered INT2 in Hadamard mse_grid scale refinement. - #11773

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
litert_pr_1018485017
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
litert_pr_1018485017

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Support centered INT2 in Hadamard mse_grid scale refinement.

  • Refine centered INT2 scales (zero_point = -0.5) against the (q + 0.5) * scale reconstruction in both the grid search and the ALS steps. mse_grid used to reject them.
  • Make uniform_quantize_tensor.is_centered_int2_zero_point public.
  • Document centered for the Hadamard algorithms in hadamard_rotation.md and recipes/README.md.
  • Test that the result matches int2_in_int4=True and lowers the error.

@copybara-service
copybara-service Bot force-pushed the litert_pr_1018485017 branch 4 times, most recently from a787272 to 295f196 Compare November 17, 2026 03:41
@copybara-service copybara-service Bot changed the title Support centered 2-bit (INT2, zero_point = -0.5) quantization in hadamard_rotation scale refinement (scale_refinement="mse_grid") and update recipe and algorithm documentation: Support opt-in centered signed INT2 (zero_point = -0.5) quantization in hadamard_rotation MSE scale refinement (scale_refinement="mse_grid"), avoiding zero_point = 0 rounding and error mismatch. Nov 17, 2026
@copybara-service
copybara-service Bot force-pushed the litert_pr_1018485017 branch 4 times, most recently from 09030b8 to 1659489 Compare November 19, 2026 22:11
@copybara-service copybara-service Bot changed the title Support opt-in centered signed INT2 (zero_point = -0.5) quantization in hadamard_rotation MSE scale refinement (scale_refinement="mse_grid"), avoiding zero_point = 0 rounding and error mismatch. Support centered INT2 in Hadamard mse_grid scale refinement. Nov 19, 2026
@copybara-service
copybara-service Bot force-pushed the litert_pr_1018485017 branch 4 times, most recently from f9b9bfc to 95c6592 Compare November 20, 2026 00:15
- Refine centered INT2 scales (`zero_point = -0.5`) against the `(q + 0.5) * scale` reconstruction in both the grid search and the ALS steps. `mse_grid` used to reject them.
- Make `uniform_quantize_tensor.is_centered_int2_zero_point` public.
- Document `centered` for the Hadamard algorithms in `hadamard_rotation.md` and `recipes/README.md`.
- Test that the result matches `int2_in_int4=True` and lowers the error.

LiteRT-PiperOrigin-RevId: 1018485017
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