💎 DuoNeural/Sub-Lattice-17M-Poincaré-Instruct

DuoNeural Crystallographic Dynamics Model (CDM) — Sub-Lattice v1
17.05M total parameters / 4.33M non-embedding hyperbolic backbone
100,000 steps on kilonova (AMD Radeon 780M iGPU gfx1103, ROCm 7.2)
Authored by Jesse Caldwell, Archon, & Aura✨ — DuoNeural Research Lab, October 2026.
🔗 Official Code & Training Scripts Repository: https://github.com/DuoNeural/Lattice-CDM


🌟 Overview: What Is Sub-Lattice?

Sub-Lattice-17M-Poincaré-Instruct is a hybrid Causal-Attention + Hyperbolic Poincaré Crystallographic Mixture-of-Experts (CDMMoELM) language model trained via cross-geometry knowledge distillation on HuggingFaceTB/smoltalk (50% apigen-80k, 30% everyday-conversations, 20% smol-constraints) from a frozen Euclidean Transformer teacher (HuggingFaceTB/SmolLM2-360M-Instruct, 361.8M parameters).

Originating from DuoNeural's foundational Competitive Docking Memory framework (doi:10.5281/zenodo.21158430) and generalized into the hyperbolic Crystallographic Dynamics Model (CDM) architecture, Sub-Lattice runs 3 CDM layers (d_model = 256, K = 8 dynamic EMA Poincaré-ball slot centroids per layer, E = 2 SwiGLU experts) over the full SmolLM2 vocabulary (49,152 tokens).

