← svarog.chGamma Engine live

Svarog Compress

Svarog is not just an LLM anymore. Svarog is an agentic coder (a router that drives Claude Code with an open model stack), and it is growing three new organs: a memory codec that stores long histories as a few learned entries, split-the-byte compression that keeps each entry at only the precision it needs, and Gamma Engine, real-time camera video that runs entirely in your browser.

Status, plainly. Everything marked measured below ran on our own hardware today (25 Nov 2026), and the code is in our repository. Things marked planned have not been built yet. Nothing here is a projection presented as a result. Patent pending: Swiss patent application filed 25 Nov 2026.

The idea in one picture

chunk8 frames / 1 turn encoder4 candidate entries joint allocation(entries × bits)cheapest ≥ quality archiveentries + landmarks read: score ALLlandmarks, top-K decode only K(K from device) view / features /prompt context write once · index with tiny landmarks · read only what this view or request needs

The starting point is a known approach from published research on memory for video world models: write each chunk once into a few learned entries, give each a small landmark, read only the top-K. What Svarog adds (Swiss patent application filed 25 Nov 2026):

  1. Joint entry count × precision. A quality head predicts reconstruction quality for every combination of number of entries and bit-width (16-bit, 4-bit, ternary at 1.58 bit). We keep the cheapest combination that meets the requested quality.
  2. Quantisation-aware training. The decoder is trained on entries quantised to every bit-width, so the predictions hold for what is actually stored.
  3. Read budget from the device. K comes from the frame-time or latency budget measured on the machine doing the read.
  4. One codec, three homes: video world models, real-time camera transformation in the browser, and the Svarog router's context memory (code-location landmarks, outcome-weighted retrieval, per-tier budgets).
  5. Memory aging. Over a storage budget, old entries are re-quantised to fewer bits, with the least predicted quality loss per byte freed.

Measured: memory codec (toy scale)

Toy world, CPU only: 1.25 M parameters, 2500 training steps; chunks of eight 16×16 views; 4 candidate entries of 96 values; landmarks of 4×8 summaries + entropy + pose + time; top-4 read. Requested quality is varied; bytes are per 8-frame chunk.

requestedentry count only, 16-bitjoint entries × bit-width (ours)bytes saved
22.56 dB668 B · 18.40 dB586 B · 18.30 dB12 %
21.56 dB500 B · 18.44 dB375 B · 18.33 dB25 %
20.56 dB395 B · 18.47 dB250 B · 18.33 dB37 %
19.56 dB320 B · 18.52 dB158 B · 18.36 dB51 %
18.56 dB280 B · 18.52 dB113 B · 18.36 dB60 %
what is stored per chunkbytes
raw 8-bit pixels of the 8 views6144
one entry + landmark, 16-bit / 4-bit / ternary264 / 122 / 93

Honest status: the allocation result above holds (12–60 % fewer bytes for 0.10–0.16 dB). In this first toy run the retrieval part did not yet beat a simple recent-memory baseline; a retrained version is running on our GPUs now and its results will be posted here when measured.

Measured: Svarog context codec

router/ctx_codec.py is a dependency-free context codec for the Svarog router, enabled with SVAROG_CODEC=1 (off by default; with the flag off the router sends exactly the same messages as before, which a test checks). Each provider tier gets its own read budget. In the test session (120 turns) a fact planted in the first turn is recalled while the conversation sent upstream shrinks to under half. All 5 tests pass.

Measured: Gamma Engine camera changer

whathardwareresult
style network 320×240, onnxruntime, webcamRyzen 9 5900HS, CPU only3.5–4.75 fps · 205–291 ms (4 runs)
style network 224×168, onnxruntime, webcamsame10.8 fps · 88 ms
temporal memory (blend 0.6), 320×240sameflicker 6.8–9.6 → 3.3 × input
browser, WebAssembly 4 threads, 224×168, headless testsame laptop, busy4.5 fps

Try it: gammaengine.ch. It's a fixed-style filter today, not the prompt-driven 720p restyling that cloud services run on data-centre GPUs. Prompt-driven one-step diffusion (SD-Turbo + tiny VAE) is next, on GPU.

Measured: split the byte (GPT-2 small, CPU)

KV cache. Random rotation + Lloyd-Max levels is what keeps very low bit-widths alive:

KV cachebits / valueperplexityΔ
fp3232.0017.25+0.00
naive-uniform4.5017.95+0.71
rotate+uniform4.5018.10+0.85
rotate+lloyd4.2518.61+1.37
naive-uniform3.5024.54+7.30
rotate+lloyd3.2521.37+4.12
naive-uniform2.50122.97+105.73
rotate+lloyd2.2538.14+20.89

