Benchmarks · one RTX 4080

Leviathan, measured

Hover or tap a bar or a dot for its numbers; every chart has its table under it, and the datasets are listed at the end of this section.

On one RTX 4080, Leviathan runs a 61 GB mixture-of-experts model at — tokens a second, where llama.cpp reaches —–—, and its own .shn5 format stores that model in — GB without losing a bit, or — GB at — bits a weight. A separate video engine with its own kernels denoises a 1280 × 736 LTX-2.3 shot — as fast as Lightricks' PyTorch pipeline, each step landing — an FP32 run than PyTorch's. Every Leviathan build is checked, model by model, against a stored reference before it ships.

MoE decode, a 61 GB model on a 16 GB card
—tok/s
llama.cpp —–— · —
The same 61 GB model as a lossless .shn5
—GB
BF16 GGUF — GB · — % smaller
Video: denoising one 1280 × 736 LTX-2.3 shot
—s
PyTorch — s · —
MoE 700-token prompt
—tok/s
llama.cpp at its fastest settings — · —
7B decode, 128-token context
—tok/s
llama.cpp —, same session · —
Models inside the reference bar
—of —
worst KL among the dense models —

A model bigger than the card

Qwen3-30B-A3B in BF16 is 61 GB; the RTX 4080 holds 16. Leviathan keeps the always-used weights on the card, streams each layer's experts in from RAM as the router picks them, and runs the whole prompt in one fp32 pass so each expert crosses PCIe once. llama.cpp runs the same model with its experts on the CPU (--cpu-moe). Higher is better.

Decode, tokens a second

700-token prompt, tokens a second

Measured by the test harness, the same 700 token ids for both engines, llama.cpp timed by its own clock: Leviathan's decode and 700-token figures on 2026-11-14, its 2,048-token figure and every llama.cpp figure on 2026-11-13. Where llama.cpp shows a range, the bar is its best run and the table lists both. Its fastest settings were -b 2048 -ub 2048 --no-mmap -fa on. At 2,048 tokens: Leviathan —, llama.cpp — tok/s. In fp32 the prompt pass comes within 6.5e-5 nats of a float64 reference built from the model's own weights.

Table
EngineVRAM, GiBDecode lowDecode700 prompt low700 prompt2,048 promptSettings

The same model in fewer bytes

Leviathan's own file format, .shn5, stores BF16 weights without loss: the exponents are entropy-coded, the sign and mantissa kept as they are. A mixture-of-experts model's experts stay compressed in RAM, and the card decodes each one as it streams in, checking every 4,096-weight tile. Stage 10, the lossy level, quantises each matrix around a per-row and per-column scale grid before the same coding; the norms, the router, the embeddings and the output head stay lossless. Stage 10 came after the 1.1.0 release. Smaller is better.

Qwen3-30B-A3B: the lossless file is — % smaller than the BF16 GGUF and decodes to its exact bytes, checked tensor by tensor; at q6, Stage 10 is — % smaller.

Decode, tokens a second

2,048-token prompt, tokens a second

Higher is better. Fewer bytes to stream make the lossy file faster as well: decode +— % and a 2,048-token prompt +— %, with — GB of RAM held for the experts instead of —, and a load of — s instead of —. Measured on 2026-11-16 in one session, the two files alternated, 16 expert slots a layer. The card's clock varies by session, which is why the lossless file decodes at — tok/s here and at — in the section above (2026-11-14).

What Stage 10 costs, beside llama.cpp's Q6_K

KL divergence from each model's reference, in nats; lower is closer. On TinyLlama 1.1B, where the q6 level was set, Stage 10 lands as close as Q6_K with — % fewer bits a weight. On the 30B it uses — % fewer bits and lands a little further from its reference (— against —), with the same top token at every position checked: the level needs setting for each model, which is the next step.

Tables
FileSize, GBBits a weightLossless
FileDecode, tok/s2,048 prompt, tok/sRAM for the experts, GBLoad, s
ModelFileBits a weightKLAgainstNote

A video model on the same card

LTX-2.3 is a 22-billion-parameter diffusion transformer that makes picture and sound together. This is a community FP8 checkpoint of it, too big for the 16 GB card, so its weights stream in from RAM at every step. Through Lightricks' own PyTorch pipeline, one 1280 × 736 shot of 113 frames takes — s to denoise. Leviathan's video engine runs the same checkpoint on its own kernels, with the four guidance passes of each step batched into one call; each bar below adds one change to the bar above it. Lower is better.

With exact f32 sums the engine already takes — s, — PyTorch's speed; the rest comes from cheaper arithmetic, and the charts below show what that costs. The times are the denoising alone, from each render's own record (2026-11-17); the text encoder, the decode and writing the file come on top. The video engine is a research build, separate from the Leviathan app, which runs text models.

One step against FP32

Relative error of one real denoising step's outputs (768 × 512, 89 frames, picture and sound made from a prompt) from Lightricks' own blocks run in FP32 on the same inputs; lower is closer. The engine's default lands —× closer than PyTorch's bf16 for the picture and —× for the sound, in the conditioned pass (2026-11-18).

The same video? Frames against the exact engine

PSNR of every decoded frame of the 1280 × 736 shot against the exact engine's render at the same seed; higher is closer. Another seed, a different video, sits at — dB. Today's default sits at — dB, a little further than PyTorch's own bf16 at —: a diffusion model carries the last bit of any arithmetic through its steps, so no two maths paths match pixel for pixel, and here the frames show the same scene, character and motion.

