A technical proposal for 4D model compaction

Shape the terrain
loop the bits.

TerrainLoop unrolls a 9B 4-bit bumped terrain across three normalized passes—multiplying 1-bit or ternary masks by local hill height and slope to reach 27B depth at 6.75 GB.

Explore 3D terrain

The thesis

Looped is stacked.
A terrain underneath.

Pure ternary and 1-bit models flatten every weight onto uniform plateaus: every step has identical height, outliers are crushed, and training usually requires trillions of tokens from scratch.

TerrainLoop treats depth index i as a 4th dimension. Loop 0 keeps a warm-started 4-bit bumped terrain H₀; Loops 1 and 2 steer across those hills and slopes with 1-bit or ternary masks, turning 3 flat levels into dozens of expressive, energy-bounded values.

014-bit Terrain
anchor H₀
→
024D Rotation
& slope ∇H₀
→
031-bit / Ternary
masks T₁, T₂
→
04RMSMatch &
27B Depth

The system

Don’t flatten weights onto a rigid ternary plane—let a 4-bit terrain amplify every subsequent bit.

01

Bumped terrain, not flat plateaus

Multiplying 1-bit or ternary masks by 4-bit hill height H₀ and slope ∇H₀ gives peaks large expressive jumps while valleys stay quiet or skip cleanly.

02

Compact across the 4th dimension

Instead of storing three independent 9B slices (27B), deterministic 4D rotations Dᵢ(H₀) rotate channels across loop depth i at zero extra weight cost.

03

Bound energy, share the KV

Per-loop RMSMatch stops variance explosion across iterations, and cross-loop KV sharing keeps inference KV cache at the 9B size rather than expanding 3×.

Why it differs from a Looped Transformer

Same loop idea.
Four small per-run modifiers.

A standard Looped Transformer reuses 2 identical blocks on every pass. TerrainLoop pairs those 2 shared 4-bit terrain boxes with 4 small 1-bit/ternary modifier strips so every pass computes a distinct function.

Mixture of Experts

Huge weights. Few active per token.

Datacenter
Memory
Compute
Fast per token, but must keep huge unused experts in RAM/VRAM.

Looped Transformer

Small weights. Reused identically on every pass.

Laptop
× N (identical weights)
Memory
Compute
Bottleneck: Every pass executes the exact same 2 matrices (W₀). Loops cannot specialize cleanly.

3-Loop stack

Three passes.
One 9B core.

Gradients from all three passes sum back into the shared 4-bit base via Straight-Through Estimation, while T₁ and T₂ learn the residual divergence needed at steps i=1 and i=2.

01
Loop 0 · 4-bit4.50 GB (9B core)

16-level bumped terrain H₀ preserving outliers and pretrained geometry

02
Loop 1 · 1-bit / T₁+1.125 GB (1-bit)

D₁(H₀) + γ₁(H₀ ⊙ T₁) + β₁(∇H₀ ⊙ T₁) stabilized by RMSMatch

03
Loop 2 · 1-bit / T₂6.75 GB total · 27B depth

Second terrain-coupled pass + shared KV cache (8× smaller than FP16)

Fixed 4D example

Bounded rotation,
not drifting lines.

Linear shifts like (2.44, 1.44, 2.44) + i·(1, 1, 2) explode in norm and collapse onto one ray. A true 4D formulation starts on a 4-bit grid and stays locked on a constant-energy sphere (‖w‖ = 2.092).

01 i = 0 · 4-bit anchor H₀

(+1.25, −0.75, +1.50)

Quantized as 0.25 × (+5, -3, +6). High hills on x and z (1.25, 1.50) and a shallower valley on y (−0.75) set the terrain.

→
02 i = 1 · Rot + T₁ = (+1, 0, −1)

(+0.76, −0.95, +1.70)

3D rotation D₁ maps H₀ to (+0.10, −0.75, +1.95); terrain-scaled T₁ shifts x/z strongly while skipping y (0), then RMSMatch locks norm at 2.092.

→
03 i = 2 · Rot + T₂ = (−1, +1, +1)

(−0.31, −1.60, +1.32)

