Skip to content

Align the default 2-bit quantization policy with TFLite kernel support: - #11988

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

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

Conversation

@copybara-service

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

Copy link
Copy Markdown

Align the default 2-bit quantization policy with TFLite kernel support:

  • Remove CONV_2D from dynamic_wi2_afp32, since TFLite CONV_2D kernels do not support INT2 weights.
  • Add EMBEDDING_LOOKUP to dynamic_wi2_afp32_blockwise.
  • Add weightonly_wi2_afp32 (channelwise/tensorwise, symmetric and asymmetric) policy for FULLY_CONNECTED and EMBEDDING_LOOKUP.
  • Add end-to-end TFLite interpreter execution tests in recipe_test covering weightonly_wi2_afp32 (CHANNELWISE and TENSORWISE on FULLY_CONNECTED) and dynamic_wi2_afp32_blockwise (BLOCKWISE_32 on EMBEDDING_LOOKUP), and policy validation tests rejecting unsupported 2-bit blockwise weight-only configs.

@copybara-service
copybara-service Bot force-pushed the litert_pr_1023320191 branch 3 times, most recently from 3f0fa5a to d33a3ee Compare November 19, 2026 23:05
- Remove `CONV_2D` from `dynamic_wi2_afp32`, since TFLite `CONV_2D` kernels do not support INT2 weights.
- Add `EMBEDDING_LOOKUP` to `dynamic_wi2_afp32_blockwise`.
- Add `weightonly_wi2_afp32` (channelwise/tensorwise, symmetric and asymmetric) policy for `FULLY_CONNECTED` and `EMBEDDING_LOOKUP`.
- Add end-to-end TFLite interpreter execution tests in `recipe_test` covering `weightonly_wi2_afp32` (`CHANNELWISE` and `TENSORWISE` on `FULLY_CONNECTED`) and `dynamic_wi2_afp32_blockwise` (`BLOCKWISE_32` on `EMBEDDING_LOOKUP`), and policy validation tests rejecting unsupported 2-bit blockwise weight-only configs.

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