Where a step's time goes

GPU time of one denoising step at 1280 × 736, four guidance passes: — s in all, from a profiler trace taken before the last change on the ladder, which then took about 0.35 s a step off the matrix products.

A prompt in, picture and sound out

LTX-2.3 also makes its own sound, 48 kHz stereo. On the engine's default, with Lightricks' 2.3 guidance for both, from the prompt to the MP4 written (2026-11-18); the whole run includes building the engine, and the prompt's text encoding was cached.

SizeClip, sDenoising, sDecode, sWhole run, s
Tables
StepChangeDenoising, s
OutputPassVideo enginePyTorch
RenderPSNR, dBDenoising, s
PartGPU seconds a step

Decoding a 7B model that fits the card

Qwen 2.5 Coder 7B at Q8_0, one token at a time after a prompt of 128, 2,048 or 4,096 tokens. Both engines ran back to back in the same session, in two interleaved rounds; each bar is that engine's faster round. Leviathan keeps the activations and the attention cache in fp32; llama.cpp rounds the activations to int8 before each matrix product and keeps its cache in fp16. Higher is better.

From a 128- to a 4,096-token context, Leviathan's token takes — ms longer and llama.cpp's — ms. Leviathan keeps the attention cache in fp32, twice llama.cpp's fp16 bytes: at 4,096 tokens each token reads — MB of keys and values, which its attention streams at — GB/s (— % of the card's read ceiling, Nsight Systems). Half those bytes at that speed would save about — ms a token, about the whole — ms difference. An fp16 cache is not built; it would be an opt-in, at llama.cpp's precision.

Table
EngineContexttok/sms a tokenRound 1Round 2

Prompts on the same 7B model: llama.cpp still leads by default

A prompt runs as matrix multiplications on the tensor cores. Leviathan's default feeds them fp16; llama.cpp feeds int8, which this card runs four times as fast. Leviathan's two opt-in switches trade precision for speed and are off unless the user turns them on. Higher is better.

512-token prompt

2,048-token prompt

4,096-token prompt

With both switches on, the matrix inputs are int8 like llama.cpp's, and Leviathan's prompts run at —, — and — llama.cpp's speed at 512, 2,048 and 4,096 tokens.

What each arm costs, on the 2,048-token prompt's last position against Leviathan's exact path (fp32 matrix-vector products, no tensor cores): default KL —, tensor-core attention —, int8 matrices — (KL in nats, lower is closer to exact; one position, where the reference check below takes the worst of 100).

Table
ArmPrompttok/sKL vs exactMatrix inputs

Every model, checked against a stored reference

Before a build ships, each model is run teacher-forced over four prompts, 25 positions each, and compared position by position with the RTX 4080's recorded output. A model passes when the top token matches (or the top two are tied within 0.01 nats) and the KL divergence stays under its bar everywhere; the same comparison one step out of line must fail, and does, for every model. The chart is the CUDA engine now live; the Vulkan engine passed the same check on this card and on an AMD integrated GPU (2026-11-14). Lower is better; the line marks each model's bar.

Table
ModelWeightsWorst KLBarDecode path

What the two opt-in switches cost

The same check with each switch on. Tensor-core attention stays far inside the bar on every model it applies to. int8 matrices, llama.cpp's own precision for prompts, cross it on every Q8_0 model, and on the Gemma 4 fine-tune they change the top token twice: that is why both stay off by default. Lower is better.

Table
ModelWeightsTensor-core attentionint8 matrices

Under the hood of a decode step

A decode step reads every weight once, so it is bound by how fast memory streams. Leviathan's matrix-vector products now take about as long as llama.cpp's while keeping fp32 activations, and the step runs as fewer, larger kernels, replayed as one CUDA graph a token as llama.cpp's is.

Kernels a decode token

How fast each weight streams, of the card's 670 GB/s ceiling

Matrix-vector time a token, Nsight Systems, the two engines traced back to back: Leviathan — ms, llama.cpp — ms. The ceiling is the fastest a bare streaming-read kernel reached on this card; the paper figure is 716.8 GB/s.

Since 1.1.0: the raw formats decode faster

Leviathan computes on a GGUF file's quantised blocks as they are. After the 1.1.0 release, the kernels that read those blocks while decoding moved to two rows a warp, and a decode token now takes less time on every format measured, with the same output: a KL of at most 4.2e-12 against the old kernels and the same top token on every row. Higher is better.

Less time a decode token

Qwen3-30B-A3B at Q3_K_S, whole on the card: a decode token took — ms before and — ms after, in the same session (2026-11-15).

Table
ModelFormatBefore, msAfter, msChange, %

The tests behind these numbers

Each test runs through the real engine on the card. A speed change that alters a single byte of output has to say so and pass the reference check above.

The gate the engine passed on 2026-11-14

TestWhat it checksPassed

Since then

TestAreaWhat it checksPassedDate
Method, hardware and flags

Card: NVIDIA GeForce RTX 4080, 16 GB, stock clocks; Ryzen 9 7950X; 128 GB DDR5 at 3,600 MT/s; Windows 11. The card's clock varies by hour, so a comparison counts only when both engines ran in the same session.