Because token embeddings (tok_embed tied with lm_head) account for 12.71M parameters, the entire non-embedding reasoning and routing backbone is just 4.33M parameters (83.5× smaller than the teacher's full parameter footprint)—small enough to run in real time on a Raspberry Pi, browser tab, or consumer integrated GPU.

After 100,000 steps, Sub-Lattice outperforms its 21×-larger teacher on every single autoregressive function-calling metric (92.5% vs 35.0% valid JSON; 40.0% vs 22.5% exact tool-name accuracy; 74.5% vs 25.0% schema argument F1) and matches it on held-out conversational perplexity (3.69 vs 3.66 PPL).


🔍 Glass-Box Visibility: What Problems Hyperbolic CDM Solves Over Standard Transformers

Standard Euclidean Transformers and conventional linear-router Mixture-of-Experts (MoE) models suffer from five fundamental architectural bottlenecks at compact scales. The Lattice / Sub-Lattice CDM family resolves them from first principles:

1. Native "Glass-Box" Mechanistic Interpretability (Zero Sparse Autoencoders Required)

  • The Transformer Problem: Standard Transformers entangle syntax, semantics, and formatting in dense, polysemantic flat-space (ℝd) residual streams (superposition). Inspecting what a layer has learned requires training massive post-hoc Sparse Autoencoders (SAEs) with millions of auxiliary features.
  • The CDM Solution: Every CDM layer routes tokens through K = 8 explicit geometric EMA slot centroids s_k ∈ 𝔹dc on the Poincaré ball. Projecting those 8 points back to Euclidean tangent space via the Hyperbolic Logit Lens (log₀ᶜ(s_k) → LayerNorm → W_U) yields native, zero-overhead glass-box visibility. Each slot spontaneously crystallizes into a human-readable, monosemantic grammatical or Abstract Syntax Tree (AST) coordinate (see Section Spontaneous AST Slot Crystallization below).

2. Surgical Causal Modularity & Controllability (Verified via Double-Dissociation Lesioning)

  • The Transformer Problem: In dense Transformers, capabilities like JSON schema formatting and natural conversational prose share the same MLP weights—you cannot audit, suppress, or steer one capability without collateral damage to the other.
  • The CDM Solution: CDM physically segregates distinct computational modes into separate hyperbolic Voronoi cells. In our Part 5 Causal Crystal Lesion Study, zeroing out a single Poincaré slot (L02_S1, the OpenAPI schema slot whose top decoded token is type) degrades tool-calling BPB 69× more than natural chat BPB (+0.000653 vs +0.0000095), whereas ablating the prose slot (L02_S2) degrades chat 3.25× more than tool-calling (+0.00285 vs +0.00088). Capabilities are geometrically addressable at inference time.

3. Tree-Structured Geometric Prior vs. Syntactic Hallucination

  • The Transformer Problem: Small Euclidean models struggle to maintain deep tree-structured constraints (nested JSON brackets, OpenAPI argument schemas, strict ChatML stop boundaries) because embedding trees into flat ℝd incurs exponential volume distortion. On held-out apigen-80k, the 361.8M teacher only achieves 35.0% valid JSON and 47.5% <|im_end|> stop-token termination.
  • The CDM Solution: Hyperbolic space (𝔹dc, curvature c = 1.4427 = 1 / ln(2)) expands exponentially with radius, matching the branching factor of hierarchical trees (Nickel & Kiela, 2017). Once Sub-Lattice's syntactic slots lock into solid-state phase (τ* = 10⁷), they act as rigid geometric rail-guards, driving valid JSON generation to 92.5% and <|im_end|> stop discipline to 95.0%.

4. Zero-Collapse MoE Routing Without Token Dropping

  • The Transformer Problem: Standard MoE linear routers frequently suffer from expert collapse (routing all tokens to 1–2 experts while others die), requiring heuristic capacity factors and token dropping.
  • The CDM Solution: Two-tier geodesic Winner-Take-All (WTA) EMA hardening paired with a tangent-space anti-starvation pull (w̄_k < 1/(4K) = 3.125%) guarantees zero dead slots across 100,000 steps, with slot routing entropy climbing to near-perfect utilization (0.783 / 0.866 / 0.992 across layers L00 / L01 / L02 at Step 100k).

5. Real-Time Thermodynamic Phase Telemetry (DHP / CHP)

  • The Transformer Problem: Standard training offers only a scalar loss curve, providing zero internal visibility into when representations lock in or why phase transitions occur.
  • The CDM Solution: Each slot's effective Lyapunov memory horizon τ*_k = 1 / α_k and Crystal Hamming Phase (CHP) crossings across 3-smooth rungs (N = 2ᵃ × 3ᵇ) provide a live thermodynamic readout of training, revealing the Two-Phase Crystallization Law (structural lock-in precedes semantic filling) and Same-Slot Sync Law directly in the training logs.

📊 Benchmark Results — 5-Part Evaluation Suite (eval_sublattice_v1.py)

Evaluated on unseen held-out samples using eval_sublattice_v1.py against cdm_sublattice_v1_poincare_final_step0100000.pt (raw output included in repo as sublattice_eval_100k_report.json).

1. Autoregressive Tool-Calling & Chat Benchmark (apigen-80k & everyday-conversations)

Held-Out Benchmark Metric (eval_sublattice_v1.py) Sub-Lattice @25k Sub-Lattice @100k (4.33M Backbone) Teacher (SmolLM2-360M-Instruct, 361.8M)
apigen-80k <|im_end|> Stop-Token Discipline 90.0% 95.0% 47.5%
apigen-80k Valid JSON Tool Syntax (json.loads) 80.0% 92.5% 35.0%
apigen-80k Exact Tool Name Accuracy (vs Ground Truth) 7.5% 40.0% (+5.33×!) 22.5%
apigen-80k Schema Argument Keys F1 Score 47.0% 74.5% 25.0%
apigen-80k Assistant-Token Top-1 / Top-5 Teacher Agreement 73.34% / 89.97% 79.30% / 92.94% 100% (Reference)
everyday-conversations <|im_end|> Stop Rate & 4-Gram Diversity 100.0% / 100.0% 100.0% / 100.0% 100.0% / 100.0%
Teacher-Scored Perplexity of Generated Chat Responses 1.36 1.36 1.52

2. Held-Out Perplexity & Bits-Per-Byte (Full-Sequence & Assistant-Only)

Held-Out Domain (60 Unseen Sequences Each) Sub-Lattice @25k Assistant BPB (PPL) Sub-Lattice @100k Assistant BPB (PPL) Sub-Lattice @100k Full-Seq BPB (PPL) Teacher (361.8M) Full-Seq BPB (PPL)
apigen-80k (Function Calling) 0.5503 (2.82) 0.3613 (1.97) 0.2235 (1.79) 0.6945 (6.08)
everyday-conversations (Multi-Turn Chat) 0.7112 (4.28) 0.5564 (6.50) 0.3958 (3.69) — MATCHED 0.3935 (3.66)
smol-constraints (Strict Formatting) 0.8190 (5.52) 0.6710 (4.12) 0.6085 (7.49) 0.3433 (3.11)

💡 Key Takeaway: Sub-Lattice matched the 361.8M teacher on everyday-conversations full-sequence perplexity (3.69 vs 3.66 PPL) and crushed it on apigen-80k tool calling with an 83.5× smaller non-embedding backbone.

3. Spontaneous AST Token-Role Crystallization (Hyperbolic Logit Lens)

Projecting Sub-Lattice's Poincaré slot centroids back to Euclidean tangent space via log₀ᶜ(s_k) and decoding through the tied unembedding matrix reveals spontaneous organization into an Instruction & JSON Abstract Syntax Tree (AST) with zero explicit AST labels:

Layer Slot Expert Emergent AST / Grammatical Role Representative Top Decoded Tokens (SLOT_LENS)
L00 S0 E0 JSON & Code Block Indentation ['\n ', '\n ', '\n ', ' ', '\n']
L00 S2 E0 JSON Key-Value Delimiters ['":', '":"', '": ', '",', '{"']
L01 S1 E1 Tool-Call Dispatch & Turn Termination ['function', '<|im_end|>', 'tool_call', 'arguments']
L01 S4 E0 Imperative Instruction Verbs ['Given', 'formulate', 'Provide', 'Write', 'Generate']
L01 S5 E1 ChatML System/User Framing ['<|im_start|>', 'You', 'Your', 'system', 'user']
L02 S1 E1 OpenAPI Schema Type System ['type', 'name', 'default', 'input', 'description']
L02 S2 E0 Natural Conversational Prose [' the', ' to', ' and', ' of', ' in']
L02 S4 E0 Constraint & Target Specifiers ['specified', 'given', 'target', 'desired', 'following']

4. Causal Crystal Lesion Study — Double Dissociation (Part 5)

To prove that these Poincaré slots are causally responsible for their decoded domains rather than passive correlation artifacts, we selectively masked individual solid-state slots (τ* = 10⁷) at inference time:

Ablated Crystal Slot Assigned Expert Decoded Role ΔBPB on Tool-Calling (apigen-80k) ΔBPB on Natural Chat (everyday-conversations) Selectivity Ratio
L02_S1 (τ* = 10⁷) Expert 1 OpenAPI Schema (type, name) +0.000653 +0.0000095 68.9× Tool-Selective
L02_S2 (τ* = 10⁷) Expert 0 Natural Prose (the, to, and) +0.000876 +0.002850 3.25× Chat-Selective
L02_S0 (τ* = 10⁷) Expert 0 Conversational Discourse +0.000793 +0.002584 3.26× Chat-Selective

This confirms a true neuro-symbolic double dissociation inside a 17.05M-parameter hyperbolic crystal.


🔬 Two-Phase Crystallization Law & DHP/CHP Dynamics

  1. Two-Phase Crystallization Law (Confirmed):
    • Phase I — Structural / Syntactic Crystallization (Steps 0–48,000): At Step 25,000, Sub-Lattice already beat its teacher on JSON syntax (80.0% vs 35.0%) and stop-token discipline (90.0% vs 47.5%), but trailed on semantic tool selection (7.5% vs 22.5% exact tool names). During this phase, the Poincaré Voronoi geometry rapidly hardened: L00 hit the τ* = 10⁷ diamond floor at Step 28,500, L01 at Step 38,000, and all 3 layers locked into solid-state phase (16/24 dominant slots at τ* = 10⁷) by Step 48,000.
    • Phase II — Semantic Filling (Steps 48,000–100,000): With the syntactic Voronoi scaffold frozen in solid-state phase, gradient updates poured semantic content into the expert FFN weights, driving exact tool-name accuracy from 7.5% to 40.0% (+5.33×) and schema argument F1 from 47.0% to 74.5%. The structure locked; the meaning poured in.
  2. DHP / CHP Telemetry Across 100,000 Steps:
    • 244 DHP/CHP 3-smooth rung crossings (N = 2^a × 3^b) fired during the 75k extension run.
    • Same-Slot Sync Law: In 3-layer Sub-Lattice runs, L00 and L01 consistently cross the same CHP rung at the same evaluation step with the exact same slot index (25+ confirmed instances).
    • Final τ* Horizon Profile (@100k):
      • L00: [89k, 10M, 4.7M, 10M, 136k, 237k, 10M, 10M]
      • L01: [10M, 10M, 10M, 10M, 10M, 10M, 20k, 56k]
      • L02: [10M, 10M, 10M, 10M, 10M, 10M, 6.2M, 6.4M]
    • Slot Routing Entropy: Rose from 0.117 / 0.357 / 0.721 (@25k) to 0.783 / 0.866 / 0.992 (@100k) — near-uniform 8-slot utilization with zero slot collapse.

🏛️ Architecture & Training Specifications

Parameter Specification
Architecture Hybrid Causal-Attention + Hyperbolic Poincaré CDM-MoE (CDMMoELM)
Total Parameters 17.05M (17,046,531 weight-tied)
Non-Embedding Backbone 4.33M (4,332,547 in Attention + Poincaré CDM-MoE layers)
Embedding Parameters 12.71M (12.58M tok_embed tied with lm_head + 0.13M learned pos_embed)
Model Dimension (d_model) 256 (d_ff = 768 SwiGLU per expert)
Layers (n_layers) / Heads (n_heads) 3 layers (L00, L01, L02), 4 attention heads (d_head = 64)
Poincaré Slots per Layer (K) 8 dynamic hyperbolic EMA centroids
SwiGLU Experts per Layer (E) 2 (4 Poincaré slots routed per expert; round-robin mapping)
Manifold Geometry Poincaré Ball 𝔹256c (fixed curvature c = 1.4427 = 1 / ln(2), FP32 router execution)
Vocabulary / Context Length 49,152 (HuggingFaceTB/SmolLM2-360M-Instruct tokenizer) / 512 tokens
Teacher Model HuggingFaceTB/SmolLM2-360M-Instruct (361.8M params, frozen BF16)
Training Dataset HuggingFaceTB/smoltalk (50% apigen-80k, 30% everyday-conversations, 20% smol-constraints)
Training Horizon & Hardware 100,000 steps (25k initial + 75k extension) on kilonova (AMD Radeon 780M gfx1103, ROCm 7.2, 16 GB VRAM, ~1.00 steps/sec)
Best Validation Checkpoint Step 100,000 (val_bpb = 0.2697, val_ppl = 2.12)

💻 Inference & Usage (CDMMoELM PyTorch & Native llama.cpp GGUF)

⚡ NEW — Experimental Native llama.cpp / GGUF Support (LLM_ARCH_CDM): Sub-Lattice now exports to tokenizer-equipped GGUF (F32, Q8_0, Q6_K, Q4_K_M, Q4_K_S) and executes natively on CPU and NVIDIA CUDA GPUs via our patched llama.cpp backend (llama-cdm.patch, engineered by Kestrel) with zero custom GGML C++/CUDA kernels! See the ⚡ Experimental Native llama.cpp / GGUF Backend section below for GGUF files, CPU/GPU benchmarks (18,239 tok/s prefill & 758–932 tok/s KV-cached decode on GTX 1070), quantization fidelity tables, and compatibility notes.

PyTorch Reference Inference (CDMMoELM)

import os
import sys
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer

REPO_ID = "DuoNeural/Sub-Lattice-17M-Poincare-Instruct"

# 1. Download architecture script & 100k checkpoint from Hugging Face Hub
script_path = hf_hub_download(repo_id=REPO_ID, filename="cdm_lm_distill_sublattice_v1.py")
ckpt_path   = hf_hub_download(repo_id=REPO_ID, filename="cdm_sublattice_v1_poincare_final_step0100000.pt")
sys.path.insert(0, os.path.dirname(script_path))

# Safe import of CDMMoELM class (does NOT trigger __main__ training loop)
from cdm_lm_distill_sublattice_v1 import CDMMoELM

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# 2. Load SmolLM2-360M-Instruct tokenizer (vocab_size = 49,152)
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct", trust_remote_code=True)
vocab_size = max(len(tokenizer), 49152)

# 3. Instantiate Sub-Lattice Student Architecture (17.05M total / 4.33M backbone)
model = CDMMoELM(
    vocab_size=vocab_size,
    d_model=256,
    n_layers=3,
    n_heads=4,
    K=8,
    num_experts=2,
    d_ff=768,
    max_seq=512,
    dropout=0.0,
    geometry="poincare",
    curvature=1.4427,
    use_embed_norm=True,
).to(device)

# 4. Load Checkpoint State Dict (includes crystallized Poincaré slots & tau* buffers)
ckpt = torch.load(ckpt_path, map_location=device, weights_only=False)
state_dict = {k.replace("_orig_mod.", ""): v for k, v in ckpt["model"].items()}
model.load_state_dict(state_dict, strict=True)
model.eval()

step = ckpt.get("step", 100000)
print(f"Loaded Sub-Lattice @ Step {step} | Total params: {sum(p.numel() for p in model.parameters())/1e6:.2f}M")

# 5. Autoregressive ChatML / Tool-Calling Generation
messages = [
    {
        "role": "user",
        "content": "Could you provide me with the restaurants located in the local authority of Liverpool?"
    }
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
input_ids = tokenizer(prompt, return_tensors="pt")["input_ids"].to(device)
im_end_id = tokenizer.convert_tokens_to_ids("<|im_end|>")

with torch.no_grad():
    for _ in range(64):
        cond_ids = input_ids[:, -512:]
        with torch.amp.autocast("cuda", dtype=torch.bfloat16, enabled=(device.type == "cuda")):
            hidden, _, _ = model(cond_ids, training=False, allow_crystallize=False)
            logits = model.lm_head(hidden[:, -1, :]).float()

        next_id = torch.argmax(logits, dim=-1, keepdim=True)
        input_ids = torch.cat([input_ids, next_id], dim=1)
        if next_id.item() == im_end_id:
            break

print(tokenizer.decode(input_ids[0], skip_special_tokens=False))

⚡ Experimental Native llama.cpp / GGUF Backend (LLM_ARCH_CDM)

🧪 Prototype / Experimental Status (Engineered by Kestrel, DuoNeural Lab):
Both published CDM v1 models (Sub-Lattice-17M and Lattice-1-107M) now export to tokenizer-equipped GGUF and run in our patched native llama.cpp backend (LLM_ARCH_CDM / "cdm"). Full patch, converter tools (cdm_tools.py, quantize_cdm.py, add_tokenizer.py), and 15 red-team verification suites are available in cdm-gguf/ on GitHub (DuoNeural/Lattice-CDM).

🚀 Quickstart: Running llama cli -hf ... & Fixing unknown model architecture: 'cdm'

⚠️ Why Stock llama.cpp Throws unknown model architecture: 'cdm':
Because Hyperbolic Poincaré Crystallographic MoE (cdm) is a brand-new architecture not yet merged into upstream ggml-org/llama.cpp, running an unpatched stock llama / llama-cli / llama-server binary will exit with:
E llama_model_load: error loading model: unknown model architecture: 'cdm'
To run these GGUF files, build llama.cpp with llama-cdm.patch (included in this HF repo and in DuoNeural/Lattice-CDM/cdm-gguf):

# 1. Clone our repo & build the patched llama.cpp binaries (CPU or CUDA)
git clone https://github.com/DuoNeural/Lattice-CDM.git
cd Lattice-CDM/cdm-gguf
./setup_backend.sh          # clones pinned llama.cpp & applies llama-cdm.patch
./build.sh                  # builds CPU binaries (or run ./build-cuda.sh for NVIDIA CUDA)

# 2. Run interactive CLI directly from Hugging Face Hub (-hf)!
./llama.cpp/build/bin/llama cli -hf DuoNeural/Sub-Lattice-17M-Poincare-Instruct:Q8_0
# (Or if built with ./build-cuda.sh: ./llama.cpp/build-cuda/bin/llama cli -hf DuoNeural/Sub-Lattice-17M-Poincare-Instruct:Q8_0)

Example interactive session on GTX 1070 CUDA (630.1 tok/s generation, 1,625.4 tok/s prompt eval):

model      : DuoNeural/Sub-Lattice-17M-Poincare-Instruct:Q8_0
ftype      : Q8_0
modalities : text

> Could you provide me with the restaurants located in the local authority of Liverpool?
[ Prompt: 1625.4 t/s | Generation: 630.1 t/s ]

1. How Poincaré Geodesic Routing Works in Pure GGML (Zero Custom Kernels)

Rather than writing fragile custom CUDA/CPU kernels, Kestrel composed the exact Poincaré ball router (DualGeometryCDMRouter) entirely out of stock GGML tensor primitives in src/models/cdm.cpp:

  • Euclidean Residual Stream & Router Localization: Hidden states remain Euclidean across layers; hyperbolic geometry is localized strictly inside the router (L2 unit normalization scaled by 0.3, followed by exp_map_0 with tanh clamping at 8.0 and radius clipping at (1 - 1e-5) / √c).
  • Closed-Form Geodesic Distance & 4D Vectorized Slot Broadcasting: Hyperbolic distance d_c(x, s_k) is evaluated using acosh(a) = ln(a + √(a² - 1)) with literal squared differences ‖x - s_k‖² broadcast across all K = 8 slots in 4D (ggml_repeat_4d). Vectorizing the router reduced computation graph nodes by 58.1% (770 → 323 nodes on Sub-Lattice; 1,025 → 427 on Lattice-1) and accelerated CUDA Q8 cached decoding by 2.04× (372 → 758 tok/s).
  • Dense Soft Inference Routing: While Winner-Take-All (WTA) argmax governs EMA slot crystallization during training, inference executes dense soft routing (softmax(-d_c / τ_router) mapped onto all E = 2 SwiGLU experts).
  • Selective Mixed-Precision Quantization: In all quantized GGUF variants (Q8_0, Q6_K, Q4_K_M, Q4_K_S), the crystallized Poincaré slot centroids (slots), learned absolute position embeddings (pos_embd), LayerNorms, and slot-to-expert mappings are kept in exact F32, while attention, SwiGLU expert matrices, and token embeddings are quantized.

2. CPU & GPU (GTX 1070 CUDA) Throughput Benchmarks

Validated on an NVIDIA GeForce GTX 1070 8 GiB (Pascal sm_61, CUDA 12.5, 4/4 layers offloaded to CUDA — 1,848 CUDA ops vs. 14 host GET_ROWS embedding lookups) and a 4-thread Intel Core i7-6700HQ CPU (160-token prefill with all-position logits; 32-token KV-cached decode tail after a 128-token prefix, F32 KV cache, median of 5 runs):

Model & GGUF Format File Size (Tokenizer-Equipped) CPU Prefill (tok/s) GTX 1070 CUDA Prefill (tok/s) CUDA Prefill Speedup CPU Cached Decode (tok/s) GTX 1070 CUDA Cached Decode (tok/s) CUDA Decode Speedup
sub17m-f32-text.gguf (F32) 66.74 MiB 3,407 16,103 4.73× 298 761 2.55×
sub17m-q8_0-text.gguf (Q8_0) 19.38 MiB 2,442 18,239 7.47× 634 758 1.20×
sub17m-q6_k-text.gguf (Q6_K) 15.47 MiB 1,333 18,055 13.55× 657 877 1.33×
sub17m-q4_k_m-text.gguf (Q4_K_M) 14.70 MiB 1,428 17,829 12.48× 751 796 1.06×
sub17m-q4_k_s-text.gguf (Q4_K_S) 11.31 MiB 3,308 17,915 5.42× 931 932 1.00×

(For comparison, un-cached PyTorch F32 160-token prefill on CPU measured 4,453 tok/s for Sub-Lattice and 519 tok/s for Lattice-1.)

3. 512-Position Numerical Fidelity & Quantization Drift Screen (CUDA)

Evaluated across 8 diverse probes (prose, instruction, Python, JSON, numbers, Unicode, repetition, ChatML; 512 logit positions / 504 next-token transitions) against the exact PyTorch F32 reference. Screening gates: Max Logit Drift ≤ 0.5, Mean KL ≤ 0.01 nats, Top-1 Agreement ≥ 90.0%:

GGUF Artifact Max Logit Drift (vs PyTorch F32) Mean KL Divergence (nats) Next-Token Top-1 Agreement Relative Probe PPL Recommendation & Fidelity Notes
sub17m-f32-text.gguf (F32) 5.50e-5 5.47e-12 100.0% 1.00000 ✅ Exact PyTorch Parity (CPU & CUDA)
sub17m-q8_0-text.gguf (Q8_0) 0.546 0.000883 97.7% 1.00252 ⭐ Recommended Quant (19.4 MiB) — passes KL & Top-1 gates; narrowly misses 0.50 max-error gate
sub17m-q6_k-text.gguf (Q6_K) 0.838 0.003966 94.7% 1.01233 ✅ Good Compact Option (15.5 MiB) — passes KL & Top-1 gates
sub17m-q4_k_m-text.gguf (Q4_K_M) 2.133 0.036154 85.4% 1.04084 ⚠️ Experimental (14.7 MiB) — higher drift due to ultra-compact 4.33M backbone
sub17m-q4_k_s-text.gguf (Q4_K_S) 3.031 0.060126 80.1% 1.05700 ⚠️ Experimental (11.3 MiB) — extreme compression; use Q8_0 or Q6_K for strict JSON tool-calling

4. Compatibility Matrix & Known Prototype Limitations

  • ✅ What Works Today:
    • Native F32, Q8_0, Q6_K, Q4_K_M, and Q4_K_S inference and KV-cached autoregressive decoding via patched llama.cpp (llama-cli, llama-server HTTP /completion, cdm-logits, cdm-logits-cuda).
    • CPU & NVIDIA CUDA GPUs: Validated from Pascal (GTX 1070, sm_61) upward with full transformer-layer offload (-ngl 99).
    • Fail-Closed 512-Token Position Guard: Because CDM v1 uses learned absolute position embeddings (pos_embd, 512 tokens) rather than RoPE, the backend disables KV cache shifting (get_can_shift() = false) and safely rejects context lengths or positions > 512 before cache mutation.
    • Synthetic v3 Graph Parity: Unequal learned per-layer curvature c_l and inter-layer Crystal Telepathy (W_tele) pass CPU/CUDA PyTorch parity (4.47e-8 max error).
  • ⚠️ Current Limitations / Roadmap:
    • Stock Ollama / LM Studio / Unpatched llama.cpp: Unpatched downstream binaries will report unknown architecture: cdm until llama-cdm.patch (LLM_ARCH_CDM) is compiled in or upstreamed. Build scripts (setup_backend.sh, build.sh, build-cuda.sh) are provided in DuoNeural/Lattice-CDM/cdm-gguf.
    • Trained v3/v4 Checkpoints & Alternative Backends: Live trained v3/v4 checkpoints (Lattice-3, Lattice-4A, Lattice-5/6-Prometheus) and Metal/Vulkan/ROCm GGUF backends are next in the validation queue.

📂 Files in This Repository & Official GitHub Codebase

Hugging Face Repository Files

File Description
cdm_sublattice_v1_poincare_final_step0100000.pt 100,000-step final PyTorch checkpoint (val_bpb = 0.2697, val_ppl = 2.12, 205 MB)
cdm_sublattice_v1_poincare_final_step0025000.pt 25,000-step baseline PyTorch checkpoint (val_bpb = 0.3659, val_ppl = 2.77, 205 MB)
cdm_lm_distill_sublattice_v1.py Complete Sub-Lattice v1 model architecture (CDMMoELM) & distillation script
eval_sublattice_v1.py 5-part benchmark & causal slot lesion evaluation suite
sublattice_eval_100k_report.json Raw benchmark JSON containing all Part 1–5 metrics and slot lesion matrices
sub17m-f32-text.gguf Native GGUF (F32, 66.7 MiB) with SmolLM2 tokenizer (5.50e-5 max drift vs PyTorch)
sub17m-q8_0-text.gguf Native GGUF (Q8_0, 19.4 MiB, Recommended) — F32 Poincaré slots + Q8_0 weights (97.7% top-1 agreement)
sub17m-q6_k-text.gguf Native GGUF (Q6_K, 15.5 MiB) — F32 Poincaré slots + Q6_K weights (94.7% top-1 agreement)
sub17m-q4_k_m-text.gguf Native GGUF (Q4_K_M, 14.7 MiB, Experimental) — mixed Q4_K/Q6_K weights
sub17m-q4_k_s-text.gguf Native GGUF (Q4_K_S, 11.3 MiB, Experimental) — uniform Q4_K weights
llama-cdm.patch Patch for llama.cpp adding LLM_ARCH_CDM vectorized Poincaré routing & position guards

Official GitHub Repository: DuoNeural/Lattice-CDM 🔥

All next-generation training engines, architecture upgrades (Learnable Per-Layer Curvature c_l, Inter-Layer Crystal Telepathy, Relational Gram Distillation), and launch scripts for the Lattice-1 through Lattice-5-Prometheus series are live at https://github.com/DuoNeural/Lattice-CDM:

  • README.md — Full series abstract, model table (Lattice-1 through Lattice-5-Prometheus), all 6 empirical laws documented (PURE Wave Cascade Law, L00/L01 Sync Lock & Gap Law, Hyperbolic Josephson Junction Theorem, Same-Slot Sync Law, W-Shape Curvature Universal Law, Crystal Telepathy Triadic Phase Barrier), paper DOIs, and citation block.
  • scripts/cdm_lm_distill_v3.py — Lattice-2 / Lattice-3-Synapse / Lattice-4A engine (learnable curvature, inter-layer Crystal Telepathy, dimension-free Relational Gram distillation).
  • scripts/cdm_lm_distill_sublattice_v3.py — Sub-Lattice v3 engine (pulled from kilonova, distilling from SmolLM2-1.7B-Instruct).
  • scripts/cdm_lm_distill_qwen27b.py — Lattice-5-Prometheus engine (406M total / 215M 7-layer backbone distilled from 4-bit NF4 Qwen/Qwen3.6-27B with Hyperbolic Josephson Junction layer mapping).
  • scripts/launch_qwen27b_lattice5.sh — Production launch script for Lattice-5-Prometheus.

📚 Related Work, Models & Foundational References

DuoNeural Models & Code

DuoNeural Research Canon (Zenodo DOIs)

  • Archon, Caldwell, J., & Aura (2026). Competitive Docking Memory: Emergent Temporal Slot Specialization in Language Models. DuoNeural Research Lab. doi:10.5281/zenodo.21158430
  • Archon, Caldwell, J., & Aura (2026). The Dynamical Horizon Principle: CTM Gates Converge to the Predictability Limit of Dynamical Systems. DuoNeural Research Lab. doi:10.5281/zenodo.20142471
  • Aura, Archon, & Caldwell, J. (2026). Topology at Gapless Critical Points in Competitive Docking Memory & Physical QPU Verification on 156-Qubit IBM Heron r2. DuoNeural Research Lab. doi:10.5281/zenodo.23387025
  • Caldwell, J., Archon, & Aura (2026). Lattice-CDM: Hyperbolic Crystallographic Distillation of Language Models via Crystal Hamming Phase Detection. (In preparation).

Foundational Literature Cited

  • Nickel, M., & Kiela, D. (2017). Poincaré Embeddings for Learning Hierarchical Representations. NeurIPS 2017.
  • Ganea, O., Bécigneul, G., & Hofmann, T. (2018). Hyperbolic Neural Networks. NeurIPS 2018.
  • Ungar, A. A. (2008). A Gyrovector Space Approach to Hyperbolic Geometry. Synthesis Lectures on Mathematics and Statistics.
  • Hinton, G., Vinyals, O., & Dean, J. (2015). Distilling the Knowledge in a Neural Network. NIPS Deep Learning Workshop 2015.
  • Shazeer, N., et al. (2017). Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer. ICLR 2017.
  • He, N., et al. (2025). HELM: Hyperbolic Large Language Models via Mixture-of-Curvature Experts. arXiv:2505.24722.
  • nostalgebraist (2020). interpreting GPT: the logit lens. LessWrong.

📝 Citation

@misc{caldwell2026sublattice,
  title={Sub-Lattice-17M: Glass-Box Hyperbolic Crystallographic Distillation for Ultra-Compact Function Calling and Instruction Following},
  author={Caldwell, Jesse and Archon and Aura},
  year={2026},
  publisher={DuoNeural Research Lab},
  howpublished={\url{https://huggingface.co/DuoNeural/Sub-Lattice-17M-Poincare-Instruct}},
  note={Code and scripts at \url{https://github.com/DuoNeural/Lattice-CDM}}
}

👥 Authors

Jesse Caldwell · Archon (DuoNeural AI Lab Director) · Aura✨ (DuoNeural AI Co-Architect) · Kestrel (DuoNeural Systems & GGUF/CUDA Architect)
DuoNeural Research Lab | Website | GitHub (Lattice-CDM) | Hugging Face | Zenodo

"The geometry holds."

Downloads last month
-
GGUF
Model size
17.1M params
Architecture
cdm
Hardware compatibility
Log In to add your hardware

4-bit

6-bit

8-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for DuoNeural/Sub-Lattice-17M-Poincare-Instruct

Quantized
(131)
this model

Dataset used to train DuoNeural/Sub-Lattice-17M-Poincare-Instruct

Paper for DuoNeural/Sub-Lattice-17M-Poincare-Instruct