L32 Null Q9 · Shrinking models
E-S1: how far can a ternary 2B model be compressed without loss?
QuestionCan a 1.58-bit AI model be squeezed much smaller without losing anything?
Run by us; no unaffiliated reproduction
01Why it matters
Could a ternary model be made much smaller without losing anything?
02Method, step by step
- Count all 2,084,044,800 weights in the 210 body tensors.
- Code them with rANS, xz and zstd.
- Verify the round trip byte for byte.
Method as recorded
Census and lossless coding (rANS, xz, zstd) of all 2,084,044,800 weights in the 210 body tensors of the BitNet-b1.58-2B engine model file aegis_pruned_model.safetensors, with a byte-exact round trip, on one Dell i5-5200U. Counts and byte sizes only. Run by us.
03Results, exact and sourced
-
R1The best of the lossless coders tested (zstd -19 on packed bytes) reached 1.532 bits per weight, 399,113,010 bytes, against 2.000 bits per weight for the engine's current packing.
| **zstd -19 on packed bytes** | **1.532** | **399,113,010** |
Verbatim source alice-aegis / ES1_TRIT_CENSUS_RESULTS.md -
R2The round trip was byte-exact on every tensor, with 0 mismatches.
Byte-exact round-trip on every tensor: 0 mismatches.
Verbatim source alice-aegis / ES1_TRIT_CENSUS_RESULTS.md -
R3The trits are near-uniform, so the weights compress only a little.
Pretrained ternary weights do not compress much
Verbatim source alice-aegis / ES1_TRIT_CENSUS_RESULTS.md
04What it does NOT show
Anything about coding speed or changes to the model.
05Scope and caveats
- One model, one machine (Dell i5-5200U).
- Against ideal trit packing (1.600 bits per weight) the saving is about 4%. The 23% saving against the engine's file comes only from that file spending 2 bits per trit.
- Generic zstd beat the one-trit-context rANS coder on the gate and up projections. The source says this is worth about 1% overall and that a row/column-adaptive model is the only remaining lossless headroom. That was not tested here.
- Going below this level needs model changes (sparsity), which this lab does not make.
- Counts and byte sizes only. Coding speed was not measured.
- Run by us; no unaffiliated reproduction.
06Outcome
No effect found, or nothing yet to report.
07What we learned
Pretrained ternary weights are close to uniform, so lossless coding gains little. Real savings would need changes to the model, not a better coder.
08Check it yourself
- alice-aegis / ES1_TRIT_CENSUS_RESULTS.mdhttps://github.com/Aefinity-AI/alice-aegis/blob/main/docs/experiments/ES1_TRIT_CENSUS_RESULTS.md
Read the results (link above).