llama.cpp: its own llama-bench, build 983ca8992, -ngl 99 -fa 1 (all layers on the card, flash attention on; every other setting at its default, such as 512-token micro-batches), 3 repetitions, its mean. Decode is tg64 at the given depth; prompts are pp512 / pp2048 / pp4096.

Leviathan: the same model as a .lev file, loaded the way the app loads it. A prompt is one pass from position 0, the mean of three; decode is 64 steps after the prompt, the logits copied to the host each step and no sampling, as llama-bench does, the mean of two runs. Both engines ran in two interleaved rounds (llama.cpp, Leviathan, Leviathan, llama.cpp); each engine's faster round is shown, and the tables list both. The app's chat sends a prompt the same way, in one pass.

KL divergence: how far one next-token distribution is from another, in nats; 0 means identical. For scale, Leviathan's own two prompt paths (row by row, and on the tensor cores) differ by under 5e-5 on these models, except on Gemma 4's long document (9.5e-4).

.shn5: sizes are the files on disk, GB = 10⁹ bytes. The speeds are Qwen3-30B-A3B with its experts streamed from pinned RAM, 16 expert slots a layer on the card, the lossless and Stage 10 files alternated in one session. Quality: KL from a float64 reference built from the 30B's BF16 weights, with the embeddings and output head BF16 in both of its files; TinyLlama against its F16 model, teacher-forced.

Video: LTX-2.3 22B, a community FP8 checkpoint, its text encoded by Gemma 3; 1280 × 736, 113 frames (4.7 s at 24 fps), 8 denoising steps, Lightricks' 2.3 guidance (four passes a step), one reference image for the character, a given soundtrack (audio to video), seed 4242. PyTorch is Lightricks' own pipeline in bf16, its weights streamed from RAM. The engine's INT8 matrix products quantise both weights and activations to int8 after a per-row and per-column scale grid and a Hadamard rotation, with a rank-32 correction in fp16.

