Replace broken int4 bundle with a working int8 build; rewrite card with measured numbers

#1
by mlboydaisuke - opened
LiteRT Community (FKA TFLite) org

Thanks for adding a CodeGemma bundle to the community catalog β€” I ran it as part of a pass running every catalog bundle locally on a Mac.

The published int4 file generates repetitive word-salad on both backends ("sophistic sophistic ..." on CPU, ';" ;"' on GPU; litert-lm 0.15.0 and 0.16.0, file sha256-verified against the Hub). I tried to rebuild int4 from google/codegemma-7b-it and both attempts (channelwise and block-32, two toolchain versions) collapse the same way β€” this checkpoint doesn't survive data-free int4 PTQ. An int8 export does generate correctly, so this PR replaces the broken file with that build and rewrites the card to match what's inside: measured M4 Max numbers, the desktop-class size stated plainly, and a note on why int4 isn't offered. Generation was verified on CPU and GPU before benchmarking.

If you'd rather keep this repo int4-only or handle it differently, happy to adjust β€” the working file is the main thing.

LiteRT Community (FKA TFLite) org

The card in this PR said a smaller build "will take a calibration-based method, not a recipe change" β€” I've now done that, so this PR restores the int4 the repo is named for. New commit adds codegemma-7b-it-int4.litertlm (4.8 GB): own symmetric GPTQ (group 128, desc_act=false, 256 calibration samples β€” 192 code + 64 English) ingested into the LiteRT export path via ai-edge-quantizer's dequantized_weight_recovery, so the calibrated rounding survives into the int4 blockwise bundle. The dequantized checkpoint's logits correlate 0.996 with base bf16 (top-1 identical on the smoke prompt), and the bundle generates correct, well-formed code on both CPU and GPU (math, Python, JavaScript, SQL, bug-fix and explanation prompts all answer correctly) β€” the failure mode this PR replaced ("sophistic" word-salad) is gone at int4 size. README updated with the int4 rows and the recipe (on GPU the int4 beats the int8 on every metric; on CPU its blockwise prefill is slower, so the card steers CPU-only users to the int8). The int8 build stays as the highest-quality option.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment