Verace V1
A multimodal language model architecture with norm-preserving recurrent attention, unitary holographic memory and adaptive per-token depth.
- Orthogonal manifold: SSSD, CHAM and the optimizer keep a matrix exactly on it
- Per-head matrix state: Frobenius norm conserved by construction
- Cayley state rotation: Exactly orthogonal rotation at every token
- Skew-symmetric generator: Formed from the token's key and value
Overview
Verace V1 is the lab's multimodal language model architecture. It replaces three standard parts of a transformer with continuous alternatives. Softmax self-attention becomes a rotating recurrent state, the key-value cache becomes a fixed-size unitary memory matrix, and discrete routed experts become low-rank experts assembled per token. It adds per-token adaptive depth and an energy-based critic for choosing among candidate continuations. The released package is a from-scratch reference implementation with configuration, tests, GPU kernels, training and serving code. It also contains the Kimi Team's own released tokenizer files, which its tokenizer uses by default. Those files are that team's work, not the lab's.
Each decoder layer applies three pre-normed residual sublayers: Spectral State-Space Differential Attention (SSSD), Continuous Holographic Associative Memory (CHAM) and the Manifold Continuous MoE (M-CMoE). The Adaptive Cognitive Depth Engine (ACDE) decides how many layers each token passes through. One design principle runs through the system: SSSD, CHAM and the optimizer each keep a matrix exactly on an orthogonal or unitary manifold. The SiTU-GLU activation, Block Attention Residuals and the vision encoder modelled on MoonViT come from the Kimi Team's technical report (arXiv:2607.24653). Training uses a hybrid of Muon, an optimizer by other authors, and AdamW, with the report's per-head Muon variant.
The package implements every module, fused Triton kernels with PyTorch fallbacks, ZeRO-1 data-parallel training, a pilot pretraining driver sized for a 6GB GPU, an OpenAI-compatible server and evaluation harnesses. The test suite checks exact invariants: norm conservation, unitarity, batch independence and orthogonality. The earlier prototype used exact SVD orthogonalization, a first-order holographic update and a GPU attention scan that does not preserve norm. Its design document targets 10x-50x FLOP savings. The paper exists only as a table of contents with correction notes, not as a draft. Those correction notes record that a Newton-Schulz failure theorem written for the paper is arithmetically wrong. Companion rotation-memory experiments are covered in their own deep dive.
The architecture is implemented and covered by an invariant-based test suite. No pretrained weights exist, and the package includes only a minimal single-step training reference and a pilot training driver. No training run or benchmark score of the full model is recorded. The FLOP-saving figures are design targets, not results. Several configuration fields are declared but not yet read by the modules. The Hyper-XTML reasoning format is not yet wired into generation. The paper exists only as a table of contents and correction notes. Whether the model learns well at any scale remains open.
Status
Prototype. The full architecture is implemented and unit-tested with GPU kernels and training code, but no pretrained weights, training run or model-level 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
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.
In depth
Each of these pages goes through one part of the work in detail.
Architecture
SSSD attention
Sequence mixing that replaces softmax self-attention. Each head carries a matrix state that is rotated by an exactly orthogonal Cayley transform at every token.
CHAM holographic memory
Long-range memory that replaces the key-value cache. It is a fixed-size complex unitary matrix, so memory per token does not grow with sequence length.
Manifold Continuous MoE
Expert computation that replaces discrete routed experts. Experts are assembled locally from shared low-rank bases with top-K routing and per-token singular-value scaling, so no all-to-all dispatch is needed.
Adaptive Cognitive Depth Engine
Per-token halting over the layer stack, in the style of adaptive computation time, a method by Graves (2016). Each token runs between a minimum and a maximum number of layers.
Latent energy critic
A learned quadratic energy that scores candidate hidden states. It is used both as a training penalty and to choose among sampled continuations at decoding time.
Decoder backbone
Assembles the sublayers into decoder layers with tied embeddings, vision fusion, adaptive depth and block residual snapshots taken every 12th layer.
Vision encoder
A patch-based vision transformer modelled on the MoonViT encoder of the Kimi Team's report. It uses 14-pixel patches, 27 blocks, 2x2 token merging and a projector into the language model width.
Unitary Muon optimizer
A Muon-family optimizer that orthogonalizes momentum for 2D weight matrices. It is paired with AdamW for embeddings, biases and norm gains.
Triton GPU kernels
Fused CUDA kernels for the SSSD scan, the CHAM scan and the M-CMoE projection. They are dispatched automatically on GPU when Triton is available, with PyTorch fallbacks otherwise.
Hyper-XTML reasoning format
A round-trippable text format that extends the XTML chat template from the Kimi Team's technical report, wrapping a reasoning thought with depth, energy and branch metadata. It is implemented but not yet wired into generation.
Training and serving stack
Memmapped datasets, ZeRO-1 sharding, gradient accumulation, cosine schedules, diagnostics probes, incremental decoding and an OpenAI-compatible HTTP server.
Evaluation harnesses
A benchmark runner using multiple-choice log-likelihood and substring matching, plus a TinyStories protocol graded by an LLM judge. Reference scores for other models are published leaderboard figures, not the lab's results.
Implementation
Mechanisms as they are implemented in the source code, with the constants the code uses.
- Skew-symmetric Cayley state rotation
- Per head the PyTorch reference forms and the rotation , with . The state is with , and the output is followed by RMSNorm. Because is orthogonal, the Frobenius norm of the state is conserved by construction.
- Exact rank-2 Cayley via Woodbury
- The GPU kernel applies the rank-2 Cayley rotation in the opposite orientation to the PyTorch reference, , without a inverse. With it computes and then , where is a 2x2 matrix inverted in closed form. Cost is , and the step is skipped when 1e-3.
- Hermitian Cayley unitary memory update
- CHAM forms with and the exactly unitary . The state is , and the readout is . The kernel version treats the update as inactive when the magnitude of is below 1e-7; it replaced a first-order approximation that drifted from unitarity.
- Deferred readout-only retraction
- The cubic Newton-Schulz iteration runs for 3 steps on a copy of the state, used only for the output. The raw prefix product is carried forward and exported, because retraction is nonlinear. The lab's records state that feeding the retracted state back into the recurrence diverged.
- Parallel matrix prefix scan
- A work-efficient scan composes the non-commutative per-token matrices in depth. It runs an up-sweep at stride and then a down-sweep, with the newest factor on the left and the sequence padded with identities to a power of two.
- Input-substitution safe solve
- The Cayley solve is first probed without gradients. Where the result is non-finite, the inputs are replaced by an identity pair that gives an identity rotation, and the solve is repeated. Patching the outputs instead still leaked NaN through the backward pass of the solve.
- Zero-step identity for halted tokens
- Tokens that have halted get their step size, in SSSD or in CHAM, multiplied by 0. Their rotation is then exactly the identity and the recurrent state passes through unchanged.
- Halting with ponder cost
- At each layer , set to zero below the minimum depth of 2. A token halts when its cumulative reaches 0.99. At the halting layer its weight is the remainder , and the output is with a differentiable ponder cost .
- Per-item variable-length token gathering
- Each batch item's still-active tokens are gathered into a tensor of shape [1, S_active, d], processed by the layer and scattered back. Halted tokens skip compute, and tokens from different batch items are never mixed.
- Hypernetwork low-rank expert mixture
- M-CMoE computes with rank 32, 64 components and top-8 routing. Bases are initialised as 0.02 times standard normals, is a sigmoid hypernetwork output, and the output is the shared SiTU-GLU FFN plus the RMS-normed adaptation. Non-top-k router logits are set to before the softmax, so the selected weights sum exactly to 1.
- SiTU-GLU activation
- The Kimi Team report's activation, implemented as with no biases. Both branches are soft-capped by tanh, with defaults and .
- Block attention residual mixing
- An implementation of the report's Block Attention Residuals. Hidden snapshots are stored every 12 layers, and each later layer adds , a weighted sum of the stored snapshots, to its input before its sublayers.
- Quintic Newton-Schulz Muon update
- Momentum is heavy-ball with coefficient 0.98 and no Nesterov step. After , the code runs 5 steps of with , , and , with an SVD fallback. The update is scaled by , and Q, K and V weights can be orthogonalized per head.
- Composite pretraining loss
- The loss is shifted cross-entropy, plus 0.001 times the mean adaptive depth, plus 0.01 times the mean critic energy between consecutive hidden states. The energy is . In the prototype the depth term is non-differentiable as written.
- Energy-guided candidate decoding
- At each step the generator samples K candidate tokens (default 4) and runs a one-token forward pass for each from the cached recurrent state. It commits the token with the lowest and adopts that token's state. The released generator reuses per-layer SSSD and CHAM states for incremental decoding; the prototype recomputed full forward passes.
- ZeRO-1 whole-tensor state sharding
- Each parameter is owned by one rank, which alone holds its Muon or AdamW state and applies its update. Gradients are all-reduced on the last micro-batch, and owners then broadcast the updated parameters. Optimizer checkpoints are saved per rank.
- Memmapped token cache
- The corpus is tokenized once, in bounded 4MB chunks, into a raw int32 file keyed by a content hash and written atomically. Training windows are then paged in through np.memmap, so RAM use stays constant.
- Raw unitary drift monitor
- A forward-hook probe reports the deviation of CHAM's never-retracted carried state from unitarity, measured as the norm of (real part only). It also tracks the distribution of halting depths, without modifying the forward pass.
Results
From the lab's own experiments and records. They have not been independently replicated.
Exact Cayley update replaced first-order memory update
The lab's code records that the CHAM kernel moved to an exact Cayley transform of a rank-2 Hermitian generator because the earlier first-order approximation drifted from unitarity. The rotation-memory variant still carries the infinitesimal form .
Reference and kernel use opposite Cayley orientations
The PyTorch reference for SSSD computes , while the GPU kernel computes . The two code paths therefore write the transform in opposite orientations.
Retracted state must not re-enter the recurrence
According to the lab's records, feeding the Newton-Schulz-retracted memory state back into the recurrence was verified to diverge. The system therefore carries the raw prefix product and retracts only for readout.
Patching NaN outputs did not stop gradient leaks
The lab found that replacing non-finite solve outputs still leaked NaN through the backward pass of the solve. Substituting identity inputs before re-solving fixed this.
Newton-Schulz oscillation led to SVD in one revision
A design note records that Newton-Schulz was replaced by SVD polar decomposition after it locked into a two-step oscillation for rectangular matrices with small singular values. The released optimizer code runs quintic Newton-Schulz with an SVD fallback, so the note and the current code differ.
Paper theorem found arithmetically wrong
The lab's correction notes for the paper found that its claimed period-2 oscillation between 0.68 and 1.13 does not hold, since . The theorem also analyzes the cubic map rather than the quintic map the optimizer uses.
Extra scaling factor broke orthogonalization guarantee
The audit found an extra factor in the orthogonalization routine that broke the guarantee that singular values lie in [0,1]. It was fixed to the published normalization .
Quintic map diverges above 1.2637
The lab's analysis records an unstable fixed point of the quintic map near 1.2637. Singular values above it diverge to Inf or NaN within 2 to 3 steps, while values below stay bounded but may not converge to orthogonality.
Prototype GPU scan was not norm-preserving
In the earlier prototype the GPU attention kernel used a complex phase-rotation recurrence plus an additive outer product, which does not preserve norm, unlike its Cayley reference path. The released kernels implement the exact Cayley scan instead.
Fused rotation-memory scan latency
The rotation-memory experiment records report a fused Triton scan running in under 0.4 ms at sequence length 1024 on an RTX 4050. Those records also note that their target perplexity loop measured training-batch perplexity, not held-out perplexity.
Concepts
- Exact manifold maintenance
- The design principle that matrices stay exactly orthogonal or unitary by construction rather than by a regularizing penalty. SSSD uses Cayley transforms, CHAM uses Cayley updates with Newton-Schulz readout, and the optimizer uses orthogonalized momentum.
- Cayley transform
- A map that turns a skew-symmetric into an orthogonal matrix; the GPU kernel uses and the PyTorch reference uses the opposite orientation . Its Hermitian analogue produces unitary matrices.
- Constant-size memory instead of a KV cache
- CHAM stores context in a fixed-size complex matrix updated at each token. Memory is therefore per token, rather than growing with sequence length as a key-value cache does.
- Newton-Schulz retraction
- An iteration that pushes a nearly unitary matrix back toward the unitary group with quadratic convergence. Verace V1 applies it only to the copy used for readout.
- Adaptive computation time
- A halting scheme by Graves (2016), not the lab's method, in which each token accumulates a halting probability across layers and stops once the sum crosses a threshold. A ponder cost penalizes extra computation.
- Low-rank continuous experts
- Instead of routing tokens to separate expert networks on other devices, each token builds its own weight update from shared rank-32 bases. Every device holds all the bases.
- Latent energy
- The quadratic score measures how predictable a candidate hidden state is from its context. Lower energy is treated as a more consistent continuation.
- Latent tree search
- Decoding that samples several candidate tokens per step and commits the one with the lowest energy. It costs one extra forward pass per candidate.
- Stiefel manifold orthogonalization
- Projecting a gradient or momentum matrix onto matrices with orthonormal columns. This is the core operation of Muon-family optimizers.
- Kimi Team report components
- SiTU-GLU, Block Attention Residuals, the MoonViT-style vision encoder and the per-head Muon variant come from the Kimi Team's technical report (arXiv:2607.24653). Verace V1 uses these components but did not design them.
- Invariant-based testing
- Each test checks an exact property a module must guarantee, such as norm conservation, unitarity, batch independence or orthogonality, rather than an approximate output.
- Visual token fusion
- Projected image tokens replace placeholder positions in the text embedding sequence, or are prepended when no placeholders are present. Text tokens are never overwritten.
- Hybrid Muon and AdamW
- 2D hidden matrices are updated with Muon, while the tied embedding and output head, biases and norm gains use AdamW. Learning rates are matched through RMS scaling of about 0.2.
- Tokenizer fallback chain
- The tokenizer tries the Kimi Team's released tokenizer (vocabulary 163,840) first, then tiktoken cl100k_base, then GPT-2, then raw bytes. A separate top-10K GPT-2 BPE remap follows the TinyStories setup.
- Rotation memory experiments
- A companion line of experiments built real SO(d) rotation memories using a closed-form Rodrigues exponential and differential readouts. The lab documents them in a separate deep dive.
- Reference implementation status
- The released package contains architecture code, configuration and tests, but no pretrained weights. The configuration documentation lists large defaults (16384 hidden width, 128 layers), while the configuration code records a small default size (hidden 1024, 12 layers, 8 heads).
Publications
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.