Skip to content
Language modelsPrototype

Verace V5

A multimodal language model architecture built from non-Abelian gauge attention, a p-adic ultrametric kernel and a Calabi-Yau projector.

Verace Research
  1. Value vector: a value at an earlier position, before transport
  2. Cayley transport: orthogonal, so the value keeps its norm
  3. Skew generator: built per token from its key and value
  4. Rotated value: carried to the query position, then mixed by softmax
Figure 1. Orthogonal Cayley transport of value vectors in Verace V5 attention. Schematic: a value vector rotated across a sphere by the orthogonal Cayley transport in non-Abelian gauge attention. The prototype is unit-tested at small scale, and no training run is recorded.
Open the simulator on its own pageA state that turns instead of growing: an interactive toy model of the principle. You can also try it below

Overview

Verace V5 is a multimodal causal language model architecture in the Verace V series. It replaces standard attention and feed-forward blocks with operators taken from gauge theory, p-adic analysis and complex geometry. It asks whether a model can mix tokens through norm-preserving transports between positions that do not commute, weight positions with an ultrametric distance, and pass hidden states through a small complex bottleneck, all trained with an optimizer that keeps weights orthogonal. It extends Verace V4. The design specification replaces V4's SO(N) vector parallel transport with a non-Abelian transport of nonzero curvature, and V4's Gaussian kernel with a p-adic one.

Each layer applies four operators in order: gauge transport attention, a p-adic ultrametric kernel mixer, a Calabi-Yau projector and a gated activation. The attention rotates every value vector by an orthogonal Cayley transport built from per-token skew-symmetric generators, then mixes the rotated values with a causal softmax over key-key similarity. The language model head is tied to the embeddings. Images enter through a vision encoder named after MoonViT, the encoder in the Kimi Team's technical report, here written as a standard transformer encoder. Training adds a curvature penalty to cross-entropy and uses S-Muon, an SVD-based variant of the Muon optimizer, which is by other authors.

The lab implemented the architecture in PyTorch: the model, optimizer, training step, tokenizer, chat template, generator and evaluator. The test suite covers gauge curvature and holonomy, exact p-adic valuation and the ultrametric inequality, the Calabi-Yau projector, the S-Muon superalgebra projection and retraction, and an end-to-end pipeline. The configuration specifies 256 layers, hidden width 65,536, gauge width 2048 and a vocabulary of 1,048,576. That is a specification only. The evaluator scores substring matches on two toy samples by default. The code differs from the design specification in two places: the module described as fused Triton kernels is plain PyTorch, and the Ricci-flat, SU(3) volume-preserving projector is implemented as RMS normalization with Gaussian damping.

Status: the full architecture, optimizer and training step are implemented and unit-tested at small scale. No training run, loss curve or benchmark result is recorded. The configured 256-layer model is a design target and has not been built at that size. No fused GPU kernel exists, despite the name of the serving module. Whether curvature-regularized gauge attention, the p-adic kernel or the Calabi-Yau bottleneck helps language modelling has not been measured. Verace V6 reuses the holographic thought template and the byte-level tokenizer, and Verace V7 cites the gauge attention and the projector.

Status

Prototype. The model, optimizer, training step and serving code are implemented with unit and end-to-end tests, but no training run or evaluation result is recorded.

Simulator

A state of length 1 is updated again and again by the same small step, in two ways. Switch between rotating it and adding to it, and watch its length.

  • the circle: every state of length 1
Length of the state at the end
1.000
Drift from length 1
0.0%
Turned in all
248°
Updates
24
How the state is updated

Switch between the two methods with the same step size. Adding the step leaves the circle; rotating cannot.

This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.