Second orthogonal rotation D₂ + terrain-boosted T₂ explores a fresh subspace while retaining exact norm 2.092 and 4-bit fine ratios.

Important

Looping 9B weights 3× cuts weight storage (13.5 GB INT4 → 6.75 GB) and memory-bandwidth traffic by ~2×, which directly accelerates memory-bound local decoding—while arithmetic FLOPs remain comparable to a 27B pass.

Advancing your sparse-diff intuition

One base sentence. Tiny + / 0 / - diffs.

Why store 4 separate full sentences when most concepts stay untouched (0) and only small modifiers shift meaning? Watch how a 4-bit anchor + 4 tiny ternary chips produce 4 distinct meanings—just like 4 looped neural passes:

Run / LoopSlot 1 (Entity)Slot 2 (Polarity)Slot 3 (Domain)Resulting State
Base (4-bit) App is software “App is software”
Run 1 (Chip 1) +le +n’t 0 (skip) “Apple isn’t software”
Run 2 (Chip 2) +t −n’t 0 (skip) “Applet is software”
Run 3 (Chip 3) 0 (skip) 0 (skip) +_layer “Applet is software layer”

Notice 0: wherever software or is doesn’t need to change, the ternary mask pays zero update energy—just like valleys on our 4-bit terrain!

Why believe this works in real LLMs

Three concrete proofs beyond metaphor

1. Transformer layers already evolve as small diffs: Residual networks compute h_{l+1} = h_l + f(h_l). Middle-to-late layers exhibit strong cross-layer representational similarity—meaning successive passes mostly apply rotations and sparse polarity flips, not wholly new random matrices.
2. 48 levels per loop vs. 3 in flat BitNet: Pure ternary {-1, 0, +1} has only 3 flat levels. Coupling 4 small ternary chips to a 4-bit terrain H₀ (16 levels) produces 16 × 3 = 48 terrain-scaled levels per run (16× richer), preserving outlier channels intact.
3. Bandwidth-bound laptop speed + warm start: Local decoding is bottlenecked by DRAM bandwidth, not FLOPs. Streaming 2 base + 4 tiny chips (~6.75 GB) instead of 27B INT4 (13.5 GB) cuts memory traffic ~2×, while warm-starting H₀ from a pretrained 9B checkpoint avoids training from scratch.

Interactive 3D workbench

Orbit the terrain.
Inspect the sphere.

Drag either 3D viewport to rotate yaw and pitch, scroll to zoom, hover tiles to compare Flat vs. Bumped values, or click nodes on the 4D sphere.

A. Pure Ternary: Flat Surface

3 Levels

B. 4-Bit Bumped Terrain + Ternary

48+ Levels
Drag either 3D terrain to orbit • Scroll to zoom • Hover any tile

4D Trajectory Space (i = 0, 1, 2)

Norm = 2.09 (Sphere-Locked)
Drag to orbit • Scroll to zoom • Click i=1 or i=2 to flip mask

27B → 9B Footprint Calculator

8.0× vs FP16

What must be proven

No claims
without ablation.

Perplexity vs 27B INT4 Vs BitNet b1.58 (flat) Effective weight levels Loop variance stability 9B-sized KV cache Tokens/sec & bandwidth Warm-start recovery General-task regression

MVP roadmap

Validate warm-started terrain coupling and RMSMatch before scaling to 27B-depth targets.

  1. 01

    Stabilize

    Warm-start a 1.5B–3B 4-bit terrain H₀, attach per-loop RMSNorm + Dᵢ + ternary T₁, T₂, and verify variance stability across 3 loops.

  2. 02

    Benchmark

    Test 9B × 3 TerrainLoop against 9B single-pass, flat looped 9B, BitNet b1.58, and 27B INT4 with cross-loop KV sharing enabled.

  3. 03

    Fuse

    Factor T₁, T₂ along the 4th dimension and write fused 4-bit + ternary CUDA/Metal kernels so modulated weights never materialize in FP16.

Read the proposal

Compression should
keep the hills.

The full paper defines the 4D trajectory formulation, RMSMatch normalization, KV-cache sharing, and experimental controls against pure ternary models.

Open standalone paper page ↗