gemma-3-270m-it-phi-lattice-v2-gecko
4-bit packed archive of unsloth/gemma-3-270m-it. The linear layers were quantized with the Gecko pass (column blocks of 64, spectral metric alpha=0.5) and stored in the same archive layout as gemma-3-270m-it-phi-lattice-v2.
gemma3_270m_phi_gecko_v2_packed_4bit.pt is 371.03 MiB, sha256: b125c2fab6d14d8a8191ddad98565fe64b6e85522f23ed24f497a28812b62bfb. It holds 126 quantized layers and 110 BF16 tensors (embeddings and norms). The previous upload of this filename was a 511 MiB BF16 copy of the base model, with an empty layer list. That file has been replaced.
Cashback embeddings (symmetric with Qwen gecko repo)
gemma3_270m_phi_v2_cashback_packed_4bit.pt (221 MiB, sha256 3cc5e4b8d6dc854b…) keeps all 126 gecko-packed linear layers byte-identical to gemma3_270m_phi_gecko_v2_packed_4bit.pt and moves the token embedding into a two-stream cashback pair (~160 MiB vs 320 MiB BF16), reconstructing the BF16 table at 37.88 dB SQNR.
Six-text PPL on CPU (same protocol as analysis/gecko_experiment.py): gecko with BF16 embed 136.93 → gecko + cashback embed 137.47 (+0.40%). The loader defaults to this archive; pass archive_path=.../gemma3_270m_phi_gecko_v2_packed_4bit.pt for the original BF16-embedding build.
Pack report in the bio-neural repo: examples/results/gemma_gecko_embed_cashback_pack.json.
Measurement of this archive (2026-11-15)
FP32, tokenizer unsloth/gemma-3-270m-it, the six eval texts from analysis/gecko_experiment.py. The archive was unpacked and scored again. Missing keys: 0.
| Checkpoint | SQNR vs BF16 | PPL | File |
|---|---|---|---|
BF16 unsloth/gemma-3-270m-it | — | 90.82 | base |
| phi-lattice v2 | 19.48 dB | 161.26 | packed 4-bit |
| phi-lattice v2-GPTQ | 16.17 dB | 140.06 | packed 4-bit |
| this archive | 19.06 dB | 136.93 | packed 4-bit, 371.03 MiB |
| Q4_K_M | 26.80 dB | 99.30 | earlier run, same six texts |
Exact zeros in the unpacked linear weights: 13.46%. Quantizing the 126 layers took 22.7 seconds on CPU.
Summary (Perplexity & Weight Fidelity): Global full-row
v2-GPTQreduces perplexity (161.26 → 140.06) but sacrifices 3.31 dB of weight fidelity (19.48 dB → 16.17 dBSQNR) due to long-range error accumulation across columns. By restricting error feedback to 64-column blocks with a dampened spectral metric (alpha=0.5), Gecko preserves plain-lattice weight fidelity (19.06 dB SQNR and 13.46% exact zeros), achieves an even lower perplexity (136.93, -15.1% vsplain v2), and runs 6.4× faster.
Usage
import importlib.util
import torch
from transformers import AutoTokenizer
spec = importlib.util.spec_from_file_location("phi_loader", "phi_loader.py")
loader = importlib.util.module_from_spec(spec)
spec.loader.exec_module(loader)
model = loader.load_gemma3_from_packed_4bit(mode="unrolled_bf16", device="cpu", dtype=torch.float32)
tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-3-270m-it")
mode="low_vram_4bit" keeps the nibbles packed. mode="unrolled_bf16" materializes the BF16 weights.
Text benchmarks (lm-evaluation-harness)
Gemma 3 270M IT, unrolled BF16 from gemma3_270m_phi_gecko_v2_packed_4bit.pt, CPU, one task at a time (Nov 2026). Raw per-task JSON is in evals/lm_eval_gemma_gecko/. BF16 and phi-lattice v2 columns are the published pair on gemma-3-270m-it-phi-lattice-v2.
| Task | Metric | Base BF16 | phi-lattice v2 | this archive (Gecko) |
|---|---|---|---|---|
| MMLU | acc | 0.2508 | 0.2594 | 0.2354 |
| GSM8K | exact_match, strict | 0.0243 | 0.0061 | 0.0023 |
| HellaSwag | acc_norm | 0.3929 | 0.3793 | 0.3754 |
| IFEval | inst_level_strict_acc | 0.3729 | 0.2866 | 0.2602 |
Summary (Downstream Benchmarks at 270M Scale): At 270M parameters, multi-choice knowledge (
MMLU) and math (GSM8K) sit at the random-guessing floor even for the unquantized BF16 base model (25.08%vs25.00%random chance on 4-choice MMLU;2.43%on GSM8K), so the-15.1%perplexity gain cannot translate into meaningful downstream deltas on this tiny checkpoint. When the exact sameblock=64, alpha=0.5Gecko recipe is applied to a capable 4B model (qwen3-4b-instruct-2507-phi-lattice-v2-gecko), it improves every downstream benchmark overplain v2(MMLU68.06% → 69.02%,GSM8K83.93% → 85.06%,IFEval51.39% → 55.64%,HellaSwag67.19% → 67.36%).