Architecture

  1. Non-Abelian gauge attention

    A token mixer that carries each value vector to the query position with a pairwise orthogonal transport before weighting it. It has no separate query projection and adds its output back through RMSNorm.

  2. p-adic ultrametric kernel mixer

    A second token mixer whose weights fall with feature distance, scaled by the 2-adic valuation of the position offset. It is causally masked, row-normalized and added as a residual.

  3. Calabi-Yau holomorphic projector

    A bottleneck that maps hidden states to three complex coordinates, projects them on 19 learned basis matrices and recombines them into the hidden space.

  4. Gated soft-clamp activation

    An activation that passes positive inputs almost unchanged and softly bounds negative inputs.

  5. S-Muon optimizer

    An orthogonalizing optimizer derived from Muon. It splits gradients into superalgebra sectors, steps by the polar factor of the momentum, and retracts weights onto the Stiefel manifold.

  6. Vision encoder

    A patch-14 convolutional embedding followed by standard transformer encoder layers and a linear projection to the hidden width, named after the MoonViT encoder of the Kimi Team's report. It uses no positional encoding.

  7. Byte tokenizer and thought template

    A byte-level tokenizer with reserved special ids, and a chat format that wraps model output in holographic thought blocks carrying gauge metadata. The format is a variant of the XTML chat template from the Kimi Team's report.

  8. Curvature-regularized training step

    One pretraining step that combines causal cross-entropy with a penalty on gauge curvature in every layer, followed by an S-Muon update.

  9. Generator and evaluator

    A sampling loop for text and image prompts, and an evaluator that scores the percentage of generations containing the ground-truth substring.

Implementation

Mechanisms as they are implemented in the source code, with the constants the code uses.

Cayley non-Abelian holonomy transport
Each token defines a skew generator Ai=0.02 (kivi⊤−viki⊤)A_i = 0.02\,(k_i v_i^\top - v_i k_i^\top). Pairwise curvature is Fij=skew(Ai−Aj+[Ai,Aj])F_{ij} = \mathrm{skew}(A_i - A_j + [A_i, A_j]). The transport is the Cayley map Uij=(I−12Fij)−1(I+12Fij)U_{ij} = (I - \tfrac{1}{2}F_{ij})^{-1}(I + \tfrac{1}{2}F_{ij}), which is orthogonal, so vi←j=Uijvjv_{i \leftarrow j} = U_{ij} v_j preserves norm.
Holonomy-transported attention rule
The layer computes hi=∑jsoftmaxj(ki⋅kj/d) Uijvjh_i = \sum_j \mathrm{softmax}_j(k_i \cdot k_j / \sqrt{d})\, U_{ij} v_j under a causal mask, so keys play the role of queries. The output is x+RMSNorm(Wouth)x + \mathrm{RMSNorm}(W_{out} h). The layer can also return the mean squared curvature for the loss.
Gauge curvature regularization loss
The training objective is L=CE+λ∑ℓmean(Fij2)\mathcal{L} = \mathrm{CE} + \lambda \sum_{\ell} \mathrm{mean}(F_{ij}^2) with λ=0.001\lambda = 0.001. The penalty discourages large pairwise field strength in every layer's gauge attention.
p-adic ultrametric kernel weights
Mixing weights are K(i,j)=exp⁡(−γ∥xi−xj∥2 2−v2(∣i−j∣))K(i,j) = \exp(-\gamma \|x_i - x_j\|^2\, 2^{-v_2(|i-j|)}) with γ=1/d\gamma = 1/\sqrt{d}, causally masked, row-normalized and applied to WvxW_v x. The valuation is computed exactly as vp(n)=∑kI(n mod pk=0)v_p(n) = \sum_k \mathbb{I}(n \bmod p^k = 0) with p=2p = 2. Offsets divisible by a high power of 2 therefore count as closer.
Hodge bottleneck projection
Hidden states map linearly to z∈C3z \in \mathbb{C}^3 (three real and three imaginary coordinates) and are projected on 19 learned 3x3 form matrices initialized at scale 0.02. A dual 19x3 weight contracts the result, which is RMS volume-normalized and damped by exp⁡(−s∣z∣2)\exp(-s|z|^2) with learnable ss initialized at 0.5.
Gated soft-clamp formula
The activation is y=x σ(β1x)+β2tanh⁡(x/β2)(1−σ(β1x))y = x\,\sigma(\beta_1 x) + \beta_2 \tanh(x/\beta_2)(1 - \sigma(\beta_1 x)) with β1=4\beta_1 = 4 and β2=25\beta_2 = 25. Large negative inputs settle near -25.
Lie superalgebra gradient projection
A square gradient is split into 2x2 half-blocks. The diagonal (bosonic) blocks are replaced by their skew-symmetric parts and the off-diagonal (fermionic) blocks by a cross-symmetrized pair, matching the split g=g0⊕g1\mathfrak{g} = \mathfrak{g}_0 \oplus \mathfrak{g}_1, before momentum accumulates.
Polar Stiefel retraction step
With momentum 0.99 and learning rate 0.05, the update is the polar factor UV⊤U V^\top of the momentum buffer, computed by exact SVD rather than Newton-Schulz iteration. The weight is then reset to the polar factor of W−η ΔW - \eta\,\Delta, which enforces W⊤W=IW^\top W = I.
Byte-offset tokenization
Each UTF-8 byte maps to t=(b+100) mod Vt = (b + 100) \bmod V, which reserves ids 0 to 99 for special tokens. Decoding uses b=(t−100) mod 256b = (t - 100) \bmod 256. Special tokens use ids 0 to 7, and the media token is 1000.
Media placeholder embedding splicing
Embeddings at positions where input_ids equals 1000 are overwritten in order with vision patch tokens, up to the smaller of the placeholder and patch counts. Labels stay aligned with the sequence.
Holographic thought block format
Output is wrapped as an opening holographic_think tag with curvature, prime and chi attributes, the content, and a closing tag. A regular expression parses the blocks back.
Unfused holonomy transport kernel
The function fused_non_abelian_holonomy_gpu in triton_kernels.py builds AiA_i, FijF_{ij} and UijU_{ij} with batched PyTorch linear algebra. It contains no Triton code, although the design specification describes native fused Triton kernels.
Multimodal sampling loop
The generator inserts placeholders sized to the actual vision patch count, samples at temperature 0.7 until the end token, and passes the images at every step. The evaluator generates up to 64 tokens per prompt.

