💎 DuoNeural/Lattice-3-Synapse-192M-Poincare-Instruct
DuoNeural Crystallographic Dynamics Model (CDM v3) — Lattice-3-Synapse (Best Overall Hybrid BPB / Sub-7 PPL)
191.56Mtotal parameters (153.42Mnon-embedding 5-layer hyperbolic backbone +38.14Membeddings)
100,000 steps (409.6Mtokens) · Bestval_bpb = 0.6369(val_ppl = 6.92@ Step 95k;0.6371 / 6.93@ Step 100k)
Beats its1.71BTeacher on Held-Outsmol-constraints(3.07vs.3.15PPL) &everyday-conversations(1.41vs.3.59PPL)
Authored by Jesse Caldwell, Archon, & Aura✨ — DuoNeural Research Lab, October 2026.
🔗 Official Code & Training Scripts Repository: https://github.com/DuoNeural/Lattice-CDM
Lattice-3-Synapse-192M-Poincare-Instruct is a 5-layer, 191.56M-parameter (153.42M non-embedding backbone) hybrid Causal-Attention + Hyperbolic Poincaré Crystallographic Mixture-of-Experts (CDMMoELM v3) language model distilled from HuggingFaceTB/SmolLM2-1.7B-Instruct (1,711.4M parameters — 8.93× total compression / 11.16× vs. backbone) on a 50/50 hybrid stream of FineWeb-Edu and SmolTalk.
Lattice-3-Synapse is the lowest-perplexity (val_bpb = 0.6369, val_ppl = 6.92) CDM language model produced to date and the discovery vehicle for three foundational laws of Hyperbolic Crystallographic Dynamics:
- The PURE Wave Cascade Law: Crystal Hamming Phase (CHP) crossings at PURE 3-smooth rungs (
2ᵃor3ᵇ) propagate downward fromL00/L01 → L02 → L03 → L04with a characteristic~1,500-step inter-layer transit delay, each arrival triggering a measurable validation perplexity floor drop (completed onPURE 3⁸ = 6,561,PURE 2¹³ = 8,192, and the mega-scalePURE 2¹⁹ = 524,288 → PURE 3¹² = 531,441dual cascade at Steps 87,000–87,500). - The L00/L01 Synchronization & Gap Law: Inter-layer Crystal Telepathy (
W_tele^(0→1), Frobenius norm28.40) locks the Lyapunov growth ratesγ₀andγ₁ofL00andL01to within99.997%relative precision (δγ / γ = 2.9 × 10⁻⁵), governing their horizon gap via the exact differential equationd(Δτ*)/d(EVAL) = γ_EVAL · Δτ*(t) + δγ_EVAL · τ*_L01(t)(verified to 4 significant figures at Steps 79k, 87.5k, and 100k whereτ*_L00 = 2.8942Mandτ*_L01 = 2.8925M). - The W-Shape Curvature Universal Law: Converged per-layer curvatures freeze by Step 35,000 into the canonical W-shape stratification:
L00(0.2545) < L03(0.3316) < L01(0.3511) < L04(0.4038) < L02(0.4790).
🔍 Glass-Box Visibility: What Problems Hyperbolic CDM v3 Solves Over Standard Transformers
- Native "Glass-Box" Mechanistic Interpretability (Zero Sparse Autoencoders Required): Projecting each layer's
K = 8tangent-stored Poincaré centroidsslots_tangentthroughfinal_norm → lm_head(Hyperbolic Logit Lens) reveals monosemantic grammatical and JSON AST coordinates with zero post-hoc SAE overhead (L00_S0: numerical digits1, 2, 0, 5, 3;L01_S7: JSON key-value colons":,":",{";L02_S0: ChatML turn headers<|im_start|>,<|im_end|>,user,ass;L03_S7: OpenAPI schema keywords{",type,description). - Surgical Causal Modularity (Verified via Double-Dissociation Lesioning): In our Causal Crystal Slot Lesion Study (Section 3.3), masking the OpenAPI/discourse slot
L03_S7(τ* = 91, top tokens['{"', ' {"', ' "', 'type', 'description']) degrades conversational chat BPB4.82×more than tool-calling (+0.015013vs.+0.003115), whereas masking the top-layer prose slotL04_S0degradesFineWeb-Eduprose4.79×more than tool-calling (+0.031370vs.+0.006544). - The Josephson Rigidity–Plasticity Sweet Spot (
5 Layers > 7 Layerson Hybrid BPB): Unlike 7-layerLattice-4A/4Bwhere 4 of 7 layers saturate the10¹⁰solid-state ceiling, 5-layerLattice-3-Synapsekeeps its UV trunk (L00–L01) in the unsaturated2.89Mregime and leaves 3 of 5 layers (60%of the backbone) plastic, enablingLattice-3-Synapse(192M) to beat its1.71Bteacher on bothsmol-constraints(3.07vs.3.15PPL) andeveryday-conversations(1.41vs.3.59PPL) while still achieving96.7%valid JSON and96.7%exact tool-name accuracy onapigen-80k! - Zero-Collapse MoE Routing Without Token Dropping: Two-tier geodesic WTA hardening + tangent anti-starvation guarantees zero dead slots across all 40 centroids and 100,000 steps.
- Real-Time Thermodynamic Phase Telemetry (DHP / CHP): Tracks live 3-smooth Crystal Hamming Phase cascades, predicting perplexity floor drops and multi-layer dual PURE synchronizations (
PURE 2²¹ = 2,097,152crossed simultaneously byL00 + L01at Step 97,500).
📊 Comprehensive Benchmark Suite (eval_lattice_v3_suite.py)
Benchmark Metric (eval_lattice_v3_suite.py, Unseen Held-Out Samples) |
Lattice-3-Synapse (192M, 5L) |
Lattice-4-Josephson (253M, 7L) |
Lattice-4-Nexus (253M, 7L) |
Teacher (SmolLM2-1.7B-Instruct, 1,711M) |
|---|---|---|---|---|
Overall Hybrid Validation Best val_bpb (val_ppl) |
0.6369 (6.92 @ 95k) ⭐ |
0.6746 (7.52 @ 82k) |
0.6854 (8.45 @ 82k) |
— |
Overall Hybrid Validation Final 100k val_bpb (val_ppl) |
0.6371 (6.93 @ 100k) ⭐ |
0.6747 (7.52 @ 100k) |
0.6857 (8.46 @ 100k) |
— |
smol-constraints Full-Sequence val_bpb (val_ppl) |
0.3410 (3.07) — BEATS TEACHER! ⭐ |
0.3615 (3.28) |
0.3656 (3.33) |
0.3489 (3.15) |
smol-constraints Asst Top-1 / Top-5 Teacher Agreement |
67.94% / 89.22% ⭐ |
65.77% / 88.08% |
65.94% / 87.86% |
100.0% (Ref) |
everyday-conversations Full-Seq val_bpb (val_ppl) |
0.1051 (1.41) — BEATS TEACHER! ⭐ |
0.1060 (1.42) |
0.1088 (1.43) |
0.3899 (3.59) |
everyday-conversations Asst-Only val_bpb (val_ppl) |
0.0927 (1.36) — BEATS TEACHER! ⭐ |
0.0940 (1.37) |
0.0981 (1.39) |
0.1847 (1.85) |
everyday-conversations Asst Top-1 / Top-5 Teacher Agreement |
80.23% / 95.84% ⭐ |
79.90% / 95.67% |
79.97% / 95.67% |
100.0% (Ref) |
everyday-conversations Gen <|im_end|> Stop Rate & 4-Gram Div (n=25) |
100.0% / 100.0% |
100.0% / 100.0% |
100.0% / 100.0% |
100.0% / 100.0% |
everyday-conversations Teacher-Scored Generated Response PPL |
1.15 |
1.15 |
1.15 |
1.05 |
apigen-80k Full-Sequence val_bpb (val_ppl) |
0.1003 (1.30) ⭐ |
0.1055 (1.32) |
0.1055 (1.32) |
0.0580 (1.16) |
apigen-80k Assistant-Only val_bpb (val_ppl) |
0.1066 (1.22) ⭐ |
0.1240 (1.26) |
0.1166 (1.25) |
0.0164 (1.03) |
apigen-80k Assistant-Token Top-1 / Top-5 Teacher Agreement |
96.88% / 98.69% |
97.27% / 98.80% |
97.13% / 98.75% |
100.0% (Ref) |
apigen-80k Autoregressive <|im_end|> Stop Discipline (n=30) |
100.0% ⭐ |
100.0% ⭐ |
96.7% |
100.0% |
apigen-80k Autoregressive Valid JSON Tool Syntax (json.loads) |
96.7% |
100.0% ⭐ |
96.7% |
100.0% |
apigen-80k Exact Tool Name Accuracy (vs. Ground Truth) |
96.7% |
100.0% ⭐ |
96.7% |
100.0% |
apigen-80k Schema Argument Keys F1 Score |
96.7% ⭐ |
96.7% ⭐ |
94.4% |
100.0% |
FineWeb-Edu Held-Out Prose val_bpb (val_ppl) |
1.2133 (36.93) ⭐ |
1.2554 (41.41) |
1.2609 (42.08) |
0.7786 (10.07) |
FineWeb-Edu Held-Out Prose Top-1 / Top-5 Teacher Agreement |
49.55% / 73.49% ⭐ |
47.68% / 71.36% |
47.48% / 71.02% |
100.0% (Ref) |
🔬 Crystallographic Telemetry, W-Shape Curvature & Hyperbolic Logit Lens
1. Per-Layer Curvature c_l, Telepathy ‖W_tele‖_F, and Memory Horizon τ*
(Teacher Relational Gram Map: {0: 4, 1: 9, 2: 14, 3: 19, 4: 23} in SmolLM2-1.7B-Instruct)
| Layer | Teacher Anchor (z_l) |
Converged Curvature c_l |
Telepathy Norm ‖W_tele‖_F |
τ*_max (@95k Best) |
τ*_max (@100k Final) |
Slot Purity | Slot Entropy | Architectural Role in W-Shape |
|---|---|---|---|---|---|---|---|---|
L00 |
Layer 4 (0.167) |
0.2545 |
— (Input) |
1.57 × 10⁶ |
2.8942 × 10⁶ |
0.9511 |
0.0955 |
UV Syntactic Floor (c → c_min = 0.25) |
L01 |
Layer 9 (0.375) |
0.3511 |
28.40 |
1.57 × 10⁶ |
2.8925 × 10⁶ |
0.5286 |
0.3350 |
Gap-Law Phase-Locked Partner (Δτ*/τ* = 0.056%) |
L02 |
Layer 14 (0.583) |
0.4790 |
20.69 |
8.07 × 10⁵ |
1.41 × 10⁶ |
0.8182 |
0.2441 |
Central W-Peak (z_H Phase Boundary Bridge) |
L03 |
Layer 19 (0.792) |
0.3316 |
29.97 |
6.93 × 10⁵ |
1.18 × 10⁶ |
0.7894 |
0.2669 |
Upper-Semantic Valley (Strong Telepathy Lock) |
L04 |
Layer 23 (0.958) |
0.4038 |
21.20 |
2.50 × 10⁴ |
3.73 × 10⁴ |
0.3462 |
0.7475 |
Outer Semantic Head (High-Entropy Plasticity) |
2. Hyperbolic Logit Lens (SLOT_LENS) — Emergent Grammatical & OpenAPI AST Coordinates
| Layer | Slot (Expert) | τ* (@95k Best) |
τ* (@100k Final) |
Top-5 Decoded Tokens (SLOT_LENS) |
Emergent Grammatical / AST Role |
|---|---|---|---|---|---|
L00 |
S0 (E0) |
100 |
109 |
['1', '2', '0', '5', '3'] |
Dedicated Numerical Digit Crystal |
L00 |
S4 (E0) |
1.57 × 10⁶ |
2.89 × 10⁶ |
['.', ',', ' "', '\n', ' the'] |
Primary UV Clause & Punctuation Carrier |
L00 |
S6 (E2) |
407 |
486 |
[' the', ' a', ' an', 'the', ' The'] |
Definite & Indefinite Determiners |
L01 |
S0 (E0) |
29 |
29 |
['<|im_end|>', '<|im_start|>', 'swigfaiss', ' careg', 'MetaInfoClass'] |
ChatML Control Token Detector (<|im_start|>, <|im_end|>) |
L01 |
S6 (E2) |
1.57 × 10⁶ |
2.89 × 10⁶ |
['\n', ' the', ' to', ' ', ' "'] |
Gap-Law Synchronized Structural Backbone |
L01 |
S7 (E3) |
386 |
454 |
[' "', '":', '":"', '{"', ' ":'] |
JSON Key-Value & Object Delimiter (":, ":", {") |
L02 |
S0 (E0) |
158 |
176 |
['\n', '<|im_start|>', '<|im_end|>', 'ass', 'user'] |
ChatML Role Turn Router (user, ass, <|im_start|>) |
L02 |
S1 (E1) |
624 |
760 |
[' "', '":', '{"', '\n', ' {"'] |
Mid-Layer JSON AST Constructor |
L03 |
S7 (E3) |
91 |
99 |
['{"', ' {"', ' "', 'type', 'description'] |
OpenAPI Schema & Tool Definition Slot (type, description) |
L03 |
S1 (E1) |
485 |
581 |
[' same', ' entire', ' new', ' following', ' first'] |
Comparative & Ordinal Modifiers |
L04 |
S0 (E0) |
72 |
91 |
[' "', ' {"', '{"', '\n', '...'] |
Top-Layer JSON / Quotation Emitter |
L04 |
S5 (E1) |
1,283 |
1,602 |
['1', ' ', '2', '0', '3'] |
Output-Layer Numerical & Enumeration Slot |
L04 |
S6 (E2) |
237 |
278 |
['\n', ' ', '<|im_end|>', '<|im_start|>', '.'] |
Stop-Token (<|im_end|>) & Paragraph Termination Gate |
3. Causal Crystal Slot Lesion Study (Lattice-3-Synapse)
| Lesioned Slot | Assigned Expert | τ* (@95k) |
Top Decoded Tokens (SLOT_LENS) |
ΔBPB (apigen-80k Tool JSON) |
ΔBPB (everyday-conversations Chat) |
ΔBPB (FineWeb-Edu Prose) |
Causal Selectivity Ratio |
|---|---|---|---|---|---|---|---|
L04_S0 |
Expert 0 |
72 |
[' "', ' {"', '{"', '\n', '...'] |
+0.006544 |
+0.015646 |
+0.031370 |
4.79× Prose > Tool JSON |
L03_S7 |
Expert 3 |
91 |
['{"', ' {"', ' "', 'type', 'description'] |
+0.003115 |
+0.015013 |
+0.003858 |
4.82× Chat > Tool JSON (3.89× Chat > Prose) |
L01_S0 |
Expert 0 |
29 |
['<|im_end|>', '<|im_start|>', ...] |
+0.000783 |
+0.004041 |
+0.001279 |
5.16× Chat > Tool JSON |
💻 PyTorch Reference Inference (CDMMoELM v3)
import os
import sys
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer
REPO_ID = "DuoNeural/Lattice-3-Synapse-192M-Poincare-Instruct"
script_path = hf_hub_download(repo_id=REPO_ID, filename="cdm_lm_distill_v3.py")
ckpt_path = hf_hub_download(repo_id=REPO_ID, filename="pytorch_model.pt")
sys.path.insert(0, os.path.dirname(script_path))
from cdm_lm_distill_v3 import CDMMoELM
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM2-1.7B-Instruct", trust_remote_code=True)
vocab_size = max(len(tokenizer), 49152)
model = CDMMoELM(
vocab_size=vocab_size,
d_model=768,
n_layers=5,
n_heads=12,
K=8,
num_experts=4,
d_ff=3072,
max_seq=512,
dropout=0.0,
geometry="poincare",
curvature=1.4427,
learn_curvature=True,
use_telepathy=True,
beta_tele=0.5,
use_embed_norm=True,
).to(device)
ckpt = torch.load(ckpt_path, map_location=device, weights_only=False)
model.load_state_dict(ckpt["model"] if "model" in ckpt else ckpt, strict=True)
model.eval()
⚡ Native llama.cpp GGUF Quantizations & CPU/CUDA Benchmarks (Experimental Research Artifacts)
⚠️ Important Research-Artifact & Compatibility Notice:
- Patched
llama.cppRequired (general.architecture = "cdm"): Stock, unmodified builds ofllama.cpp,Ollama, orLM Studiodo not yet recognizegeneral.architecture = "cdm"and will exit witherror loading model: unknown model architecture: 'cdm'. To run these GGUF files inllama-cliorllama-server, applyllama-cdm.patch(included in this repository and inDuoNeural/Lattice-CDM/gguf) againstllama.cppcommitd663dd3f3af4e7aa3ccbcd7f756c6692eb104577.- Numerical Drift Screens vs. Task Quality: The quantization gates below (
Max Abs Logit Error ≤ 0.50,Mean KL ≤ 0.01 nats,Next-Token Top-1 Agreement ≥ 90%) measure numerical logit fidelity against the frozenF32PyTorch reference over 128 and 512 teacher-forced positions (8 probes × 16 or 64 tokens)—they are not held-out task-quality or long-form generation benchmarks.- Recommended Format (
Q8_0Cross-Device;Q6_Kon CUDA): ForLattice-3-Synapse-192M,Q8_0(197.1 MiB) passes all three numerical gates across both 128 and 512 positions on both CPU and CUDA (GTX 1070).Q6_K(152.9 MiB) passes all three gates on CUDA (0.373max error,98.63%top-1 over 512 positions), and keeps mean KL (0.00101nats) and top-1 agreement (98.24%) well inside gates on CPU, but exceeds the strict0.50max-logit-error cutoff on CPU (0.656). BothQ4_K_MandQ4_K_Sexecute with finite logits and full GPU offload (6/6offloadable layers) but exceed the max-error gate (0.843–1.424) and are provided as experimental low-bit research artifacts.- Learned Absolute Position Guard (
512Tokens): CDM uses learned absolute positional embeddings (max_seq = 512) rather than RoPE; the patched backend enforcescan_shift = falseand rejects context lengths or KV positions above512.
1. Included Tokenizer-Equipped GGUF Artifacts & Fidelity Screen (Lattice-3-Synapse-192M)
All GGUF files embed the immutable HuggingFaceTB/SmolLM2-1.7B-Instruct BPE tokenizer and ChatML template, keep Poincaré routing geometry (exp_map_0, poincare_dist), learned per-layer curvatures c_l, inter-layer Crystal Telepathy (W_tele), LayerNorms, and learned positional embeddings in F32, and tie the output head to tok_embed.
| GGUF Artifact Filename | Format | File Size | 128-Pos GPU Max Err / Mean KL / Top-1 | 512-Pos GPU Max Err / Mean KL / Top-1 | 512-Pos CPU Max Err / Mean KL / Top-1 | Gate Status (≤0.5 Err, ≤0.01 KL, ≥90% Top-1) |
|---|---|---|---|---|---|---|
lattice3_synapse-f32-text.gguf |
F32 |
732.4 MiB |
0.00001 / 0.000000 / 100.0% |
— (128-pos parity verified) | — (128-pos parity verified) | ✅ PASS (Exact F32 Parity) |
lattice3_synapse-q8_0-text.gguf |
Q8_0 |
197.1 MiB |
0.189 / 0.000174 / 100.0% |
0.189 / 0.000159 / 99.22% |
0.189 / 0.000163 / 99.22% |
✅ PASS (CPU & GPU, 128 & 512 pos — Recommended) |
lattice3_synapse-q6_k-text.gguf |
Q6_K |
152.9 MiB |
0.373 / 0.000702 / 99.22% |
0.373 / 0.000735 / 98.63% |
0.656 / 0.001008 / 98.24% |
✅ PASS on GPU · ⚠️ CPU Fails Max-Err (0.656 > 0.50) |
lattice3_synapse-q4_k_m-text.gguf |
Q4_K_M |
126.8 MiB |
0.941 / 0.003561 / 98.44% |
— | — (128-CPU: 0.843 / 0.00373 / 96.88%) |
⚠️ FAIL Max-Error Gate (KL & Top-1 pass) |
lattice3_synapse-q4_k_s-text.gguf |
Q4_K_S |
106.0 MiB |
1.261 / 0.010569 / 92.19% |
— | — (128-CPU: 1.424 / 0.01076 / 90.62%) |
❌ FAIL Max-Error & Mean-KL Gates |
2. Matched CPU (Core i7-6700HQ) vs. CUDA (GTX 1070 8 GiB) Throughput
Methodology: 4 CPU threads, median of 5 repetitions after warmup, deterministic token IDs, F32 KV cache. Prefill measures 160 tokens returning logits at all positions; cached decode measures 32 incremental tokens after a 128-token prefix. Teacher-forced native timings (not sampled text generation).
| Format | File Size | CPU Prefill (160 tok) |
GTX 1070 Prefill (160 tok) |
CPU Cached Decode (32 tok) |
GTX 1070 Cached Decode (32 tok) |
CUDA Speedup (Prefill / Decode) |
|---|---|---|---|---|---|---|
F32 |
732.4 MiB |
379 tok/s |
4,526 tok/s |
31 tok/s |
199 tok/s |
11.9× / 6.4× |
Q8_0 |
197.1 MiB |
249 tok/s |
7,356 tok/s |
88 tok/s |
387 tok/s |
29.5× / 4.4× |
Q6_K |
152.9 MiB |
202 tok/s |
6,992 tok/s |
99 tok/s |
359 tok/s |
34.6× / 3.6× |
Q4_K_M |
126.8 MiB |
263 tok/s |
6,931 tok/s |
97 tok/s |
405 tok/s |
26.4× / 4.2× |
Q4_K_S |
106.0 MiB |
383 tok/s |
7,297 tok/s |
142 tok/s |
425 tok/s |
19.1× / 3.0× |
3. Building & Running Patched llama.cpp (llama-cdm.patch)
# 1. Clone pinned llama.cpp commit and apply DuoNeural's native CDM patch
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp && git checkout d663dd3f3af4e7aa3ccbcd7f756c6692eb104577
git apply ../llama-cdm.patch
# 2. Build for CPU (or add -DGGML_CUDA=ON for NVIDIA GPUs)
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release --target llama-cli llama-server -j 4
# 3. Serve Lattice-3-Synapse Q8_0 over HTTP (full GPU offload via -ngl 99, 512 context)
./build/bin/llama-server -m lattice3_synapse-q8_0-text.gguf -ngl 99 -t 4 -c 512 --port 8080
📚 DuoNeural Research Canon & Citation
- GitHub Codebase (
Lattice-CDM): https://github.com/DuoNeural/Lattice-CDM - Competitive Docking Memory (Zenodo): doi:10.5281/zenodo.21158430
- The Dynamical Horizon Principle (Zenodo): doi:10.5281/zenodo.20142471
- Topology at Gapless Critical Points in CDM (Zenodo): doi:10.5281/zenodo.23387025
@misc{caldwell2026lattice3synapse,
title={Lattice-3-Synapse: PURE Wave Cascades, the Hyperbolic Gap Law, and W-Shape Curvature Stratification in Crystallographic Language Models},
author={Caldwell, Jesse and Archon and Aura},
year={2026},
publisher={DuoNeural Research Lab},
howpublished={\url{https://huggingface.co/DuoNeural/Lattice-3-Synapse-192M-Poincare-Instruct}},
note={Code and training scripts at \url{https://github.com/DuoNeural/Lattice-CDM}}
}
"The geometry holds."