Repository navigation
Support opt-in centered signed INT2 weights (zero point -0.5, levels {-1.5, -0.5, 0.5, 1.5} * scale; requires TFLite 2.23+). - #11772
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
litert_pr_1018485021
branch
5 times, most recently
from
November 17, 2026 03:42
3b011ce to
8c973f7
Compare
INT2) quantization (zero_point = -0.5) and N-D BlockwiseQuantization FlatBuffer serialization:
copybara-service
Bot
force-pushed
the
litert_pr_1018485021
branch
6 times, most recently
from
November 19, 2026 23:08
1f27c25 to
ff2b6e2
Compare
…{-1.5, -0.5, 0.5, 1.5} * scale; requires TFLite 2.23+).
- Add an opt-in `centered` algorithm param (default `False`) to MIN_MAX for signed symmetric 2-bit weights, preserving `float32` scales (`scale = max|w| / 1.5`).
- Accept a `-0.5` zero point for signed INT2 in `uniform_quantize` and broadcast scalar zero points in `broadcast_scale_zp_for_blockwise`.
- Serialize weights with fractional zero points as `BlockwiseQuantization` with `block_shape` and `FLOAT32` scale and zero-point tensors, updating `dequant_insert` to insert `DEQUANTIZE` before `quantize_tensor`.
- Bump the consumer op versions that `block_shape` needs (`FULLY_CONNECTED` 16/17, `EMBEDDING_LOOKUP` 6, and `DEQUANTIZE` 10) and reject unsupported built-in consumers.
LiteRT-PiperOrigin-RevId: 1018485021
copybara-service
Bot
force-pushed
the
litert_pr_1018485021
branch
from
November 23, 2026 20:06
ff2b6e2 to
31ccd59
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support opt-in centered signed INT2 weights (zero point -0.5, levels {-1.5, -0.5, 0.5, 1.5} * scale; requires TFLite 2.23+).
centeredalgorithm param (defaultFalse) to MIN_MAX for signed symmetric 2-bit weights, preservingfloat32scales (scale = max|w| / 1.5).-0.5zero point for signed INT2 inuniform_quantizeand broadcast scalar zero points inbroadcast_scale_zp_for_blockwise.BlockwiseQuantizationwithblock_shapeandFLOAT32scale and zero-point tensors, updatingdequant_insertto insertDEQUANTIZEbeforequantize_tensor.block_shapeneeds (FULLY_CONNECTED16/17,EMBEDDING_LOOKUP6, andDEQUANTIZE10) and reject unsupported built-in consumers.