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.
A technical proposal for 4D model compaction
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.
The thesis
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.
The system
Don’t flatten weights onto a rigid ternary plane—let a 4-bit terrain amplify every subsequent bit.
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.
Instead of storing three independent 9B slices (27B), deterministic 4D rotations Dᵢ(H₀) rotate channels across loop depth i at zero extra weight cost.
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
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.
Huge weights. Few active per token.
Small weights. Reused identically on every pass.
W₀). Loops cannot specialize cleanly.2 shared 4-bit terrain boxes + 4 small run chips.
3-Loop stack
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.
16-level bumped terrain H₀ preserving outliers and pretrained geometry
D₁(H₀) + γ₁(H₀ ⊙ T₁) + β₁(∇H₀ ⊙ T₁) stabilized by RMSMatch
Second terrain-coupled pass + shared KV cache (8× smaller than FP16)
Fixed 4D example
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).
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.
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.
Second orthogonal rotation D₂ + terrain-boosted T₂ explores a fresh subspace while retaining exact norm 2.092 and 4-bit fine ratios.
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
+ / 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 / Loop | Slot 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
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.
{-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.
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
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.
What must be proven
MVP roadmap
Validate warm-started terrain coupling and RMSMatch before scaling to 27B-depth targets.
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.
Test 9B × 3 TerrainLoop against 9B single-pass, flat looped 9B, BitNet b1.58, and 27B INT4 with cross-loop KV sharing enabled.
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
The full paper defines the 4D trajectory formulation, RMSMatch normalization, KV-cache sharing, and experimental controls against pure ternary models.
TerrainLoop