Concepts

Non-Abelian gauge field
A connection whose generators are matrices that do not commute. Its field strength includes the commutator term [Ai,Aj][A_i, A_j], so transports between positions depend on the path taken.
Holonomy
The transformation a vector undergoes when transported between two points under a connection. Here it is the orthogonal matrix UijU_{ij} applied to value vectors, called a Wilson line holonomy in the design specification.
Cayley transform
The map from a skew-symmetric matrix FF to (I−12F)−1(I+12F)(I - \tfrac{1}{2}F)^{-1}(I + \tfrac{1}{2}F). It always yields an orthogonal matrix, so it preserves vector norms.
p-adic valuation
For a prime pp, vp(n)v_p(n) is the number of times pp divides nn. The architecture uses p=2p = 2 on position offsets.
Ultrametric distance
A distance satisfying the strong triangle inequality d(x,z)≤max⁡(d(x,y),d(y,z))d(x,z) \le \max(d(x,y), d(y,z)). The test suite checks this inequality for the p-adic distance.
Calabi-Yau 3-fold and h11
A compact complex manifold of complex dimension 3 (real dimension 6). The Hodge number h1,1h^{1,1} counts its independent (1,1)-forms. The projector uses 19 learned matrices as a stand-in for such a basis.
Muon optimizer
An optimizer by other authors that replaces the raw update of a matrix parameter with an orthogonalized version, usually computed by Newton-Schulz iteration. S-Muon computes the orthogonal factor exactly by SVD instead.
Stiefel manifold
The set of matrices with orthonormal columns, W⊤W=IW^\top W = I. Retracting onto it after each step keeps weights orthogonal.
Polar factor
For M=UΣV⊤M = U \Sigma V^\top, the orthogonal matrix UV⊤U V^\top, which is the orthogonal matrix closest to MM.
Lie superalgebra
An algebra graded into an even (bosonic) part g0\mathfrak{g}_0 and an odd (fermionic) part g1\mathfrak{g}_1. S-Muon uses this split to choose a different symmetry projection for each gradient block.
Curvature regularization
A loss term on the squared field strength of every gauge layer. It keeps the transports close to flat unless the data favours curvature.
Holographic thought block
A delimited segment of model output that records gauge metadata (curvature, prime, chi) alongside the content, for use in generation and parsing.

About this page

Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.

The Verace V series is the lab's line of language model architectures. It started from the lab's own code for the architecture described in a technical report by the Kimi Team (arXiv:2607.24653), listed here as the V0 baseline. Later versions replace the baseline's main parts with the lab's own designs and keep some of the report's components, which each page credits to the report.

Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.