SiliGemma-4-E2B-FormA (ahrazzle/SiliGemma-4-E2B-FormA)
SiliGemma-4-E2B-FormA is the Standard-Stack transformers from_pretrained load (Form A) A_16 lattice quantization and zero-backprop evolution-strategy-adapted release of google/gemma-4-E2B-it in lossless siliquant-hf-v1 format (H1_L10_27_Anchor, seed=1753). Designed alongside the bare-metal sm_86 sibling ahrazzle/SiliGemma-4-E2B-FormB-Native, it runs with 0 Extended Hamming syndrome errors, 0 out-of-bounds groups, 0.0 cold-reload Countdown NLL drift, +0 B inference sidecar overhead, and 0 B VRAM for Per-Layer Embeddings.
This release introduces four key architectural and empirical advances:
- Upstream
Gemma4Tokenizerbos_token_id = 2Grounding (-6.4530nats) – Enforcing explicit leadingbos=2on every sequence prevents severe context ungrounding, restoringWT2_test[0]NLL from11.101388 -> 4.648381nats (-6.453007nats) andCountdown_test[:16]from2.376752 -> 1.325589nats (-1.051164nats). 276LiveA_16 Block-H4Linears &60Dead KV Tensors Pruned – Quantizes all276active 2D text linears (1,876,819,968weights) into[16, 11, 4]Extended HammingA_16 Block-H4(g=128,k_bits=4, $R^2=5213$ $L_2$ ball + sparse CSR overflowqov_*,1,203,427,606 B=5.1296quantized-linear bpw) while cleanly pruning60structurally dead KV-sharing tensors (20 x (k_proj, v_proj, k_norm),18,880,512params) inL15..34.0 BVRAM CPU-Pinned Per-Layer Embeddings (PLE) – Keeps the262,144 x 8,960BF16embed_tokens_per_layermatrix (4,697,620,480 B=4.375 GiB) pinned in host CPU RAM, reserving0 BGPU VRAM while streaming17,920 B/token.- Exact
L0..L9Prefix Hoisting &L10..L1420xshared_KVHub – Hoisting frozenL0..L9(10/35 = 28.57%layers,1xnon-reuse mode) yields0.0max abs logit error across both unperturbed and adapted rollouts and1.265x–1.266xmedian AB/BA suffix speedup, withL10..L14serving all20upper consumer layersL15..34.
Models Overview
Every 16-element weight vector $y \in A_{16} = 2\mathbb{Z}^{16} + C_{[16, 11, 4]}$ is stored via qham11 (11 systematic information bits reconstructing the 5 parity coordinates \{0, 1, 2, 4, 8\}), packed 4-bit quotients (qquot), sparse CSR overflow tuples (qov_*), and IEEE-754 bit-exact scales_fp16_bits. Untouched BF16 embeddings and 262 FP32 norm/scalar vectors (285,987 params) preserve full boundary precision.
| Property | Specification |
|---|---|
| Base Model | google/gemma-4-E2B-it (35 text layers, bos_token_id=2, stop IDs [1, 106, 50]) |
| Format & Recipe | siliquant-hf-v1 (H1_L10_27_Anchor, A_16 Block-H4, FT_PIWL, seed=1753) |
| Quantized Linear Coverage | 276 live linears (1,876,819,968 weights, 1,203,427,606 B / 5.1296 quant bpw); 60 dead L15..34 KV tensors pruned |
| Error-Correcting Code | Extended Hamming [16, 11, 4] SECDED (0 parity errors across 117,301,248 blocks, 0 OOB groups, 276 finite positive scales) |
Artifact Footprint (model.safetensors) | 6,707,744,322 B (incl. 4,697,620,480 B CPU-pinned PLE, 805,306,368 B tied embed_tokens, 1,143,948 B FP32 norms, 245,920 B header) |
Hardware Envelope (RTX 3080) | 5,019.9 MiB peak allocated VRAM (<= 5,939.2 MiB), 5,498.0 MiB peak reserved (< 6,144.0 MiB), 480.72 s GPU wall, 0 B teardown alloc |
Verified model.safetensors SHA-256 | a577b9ab55c36e5edb7140cf6477c8fbf957597ecfa5f30f4daed8c1f5290225 |
Benchmark Results & Pareto Evaluations
All empirical runs were executed on an NVIDIA GeForce RTX 3080 Laptop GPU (8,192 MiB, sm_86) with 0 B backpropagation activations, +0 B inference sidecar, 0 SECDED errors, and explicit bos=2 enforcement across identical held-out splits (WT2_test 16 x 256, Countdown_test 128, GSM8K_OOD 64):
| Configuration / Arm | Adapted Scope | WT2_test NLL (vs Base) | CD_test GT NLL (Pass@1) | GSM8K_OOD Gold NLL (Pass@1) | Notes & Acceptance |
|---|---|---|---|---|---|
H0_Base_A16 (35L frozen A_16) | 276 live linears (2,932.0 MiB VRAM) | 5.116801 | 1.397878 (10.94%) | 1.846517 (45.31%) | FroMSE = 2.742e-6, cross-run H0 diff 0.0 |
H1_L10_27_Anchor (3-seed mean 1751/1752/1753) | 46 linears (L10..27, d=638,976, 0 valves) | 5.039570 (-0.077231) | 1.253168 (11.98%) | 1.734985 (-0.111532, 43.23%) | 4/4 steps accepted on 3/3 seeds (CD CI95 [+0.1282, +0.1616], p=1e-4) |
H1_L10_27_Anchor (seed=1753, Shipped Release) | 46 linears (L10..27, +0 B sidecar) | 4.945025 (-0.171776) | 1.240732 (11.72%) | 1.681543 (-0.164974, 43.75%) | reload_diff = 0.0, 0 SECDED (s1751=1.241075, s1752=1.277698) |
H2_KVHub_Plus_Sanctuary (valve_sigma=0.003) | 47 linears (L10..14 + L25..33, + 107,534 FP32 valves) | 4.895686 (-0.221115) | 1.293634 (11.46%) | 1.679504 (-0.167013, —) | Accepted 2/2/0 steps; s1752 CD=1.169189 (13.28%), s1751/s1753 hit probe KL spikes 0.99..3.08 |
H2_KVHub_Sanctuary_CalmValves (valve_sigma=0.0005) | 47 linears (d=572,416 + 107,534 FP32 valves) | 4.922321 (-0.194480) | 1.300269 (11.20%) | 1.669843 (-0.176674, 38.54%) | Accepted 2/2/0 steps; s1752 CD=1.188619 (14.84%, WT2=4.809175), s1753 rejected (eta_valve_max=0.0025) |
Energy Efficiency & Power Profile
| Hardware Target | Workload / Regime | Avg Power (W) | Energy / Token (J/tok) | Efficiency (tok/J) | Run Energy (Wh/run) | Measurement Status |
|---|---|---|---|---|---|---|
NVIDIA GeForce RTX 3080 Laptop GPU (8 GiB) | H1_L10_27_Anchor ES + held-out eval (480.72 s wall, 5,019.9 MiB peak) | Not recorded | Not recorded | Not recorded | Not recorded | Not recorded (NVML telemetry absent in release receipt; uncontrolled single-laptop run) |
[!NOTE] Energy readings are not guaranteed to be consistent due to uncontrollable variables (thermal state, ambient temperature, fan curve, and dynamic power limits).
Getting Started
Requires torch >= 2.3, transformers >= 5.0, < 6.0, and safetensors (verify-manifest and stdlib self-test require zero third-party packages). Because standard upstream AutoModelForCausalLM.from_pretrained does not natively stream siliquant-hf-v1 containers into Gemma4TextModel with CPU-pinned PLE and explicit bos=2 enforcement, use the bundled siligemma_forma_loader.py:
from pathlib import Path
import torch
from siligemma_forma_loader import encode_with_bos, load_gemma4_forma_text_model
device = "cuda" if torch.cuda.is_available() else "cpu"
model, tokenizer, receipt_info = load_gemma4_forma_text_model(Path("."), device=device)
prompt_ids = encode_with_bos(tokenizer, "Solve Countdown using +, -, *, /: [5, 7, 2, 3] -> 29")
input_ids = torch.tensor([prompt_ids], dtype=torch.long, device=device)
with torch.inference_mode():
out = model(input_ids=input_ids, use_cache=False)
logits = 30.0 * torch.tanh(
torch.nn.functional.linear(out.last_hidden_state[:, -1:, :], model.embed_tokens.weight) / 30.0
)
print("Next token ID:", int(logits.argmax(dim=-1).item()))
hf download ahrazzle/SiliGemma-4-E2B-FormA --local-dir ./SiliGemma-4-E2B-FormA
cd ./SiliGemma-4-E2B-FormA
# 1. Verify SHA256SUMS + receipt manifest (pure stdlib, < 50 MiB RAM)
sha256sum -c SHA256SUMS
python3 -B siligemma_forma_loader.py verify-manifest .
# 2. Stream-verify qham11 zero-padding, CSR bounds, & A_16 lattice reconstruction (< 300 MiB RAM)
python3 -B siligemma_forma_loader.py verify-syndromes .
# 3. Deterministic CPU self-test
python3 -I -B siligemma_forma_loader.py self-test
Custom Infrastructure Stack & Source Repositories
| Stack Layer | Component | Role in SiliGemma Form A | Public Repository |
|---|---|---|---|
| SiliGemma Engine | SiliGemma | Gemma-4 Form A/B architecture, bos=2 guard, L10..14 hub, & L25..33 0 B-KV loop verification | Moissanite-Labs/siligemma |
| Lattice Quantization & ECC | SiliQuant | [16, 11, 4] Extended Hamming A_16 + Block-H4 lattice quantization & siliquant-hf-v1 format | Moissanite-Labs/siliquant |
| Bare-Metal Silicon Kernels | SiliKernels | Zero-spill Ampere sm_86 dp4a CUDA & Intel AVX-512 kernels | Moissanite-Labs/silikernels |
| Verified Zero-Spill Compiler | HoloEmit | Pure-Init Lean 4.36.0 compiler targeting zero-spill sm_86 PTX & AVX-512 [16, 11, 4] decoders | Moissanite-Labs/holoemit |
| Metrology & Telemetry | SiliSense | Pure-stdlib silicon physics metrology & fault-canary telemetry | Moissanite-Labs/silisense |
| Bounded Adaptation & Rollback | ML Weft / Weft-Loom | Deterministic weight-space bounds & zero-drift rollback | Moissanite-Labs/weft · Moissanite-Labs/weft-loom |
| Workbench OS & Exoskeleton | ML-OS / Aletheion | Research workbench OS & host hardware exoskeleton | Moissanite-Labs/ml-os · Foundation-0/aletheion |
| Verification & Audit Harness | Aletheia | Isolated execution parity, fail-closed verification gates, mutation auditing, & leak scanning | Foundation-0/aletheia |
| Five-Layer Stack Blueprint | Siliconcordat | Open L1–L5 stack specification (loom · weft · warp · exo · mde) | siliconcordat/.github |
Usage, Scope & Honest Limitations
- Hypothesis Selection & Selective Promotion (
2/3Gates Cleared) – Whilebos=2grounding,0-error SECDED/VRAM gating, andL0..L91xprefix hoisting (0.0drift,1.265x–1.266xspeedup) passed across both replication campaigns (646.68 sand480.72 s), theH2_KVHub_Sanctuary_CalmValves(valve_sigma=0.0005) hypothesis was falsified under pre-registered acceptance thresholds (failing to outperformH1on3/3seeds or reachCD Pass@1 >= 15%). Accordingly, this repository ships the verified winning armH1_L10_27_Anchor(seed=1753). - Text-Only Language Model Export – Vision and audio towers from
google/gemma-4-E2B-itare omitted frommodel.safetensors(model.language_model.*only), whileconfig.jsonretains upstreamvision_config/audio_configkeys fortransformersschema compatibility. - Explicit
bos=2& Stop IDs – Always prependbos_token_id = 2(viaencode_with_bosor explicit[2, ...]); omitting it degradesWT2by+6.453nats.generation_config.jsonretains upstream stop IDs[1, 106, 50]. - Baseline Reference Note –
H0_Base_A16reportsWT2=5.116801under theForm Aquantizer (g=128); the companion bare-metal Form B verification reference quantizer reportedWT2=5.118627on the same16 x 256evaluation split, and an earlier pre-KV-pruning Form A checkpoint measured1,203,561,445 Bquantized bytes vs1,203,427,606 Bshipped here. - Integrity Model –
qham11stores the11systematic bits of[16, 11, 4]and reconstructs the5parity bits on unpack, soverify-syndromeschecksqham11zero-padding, tensor shapes, CSR bounds, andA_16reconstruction across all276layers while full byte-level tamper resistance is enforced viaSHA256SUMSandsiliquant_verification_receipt.json. - License Inheritance – Inherited Apache License 2.0 from
google/gemma-4-E2B-it(full text inLICENSE, attribution inNOTICE_UPSTREAM_LICENSE.txt).
Citation
@misc{moissanitelabs2026siligemmaforma,
title={SiliGemma-4-E2B-FormA: Lattice-Quantized Gemma-4-E2B with CPU-Pinned PLE and Prefix-Hoisted ES},
author={Moissanite Labs and Foundation-0},
year={2026},
howpublished={\url{https://huggingface.co/ahrazzle/SiliGemma-4-E2B-FormA}}
}