Sources: the 18 datasets behind this page
MoE model bigger than the card
Qwen3-30B-A3B BF16 on the 16 GB RTX 4080: Leviathan's expert streaming against llama.cpp with its experts on the CPU, decode and prompt speed.
  • Model: Qwen3-30B-A3B-Instruct-2507, BF16 weights (61 GB as GGUF, 40.5 GB as Leviathan's lossless .shn5): larger than the 16 GB card, so experts are streamed
  • Card: NVIDIA GeForce RTX 4080 16 GB, PCIe 4.0 x16; Ryzen 9 7950X, 128 GB DDR5
  • Measured: Leviathan's decode and 700-token figures: 2026-11-14 ~03:00, after the shortened .shn5 decode chain (the engine DLL of that day; card clock sampled, 2,910 MHz median). Its 2,048-token figure and every llama.cpp figure: 2026-11-13 morning. Harness tests/engine/test_qwen3moe_real.py --arm; the same 700 token ids for both engines.
  • Where a range: llama.cpp's figures are the low and high of its repeated runs: the low is kept beside the high (the _low fields)
  • Accuracy: Leviathan's fp32 prompt pass comes within 6.5e-5 nats of a float64 reference built from the model's own weights (worst case over the top-5 log-probs, a 700-token document)
  • Not shown: short prompts (~20 tokens) are bounded by PCIe: ~30 tok/s against llama.cpp's 23-27
.shn5 file sizes
Qwen3-30B-A3B as its BF16 GGUF, as a lossless .shn5 and as a Stage 10 q6 .shn5: the size on disk and bits a weight.
  • Model: Qwen3-30B-A3B-Instruct-2507: 128 experts x 48 layers, 8 used a token; the BF16 GGUF is 61.1 GB
  • Lossless: every decoded byte equals the GGUF's (checked tensor by tensor); exponents entropy-coded with rANS, sign + mantissa kept raw; 4,096-weight tiles, each with a checksum (2026-11-13)
  • Stage 10 (lossy): entropy-coded scalar quantisation: a per-row x per-column scale grid around one uniform step, then the same entropy coding; norms, router, embeddings and output head stay lossless; level q6 (2026-11-16)
  • Units: GB = 10^9 bytes; bits a weight averaged over the quantised matrices
.shn5 lossless and Stage 10, speed
Qwen3-30B-A3B with its experts streamed from RAM, 16 slots a layer: decode, a 2,048-token prompt, the RAM held for the experts and the load time, both files in one session (2026-11-16).
  • Model: Qwen3-30B-A3B-Instruct-2507, experts streamed from pinned RAM, 16 expert slots a layer on the card
  • Measured: 2026-11-16, one session, the two files alternated (A/B): the card's clock varies by session, so compare within it. The 16.2 tok/s lossless figure above is an earlier session (2026-11-14)
  • Card: NVIDIA GeForce RTX 4080 16 GB (stock), Ryzen 9 7950X, 128 GB DDR5, Windows 11
Stage 10 and Q6_K, quality
Bits a weight and KL divergence from each model's reference for Stage 10 q6 and llama.cpp's Q6_K, on Qwen3-30B-A3B and TinyLlama 1.1B (2026-11-16).
  • KL: how far each file's next-token distribution is from the reference, in nats; lower is closer
  • Calibration: the q6 level is set to Q6_K's weight error on TinyLlama; on the 30B it lands a little further from the reference than Q6_K at 6.8 % fewer bits: a per-model calibration is the next step
  • Measured: 2026-11-16; Leviathan's own engine loading each file the way the app does
Video engine, one change at a time
Seconds to denoise one 1280 × 736, 113-frame LTX-2.3 shot: Lightricks' PyTorch pipeline, then Leviathan's video engine with each change added (2026-11-17).
  • Model: LTX-2.3, a 22-billion-parameter audio-video diffusion transformer (a community FP8 checkpoint), 48 blocks, the text encoder Gemma 3
  • Shot: 1280 x 736, 113 frames (4.7 s at 24 fps), 8 denoising steps, Lightricks' 2.3 guidance (4 passes a step), one reference image guiding the character, seed 4242, the music track frozen
  • Timing: seconds of DiT (the denoising), from each render's own recipe file, 2026-11-17; the whole render adds the text encoder, the decode and writing the file
  • Card: NVIDIA GeForce RTX 4080 16 GB (stock), Ryzen 9 7950X, 128 GB DDR5, Windows 11
Video engine against FP32, one step
Relative error of one denoising step's picture and sound outputs from Lightricks' blocks run in FP32: the video engine's default and PyTorch's bf16 (2026-11-18).
  • What: one real denoising step, picture AND sound made from text (no track), 768 x 512 x 89 frames: each output's relative RMS error from Lightricks' blocks run in FP32 (weights x scale in float64) on the same inputs. Lower is closer
  • Leviathan: the engine's default (fp16 sums, fp16 attention, INT8 matrix products, the fused normalisation)
  • PyTorch: Lightricks' own bf16 pipeline on the same inputs
  • Measured: 2026-11-18, the engine's test suite (its text-to-audio-video section): 16 of 16 checks
Same video: PSNR against the exact engine
PSNR of each render's frames against the exact engine's render of the same shot and seed, with another seed as the control (2026-11-17).
  • What: PSNR of every decoded frame against the exact engine's render of the same shot and seed: the same video sits in the 20s; a different seed (a different video) sits near 14.5. Higher is closer
  • Why not bit for bit: a diffusion model amplifies the last bit of any arithmetic over its steps, so no two maths paths match pixel for pixel; the frames show the same scene, man and motion
  • Measured: 2026-11-17, the 1280 x 736 shot above
One denoising step by part
GPU time of one denoising step at 1280 × 736, by part, from a profiler trace (2026-11-17).
  • What: GPU kernel time of one denoising step (4 guidance passes) at 1280 x 736, 113 frames: 8.60 s, from a profiler trace
  • When: 2026-11-17, before the L2 prefetch, which then took about 0.35 s a step off the matrix products
Picture and sound from a prompt
From a prompt to an MP4 with LTX-2.3's own sound on the video engine: clip length, denoising, decode and the whole run (2026-11-18).
  • What: a prompt in, picture AND sound out (LTX-2.3 makes its own audio, 48 kHz stereo), on the engine's default, Lightricks' 2.3 guidance for both the picture and the sound
  • Total: the whole run: the prompt read (cached), the engine built, the denoising, the decode and writing the MP4
  • Measured: 2026-11-18, NVIDIA GeForce RTX 4080 16 GB (stock), Ryzen 9 7950X, 128 GB DDR5, Windows 11
7B decode vs llama.cpp
Qwen 2.5 Coder 7B Q8_0 decode speed at three context lengths, both engines in one session over two interleaved rounds.
  • Model: Qwen 2.5 Coder 7B Instruct, Q8_0 (the same GGUF for llama.cpp; Leviathan's .lev made from it)
  • Card: NVIDIA GeForce RTX 4080 16 GB, driver 617.42, stock clocks
  • llama.cpp: llama-bench, build 983ca8992 (CUDA), -ngl 99 -fa 1 (all layers on the card, flash attention on), every other setting at its default; 3 repetitions, their mean
  • Leviathan: engine DLL 61ca4057 (sha-256 prefix; live since 2026-11-14 15:52), loaded as the app loads it; prompts: one pass from position 0, the mean of 3; decode: 64 steps after the prompt, the logits copied to the host each step, no sampling, the mean of 2 runs
  • Rounds: two interleaved rounds (llama.cpp, Leviathan, Leviathan, llama.cpp) in one session; tok_s = the engine's faster round, both rounds listed
  • Measured: 2026-11-14 15:57-16:00, one session, no other test or benchmark running
  • Log: tests/_output/proof/compare.log (scripts final_compare.sh / final_compare.py)
  • Decode path: fp32 activations and fp32 KV cache; the step ran as a CUDA graph (389 graph steps in round 1), each running the grouped decode attention (Nsight Systems shows its kernel in every token: tests/_output/proof/prof_live.log)
7B prompt speed by setting
Prompt speed at 512, 2,048 and 4,096 tokens: Leviathan's default and its two opt-in switches against llama.cpp, with each Leviathan setting's KL from its exact path.
  • Model: Qwen 2.5 Coder 7B Instruct, Q8_0 (the same GGUF for llama.cpp; Leviathan's .lev made from it)
  • Card: NVIDIA GeForce RTX 4080 16 GB, driver 617.42, stock clocks
  • llama.cpp: llama-bench, build 983ca8992 (CUDA), -ngl 99 -fa 1 (all layers on the card, flash attention on), every other setting at its default; 3 repetitions, their mean
  • Leviathan: engine DLL 61ca4057 (sha-256 prefix; live since 2026-11-14 15:52), loaded as the app loads it; prompts: one pass from position 0, the mean of 3; decode: 64 steps after the prompt, the logits copied to the host each step, no sampling, the mean of 2 runs
  • Rounds: two interleaved rounds (llama.cpp, Leviathan, Leviathan, llama.cpp) in one session; tok_s = the engine's faster round, both rounds listed
  • Measured: 2026-11-14 15:57-16:00, one session, no other test or benchmark running
  • Log: tests/_output/proof/compare.log (scripts final_compare.sh / final_compare.py)
  • KL vs exact: the 2,048-token prompt's last position in each Leviathan arm against the exact path (LEVIATHAN_TC_GEMM=0: fp32 matrix-vector products a row at a time): KL(exact || arm) in nats
Reference check per model
Each model's worst KL from the RTX 4080's recorded output over 4 prompts x 25 teacher-forced positions, with its bar.
  • What this is: tests/engine/test_cuda_reference.py: each model's output from today's engine, teacher-forced over 4 prompts x 25 positions (one prompt ~700 tokens, sent in the app's 256-token pieces), against the 4080's own CUDA output recorded on 2026-11-10. kl_max = the worst KL divergence of any position. A model passes when the top token matches and KL stays under its bar at every position; a CONTROL (the same logits one step out of line) must fail, and did, 4 of 4, for every model.
  • What it is not: Not accuracy against an exact answer: the record was itself the fast path's output. It proves today's engine gives what the recorded one gave, across every engine change since and on every backend (Vulkan and an AMD iGPU pass the same check). Exactness is shown separately.
  • Bars: 1e-4, or twice CUDA's own spread between its fast and per-row paths where that is wider: only Gemma 4's long document (1.9e-3).
  • DeepSeek: 8.9e-5 comes from one near-tie row (margin 0.076 nats) in the code prompt; the cause is the attention's F16 copy of one weight (attn_kv_b), not the prompt path. Top-1 matches everywhere.
  • Measured: 2026-11-14, engine DLL 61ca4057 (live since 15:52): three runs in its gate before the swap (15:06-15:12) and once on the live file after it (15:52), the same worst KL for every model each time (tests/_output/cand2/gate.log).
Cost of the opt-in switches
Each model's worst KL from the stored reference with tensor-core attention or int8 matrices switched on.
  • What this is: The price of Leviathan's two OPT-IN speed switches, per model: the worst KL divergence from the stored CUDA reference over 4 prompts x 25 teacher-forced positions. The bar a model must pass is 1e-4.
  • tc attention: LEVIATHAN_ATTN_TC=1: the prompt's attention on fp16 tensor cores (fp32 sums). Measured 2026-11-14 on the sm_89 test build lev_ws6 (tests/_output/attn_tc/ref_tc_ws6.log). Gemma 4 and DeepSeek run their own attention, so it does not apply to them (null).
  • int8 GEMM: LEVIATHAN_INT8_GEMM=1: Q8_0 weights times activations rounded to int8 per 32 values (llama.cpp's own precision class for prompts). Measured 2026-11-14 (tests/_output/int8/ref_int8.log). It only changes Q8_0 models; the others show their default figure (int8_applies false). Gemma 4 flips two top-1 tokens: never use it there.
  • Default: Neither switch is on by default: accuracy first (his call, 2026-11-14).
  • Models: Base architectures from the engine's blueprint of each file. DeepSeek-Coder-V2-Lite (Q6_K, MoE + MLA) is in the reference set too; neither switch applies to it.
Decode step under the hood
Kernels a decode token, matrix-vector time and attention time, from Nsight Systems traces of both engines.
  • Model and context: Qwen 2.5 Coder 7B Q8_0 on the RTX 4080; decode at a 128-token context, the attention row at 4,096 tokens
  • Tool: NVIDIA Nsight Systems 2025.6.3, CUDA trace with --cuda-graph-trace=node for both engines (both replay their decode as CUDA graphs, which a plain trace collapses). Node tracing adds a little to every kernel, the same way for both.
  • Measured: 2026-11-14 16:04-16:05 back to back: llama-bench tg64 at d128 (-ngl 99 -fa 1), then Leviathan's live DLL 61ca4057, then llama-bench again (tests/_output/proof/prof_pair.log). The attention row: 16:00, 32 decode steps after a 4,096-token prompt (prof_live.log). Leviathan 1.1.0's kernel count: 2026-11-14 ~12:40, before the launch fusion.
  • Attention bytes: 28 layers x keys and values x 4 KV heads x 128 dims x 4 bytes x ~4,120 positions = 472.5 MB a token; 382 GB/s = 57 % of the card's 670 GB/s read ceiling
Weight streaming speed
How fast each weight of a decode step streams from video memory, against the card's measured read ceiling.
  • What this is: How fast each weight of a decode step streams from video memory: its bytes over its kernel's time (Nsight Systems), Qwen 2.5 Coder 7B Q8_0 at a 128-token context.
  • The ceiling: 670 GB/s = the fastest a bare streaming-read kernel reached on this card (1 GiB, every block shape tried, best of 20; the RTX 4080's paper figure is 716.8). No matrix-vector product can stream faster than its weights load.
  • llama.cpp: Only the two weights whose llama.cpp launch could be told apart by its grid are listed for it. Its figures are its launches made outside CUDA graphs (its first tokens), traced exactly as Leviathan's were (Nsight Systems' plain CUDA trace). Its in-graph launches, traced node by node (which adds overhead per kernel), read 622 GB/s (gate + up) and 632 GB/s (LM head).
  • Measured: 2026-11-14 ~13:20 (tests/_output/dense_speed/prof/, the bw_ceiling probe), Leviathan on its test build lev_ws7: the same matrix-vector kernels as the live DLL 61ca4057 (whose traces at 16:00 and 16:04 put gate + up at 642 and 614 GB/s: the spread from one run to the next)
Raw-format decode kernels since 1.1.0
Time a decode token takes before and after the raw-format matrix-vector kernels moved to two rows a warp (2026-11-15).
  • What: time a decode token takes, before and after the raw-format matrix-vector kernels moved to two rows a warp (2026-11-15), same session
  • Same output: KL <= 4.2e-12 against the old kernels and the same top token on every row
  • Card: NVIDIA GeForce RTX 4080 16 GB (stock), Ryzen 9 7950X, 128 GB DDR5, Windows 11
Tests the live engine passed
Each test in the gate the live engine DLL passed, what it checks, and how many of its checks passed.
  • What this is: The gate the live engine DLL (61ca4057) passed before it replaced the previous one, each test through the real engine on the RTX 4080 with the candidate picked by LEVIATHAN_DLL; then the canary on the live file after the swap (the rows marked so).
  • Log: tests/_output/cand2/gate.log (2026-11-14)
  • Left out: three old tests whose model file (a DeepSeek .lev in a folder since removed) no longer exists; they fail the same way on every build and are being repointed
Tests since the 2026-11-14 gate
Each test run since the 2026-11-14 gate: what it checks and how many of its checks passed.
  • What: the tests run since the build in the table above (2026-11-14), each through the real engine on the card

Built with Claude Code by Michael Ricky Neal and Claude (Anthropic).

Leviathan

LEVIATHAN

Local AI, running on your own graphics card.

No server. No cloud. No account. No subscription. You open the app, pick a model, and type — and nothing you say leaves your machine.

WINDOWS · NVIDIA GTX 16 / RTX 20 OR NEWER · NO PYTHON, NO CUDA TOOLKIT, NO DOCKER

VulkanAMD & INTEL GRAPHICS CARDS THROUGH VULKAN · NEW IN 1.1.0

Leviathan is the host. The model is the guest.

Plenty of tools run a model locally. What sets Leviathan apart is everything it builds around the model: a memory that survives closing the app, a way to teach it without retraining, and a way for your own programs to use the models it runs.

See it running

The real app, a real model, one graphics card

Nothing here is mocked up. Every picture is the real app on a single RTX 4080, and the model at work is Qwen 2.5 Coder 7B. Tap one to see it full size.

Chatting with Qwen 2.5 Coder 7B in Leviathan, in real time
Chat — real time on an RTX 4080, nothing edited. How fast depends on your card — mostly its memory bandwidth.
Inline Studio after the model wrote roman.py
Inline Studio — one line of task; the model wrote roman.py and the execute-gate ran it.
Inline Studio with the model's phone-stand CAD script and the 3D part
Shape tasks — the model writes a CAD script against Leviathan's own library; the part updates beside it.
The phone-stand script as shape nodes in the Graph
Graph — that script as 9 shape nodes and 9 parameters, checked to make exactly the same part.
The base's top face clicked in the Planner, and the model drilling a screw hole through it
Planner — click the base, ask for "a 5 mm screw hole straight down through the middle of this face" in plain words: the model's edit lands as one undoable step.
The Fabricator's printability checks passing
Fabricator — watertight, fits the bed, no overhangs, walls thick enough: ready for your slicer.
Settings with the security membrane switched on
Settings — the security membrane, on by default and checking every message.
Studio's Merge GGUF with four models, each with its own weight, checked for a Linear merge
Studio · Merge — mergekit's core methods (Linear, SLERP, TIES, DARE, Add difference) straight on GGUF files at any quantization, up to four models at once. Here four, each with its own weight, checked for a Linear merge.
Studio's Tensor Scan listing Qwen 2.5 Coder 7B's 339 tensors
Studio · Tensor Scan — every tensor in a model, with its shape, type and statistics, exportable as a blueprint.
Studio's Join SafeTensors checking a two-piece download
Studio · Join SafeTensors — a Hugging Face model's pieces joined into one file, byte for byte.
Studio's Inspect memory: a model's memory, what it reads back, and every line
Studio · Inspect memory — look inside a model's memory: every line, what it reads back before your next message, nothing hidden.
<1sfrom prompt to a wall of text — the model runs in-process, no server between you and it
0bytes leave your machine on the local path
~1msinput security scan, on by default
2file types that give a model a mind

The two file types

A model given a mind

If the model is a person: .lev (or its compressed twin, .shn5) is their brain and .mem is their memory of your conversations. Two different jobs, not alternatives to one another. Knowledge is a third thing — but it is not a file format; it is text, and it gets its own note below.

.lev · .shn5
The model

The brain, shaped for your GPU

A model converted into the exact byte layout the graphics card wants, so it goes from disk to VRAM with no reshuffling. Convert a .gguf once, then load it straight onto the card. No server starts, nothing listens on a port.

Or keep it as a .shn5: the same model, compressed without losing a bit, about 1.5× smaller for full-precision (F16 / BF16) models and unpacked on the graphics card as it loads. Leviathan runs it with exactly the same numbers as the .lev, and checks every piece as it unpacks.

A mixture-of-experts model can be far bigger than your card: its experts wait in your computer's memory, and only the ones each word needs come to the card. Qwen3-30B-A3B in BF16 (61 GB) runs on a 16 GB RTX 4080 at 16 tokens a second and reads a 700-token prompt at 683 a second, faster than llama.cpp on the same card (about 10 tokens a second, and 365 for that prompt at the fastest settings we found for it), with the same answers as if it all fitted.

.mem
The memory

What it remembers, kept as text

Close a normal chat and the model forgets you. A .mem keeps your conversations with that model as plain text, and before it answers the model reads back the newest of them, so the conversation genuinely continues. It saves itself as you talk, takes no graphics memory, and every word is yours to read.

Knowledge is text, not a weight file. A knowledge bank is a body of knowledge you give a model without retraining it — drained from a model before you retire it, absorbed from your own code and datasets, or built by hand. It is kept as plain text and handed to the model by meaning when a question calls for it, so it crosses between models regardless of architecture or size, and it is tiny where the old weight approach cost gigabytes. Banks are backed up automatically as .jsonl in your knowledge vault's backup folder, so your distilled knowledge is never trapped in one file.

The systems

What runs underneath

The tabs are surfaces. These are the things working beneath them, each one built to be measured rather than taken on trust.

🧠

Persistent memory

The model resumes instead of restarting. You never re-introduce yourself: it reads back what the two of you said, as text, and keeps it on disk rather than in graphics memory.

🔀

Knowledge routing (ANI)

Every bank — hand-built, drained from a model, or absorbed from your own code — lands in one shared space. Ask a question and the knowledge that fits is found by meaning, not spelling. The strongest bank wins.

📥

Absorb, locally — and vetted

Fill a bank from a model drained of what it knows, or from your own code — source files and datasets, every function compiled and run before it is kept. Loose documents, recordings and chat logs are deliberately not absorbed: the shared knowledge takes only what can be verified, so nothing unvetted can poison what your models read. Opt-in, and it never leaves the machine.

🧩

Reasoning layer

Before answering, the model is handed the shape of how a frontier model worked through problems like yours. One pass, no extra cost.

🔬

Forensic Grid

Structural vision for a model with no eyes. It reads an image's shape (blob, ridge, layered, diffuse) and narrates it in plain language.

🔎

Surface Sight

Actual recognition, run as an external tool on your CPU. It tells the model what a picture depicts, and how sure it is.

♻️

Recycling cloud answers

Ask a hosted model on your own key and Leviathan keeps the substance, so your local models can draw on it later. Nothing pre-loaded.

💭

Episodic memory

Each model remembers your conversations — its own, across sessions, linked so "remember Pepper the dog?" pulls the whole thread back. Kept strictly per model: it never bleeds into another, and never folds into the shared banks.

🔁

Second-opinion fact-check

After a factual answer, the model is quietly re-asked. Agree with itself and it stands; wander between retellings and it is flagged.

📘

Code that lifts itself

Leviathan builds a bank of verified code patterns — every function compiled and run before it is kept — and the coding loop fetches the right one and repairs from the interpreter's own error. A small model codes well above its weight, borrowing a proven pattern instead of guessing.

🧭

Tab-scoped memory

Switch from coding to chatting and the model doesn't drag its last task along. Each tab keeps its own working memory, while your chats with the model stay in its memory, there when you come back to Chat.

🔗

Graph — nodes, or a model

Eighty-seven of Leviathan's own nodes — maths, logic, text, lists, data, thirty shape nodes, measuring a part, your own model and ANI — found by a search, not a scroll. Wire shapes, numbers, expressions and code into a graph that computes a result. A model, or ANI, can read and build the graph alongside you, handed the real nodes and ports instead of guessing. Only you run it; the host keeps the trigger.

🧊

Planner — a real CAD engine

A parametric, watertight 3D modeller in true millimetres, built in-house: sketch, extrude, cut, push a face — the whole part a replayable history. A graph becomes a solid part. Import any 3D file at its real size. Ask your model — or ANI — to change it in plain words; it's handed the real part and edits it as one undoable step. One click forwards it to the Fabricator.

🖨️

Fabricator — idea to object

Proves a part printable before a gram of filament goes in: on your printer's real bed, it checks watertight, fit, overhangs, wall thickness and bed contact, tints the problem faces, turns the part for the least support, then hands your slicer the 3MF/STL. Opens STL, 3MF, OBJ, PLY, glTF and FBX by their blueprint — units and up axis read, or weighed and said how sure — so a file arrives at its real size. Type it, a model builds it, you make it real.

🛡️

Security membrane

Guards what comes in — and the reply on the way out: hijacked models, poisoned documents, hidden characters, a slow steering attack across a whole conversation. It trusts you; it watches everything pretending to be you.

What ANI is

A frozen model, given a living memory.

A language model is frozen the day it ships — correct it today and it forgets by tomorrow, because there is nowhere for the correction to live. ANI is that missing place: the layer around the model where knowledge is held, routed by meaning, corrected, and remembered — so the whole system keeps learning while the model's weights never move. Not retraining. Adaptation without it. Learn, adapt, recall — a complete loop, on hardware you own.

And every piece of it stays on your machine — privacy by design, not promise, because there is no cloud in the loop to trust. The membrane keeps it safe by governing what comes in, never policing what you do. A model that learns and grows with you, keeps everything it learns yours alone, and stays lawful without a corporation deciding what you may know.

Inline Studio

Two models. One writes, one talks. You decide.

Local models can write and refine whole files on their own — but in Leviathan you hold the controls. Give one model the Worker role and it writes the code; give another the Chat role and it talks with you about the work while the first keeps going. Set the roles once on the model, and every session just knows who does what.

🎭

Roles you assign

Worker writes, Chat talks with you, or Both. Saved on the model and carried into every run — no wiring, no scripts.

💬

Talk while it works

Flip Converse and the turn-timer freezes. Ask the chat model anything, steer the work mid-flight, and the worker picks up your direction on its next turn.

⏸

Halt and resume

Pause the worker at any point to revise the code yourself, then let it carry on. Nothing runs on without you.

You choose who works, who talks, and when it stops. The models take turns; you hold the leash.

The security membrane

Your machine is sovereign territory. Fourteen layers keep it that way.

Sovereignty is more than nothing leaving your machine — it means nothing gets in that you didn't invite, and nothing goes out that would hijack the screen or clipboard it lands on. Not a weaponised model, not a poisoned document, not a web page reaching through your browser for your GPU, not an instruction hidden in characters you can't see. The membrane trusts you completely and distrusts everything pretending to be you or trying to slip past you. Most local-AI tools ship none of this. Leviathan ships 14 measured layers — each one built to be tested, not taken on faith.

01

Intent scan

Catches a jailbreak or roleplay trick in what's typed, before the model reads it as a command.

02

Content safety

Screens generated output against a harm taxonomy — the genuinely dangerous, not the merely awkward.

03

Structured-data guard

Injection, unicode trickery and payload bombs hidden inside JSON a program feeds in.

04

Document guard

Hostile PDFs — embedded scripts, invisible text, font exploits — read for traps before they're ingested.

05

Interaction integrity

Tells a person apart from a script flooding the input to farm or slowly steer the model.

06

Workspace scan

Ghost scripts that quietly appear in your project folder, surfaced on demand.

07

Model-file integrity

A weaponised or tampered model refused before a single byte reaches your GPU.

08

Knowledge guard

A poisoned knowledge bank trying to plant a standing instruction that fires every session — quarantined, then fenced as data.

09

Network-door guard

A web page you visit trying to reach through your browser to the model on your card — turned away at the door.

10

Vision-input guard

Malformed images and decompression bombs stopped at the picture path, before anything is decoded.

11

Invisible-character guard

An instruction hidden in zero-width or tag-block Unicode — invisible to you, read by the model — reassembled and caught on the way in, stripped from any reply on the way out.

12

Output sanitizer

Terminal-control codes in a reply built to rewrite your screen or hijack your clipboard, stripped before the answer reaches you — without blocking the answer itself.

13

Hidden-pixel guard

A payload hidden in an image — in bits too fine for any eye to see, or a pattern tuned to steer the model while looking like nothing to you — erased by bounding the picture to what a human could actually perceive. The model sees only your surface; whatever was painted beneath it is gone.

14

Machine-code guard

A QR or barcode a model can read but you can't — carrying an instruction straight past you, the way a sticker could hijack a robot. Caught by its structure, not its format (which an attacker would just change), and blanked before the model decodes it. Proven to defeat a real QR decoder.

And the model is a guest. It has no hands.

The other fear — a model that runs away with itself — can't happen here, and it isn't clever, it's architecture. A model in Leviathan produces text; it cannot loop itself, reach the internet, spawn a process, or touch your machine. Every action — running the server, saving memory, anything at all — is the host's decision: bounded, governed, and interruptible at any moment. Leviathan is the host, the model is only ever the guest, and a guest is never handed the keys.

Every layer runs on your own computer — nothing uploaded, nothing reported — and every one is documented and independently tested. That combination, this many layers, all local, all measured, is something almost nothing else in local AI ships. What you can switch off, and the one line that never bends, is spelled out below.

From your own programs

One model, many programs

A game engine, a script, a tool you wrote: any of them can talk to a model Leviathan runs, over a local endpoint on your own machine. One running instance answers any number of programs at once.

No terminal, no command to remember — flip the server on or off in the app's Settings. It listens on 127.0.0.1:8080.

OpenAI-compatible

Speaks the same API as OpenAI's chat endpoint. Most existing tools work by changing one URL to 127.0.0.1:8080.

Leviathan-native

A richer set of endpoints: load and unload models, cancel a reply mid-answer, list knowledge banks. Both stream; your program keeps its own conversation and sends it each time.

Your machine, your rules

Every guard in Leviathan has an off switch, because it is your hardware and that is not up for debate. The security membrane runs entirely on your computer: nothing uploaded, nothing reported, no telemetry, ever.

There is exactly one line with no switch. Child sexual abuse material is refused whether security is on or off, in the app and over the bridge. User sovereignty is a principle worth defending, and so is that floor. Only one of the two ever bends.