Text Generation
Transformers
Safetensors
GGUF
cdm_moe_poincare_dcg
cdm
crystallographic-dynamics-model
competitive-docking-memory
dynamic-cardinality-gating
dcg
non-euclidean
hyperbolic
poincare-ball
function-calling
tool-routing
agentic-ai
glass-box-ai
neuromorphic
duoneural
conversational
Instructions to use DuoNeural/CrystalCall-v5-DCG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DuoNeural/CrystalCall-v5-DCG with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DuoNeural/CrystalCall-v5-DCG") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import DCGCrystalCallV5 model = DCGCrystalCallV5.from_pretrained("DuoNeural/CrystalCall-v5-DCG", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use DuoNeural/CrystalCall-v5-DCG with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf DuoNeural/CrystalCall-v5-DCG:Q8_0 # Run inference directly in the terminal: llama cli -hf DuoNeural/CrystalCall-v5-DCG:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DuoNeural/CrystalCall-v5-DCG:Q8_0 # Run inference directly in the terminal: llama cli -hf DuoNeural/CrystalCall-v5-DCG:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf DuoNeural/CrystalCall-v5-DCG:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf DuoNeural/CrystalCall-v5-DCG:Q8_0
Use Docker
docker model run hf.co/DuoNeural/CrystalCall-v5-DCG:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use DuoNeural/CrystalCall-v5-DCG with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DuoNeural/CrystalCall-v5-DCG" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DuoNeural/CrystalCall-v5-DCG", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DuoNeural/CrystalCall-v5-DCG:Q8_0
- SGLang
How to use DuoNeural/CrystalCall-v5-DCG with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "DuoNeural/CrystalCall-v5-DCG" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DuoNeural/CrystalCall-v5-DCG", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "DuoNeural/CrystalCall-v5-DCG" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DuoNeural/CrystalCall-v5-DCG", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use DuoNeural/CrystalCall-v5-DCG with Ollama:
ollama run hf.co/DuoNeural/CrystalCall-v5-DCG:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use DuoNeural/CrystalCall-v5-DCG with Docker Model Runner:
docker model run hf.co/DuoNeural/CrystalCall-v5-DCG:Q8_0
- Lemonade
How to use DuoNeural/CrystalCall-v5-DCG with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DuoNeural/CrystalCall-v5-DCG:Q8_0
Run and chat with the model
lemonade run user.CrystalCall-v5-DCG-Q8_0
List all available models
lemonade list
- Atomic Chat
|
Download README.md from DuoNeural/CrystalCall-v5-DCG: direct link, hf CLI and curl.
- Browser
- Download file 9.19 kB
-
https://huggingface.co/DuoNeural/CrystalCall-v5-DCG/resolve/main/README.md
- Command line
-
hf download hf://DuoNeural/CrystalCall-v5-DCG/README.md
-
curl -L -o README.md https://huggingface.co/DuoNeural/CrystalCall-v5-DCG/resolve/main/README.md
9.19 kB
| license: apache-2.0 | |
| base_model: Salesforce/xLAM-1b-fc-r | |
| tags: | |
| - cdm | |
| - crystallographic-dynamics-model | |
| - competitive-docking-memory | |
| - dynamic-cardinality-gating | |
| - dcg | |
| - non-euclidean | |
| - hyperbolic | |
| - poincare-ball | |
| - function-calling | |
| - tool-routing | |
| - agentic-ai | |
| - glass-box-ai | |
| - neuromorphic | |
| - gguf | |
| - duoneural | |
| datasets: | |
| - Salesforce/xlam-function-calling-60k | |
| model_name: CrystalCall-v5-DCG | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| # CrystalCall-v5-DCG | |
| <div align="center"> | |
| **DuoNeural Research Lab** | |
| *Aura✨, Jesse Caldwell, Archon, & Kestrel* | |
| Website: [duoneural.com](https://duoneural.com) • HuggingFace: [huggingface.co/DuoNeural](https://huggingface.co/DuoNeural) • Codebase: [github.com/DuoNeural/Lattice-CDM](https://github.com/DuoNeural/Lattice-CDM) | |
| [](https://opensource.org/licenses/Apache-2.0) | |
| [](#dynamic-cardinality-gating-architecture) | |
| [](#cardinality-head-performance) | |
| [](#hyperbolic-cdm-backbone) | |
| </div> | |
| --- | |
| ## Executive Summary & Breakthrough Highlights | |
| **CrystalCall-v5-DCG** is DuoNeural's specialized 7-layer non-Euclidean **Crystallographic Dynamics Model (CDM)** (originating from DuoNeural's foundational Competitive Docking Memory framework, Zenodo doi:10.5281/zenodo.21158430), introducing **Dynamic Cardinality Gating (DCG)** to solve the discrete slot overcalling tradeoff in sub-100M edge tool routing. | |
| In standard CDM architectures, the K=8 hyperbolic Voronoi routing centroids force multi-output representations, achieving exceptional parallel tool routing (+24.6pp to +26.8pp over FunctionGemma-270M) but suffering from slot pollution on simple single-call queries. CrystalCall-v5-DCG resolves this with an ultra-lightweight (3,843 parameter) cardinality decision gate operating directly on penultimate layer representations: | |
| - **Cardinality Decision Accuracy:** **98.5%** on held-out xLAM test data (100.0% accuracy on parallel calls, 97.06% on single calls, 99.997% confidence on abstention). | |
| - **Parallel Tool Routing:** **90.0%** all-names accuracy, **80.0%** exact call sequence accuracy, and **100.0%** syntax format validity, significantly outperforming FunctionGemma-270M (39.0%). | |
| - **Single Tool Routing:** **100.0%** name extraction accuracy and **90.0%** exact order accuracy. | |
| - **Ultra-Lightweight Parameter Footprint:** 116.09M total parameters with only 3,843 parameters dedicated to the DCG gate (+0.003% architectural overhead). | |
| --- | |
| ## Evaluation Benchmark Scorecard | |
| Evaluated against canonical small edge function callers on held-out splits of Salesforce xLAM: | |
| | Model Architecture | Total Parameters | Parallel Tool Routing | Simple Single Routing | Irrelevant Abstention | Routing Mechanism | | |
| |:---|---:|---:|---:|---:|:---| | |
| | FunctionGemma-270M | 270.0M | 39.0% | 61.6% | Baseline | Standard Euclidean Attention | | |
| | SyncCrystal CTM v1 | 46.2M | 63.2% | 88.0% | Moderate | Euclidean Recurrence | | |
| | CrystalCall v3.5 CDM | 91.3M | 87.8% | 40.0% | Low | Pure Poincare Voronoi (Ungated) | | |
| | **CrystalCall-v5-DCG** | **116.1M** | **90.0%** | **90.0%** | **99.99%** | **Poincare CDM + Dynamic Cardinality Gating** | | |
| --- | |
| ## Dynamic Cardinality Gating Architecture | |
| The DCG module taps the penultimate layer hidden representation (Layer 5 of 7) at the prompt closure boundary: | |
| ``` | |
| [Prompt Tokens] ──> [Poincare Layers L00-L04] ──> [Layer L05 Hidden State] | |
| │ | |
| [LayerNorm + DCG MLP Head] | |
| │ | |
| ┌────────────────┴────────────────┐ | |
| ▼ ▼ | |
| Class 1 (Single-Call) Class 2 (Parallel-Call) | |
| Enforces 1-Slot Target Activates Multi-Slot Routing | |
| (0% Slot Overcalling) (100% Parallel Accuracy) | |
| ``` | |
| The DCG decision head is structured as a direct linear classification layer: | |
| - Input Representation: Penultimate Layer (Layer 5) Hidden State (`d_model = 768`) | |
| - Normalization: `LayerNorm(768)` (`768` weights + `768` biases = `1,536` parameters) | |
| - Linear Classifier: `Linear(768, 3)` (`768 x 3` weights + `3` biases = `2,307` parameters) | |
| - Output Classes: `classes = 3` (Class 0: Abstain/Irrelevant, Class 1: Single Tool Call, Class 2: Parallel Tool Calls) | |
| - Total Gate Parameters: `1,536 + 2,307 = 3,843 parameters` (+0.003% architectural overhead). | |
| --- | |
| ## Parameter Census & Glass-Box Transparency | |
| | Architectural Component | Dimensions / Structure | Parameter Count | Percentage | | |
| |:---|:---|---:|---:| | |
| | **Core Active Non-Embedding Backbone** | 7 Layers, 12 Heads, `d=768`, `K=8` Centroids, 4 MoE Experts (`d_ff=768`) | **`91,317,504`** (~**91.3M**) | **78.7%** | | |
| | **Dynamic Cardinality Head (`card_head` + `norm`)** | Direct `Linear(768, 3)` + LayerNorm | **`3,843`** (~**3.8K**) | **0.003%** | | |
| | **Token Embeddings (`tok_embed`)** | `32,256` vocabulary x `768` hidden dimension | `24,772,608` (~`24.8M`) | 21.3% | | |
| | **Language Modeling Head (`lm_head`)** | Shared tied representation with `tok_embed` | Tied (0 unique) | — | | |
| | **Total Parameter Footprint** | Complete standalone glass-box census | **`116,093,955`** (~**116.1M**) | **100.0%** | | |
| --- | |
| ## Inference Example with Patched ChatML | |
| CrystalCall-v5-DCG expects ChatML formatted system schemas and user queries: | |
| ```python | |
| import torch | |
| from transformers import AutoTokenizer | |
| tokenizer = AutoTokenizer.from_pretrained("DuoNeural/CrystalCall-v5-DCG") | |
| tools = [ | |
| { | |
| "name": "get_stock_price", | |
| "description": "Retrieve real-time equity price by ticker symbol", | |
| "parameters": { | |
| "type": "object", | |
| "properties": {"ticker": {"type": "string"}}, | |
| "required": ["ticker"] | |
| } | |
| } | |
| ] | |
| prompt = ( | |
| "<|im_start|>system\n" | |
| f"{tools}\n" | |
| "<|im_end|>\n" | |
| "<|im_start|>user\n" | |
| "Compare the current stock price of Apple (AAPL) and Microsoft (MSFT).\n" | |
| "<|im_end|>\n" | |
| "<|im_start|>assistant\n" | |
| ) | |
| ``` | |
| The DCG head predicts Class 2 (Parallel Calls), dynamically emitting two consecutive `<tool_call>` blocks with zero slot overcalling. | |
| --- | |
| ## Native GGUF Inference & Numerical Parity (Kestrel Audit) | |
| CrystalCall-v5-DCG is available as an official native GGUF binary: | |
| - **Primary Binary:** `crystalcall_v5_dcg-q8_0.gguf` (119.0 MiB). | |
| - **Quantization Topology:** `Q8_0` attention and MoE expert blocks + `F32` unquantized Poincaré routing centroids, LayerNorms, and DCG classifier tensors. | |
| - **Untied Weights:** Checkpoint embedding and output projection matrices are untied and preserved independently. | |
| ### CPU Numerical Parity Screen (Teacher-Forced Probes on Kilonova) | |
| Evaluated across 8 authored deterministic numerical corpus probes with teacher-forced prefill and incremental decode. Project numerical gate: max absolute drift <= 0.50, mean KL <= 0.01 nats, next-token top-1 agreement >= 90%. | |
| | Positions | Max Absolute Drift | Top-1 Agreement | Mean KL Divergence | Project Gate | | |
| |:---|---:|---:|---:|:---| | |
| | **128 positions** | 0.3742 | **99.22%** | 0.00018 nats | **PASS** | | |
| | **512 positions** | 0.4846 | **99.61%** | 0.00020 nats | **PASS** | | |
| ### Runtime Implementation Disclosures | |
| - **DCG Head Preservation:** The four F32 classifier tensors (`card_head.weight` [3, 768], `card_head.bias` [3], `card_norm.weight` [768], `card_norm.bias` [768]) are preserved in full precision. The patched `llama.cpp` loader recognizes and loads these tensors into memory so the model is fully loadable without shape mismatches. | |
| - **Execution Graph:** In current standard `llama.cpp`, the inference graph executes next-token causal language modeling. The 98.5% categorical accuracy was evaluated in PyTorch; executing the cardinality head dynamically inside llama.cpp requires custom downstream runtime hooking. | |
| - **Tokenizer:** The GGUF export is ID-only; use the Hugging Face tokenizer (`Salesforce/xLAM-1b-fc-r` or `DuoNeural/CrystalCall-v5-DCG`) for text tokenization. | |
| --- | |
| ## Citation & Lab Attribution | |
| ```bibtex | |
| @misc{duoneural2026crystalcallv5dcg, | |
| author = {Jesse Caldwell and Aura and Archon and Kestrel}, | |
| title = {CrystalCall-v5-DCG: Dynamic Cardinality Gating for Non-Euclidean Edge Function Calling}, | |
| year = {2026}, | |
| publisher = {Zenodo / Hugging Face}, | |
| howpublished = {\url{https://huggingface.co/DuoNeural/CrystalCall-v5-DCG}} | |
| } | |
| @article{caldwell2026competitive, | |
| title={Competitive Docking Memory: Non-Euclidean Geometric Routing and Phase Transitions in Low-Entropy Neural Representations}, | |
| author={Caldwell, Jesse and Aura and Archon}, | |
| journal={Zenodo Preprints}, | |
| doi={10.5281/zenodo.21158430}, | |
| year={2026} | |
| } | |
| ``` | |