The package contains 2,077 indexed tensors. All 343 active text attention, MLP and per-layer projection
matrices use BFP4-valued weights, including 85 per-layer projections. Token and per-layer lookup tables, the
tied head and norms remain BF16. Inactive original encoder tensors and an explicit tied-head copy remain for
checkpoint completeness.
Table with columns: Quantity, Value| Quantity | Value |
|---|
| Original saved export | 17,257,039,013 bytes |
| Active text values, tied table counted once | 7,463,013,418 |
| Logical packed active text weights | 9,215,137,876 bytes |
| Average bits per active text value | 9.878 |
| Packed selected matrices plus all other stored tensors | 11,513,491,924 bytes |
The large BF16 lookup tables make the whole-text average higher than four bits. Safetensors preserve the
BF16-valued quantized weights for framework loading; the included helpers check their BFP4 packing.
Quickstart
Use a Transformers release that supports Gemma 4. This exact text-only framework example is checked with
Transformers 5.22.1:
import torchfrom transformers import AutoModelForImageTextToText, AutoTokenizer repo = "Xylolabs/gemma-4-E4B-it-Tenstorrent-Tensix-BFP4-PLE4-Cal4x"tokenizer = AutoTokenizer.from_pretrained(repo)model = AutoModelForImageTextToText.from_pretrained( repo, dtype=torch.bfloat16, device_map="cpu",)messages = [{"role": "user", "content": "What is 2 + 2?"}]inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, enable_thinking=False, tokenize=True, return_tensors="pt", return_dict=True,)with torch.no_grad(): output = model.generate(**inputs, max_new_tokens=32, do_sample=False)print(tokenizer.decode(output[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Framework loading uses the saved BF16-valued tensors, totaling about 17.22 GB before runtime buffers. The
included pack_tensix.py and verify_grid.py check the declared compressed formats. Host TT-NN packing requires
a configured architecture context, such as an upstream simulator environment; its format checks do not qualify
a complete native model runner.
Evaluation
The quantization accuracy check on the saved files passes on the host: 32/33 normal answers versus BF16’s 31/33, and 5/7 thinking
answers for both. Counted loss is zero. The gained normal item is ko-reason-balls. Both strict CLI
verdicts pass, with no near-tie exclusion or recovery pardon. Five original BF16 thinking items are eligible
for that gate; the raw denominator remains seven.
Table with columns: Saved-file check, Result| Saved-file check | Result |
|---|
| Original Q4_K_M chat KL | 0.199890 |
| This checkpoint chat KL | 0.100876313 |
| KL ratio to Q4_K_M | 0.504659 |
| Normal answers right | 32/33 |
| Thinking answers right | 5/7 |
| Counted lost or broken answers | 0 |
The original 32 evaluation sequences and 16,144 scored positions are read back. The accuracy check's KL uses the
original 16 chat sequences, 7,968 positions and all 262,144 vocabulary entries. All 33 normal and seven thinking prompt IDs,
generation budgets, stop IDs and frozen scoring rules remain unchanged. Stored BF16 log-probability values
match their original PT sources without a new reference forward.
All 343 selected matrices pass the exact grid check and TT-NN host packing round trips in BFP4 and BFP8,
including the global projection. The other 1,734 tensors match the pinned source. These format checks use an
offline upstream architecture context. They qualify the preserved weights and their formats. Native execution
requires compatible projection support and its own validation. Vision and audio task performance are not
evaluated here. Speed is not reported here.
License
Apache 2.0, as declared by the pinned Google release. The primary repository supplies no root legal file;
LICENSE contains the complete standard Apache Software Foundation text. NOTICE identifies the source, changes
and scope. Original Xylolabs helper code uses Apache 2.0 (CODE_LICENSE). Provided as is, without warranty or
upstream endorsement. Not affiliated with or endorsed by Tenstorrent.
Citation
Cite the original Google Gemma 4 E4B Instruct release and its
recommended technical report:
@misc{gemmateam2026gemma4, title={Gemma 4 Technical Report}, author={Gemma Team}, year={2026}, eprint={2607.02770}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2607.02770}, }