Weights, post-training only. 8-bit is free and 4-bit costs a little; everything below 2 bits collapses without quantisation-aware training, which is what sub-1-bit methods rely on. That training needs GPUs and is on our list.

weightsbits / weightperplexity
fp32 reference32.0016.7
int8 absmax per row8.0216.7
int4 group-1284.1219.9
ternary absmean (b1.58)1.61495272.3
binary sign x row scale1.0252405.1
low-rank fp16 @ 1.0 bpw1.003600.7
littlebit-style @ 1.0 bpw1.00631146.6
low-rank fp16 @ 0.55 bpw0.553584.3
littlebit-style @ 0.55 bpw0.55220245.0
low-rank fp16 @ 0.3 bpw0.301847.6
littlebit-style @ 0.3 bpw0.30200924.5
low-rank fp16 @ 0.1 bpw0.101908.3
littlebit-style @ 0.1 bpw0.103131.2

Two tracks, ranked

#trackwhy this rankstatus
1agent memory codec in the Svarog routerworks on every model tier including hosted ones, no training needed to start, clear evidence that memory raises agent successbuilt (text level), off by default
2spatial world memorythe learned video version needs a jointly trained video model (beyond our GPUs); a geo-landmark version for our Zürich scout data reuses track 1's codetoy codec measured; geo version planned

What we still need

goalwhat it takes
faithful reproduction of a video memory codecroughly 20k–60k H100-hours (≈ USD 54k–270k), licensed posed video data (most public sets are non-commercial), a pose-conditioned video model
minimal real-video experiment300–1,000 posed trajectories at 128 px, a 20–60 M parameter codec, ~10–80 h on a 16 GB GPU (≈ USD 1–10 rented)
prompt-driven camera changera working NVIDIA driver on our laptop (needs a reboot), then SD-Turbo + TAESD; 16 GB GPU for 30 fps
sub-1-bit LLM weightsquantisation-aware training on GPUs; post-training alone is not enough (see table above)

The 30 cornerstones

The enabling techniques behind real-time world models and live camera-to-video, and where Svarog stands on each. It's a map, not a claim to be 30× faster.

#techniqueSvarog / Gamma Engine
1Causal autoregressive (chunk-wise) video diffusionplans
2Diffusion forcing: independent noise level per framecan't yet
3Training on its own imperfect rollouts (self-forcing)can't yet
4Few-step distillation (DMD, consistency, adversarial)uses (1-step SD-Turbo)
5Bidirectional teacher distilled into a causal studentcan't yet
6Long-rollout distillation against driftcan't yet
7Rolling or pipelined multi-frame denoisingcan't yet
8Per-frame generation inside a hard latency budgetuses
9Synthetic or engine-generated training dataplans
10KV cache carried across framesplans
11Anchor frames and attention sinkscan't yet (output blending instead)
12Short context window plus retrievaluses (Svarog context codec)
13KV recompute on a prompt switchcan't yet
14Learned memory codec: write, landmark index, top-K readuses + patent pending
15Skipping redundant compute (similarity filter, feature caching)plans
16Feature-bank temporal consistencyplans
17FP8 arithmeticplans (Blackwell GPU)
184-bit compute and storageuses for memory entries; plans for weights
19Megakernels and kernel fusioncan't yet
20Graph compilers (TensorRT, torch.compile, OpenVINO)uses (browser runtime)
21Fast attention kernelsplans
22Dynamic sparse / linear attention, token mergingplans
23Tiny VAE decodersuses (TAESD)
24Removing guidance costuses
25Stream batching across denoising stepsplans
26Multi-GPU communicationnot needed on-device
27Hardware portabilityuses (WebGPU → WebAssembly fallback)
28Real-time transport and latency meteringplans
29Live session control without reconnectingplans
30Cheap pose or action conditioninguses (pose + time landmarks)

Credits and prior art

Published research on memory codecs for video world models (2025–2026); Landmark Attention (2023); InfLLM (2024); Quest (2024); MemGPT (2023); WorldMem, VMem, Context-as-Memory (2025); StreamDiffusion (2023), StreamV2V (2024); BitNet b1.58 (2024); LittleBit (2025); TurboQuant (2025); fast neural style transfer (Johnson et al. 2016). Svarog and Gamma Engine are independent and not affiliated with any of these authors or companies.

⬇ Get Svarog⛰ Field / Mesh