# ai-muninn — Full Site Content
# https://ai-muninn.com
# Generated: 2026-11-27
# Articles: 221
This file contains the full text of all articles on ai-muninn.com.
It is intended for AI tools that need complete site context.
For the article index only, see /llms.txt.
# Local Model Picker
URL: https://ai-muninn.com/en/tools/local-models
Traditional Chinese: https://ai-muninn.com/zh-TW/tools/local-models
Updated: 2026-11-27
Choose coding, quick questions and vision, images, narration, transcription or video. Timings and outputs come from real runs; intermediate generation is illustrated. No model is called by the page.
Text playback: 1 token ≈ 0.75 English words, approximate. Chinese uses roughly one character per token. Reading seconds = 10000 / prefill tok/s. Estimates do not establish complete task turnaround. Missing measurements remain unknown.
## DeepSeek V4.1 Flash
Configuration: DeepSeek-V4.1-Flash-1017 / MiaAI EXL3 2.9bpw + ABLIT
Engine: TensorFold TP=2
Job: Extended coding tasks and careful review
Hardware: 2× ASUS Ascent GX10 / GB10
Generation: Code 111.5; Chinese 59.2 tok/s
Prefill: 1590.55 tok/s (roughly 2K smoke test)
Typical turnaround: Small-task median 26.9 s; one long task remained unfinished at 45 min. Historical related-family director runs: 5.4–10.7 min / 7–15 min; not finished films.
Date: Published 2026-10-28; test day unrecorded
Conditions: One request, temperature 0, up to 400 output tokens; three requests × three rounds, median. Prefill was a separate roughly 2K smoke test, not the same prompt.
## Qwen3.8 Flash-Next · 1 GPU
Configuration: Qwen3.8-Flash-Next IQ3_S / resident single-GPU settings
Engine: Strata 61b3fb5d (historical test; retained version 0.2.10)
Job: Backup for code and diagnosis
Hardware: 1× RTX 2080 Ti 22GB + 128GB RAM
Generation: Code 89.2; Chinese 57.8 tok/s
Prefill: not measured
Typical turnaround: not measured
Date: Published 2026-10-14; October test
Conditions: Historical Strata build 61b3fb5d. One stream; 128K limit, 32768 resident KV; three coding runs, median; up to 650 tokens, thinking off. Prefill not measured.
## Qwen3.8 Flash-Next · 2 GPU
Configuration: Qwen3.8-Flash-Next IQ3_S / historical dual-GPU settings
Engine: Strata 61b3fb5d / layer split
Job: Historical two-GPU configuration
Hardware: 2× RTX 2080 Ti 22GB + 128GB RAM
Generation: Code 98.7; Chinese 64.9 tok/s
Prefill: 1544.74 tok/s (16K prompt)
Typical turnaround: not measured
Date: Published 2026-10-14; October test
Conditions: Historical Strata build 61b3fb5d. 32K context, int8 KV, spec4; three-run median, up to 650 output tokens; 16K prefill. Settings differ from the single-GPU run.
## MiniCPM-V 4.7
Configuration: MiniCPM-V-4.7-35B-A3B / mix_q3gud_im
Engine: llama.cpp b11588
Job: Quick questions, screenshots and routine review
Hardware: 1× RTX 2080 Ti 22GB
Generation: 111.5 tok/s (llama-bench); 96.0 at 32K depth
Prefill: 1938 / 1896 / 1597 tok/s (512 / 8192 / 32768 tokens)
Typical turnaround: not measured
Date: 2026-10-14; published 10-16
Conditions: Initial llama.cpp b11588 text benchmark: 128 generated tokens, two runs. Generation 111.5 tok/s; 32K-depth result 96.0. Prefill 1938 / 1896 / 1597 tok/s at 512 / 8192 / 32768 tokens. The demonstration uses the 8K prefill rate. Later vision/KV settings were not retested.
## Swift 1.5 27B · NVFP4
Configuration: Swift 1.5 27B / locally converted NVFP4 (former)
Engine: fastllm TP=2 + DFlash
Job: Former daily assistant
Hardware: 2× RTX 2080 Ti 22GB
Generation: 153.95 tok/s
Prefill: not measured
Typical turnaround: not measured
Date: 2026-10-08
Conditions: October 8: fastllm TP=2 + DFlash, three-run median for a 512-token coding output. Prompt length unrecorded; no prefill rate.
## Qwen3.6-27B · Q4_K
Configuration: Qwen3.6-27B Q4_K (former; suffix unspecified)
Engine: llama.cpp + MTP
Job: Earlier single-GPU assistant
Hardware: 1× RTX 2080 Ti 22GB / Ryzen 5 3500X / 16GB RAM
Generation: About 30–40 tok/s (warm observation)
Prefill: not measured
Typical turnaround: not measured
Date: Published 2026-06-22; test day unrecorded
Conditions: Warm daily-agent observation, about 30–40 tok/s; context and exact task unrecorded. CPU load could reduce speed. Excluded from the simulation.
## Qwen-Image 2.1 Turbo
Configuration: Qwen-Image 2.1 Turbo / 8 steps / qwen3vl_8b_int8_convrot TE
Engine: ComfyUI / Turbo workflow
Job: Illustrations, covers and starting frames
Hardware: 1× RTX 2080 Ti 22GB
Generation: 14.28 s/image (warm end-to-end median)
Prefill: not applicable
Typical turnaround: 14.28 s/image; warm end-to-end median, 12 prompts, 1024×1024
Date: 2026-11-23
Conditions: ComfyUI, eight steps, qwen3vl_8b_int8_convrot text encoder; narration resident. Twelve prompts, one image each, seed 20261123. Includes encoding, scheduling and polling.
## VoxCPM2 · Q8_0
Configuration: VoxCPM2 BaseLM Q8_0
Engine: llama.cpp-omni / GGUF
Job: Narration
Hardware: 1× RTX 2080 Ti 22GB
Generation: 1.54 s/line (mean)
Prefill: not applicable
Typical turnaround: 1.54 s/line; mean of six lines, not one minute of narration
Date: 2026-10-18
Conditions: llama.cpp-omni / GGUF. October 18 paired six-line test; variable line lengths. No one-minute real-time factor.
## Whisper large-v3-turbo
Configuration: Whisper large-v3-turbo
Engine: MLX
Job: Transcription and subtitle alignment
Hardware: Apple M4 / MLX
Generation: One-minute audio time not measured
Prefill: not applicable
Typical turnaround: not measured
Date: 2026-11-17 (accuracy)
Conditions: November 17 accuracy test: 45 Chinese + 17 English utterances, 59 distinct scripts. No traceable time for one minute of audio; no extrapolation.
## Pika-H3 Turbo
Configuration: Pika-H3 Turbo LoRA / MiniMax-H3
Engine: ComfyUI / Pika-H3 Turbo
Job: Short shot previews
Hardware: 1× RTX 5090 32GB
Generation: 16.3 s/5 s clip (warm)
Prefill: not applicable
Typical turnaround: 16.3 s/5 s clip; warm single example, 864×480
Date: 2026-11-04
Conditions: ComfyUI, same starting frame and seed, one warm run per configuration. No estimate of variance or general quality.
## LTX-2.5
Configuration: LTX-2.5 / 8+3 steps
Engine: ComfyUI
Job: Short clips with Chinese dialogue
Hardware: 1× RTX 5090 32GB
Generation: 28.67 s/about 5 s clip (full workflow)
Prefill: not applicable
Typical turnaround: 28.67 s/about 5 s clip; one full run, 1280×704, 121 frames
Date: 2026-09-11
Conditions: ComfyUI, 8+3 steps, single-speaker Chinese dialogue. Different output size from Pika; no direct speed ratio.
Image output: eight illustrative denoising steps, 14.28-second warm end-to-end median across twelve 1024×1024 prompts. The 1.5-second preparation phase is illustrative.
Video output: a real five-second 864×480 greybox-assisted silent clip. The 16.3-second timing is a different-image first-frame-only warm single run; this clip was not timed separately.
Narration: playback is Chinese. The 1.54-second mean covers six lines; the playback line was not timed separately. Synthesis and waveform reveal are illustrative.
Why these assignments: https://ai-muninn.com/en/blog/local-ai-model-guide
---
# [Claude Code] Claude Picked an OEIS Sequence Stuck Since 2017 and Added Two Terms: 8×8 in 8.5 Hours
URL: https://ai-muninn.com/en/blog/oeis-a285765-queens-graph-new-terms
Date: 2026-11-28
Series: AI Workflow (Part 34)
import YouTubeEmbed from "@/components/YouTubeEmbed";
Claude Opus 5.5, running in Claude Code, picked an OEIS sequence nobody had extended since 2017 and computed two new terms. A285765 counts the ways to place queens on an n×n board so that they all connect. On one 24-core CPU, a(7) = 562,919,128,262,041 took about 7 seconds and **a(8) = 18,446,595,092,102,706,804 took 8.5 hours**, where checking all 2^64 placements one by one would take about 2,700 years. The method: count the placements that don't connect instead, enumerate only the first group of queens, and add up everything after it with 2^k − 1. Both terms are now in OEIS.
---
## Asking Claude to find an open problem on OEIS
I could be using Claude to discover something new. Instead I kept having it make weird images and weird characters. So I asked it: what could you do that I'd find interesting but would never think to ask for?
One answer: find a math problem whose answer isn't published yet, and compute it.
The place to look is OEIS, the On-Line Encyclopedia of Integer Sequences, a database of number sequences and the terms found so far. Entries tagged with the keyword `more` need more terms. You can search for them directly:
https://oeis.org/search?q=keyword:more&fmt=json
Claude skipped the famous ones, like Dedekind numbers (A000372) and Wieferich primes (A001220), and looked for entries that were obscure, short and untouched for years. It came back with five: A285765, A287071, A165143, A030446 and A400997, the last one added on 2026-11-14.
It chose A285765, connected subgraphs of the queens graph. It had 6 known terms, 1, 15, 495, 64815, 33478163, 68694593248, and nobody had extended it since 2017. Its siblings went much further: the king version, A286139, is listed to 16 terms, and the rook version, A286189, to 50. The program attached to the entry checks every subset one at a time.
Before it started, I stopped it: had anyone done this already, and what would we get out of it? The entry was last revised on 2025-02-16 and still had 6 terms, and I found no a(7) anywhere else. The payoff is one line in OEIS, with no money and no theorem attached. What I wanted was the process.
## What A285765 asks: how many queen placements connect
A chess queen moves along rows, columns and diagonals, in eight directions, as far as it likes.
Pick some cells on an n×n board and put a queen on each. Two queens reach each other if they share a row, a column or a diagonal. A queen sitting between two others doesn't block them here.
A placement is connected when the queens form one piece: you can get from any queen to any other by hopping between queens that reach each other. One queen alone counts, and so does a full board. Anything that splits into separate pieces is disconnected.
The question is how many connected placements an n×n board has. Formally, it's the number of connected induced subgraphs of the n×n queen graph.

Start with 2×2. Each of the four cells has a queen or doesn't, so there are 2^4 = 16 placements. Drop the empty board and 15 are left. On a 2×2 board every cell reaches every other cell, so all 15 are connected. a(2) = 15.
On 3×3 there are 2^9 = 512 placements, or 511 without the empty one. Only 16 of them are disconnected: 8 with two queens and 8 with three. 511 − 16 = 495.

4×4 has 65,535 placements, 720 of them disconnected, so the answer is 64,815. 5×5 gives 33,478,163 and 6×6 gives 68,694,593,248.
## Why brute force can't reach 8×8
The obvious method is to check every placement. An 8×8 board has 64 cells, so there are 2^64 = 18,446,744,073,709,551,616 placements.
Checking all 2^36 placements of 6×6 took 317.9 seconds on 24 threads. Scale that rate up and 7×7, with 2^49 or about 5.6×10^14 placements, takes about 30 days. 8×8 takes about 2,700 years. Both are constant-rate estimates, not actual runs.
## How three ideas cut 2,700 years to 8.5 hours
### Idea one: count the placements that don't connect
Queens reach far, so almost every placement connects. The known terms showed it. On 6×6, only 2^36 − 1 − a(6) = 24,883,487 placements fail to connect (the −1 is the empty board). On 5×5 it's 2^25 − 1 − a(5) = 76,268. On 8×8 the count turned out to be 148,981,606,844,811, about 1 in every 123,819 placements.
So the program counts the disconnected placements and subtracts them from 2^(n²) − 1. That still means finding 149 trillion placements, each one exactly once.
### Idea two: follow only the first group
Take three queens on a 3×3 board: top-left, middle-right and bottom-middle. The top-left queen reaches neither of the other two, so this placement is disconnected. It has two groups: the top-left queen alone, and the other two, which share a diagonal.

Every disconnected placement splits into groups like that. Read the board like a page: the top row left to right, then the next row down. The first queen you meet belongs to one group, the first group. Every disconnected placement has exactly one first group, so sorting by it never counts anything twice.
Once the first group is fixed, two kinds of cells are off limits: cells it reaches, because a queen there would join it, and cells before the first queen, because a queen there would become the first queen. The cells left over can still take queens. The figures and the video color them green.

In the 3×3 example, with top-left as the first group, only middle-right and bottom-middle stay green. Any non-empty set of green cells gives a disconnected placement with that first group. Two green cells give 2^2 − 1 = 3 placements: one cell, the other, or both. With k green cells that's 2^k − 1 placements, and none of them has to be listed. With 18 green cells, 2^18 − 1 = 262,143 placements go into the total in one step.
### Idea three: stop when the green runs out
As the first group grows, the green shrinks. Once it's gone, no second group can fit, however many queens join the first, so the program drops that whole branch. Queens cover so much ground that the green runs out after only a few of them.
## The whole method on a 3×3 board, in ten steps
Cells are named by position: top-left, top-middle, top-right, middle-left, center, middle-right, bottom-left, bottom-middle, bottom-right. Ten first groups have green cells left:
1. Top-left alone. Green: middle-right and bottom-middle, so 2^2 − 1 = 3. Running total 3.
2. Top-left and top-right. Green: bottom-middle, so 1. Total 4.
3. Top-left and bottom-left. Green: middle-right, so 1. Total 5.
4. Top-middle alone. Green: bottom-left and bottom-right, so 3. Total 8.
5. Top-middle and middle-left. Green: bottom-right, so 1. Total 9.
6. Top-middle and middle-right. Green: bottom-left, so 1. Total 10.
7. Top-right alone. Green: middle-left and bottom-middle, so 3. Total 13.
8. Top-right and bottom-right. Green: middle-left, so 1. Total 14.
9. Middle-left alone. It can't reach top-right, but top-right comes before it, so that cell is out too. Green: bottom-right only, so 1. Total 15.
10. Middle-right alone. Green: bottom-left only, so 1. Total 16.
The center reaches every cell, and a queen in the bottom row reaches every cell after it, so neither leaves any green. The ten steps add 3, 1, 1, 3, 1, 1, 3, 1, 1, 1 = 16, and 511 − 16 = 495, the known answer.

## Results: a(7) in 7 seconds, a(8) in 8.5 hours
Everything ran on one AMD EPYC 7402 (24 cores), with 24 threads and no GPU. The program is C with OpenMP. Each set of cells is a single 64-bit integer, one bit per cell, so an 8×8 board uses all 64 bits.
The second column is the real work: how many first groups the program visited.
| Board | First groups walked | Time | Answer |
|---|---|---|---|
| 3×3 | 10 | — | 495 |
| 4×4 | 340 | — | 64,815 |
| 5×5 | 43,296 | — | 33,478,163 |
| 6×6 | 16,964,861 | 0.01–0.02 s | 68,694,593,248 |
| 7×7 | 22,675,282,126 | 6.79 s | 562,919,128,262,041 (new) |
| 8×8 | 112,872,055,914,761 | 30,460 s (8.5 h) | 18,446,595,092,102,706,804 (new) |
On 8×8 it visited about 3.7 billion first groups per second. 148,981,606,844,811 placements are disconnected, so a(8) = 2^64 − 1 − 148,981,606,844,811. On 7×7 the disconnected count is 30,825,159,270.
## How to check an answer with nothing to compare against
These numbers weren't published anywhere, so there was nothing to compare against. Claude checked them four ways.
- **Brute force on small boards.** Up to 6×6, checking every placement agrees with the new method on all six terms.
- **A second program that searches in a different order.** It renumbers the cells at random, follows the group of the last queen instead of the first, branches in a different order and uses an explicit stack. Its partial sums look nothing like the first program's, and the totals match to the last digit. 7×7 also matched with a second random numbering and a different split of the work. On 8×8 the second program took 74,617 seconds, 20.7 hours.
- **Known sequences as regression tests.** Switched to the rook graph (rows and columns only), the same code reproduces A286189: 1, 13, 397, 55933, 31450861, 67253507293. Switched to the king graph (one step in any direction), it reproduces A286139: 1, 15, 388, 37196, 14765089.
- **A rough sanity check.** Nearly every disconnected placement has one queen sitting isolated. An estimate from that case alone lands about 0.18% off the real count on 8×8, 0.7% on 7×7 and 2.0% on 6×6.
The weak spot: both programs rest on the same idea, so if it has a hole, both are wrong the same way. The idea itself is only fully checked up to 6×6. 7×7 never got a brute-force run (about 30 days by my estimate), and there's no third, mathematically different method.
## Submitting AI-assisted results to OEIS
Work started on 2026-11-25, and a(7) came out that day. The first 8×8 program finished on the 25th and the second on the 26th. On 2026-11-26 I submitted a(7) and a(8) to OEIS under my name, and after editor review they went live the same day:
https://oeis.org/A285765
The code and run logs are public:
https://github.com/coolthor/queen-graph-connected-subgraphs
Claude picked the problem, came up with the method, wrote the programs and designed the checks. I made it check whether anyone had done this first, learned the method well enough to explain it myself, and submitted it under my name, so I'm responsible for it.
I read the OEIS rules on AI before submitting. The gist: you have to understand the work and take responsibility for it; replies to editors must be written by you, not pasted from an AI; an AI is never listed as an author; and mass submissions need permission first.
## How to try this yourself in five steps
1. Search OEIS for `keyword:more`. Pick something obscure, short and untouched for years; skip the famous ones.
2. Before any code, check when the entry was last revised, whether someone has published new terms elsewhere, and what you'd get out of it.
3. Have the AI reproduce the known terms with the dumbest possible method before it proposes a clever one.
4. Implement the new method twice with different traversal orders, compare the totals, and write down which assumptions the two programs share.
5. Read the platform's AI policy in full before submitting, and make sure you can explain the method yourself.
## Deep dive: the formula, reproduction commands and raw output
You can skip this section; nothing above depends on it. It has what you need to rerun the numbers, or to hand this page to a model and ask it questions.
### The counting formula
```
D = Σ_C (2^|F(C)| − 1)
a(n) = 2^(n²) − 1 − D
```
D is the number of disconnected placements. C runs over every first group whose green set is not empty. F(C) is the green set: the cells numbered after the smallest cell in C that are neither in C nor reached by C. |F(C)| is the number of cells in it.
### One more pruning rule
If a cell reaches every cell in F, adding it to the first group is certain to leave no green cells, so that branch is ruled out before it starts. On 7×7 this made the run 18% faster, with the same result.
### First groups visited versus disconnected placements
The number of first groups walked comes to about 0.74–0.76 times D: 0.736 on 7×7 and 0.758 on 8×8.
### Reproducing the runs
You need gcc and OpenMP.
```bash
make
OMP_NUM_THREADS=24 ./anchor 7
OMP_NUM_THREADS=24 ./maxbin 7 2024
OMP_NUM_THREADS=24 ./brute 6
```
`anchor` is the main program, `maxbin` is the second program (its second argument, 2024 here, is the seed for the random cell numbering), and `brute` checks every placement.
### Raw output
The main program's lines for 7×7 and 8×8:
```
method=A n=7 disconnected=30825159270 a=562919128262041 nodes=22675282126 seconds=6.79
method=A graph=queen n=8 disconnected=148981606844811 a=18446595092102706804 nodes=112872055914761 seconds=30459.83 threads=24
```
`nodes` is the number of first groups visited.
### Checkpoints and resume
The 8×8 runs can stop and resume from a checkpoint file. The second program's checkpoint holds partial sums for 2,931,426 tasks. Adding them up again from the file gives 148,981,606,844,811.
### The run-time estimate that went wrong
The first time estimate sampled one task in every 2,000, and a few very large tasks threw it off. The programs now keep a live count of progress instead.
---
# [Guide] Which Local AI Model for Which Job: What We Actually Run (Updated as We Switch)
URL: https://ai-muninn.com/en/blog/local-ai-model-guide
Date: 2026-11-27
Series: AI Workflow (Part 33)
For a model recommendation, open the [Local Model Picker](/en/tools/local-models). Choose a task to see the hardware, measured speed, typical wait and sample outputs.
## [Local Model Picker →](/en/tools/local-models)
This guide explains the choices behind that tool: what each model has done in our workflow, what replaced it, and which comparisons remain incomplete.
## Multi-step jobs vs. single questions
A coding task can require opening files, editing code, running checks and responding to failures. DeepSeek handles those extended runs and careful reviews; Qwen Flash-Next is the backup. The surrounding software gives the model file and program access. I still inspect the checks and the final report before accepting the work.
For a screenshot, a brief explanation or routine review, I use MiniCPM. Combining text and vision on one older GPU leaves another card free. A fast stream of tokens tells me how quickly text appears. Whether an assistant follows through on a job requires a separate test.
### How our text and vision lineup changed
The GB10 systems moved from [Qwen3.5-35B](/en/blog/dgx-spark-vllm-qwen35-setup) to [DeepSeek-V4-Flash](/en/blog/dgx-spark-deepseek-v4-flash-context-memory-engineering), then to [DeepSeek V4.1 on two systems](/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold). A faster engine ran out of memory on large requests along the way; I [reverted that deployment](/en/blog/hikari-ds4-oom-rollback).
On the older GPUs, the sequence was [single-card Qwen3.6](/en/blog/modded-2080ti-22gb-local-agent), [two-card fastllm with locally converted NVFP4 weights](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant), and [single-card MiniCPM](/en/blog/minicpm-v47-35b-a3b-one-2080ti). The final daily two-card model was Swift. MiniCPM took over routine questions and screenshots, freeing a card for the backup. Later memory changes allowed vision and long text to fit together. Model details are on the [MiniCPM model page](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B); Qwen runs through [Strata](https://github.com/Niko1221/Strata); the [single- and dual-card deployment record](/en/blog/strata-flashnext-dual-2080ti) keeps the earlier configurations and diagnosis test together.
### Images: inspect the output before choosing the faster workflow
Qwen-Image Turbo makes our news illustrations. MOSS-Image remains an alternative. Mage was quicker in the same batch but scored lower, so I removed it. A later MOSS acceleration test covered fewer prompts; its old quality score cannot be attached to the new timing. I inspect important Traditional Chinese lettering and typeset exact captions afterward.

Measurement note: November 23, twelve prompts, one 1024×1024 image per prompt, one blinded MiniCPM-V judge. Qwen scored 96.75/100 at a 14.28-second warm median; Mage scored 79.33/100 at 5.83 seconds; the original MOSS workflow scored 91.50/100 at 37.04 seconds. The accelerated MOSS follow-up took 12.04 seconds across only three fixed prompts. These scores do not measure lettering accuracy. The [earlier MOSS lettering experiment](/en/blog/moss-image-traditional-chinese-comic-cards) records a different test.
### Video: preview the shot, then check dialogue separately
Pika-H3 Turbo is my first choice for a quick shot preview. I try LTX when Chinese dialogue matters, then listen to the full clip for missing words and speaker changes. For a prescribed camera move, I supply frames from a simple 3D scene; the [greybox camera experiment](/en/blog/pika-h3-flex-rtx5090-whitebox-orbit) shows the method.

Measurement note: November 4, identical first frame, seed and five-second 864×480 output. One warm run each took 38.0 seconds for H3, 20.8 for Flex and 16.3 for Turbo. In September 11 dialogue examples, single-speaker CER was zero for both LTX and H3; two-speaker CER was 9.52% and zero. Those dialogue outputs had different sizes and one example per setting, preventing an overall quality ranking or direct speed ratio.
### Speech: synthesis and checking have different jobs
VoxCPM2 Q8 generates narration. Whisper on M4 through MLX transcribes it and helps align subtitles. I listen to every line and compare subtitle timing with the original audio. Giving the recognizer the intended script could hide a spoken mistake, so the check runs without that hint.
Vox Q4 was quicker in the paired test, but later occasionally garbled entire lines. I returned to Q8 without claiming a measured failure rate. Whisper made fewer transcription errors in our test. I kept it without treating a comparison across hardware as a pure model speed ranking. CPU transcription uses Qwen3-ASR GGUF separately; earlier FP32 scores do not describe that setup.

Measurement note: October 18, six paired lines, mean synthesis time 1.38 seconds for Q4 and 1.54 for Q8. November 17, 45 Chinese and 17 English utterances including repeated closings: Whisper reached 8.08% CER and 8.67% WER; Ming BF16 reached 10.27% and 18.97%. The utterances were not 62 independent scripts. There is no traceable timing for a one-minute recording. See the [narration implementation](/en/blog/voxcpm2-news-shorts-narration-2080ti) and [Whisper repository](https://github.com/openai/whisper).
## Deep dive: replacement candidates and measurement limits
You can use the picker without this section. It records why promising candidates did not replace the daily assistants and how the demonstrations estimate time.
### A question score does not establish follow-through
Bonsai did better on hard questions but often spent its output allowance thinking when diagnosing real failures. Answers remained unfinished; disabling thinking led to repeated lookups. Inkling improved when allowed extra computation, but the question test did not establish that it would complete daily work better.

Measurement note: April 17–20, GB10, the same scaffold and all 300 [SWE-bench Lite](https://www.swebench.com/) issues per model. Qwen solved 145, Gemma 26B solved 116 and E4B solved 50. The [repair experiment](/en/blog/swe-bench-scaffold-transfers-three-models) records historical results, not the current assignment order.

Measurement note: November 26, Bonsai answered 82/110 hard questions versus an earlier MiniCPM Q8 baseline of 75/110. Incident diagnostics scored 2/21 against 9/21 rubric points, seven tasks worth three points each. November 22–23, [Inkling](/en/blog/inkling-varloop-5090-2080ti) answered 39, 46 and 46 of the same sixty questions with one, three and five passes. The [older Bonsai GPU timing](/en/blog/ternary-bonsai-2-27b-one-2080ti) is a separate measurement from the later capability test on another GPU.
### What the time estimates mean
Generation measures output tokens per second. Prefill measures processing of the supplied prompt before generation. The picker uses the approximation “1 token ≈ 0.75 English words, approximate” for its English passages. The Chinese demonstration uses roughly one character per token. Neither animation calls a model. Image, video and narration outputs are real; intermediate generation is illustrated.
Calculation: reading seconds = 10000 / measured prefill tok/s; generation seconds = estimated passage tokens / generation tok/s. Read and generation measurements may come from separate tests. Single- and dual-GPU settings also differ. These calculations cannot establish a complete coding task's turnaround. That field uses recorded work durations and stays “not measured” when no record exists. Image timing is a warm end-to-end median, speech timing a six-line mean, and video timing a single example with its output size and input conditions retained. We do not extrapolate a one-minute transcription time.
## Update log
- **2026-11-27:** Moved the quick reference into the standalone Local Model Picker; this guide now explains the workflow assignments.
- **2026-11-27:** Added turnaround records, token rates and demonstrations, later moved to the picker.
- **2026-11-27:** First edition, recording daily assignments, replacement evidence and test limits.
---
# [Benchmark] Antigravity Orchestrator and /swarm on my coding tickets: same score, 1.2 to 7.7 quota points
URL: https://ai-muninn.com/en/blog/antigravity-orchestrator-swarm-real-work
Date: 2026-11-23
Series: AI Workflow (Part 32)
Antigravity is Google's AI coding tool. I compared three modes on two jobs: build an inventory ledger and fix a parcel app with planted bugs. All scored 100%. Below are the parcel results; quota is a share of my plan's five-hour limit:
- **One model, working alone:** handles the whole job. Fastest and cheapest: 163 seconds, 1.2%.
- **Orchestrator:** one model plans, another edits. 475 seconds, 4.2%. The saving was about a third when the baseline was Neon at its highest thinking level.
- **/swarm:** agents work in parallel; one checks. Average: 460 seconds, 7.7%.
Each setup ran 1–3 times. These results compare time and quota, not coding ability.
---
## Antigravity turns a text request into code changes
Antigravity is Google's AI coding tool: I give it a request, and it reads files, edits code, and runs tests. Its updates offer two ways to divide that work among models. I wanted to know how much of my allowance they consumed on actual engineering tasks, beyond what a demo could show.
The model lineup starts with Hydrogen, the fast, economical daily option. Neon sits in the middle. Google positions Carbon for the hardest long-running work; my plan did not include it.
## Orchestrator passes work between two models in one conversation

[Orchestrator](https://antigravity.google/docs/models#orchestrator) keeps one conversation and assigns different jobs to a planner and an executor. The planner explores the problem, makes a plan, and reviews the work. The executor searches files, changes code, builds, and tests.
When the executor gets stuck, control returns to the planner. Only one is active at a time.
## /swarm runs separate worker conversations in parallel

With [Swarm](https://antigravity.google/docs/swarm/), my request goes to a coordinator. It splits independent work among named workers, each with its own conversation. A verifier reads their changes, runs tests, and returns problems to the worker who made the change.
All assignments, questions, and results go through a shared board. A monitor prompts members to resume if the whole team falls silent before finishing. Each conversation consumes quota when it works; waiting while idle uses no tokens.
## What I asked the agents to build and repair
The first assignment was to build a small shop’s inventory ledger from scratch. The shop’s purchases and sales arrive in three kinds of files: a table exported from a spreadsheet, a file with one record per line, and an old-style text file with fixed-width columns. The agent got a specification and a few empty files. It had to write a program that reads all three formats into one ledger, counts repeated copies of a record once, and rejects records that share an ID but disagree about what happened.
Here is the purchase-and-sale example from the specification: buy 2 units at 1.125 each, then 3 at 2.50 each, then sell 4 at 4.00 each. The program must work out what the sold units originally cost the shop.
The rule is to sell the oldest stock first. Take both units from the first purchase, then two from the second. Multiply the units taken from each purchase by its price and add them up: **Cost = 2 × 1.125 + 2 × 2.50 = 7.25.** Revenue is 16.00; subtract the cost to get a profit of 8.75. The one unit left on the shelf has a purchase cost of 2.50.
That example checks the arithmetic. I also checked the rules around it: keep full precision until rounding the final money amounts to cents, with halves rounded up; order same-day transactions by ID (a, b, then z here); and reject a sale if there is not enough stock at that point. A later purchase cannot cover an earlier shortage.

The second assignment started with someone else’s parcel shipping app: 23 files, five bugs to fix, and one feature to add. These were the bugs:
- Adding one business day to Friday returned Saturday. It should skip the weekend and return Monday.
- A shipping fee of 0.005 rounded down. It should round up to 0.01.
- Postcodes beginning with zero went to the wrong route. For example, 00123 must keep its leading zeros and match route 00.
- The dispatch plan put low-priority parcels first. Higher-priority parcels should go first.
- Sending two different orders under the same request ID silently returned the first order. The second must be rejected without changing existing data.
The new feature was **all-or-nothing batch shipping**. If any parcel has a problem, the whole batch stays put and no stored data changes. Shipping the valid parcels and leaving the rest behind would fail the assignment.

How did I score them? Each task had 40 automated checks the agent could not see. Each supplies an input and checks the answer: do those purchases and sales produce a cost of 7.25? Does Friday plus one business day return Monday? Scores depend on the checks passed. The reference solution scored 100, an empty program scored 0, and the unmodified parcel app scored 16.25.
Solo models and Orchestrator received the same tasks; Swarm also attempted the parcel app. Every run started from the same files, with the hidden checks kept out of reach. The [earlier benchmark](/en/blog/pi-dsh-hermes-local-model-ticket-benchmark) has the task and scoring details.
I ran Antigravity CLI 1.5.14 on November 23 with my personal account. CLI means command-line interface: I sent requests through terminal commands. Each configuration had only one to three runs. I did not test the desktop app.
All 16 valid engineering runs scored 100. These tasks therefore cannot rank the modes' coding capabilities. They can show how much time and quota each mode spent reaching the same score.
## Solo Hydrogen already scored 100
The cheapest solo configuration passed everything. Orchestrator and Swarm reached the same score while generally adding quota use and waiting time.
My plan provides an allowance for each five-hour window. Here, a “percentage point” means one hundredth of that full allowance consumed by a job.
On the parcel task, solo Hydrogen at **high** effort took **163 seconds and 1.20 quota points**. Swarm averaged **460 seconds and 7.71 points**, about **6.4 times as much quota**.
The chart adds Orchestrator to the comparison. Shorter bars mean less waiting or less quota consumed. The /swarm row averages two runs.

The chart covers Gemini's five-hour allowance only. Extra Argon weekly usage in the second Swarm run stays separate. Some workers also reported a different model; I include those records and the comparison at the same reasoning effort in the deep dive. Quota snapshots can jump, so these readings describe usage trends rather than exact bills.
## How I would choose a setup after 16 passing trials
My first question is whether the returned code passes my own checks. A passing result lets me keep the cheaper setup; a failure gives me a reason to try the next one.
- **Start with solo Hydrogen high when the specification and acceptance tests are clear.** It passed both tasks; the parcel run took 163 seconds and 1.2% of the five-hour allowance.
- **Move to a stronger model or a higher reasoning setting after an acceptance check fails.** The high and xhigh settings control reasoning effort, with xhigh higher; Neon took 386 seconds at high and 547 at xhigh on the parcel task, with no score gain.
- **Try Orchestrator for work that already requires solo Neon xhigh.** My Neon xhigh planner and Hydrogen xhigh executor used 4.06 versus 6.00 quota points across three matched pairs, about 32% less quota and 17% less time; against Neon high, the pairing took longer and showed no quota saving.
- **Save /swarm for larger jobs with independent pieces you can check separately, such as unrelated packages or investigations.** On this single parcel ticket it used 3.8 times the quota of solo Hydrogen xhigh at the same requested effort, with no score gain; larger jobs remain untested.
- **Record /usage before and after a run, then read the report and run the tests yourself.** Beyond the 16 valid engineering trials, 19 setup attempts were invalid and still consumed quota, and I saw SUCCESS returned without a report.
## How quickly would these jobs use up the quota?
Back-to-back jobs drain the allowance quickly, especially at the highest reasoning setting or with `/swarm`.
Starting full and repeating the parcel task, solo Hydrogen high would last about 3.8 hours, Neon at its highest reasoning setting about 2.5 hours, and `/swarm` about 1.7 hours. All fall short of five hours. These are projections from the parcel readings; I did not run them to exhaustion.
Over 11 supplemental runs in 49 minutes, Gemini weekly remaining fell by 7.45 percentage points. Each swarm member uses quota, and one run also drew 6.06 points from Argon's separate weekly allowance. Points from different allowances cannot be added.
Check `/usage` before choosing the highest reasoning setting or `/swarm`. The [deep dive](#exhaustion-estimates-and-weekly-quota-limits) has the calculations and individual readings.
## Try a small test-repair task with these flags (optional)
If you want to try it, start in a disposable working copy with tests you can run yourself. These prompts are demonstrations; the measurements above used the two benchmark tasks. The command flags are the ones I actually used. You can change the wording to describe your own acceptance checks.
Before running, I prepared `settings.json` to allow the commands the job needed. The command below does not create that file. Ask your coding assistant to prepare scoped permissions for the project, then try the commands first; a denial can cancel the entire conversation. This setup runs headless, meaning without interactive prompts.
```bash
agy -p "Fix failing tests in tests/ without editing test files; write changes and checks in report.md." --model gemini-pro-orchestrator-neon --mode accept-edits --settings ./settings.json --output-format stream-json --print-timeout 0
```
`--model` selects the model or Orchestrator pairing; `--mode accept-edits` lets it edit files directly. `--settings` loads the prepared permissions file; this is the syntax I used in CLI 1.5.14.
For the Swarm demonstration, prefix the same simple request with `/swarm` and ask for a verifier:
```bash
agy -p "/swarm Fix failing tests in tests/ without editing test files; write changes and checks in report.md. Use @verifier to review the changes and run tests." --model gemini-4-hydrogen-xhigh --mode accept-edits --settings ./settings.json --output-format stream-json --print-timeout 0
```
`--print-timeout 0` removes the waiting limit; `--output-format stream-json` emits events. I used them together, without testing their effects separately. My initial command without that combination returned within a few seconds. With both, the preflight waited 97 seconds for the worker and verifier to finish. The documented timeout default is already zero and applies to the current turn. These flags do not guarantee that the whole swarm has finished; I still check each member.
I read usage before and after each job with:
```bash
agy -p "/usage" --output-format json
```
For the same five-hour bucket, keep both raw snapshots and read `remaining_fraction`, the fraction of allowance left. Quota points equal `(before remaining_fraction − after remaining_fraction) × 100`. These floating-point readings can be noisy and nonmonotonic. They are not billing records.
A `SUCCESS` result can survive a denied command or cancellation. I still checked the actual files, test results, and `report.md`, and confirmed that the workers and verifier had finished.
## Deep dive: matched baselines, every run, and the discarded attempts
You can skip this section and still use the workflow above. I kept 28 valid runs across the two rounds: 16 engineering runs and 12 document-checking runs. This is the evidence behind the comparisons, including where I initially compared different effort levels.
### Exhaustion estimates and weekly quota limits
For the parcel task, I can estimate how long a full five-hour allowance would last under continuous use. Assume a fresh 100% allowance, repeated identical jobs, no pauses or other usage, and a fixed consumption rate. Ignore resets until that allowance is exhausted.
With `q` measured in percentage points per job and `t` in seconds:
```text
quota-equivalent jobs = 100 / q
hours to exhaustion = (100 / q) × t / 3600
```
The last column shows the estimated hours until the allowance runs out. Quota points are displayed to two decimals and seconds to whole numbers; the calculations use the original readings.
| Parcel setup | Five-hour quota per job | Seconds per job | Rounded quota-equivalent jobs | Hours to exhaustion |
|---|---:|---:|---:|---:|
| Hydrogen high | 1.20 pp | 163 | 83 | 3.8 |
| Neon xhigh | 6.00 pp | 547 | 17 | 2.5 |
| Swarm | 7.71 pp | 460 | 13 | 1.7 |
These are rounded quota equivalents, not guaranteed completed jobs. Neon xhigh works out to about 16.67 jobs, so the seventeenth may not finish. Normal work includes review and pauses; I did not measure how much those extend a session. These estimates describe the parcel runs within this two-task experiment, not coding work in general.
The weekly allowance is harder to estimate reliably. During 11 supplemental runs on November 23, from 07:03:22 to 07:51:49 Taipei time (UTC+8), Gemini weekly remaining fell from 71.06% to 63.61%, a drop of 7.45 percentage points. Argon weekly remaining fell from 85.75% to 83.21%, a drop of 2.54 points. I do not have the initial raw weekly reading for the full experiment.
Even the five-hour readings do not reconcile exactly: summing the per-run changes gives 24.3634 points, while subtracting the session endpoints gives 23.5633. Concurrent usage is unknown. I cannot reliably attribute the entire weekly change to these jobs or derive a weekly-to-five-hour conversion from these readings.
The second swarm run also consumed 6.06 points from the separate Argon weekly bucket. Each active member consumes quota; percentage points from different buckets must stay separate.
### The grader had a ceiling, and every valid run reached it
L1 builds an inventory-ledger CLI from a specification, with 8 public and 40 hidden tests. L2 modifies a 23-file parcel service: five bugs plus one feature spanning modules, with 185 public and 40 hidden tests. The reference solutions scored 100%, the empty skeleton 0%, and L2's original buggy version 16.25%. The earlier benchmark explains the tickets and scoring in detail; I kept that setup rather than introducing a new score here.
Seconds and reported tokens below are rounded to whole seconds and thousands; quota deltas are rounded to two decimals. Averages and ratios in this article are computed from the unrounded readings, so a few differ in the last digit from what the rounded table gives. Orchestrator means Neon xhigh planner plus Hydrogen xhigh executor. For `/swarm`, Hydrogen xhigh was the requested conversation model, each run had six conversations, and the reported tokens cover **the coordinator only**. The CLI's `total_tokens` field excludes the separately reported cache-read field in this dataset. I could not obtain a reliable worker total.
| Method | Task / repeat | Seconds | Reported tokens | Five-hour delta (pp) |
|---|---|---:|---:|---:|
| Neon high | L1 / run 1 | 501 | 135K | 3.69 |
| Neon high | L1 / run 2 | 531 | 150K | 2.48 |
| Neon high | L2 / run 1 | 386 | 133K | 3.23 |
| Neon xhigh | L1 / run 1 | 735 | 214K | 5.59 |
| Neon xhigh | L1 / run 2 | 723 | 195K | 6.42 |
| Neon xhigh | L2 / run 1 | 547 | 175K | 6.00 |
| Orchestrator | L1 / run 1 | 601 | 205K | 4.00 |
| Orchestrator | L1 / run 2 | 586 | 208K | 3.99 |
| Orchestrator | L2 / run 1 | 475 | 228K | 4.21 |
| Hydrogen high | L1 / run 1 | 249 | 123K | 1.65 |
| Hydrogen high | L1 / run 2 | 280 | 136K | 1.25 |
| Hydrogen high | L2 / run 1 | 163 | 108K | 1.20 |
| Hydrogen xhigh | L2 / run 1 | 262 | 166K | 1.83 |
| Hydrogen xhigh | L2 / run 2 | 294 | 180K | 2.20 |
| /swarm | L2 / run 1 | 384 | 149K (coordinator) | 7.94 |
| /swarm | L2 / run 2 | 535 | 191K (coordinator) | 7.49 |
### Why did changing the baseline reverse my Orchestrator result?
In the first round I asked the question I would naturally ask at work: is Orchestrator better for me than the Neon high setting I already use? The initial summary said it was 17% slower and used more quota. That was a useful adoption comparison, but I was also reading it against Google's claim about replacing an expensive planner-only run. Those are different questions.
The picker showed both Orchestrator roles at xhigh. My solo baseline was high. I added solo Neon xhigh runs on the same tasks and paired L1's first and second runs and L2's run. Dividing the total elapsed time for those three Orchestrator runs by the total for their solo Neon xhigh counterparts gives 0.83. Against **solo Neon xhigh**, Orchestrator was now about 17% faster, with about a third less observed five-hour quota. None of the original high runs changed; I only swapped what I compared them against. The initial 17%-slower summary and the later task-grouped 1.15–1.23 range also aggregate the high comparison differently, so I keep them labelled rather than treating them as identical statistics.
Effort alone consumed a substantial part of the budget. Neon xhigh took about 1.41 times as long as high, with roughly 1.9 times the quota. Hydrogen xhigh versus high on L2 took 1.71 times as long, with a 1.68 quota ratio. That latter quota gap is only about 0.81 points, smaller than the roughly 1.2-point difference between the repeated Neon high L1 readings. I report it as a ratio of these observations, not a stable quota multiplier. All of these settings earned the same score.
The 32% Orchestrator comparison has three matched pairs, a different planner from Google's Carbon experiment, and different tasks. It supports trying the Neon planner/executor split when Neon xhigh is the baseline. It does not validate the 24% quota saving reported for Carbon-based Orchestrator on Terminal-Bench 4.1 in Google's [Hydrogen announcement](https://antigravity.google/blog/gemini-4-hydrogen-in-google-antigravity).
### Requiring source quotes produced no fabricated answers in either check
I also ran a grounded checking task on three supplied documents: the earlier article and the two experiment summaries. Argon medium and Neon medium each ran each version three times. I wanted to see what happened when a question had no supported answer.
| Check | Questions per run | Argon medium | Neon medium |
|---|---|---|---|
| Version 1, explicitly allow abstention | 6 answerable + 6 unrelated missing topics | 18/18 missing answers declined | 18/18 missing answers declined |
| Version 2, require quotes and sources | 4 answerable + 8 related but undocumented details | 24/24 missing answers declined | 24/24 missing answers declined |
Version 1 explicitly told the model to say so when the documents didn't contain an answer. Its missing topics were wholly absent, so abstaining was easy. For version 2 I removed that instruction and asked for a quote and source. The topics were now present, but the requested detail was missing: a release date, the next version number, an exact error message, a settings key, or the name of someone relaying a claim.
In version 2, each model produced zero invented answers and zero invented quotes on its 24 missing-detail questions. Across all six version-2 runs, 72 of 72 submitted quote checks matched the supplied documents verbatim. Those quote checks cover the whole response set; they are not 72 answered missing-detail questions. I did not test asking from memory without documents, and this cannot establish that either model never fabricates.
### Permission and isolation problems led to 19 discarded attempts
The discarded attempts explain why the copyable flags are only part of the setup. `find` piped to `sort`, `git status`, and `shasum` were blocked by missing permissions. Tests written by the agent also put temporary files outside the working copy. I fixed the per-run allowlist and temporary directory placement before counting replacement runs. I discarded 19 runs during setup. None of the follow-up runs had to be discarded.
My settings allowed reads and writes in the working copy, Python and tests, file inspection, and read-only Git commands. I kept temporary test files inside the copy by setting `TMPDIR`, `TMP`, and `TEMP` there, and used an outer operating-system guard to block other experiment directories and the hidden grader. Copying this command does not recreate that guard.
The operating-system guard also denied seven attempts to read CLI-generated stdout files outside the working copy. Those were blocked reads, not hidden-test access, but recovering from them may have affected latency. A missing terminal-device permission caused other setup failures. I exclude these attempts from the score and timing table rather than count a cancelled conversation as a quick completion.
### Swarm shared the workspace as documented, but some workers reported a different model
The guide says “Workers share your workspace by default.” All six conversations in each of my two swarm runs used the same working directory. I did not observe isolated worktrees in these runs.
It also says “Workers run on the same model as your conversation.” In the second run, the tester, verifier, and monitor metadata showed `gemini-4-argon-high`, and the Argon weekly bucket dropped 6.06 percentage points. My prompt had not asked for a model change. This happened in one of the two runs; I did not determine why. It limits the comparison to a requested Hydrogen xhigh swarm, rather than a proven homogeneous Hydrogen team.
### Fixed run order, small samples, and noisy quota readings
I used a fixed run order, one to three observations per cell, and only one task at each level. Permissions were expanded during setup; I did not rerun all earlier successful baselines after adding read-only Git inspection. One baseline came after a quota refresh, with a different cache age. The effective worker mix differed in the second swarm. Quota reads were occasionally non-monotonic, and Neon high's two L1 drops differed by about 1.2 points. Differences on that scale do not support a reliable quota claim.
Across the experiment, including setup failures, the Gemini five-hour allowance fell to 1.4% and I waited for one refresh. The initial Gemini weekly display showed 99%; the final recorded fraction was 63.61%. The account readings include setup failures, so they do not isolate usage by the valid runs in the table. My next comparison would need harder tasks with room above the solo score and a randomized run order.
Also in this series: [Same local model, different coding harnesses](/en/blog/pi-dsh-hermes-local-model-ticket-benchmark).
---
# [Benchmark] Inkling's Variable Loop on an RTX 5090: 48 Layers of Depth from 24, and 39/46/46 of 60 at 1, 3 and 5 Passes
URL: https://ai-muninn.com/en/blog/inkling-varloop-5090-2080ti
Date: 2026-11-22
Thinking Machines' Inkling 2 Mini has 24 physical layers, but its middle 12 run three times with the same weights, so each token gets 48 layers of depth from a roughly 20 GB checkpoint that fits on a 32 GB card. The research model, TML-d24-varloop-research, lets you pick 1 to 5 passes. On an RTX 5090 it got 39 of my 60 hard math and reasoning questions right at 1 pass, **46 at 3**, and 46 at 5, leveling off after 3, as most of the official benchmarks do. The cost is speed. On the 2080 Ti where I keep MiniCPM-V 4.7 always on, Inkling at 3 passes decodes at **38.7 tok/s**, about a third of MiniCPM-V 4.7's 108. That's the price of 7 more right answers.
---
## What Inkling is
Thinking Machines released Inkling 2 Mini on November 20. Hugging Face's launch post describes it as built for local AI setups. It's a mixture-of-experts model: each layer has 128 experts, and each token is routed to 8 of them. That gives 26.4B parameters in total, with 3.4B listed as active per token. Because the middle layers run three times, the model card counts that as about 5.4B effective active parameters per token in Inkling 2 Mini. It takes text and images as input, writes text, supports a context of up to 1M tokens, and is licensed Apache 2.0.
The weights ship in the precision they were trained in, NVFP4 and MXFP8 for the experts and BF16 for the rest, about 20 GB in all. There's nothing to quantize, and it fits on a 32 GB GPU or a 32 GB Mac.
What sets it apart from other models is the loop.
## The problem the loop solves: depth without twice the weights
A transformer works layer by layer, each one refining the output of the one before. More layers usually means a stronger model, but every layer is another set of weights to store, so the file and the memory footprint grow with it. On your own hardware, memory is usually the first wall you hit.
Inkling 2 Mini reuses its middle 12 layers instead. It physically has 24 layers. The first 6 run once, the middle 12 run three times with the same weights, and the last 6 run once. That's 48 layer runs per token, the same as the larger Inkling 2 Small. Each pass starts from the output of the first 6 layers and reads what the previous pass produced. A small gate decides how much of each to keep, so every pass refines the one before it.
The loop saves weights, not compute. All 48 layer runs still happen, and each pass keeps its own KV cache. Sharing weights shrinks the checkpoint, but it doesn't by itself make inference any faster.
## The research model adds a dial: pick the pass count
Thinking Machines also released a research sibling the same day, [TML-d24-varloop-research](https://huggingface.co/thinkingmachines/TML-d24-varloop-research). The architecture is the same, but you choose how many times the middle section runs when you load it, anywhere from 1 to 5. 1 pass is 24 layer runs per token, 3 passes is 48, and 5 passes is 72. Each extra pass adds about 1.0B effective active parameters per token: 3.4B at 1 pass, 5.4B at 3 and 7.4B at 5. The file stays the same size.
That turns "smarter or faster" into a load-time setting on a single file. The research model was trained at 1 to 5 passes, but mostly at 3, and post-trained at 3. Its model card reports scores at every pass count, and on most benchmarks the biggest jump is from 1 to 2 passes, with smaller or mixed gains after 3. There are exceptions: BrowseComp keeps climbing from 65.7% at 3 passes to 71.0% at 5. On SWE-bench Verified, for example, 1 to 5 passes score 56.3%, 76.5%, 78.7%, 79.3% and 79.6%. The card warns that because training favored 3 passes, other pass counts may be underrated, and that the research model's later training differs from Inkling 2 Mini's, so the two shouldn't be compared directly. All the tests in this post use the research model.
Hugging Face's post says 1 or 2 passes run a lot faster with possibly slightly lower quality, but they didn't evaluate it in depth. That's what I wanted to measure on my own hardware: how many more right answers each pass buys, and how much speed it costs.

## How to set the pass count
**RTX 5090, vLLM.** The research model ships in its training precision: NVFP4 experts in the first 20 layers, MXFP8 experts in the last four, BF16 for the rest, about 19.5 GB. It needs no further quantization and fits on a 32 GB card. I used the Inkling vLLM image and set the pass count with `--hf-overrides`. This is my actual command under WSL2, minus a counting patch I mounted to verify the loop count and some cache paths. On native Linux you'd swap the two WSL lines for `--gpus all`.
```bash
docker run --rm --name inkling-trial-server --network host --ipc host \
--device /dev/dxg -v /usr/lib/wsl:/usr/lib/wsl:ro \
-e LD_LIBRARY_PATH=/usr/lib/wsl/lib:/usr/local/cuda/lib64 \
-v /root/inkling-varloop-2026-11-22:/root/inkling-varloop-2026-11-22 \
vllm/vllm-openai:inkling-2-mini /root/inkling-varloop-2026-11-22/weights \
--served-model-name inkling-varloop --port 9498 \
--max-model-len 36864 --max-num-seqs 32 --gpu-memory-utilization 0.93 \
--reasoning-parser inkling --no-enable-prefix-caching --enforce-eager \
--language-model-only \
--hf-overrides '{"text_config":{"loop_num_passes":3}}'
```
**RTX 2080 Ti 22G, llama.cpp.** I used the [ggml-org GGUF](https://huggingface.co/ggml-org/TML-d24-varloop-research-GGUF) `TML-d24-varloop-research-IQ4_NL.gguf`: 17.6 GB, IQ4_NL experts in the first 20 layers, Q8_0 for the last four layers' experts and everything else, loop control in F32. I built llama.cpp from master (commit `afe77e18`) for sm_75 and set the pass count with `--override-kv`:
```bash
llama-server -m TML-d24-varloop-research-IQ4_NL.gguf \
--host 127.0.0.1 --port 18122 -ngl 99 -fa on -t 24 --jinja \
-np 4 -c 147456 -ctk q8_0 -ctv q8_0 -b 1024 -ub 256 --fit off \
--override-kv inkling2_loop.loop.count=int:3
```
That used 21,296 MiB of the card's 22 GB. Weights, a 36,864-token context for each of 4 slots, and a q8_0 KV cache all fit without offloading.
To confirm the override actually changed something, I sent the same prompt with the same seed at 1 and 3 passes. The outputs differed, and decode dropped from 81.6 to 37.9 tok/s. On the 5090 I also counted calls into the looped layers: 1 and 3 per token. One more thing to know: by default the model writes out its reasoning before the answer, which matters for the real-task results in the Deep dive.
## Results on the 5090: 39, 46 and 46 right at 1, 3 and 5 passes
The test set is 60 hard questions: 30 competition math and 30 reasoning, temperature 0, up to 32,768 output tokens. All 60 ran to completion on the 5090 at each pass count. Read the "Correct" column first, then the speed column next to it.
| Passes | Correct (of 60) | Avg output tokens | Decode, 1 stream | Total time, summed per question |
|---|---|---|---|---|
| 1 | 39 | 9,871 | 76.7 tok/s | 141 min |
| 3 | 46 | 8,388 | 31.6 tok/s | 272 min |
| 5 | 46 | 7,702 | 19.9 tok/s | 390 min |
Going from 1 to 3 passes gained 7 correct answers and the model wrote 15% fewer tokens. It still took about twice as long, because decode speed fell by more than half. 5 passes matched 3 on score and took 43% longer. That matches most of the model card: little left to gain past 3 passes.
## Head-to-head with MiniCPM-V 4.7 on my always-on 2080 Ti
Then I put it up against a model doing a real job. My modded RTX 2080 Ti 22G runs MiniCPM-V 4.7 35B-A3B as an always-on local model; I set that up in [an earlier post](/en/blog/minicpm-v47-35b-a3b-one-2080ti) and [upgraded its llama.cpp](/en/blog/llama-cpp-upgrade-chunked-prefill-port) recently. Most of what goes to that card is short: classify this, score that, rewrite a headline. Its job is to answer fast, about 108 tok/s for a single request.
In an earlier run on the 2080 Ti at its usual quant, MiniCPM-V 4.7 got 39 of the same 60 right, with the same grader and 32,768-token limit. Decode on the 2080 Ti is single-request, median of 9 runs:
| Model on the 2080 Ti 22G | Hard questions correct (of 60) | Decode, 1 stream |
|---|---|---|
| Inkling research, 1 pass (IQ4_NL) | 39 (measured on the 5090) | 82.6 tok/s |
| Inkling research, 3 passes (IQ4_NL) | 46 (measured on the 5090) | 38.7 tok/s |
| MiniCPM-V 4.7 35B-A3B | 39 | about 108 tok/s |
At 3 passes, where its score peaks, Inkling is 7 answers ahead and runs at 36% of MiniCPM-V 4.7's speed. At 1 pass it ties on score and is still 24% slower. The product Inkling 2 Mini always runs 3 passes, so the same 48 layer runs per token apply to it. I'd expect similar speed, though I didn't measure it.
The 2080 Ti accuracy runs were cut off by a time limit (41 questions at 1 pass, 18 at 3), so the scores above come from the 5090. On the 18 questions the 2080 Ti finished at 3 passes, it got 14 right, the same count the 5090 got on those 18. The IQ4_NL quant didn't visibly hurt.
So MiniCPM-V 4.7 stays on the always-on card. Short jobs need a fast reply, and it gives one at 108 tok/s. Inkling is worth starting when the question is hard enough that 7 more right answers out of 60 matter more than a slower answer, and the 5090 is the better place for it.
I also tried Inkling on a small set of my real tasks. That attempt mostly measured interface problems, not ability, so it's in the Deep dive below. On seven incident-diagnosis replays, scored on the answer each model actually delivered, three of Inkling's ended in that interface failure and delivered nothing gradable. It still came to 10 of 21 against MiniCPM-V 4.7's 9 of 21, at a median 202 s per case against 102 s.
## Which quant I ran, and would a smaller one be faster?
The 5090 ran the native NVFP4/MXFP8/BF16 checkpoint with no requantization. The 2080 Ti ran IQ4_NL at 17.6 GB, which already fits entirely in 22 GB.
A smaller quant would make the file smaller. I don't think it would make the 2080 Ti much faster. This is an estimate from two measurements, not a test of a smaller file:
- Going from 1 to 3 passes raises active parameters per token from 3.4B to 5.4B, **1.6x**.
- It doubles layer runs per token, 24 to 48, **2x**.
- Measured decode on the 2080 Ti fell from 82.6 to 38.7 tok/s, **2.13x**.
The slowdown tracks the layer count, not the amount of weight data. If decode on this card were limited by reading weights, a 1.6x increase in weights read should cost about 1.6x. It cost more than 2x. My read is that most of the time per token goes to running each layer rather than reading its weights, but I haven't profiled it, so treat that as a hypothesis.
The 5090 numbers point the same way. It has nearly 3x the 2080 Ti's memory bandwidth, yet at 1 pass it decoded slower (76.7 against 82.6 tok/s). It also ran with `--enforce-eager`, which turns off CUDA graphs and makes every layer launch cost more. Different framework and quant, so treat that as a hint, not proof.
To match MiniCPM-V 4.7 at 3 passes, Inkling on the 2080 Ti would need to go 2.8x faster. I don't expect a quant change to get anywhere near that.
If you want to try anyway, Unsloth publishes [Inkling 2 Mini GGUFs](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF) from 7.8 GB (UD-IQ1_S) to 22.9 GB (UD-Q8_K_XL). Their table puts UD-Q2_K_XL at 9.1 GB with the same top token as Q8 91.6% of the time, against 97.7% for UD-IQ4_XS at 15.7 GB. Two notes from their README. The `Mainline_Support` files that keep NVFP4 scales need a llama.cpp build with PR #32704, which merged upstream on November 21; without it the second and third passes lose their expert scales and the output is wrong. And the DSpark draft model that ships with these GGUFs (0.4 GB, for speculative decoding) needs Unsloth's own llama.cpp build for now, since upstream PR #32218 is still open. Speculative decoding cuts the number of full model steps per token, so it's the speed lever I'd try first. I haven't tested it.
## Deep dive: real-task check, harness fixes, and measurement notes
Skip this section if you only want the results; nothing above depends on it. It records what broke when I pointed Inkling at real work, and the details behind each number.
### Default thinking used up the short output limits
My real-task set has 20 short text jobs taken from production: classification, news scoring, short Chinese-to-English labels, data extraction, and headline rewrites. Each job has the output token limit it uses in production: 250 for classification, 850 for scoring, 900 for rewrites, 1,800 for translation, 4,500 for extraction.
The answers I compared against came from whichever model does that job today, run with thinking off. I ran Inkling with its default thinking on, same prompts, same limits. The reasoning and the final answer share one token budget, and the reasoning won: 17 of 20 answers at 1 pass and 16 of 20 at 3 passes hit the limit. On one classification question, 248 of the 250 tokens were reasoning and the final answer was empty.
| Short jobs (20) | Machine check passed | Usable as-is (blind review) |
|---|---|---|
| Inkling, 1 pass | 3 | 1 |
| Inkling, 3 passes | 4 | 1 |
| Production models, thinking off | 12 | 4 |
So "1 of 20" measures the setup, not the model. A fair rerun would turn thinking off, or test a higher limit separately. I didn't run it, because the speed gap had already settled the decision.
### Tool calls came back as unparsed text
The other categories need tools: two code-patch tasks, seven incident replays, and two rule-file edits, run through a coding agent with `read` and `bash` tools. Inkling passed the tool smoke test (one `read` and one `bash` call in 12.6 s). On longer tasks, after 3 to 30 tool calls, the final reply was an unexecuted tool-call string instead of a call. vLLM reported no error and the agent saw a normal stop. One rule-file task ended after 9 tool calls with just this:
```
bash"}}
```
Another, after 11 calls (I shortened my local path to ``):
```
bash"name":"bash","args":{"command":"find /runs/inkling-p3/C2 -name \"*size*inventory*\" ..."}}
```
The server ran with `--enable-auto-tool-choice --tool-call-parser inkling --reasoning-parser inkling`, sampling at the model's default temperature 1.0. I couldn't tell whether the parser missed a valid format or the model emitted a broken one, so I count its ability on those tasks as untestable, not as zero. The incident replays below are the one place I report a score anyway, on what was actually delivered, so the failed replays count as zero there. Of the seven incident replays, four finished cleanly. Graded blind against MiniCPM-V 4.7 on root cause (0–2) and safe fix (0–1), the full set came to 10 of 21 against 9 of 21. Two replays got full marks from Inkling; none did from MiniCPM-V 4.7.
### Two harness bugs this run exposed
Both were in my test harness, not in Inkling:
1. **A tool timeout left children running.** The agent's `bash` tool killed only the parent shell on timeout. A `find | grep | head` pipeline kept running and held stdout open. It now kills the whole process group. A 1-second probe ends in 1,007–1,011 ms with no leftovers.
2. **The sandbox could read the answer key.** On its first attempt at one rule-file task, Inkling's `find` reached that case's historical answer file and read two lines of it. I voided that run, blocked every path outside the candidate's own workspace, and reran it in a fresh session. Only the rerun counts.
### Measurement notes
- **5090 runs used `--enforce-eager`.** No CUDA graphs, no torch.compile. These are the numbers for this configuration, not the framework's ceiling.
- **Decode** is (completion tokens − 1) divided by the time from first to last content chunk, including reasoning tokens. Median of 9 single-stream runs (3 Chinese, 3 English, 3 code).
- **Time per pass count**: I use the sum of per-question seconds (141 / 272 / 390 min). The 1-pass suite wall clock was undercounted after a resumed run dropped 488.7 s, and the suites ran at different concurrency (4 streams at 1 pass, 2 at 3 and 5), so wall clocks don't compare.
- **Questions all three pass counts got right** (35): average output 3,288 / 2,472 / 3,028 tokens at 1 / 3 / 5 passes, average time 48 / 81 / 153 s.
- **2080 Ti software**: llama.cpp master `afe77e18`, CUDA sm_75, Release. That build already includes PR #32704 (GitHub's compare view shows it 13 commits ahead of the merge, 0 behind). My GGUF also had no NVFP4 tensors, and both cards scoring 14 of the same 18 at 3 passes says the output was sane.
- **2080 Ti 4-stream decode** at 3 passes: 12.9 / 15.2 / 21.7 / 19.9 tok/s per stream. In one 4-stream run, 3 streams produced 512 tokens with no visible content. I didn't track down why.
---
# [Benchmark] Upgrading llama.cpp on an RTX 2080 Ti: Carry Chunked Prefill Forward and Short Requests Finish in 5.4 s
URL: https://ai-muninn.com/en/blog/llama-cpp-upgrade-chunked-prefill-port
Date: 2026-11-22
Series: 改裝 2080 Ti 22G (Part 30)
I upgraded llama.cpp from b11588 to b12595 on a modded RTX 2080 Ti 22G. Decode got 3–10% faster and prefill 13% faster. But my hand-ported chunked-prefill patch didn't come with it: upstream ignores my `LLAMA_PREFILL_CHUNK` variable without a warning, and its own version (PR #10718) is still open. With a 30K-token prompt in flight, short requests took 16.8 s instead of 7.3 s. The upgrade only stays a win if you carry the 35-line patch forward. With it, short requests finish in **5.4 s**.
---
## Why I upgraded
One modded RTX 2080 Ti 22G runs MiniCPM-V 4.7 35B-A3B for my family's chat server and a news pipeline. I set that up in [#25](/en/blog/minicpm-v47-35b-a3b-one-2080ti). It ran llama.cpp b11588 plus my own hand port of chunked prefill, switched on by an environment variable called `LLAMA_PREFILL_CHUNK`. That name is mine. Upstream has never heard of it.
The chunk size of 64 came from a sweep in part 25. I tried 512, 256, 64, and 32. At 64 and 32, short requests came back within a second of each other, and the long request was only 3% slower.
A month later llama.cpp was at b12595. I wanted to know two things: how much faster is it, and do I still need the patch?
A few terms first. A **token** is the unit the model reads and writes, roughly a word piece, and tok/s is tokens per second. **Prefill** is the model reading the whole prompt before it writes anything. **Decode** is generating the answer one token at a time. **TTFT** (time to first token) is how long you stare at a blank reply before the first word shows up. My server runs 4 parallel slots, so up to 4 requests share the GPU at once.
## Decode is 3–10% faster on b12595, prefill 13% faster
I ran the new build without my patch and compared it with the old build. Look at the 4-stream rows: that's where the gain is biggest.
| Test (tok/s) | b11588 + patch | b12595, no patch | Change |
|---|---|---|---|
| Chinese, 1 stream | 102.89 | 105.65 | +2.7% |
| Chinese, 4 streams (per stream) | 48.12 | 52.25 | +8.6% |
| Code, 1 stream | 102.21 | 105.71 | +3.4% |
| Code, 4 streams (per stream) | 47.97 | 52.69 | +9.8% |
| 8K prompt prefill | 2080 | 2359 | +13% |
Quality didn't move. The new build scored 129/140 on my evaluation set, same as the old one, and it read every receipt in the OCR check correctly.
So far, a free upgrade.
## But short requests wait 16.8 s behind a long prompt
Then I ran the test that matches real life at home. Someone pastes a long document. A moment later, someone else asks a short question.
The test sends one 30K-token prompt, then three short prompts 0.15 s later. Look at the "short done" row: that's how long the person with the quick question waits.
| Mixed load | b11588 + patch | b12595, no patch |
|---|---|---|
| Short requests, TTFT | 1.10 / 1.10 / 1.10 s | 2.02 / 15.50 / 2.02 s |
| Short requests, done | 7.29–7.30 s | 16.75–16.99 s |
| Long request, done | 22.55 s | 17.99 s |
The long request got 4.5 s faster. Every short request waited about 10 s longer. One of them sat for 15.5 s before the first word appeared.
## Why: upstream ignores LLAMA_PREFILL_CHUNK, and PR #10718 is still open
The new run still had `LLAMA_PREFILL_CHUNK=64` set. Upstream llama.cpp doesn't read that variable. So there's no error and no warning. It just does nothing.
llama-server works in rounds. Each round it hands the GPU one batch of tokens, up to 2048 in my config. Without the patch, a long prompt fills the whole batch by itself every round. A 30K-token prompt takes about 15 rounds, and the short requests get no room in any of them.

Upstream does have a chunked-prefill change: [PR #10718](https://github.com/ggml-org/llama.cpp/pull/10718). It was opened in December 2024. As of November 2026 it's still open.
So upgrading llama.cpp means carrying the patch forward yourself.
## The fix: re-apply a 35-line patch to one file
The patch touches one file, `tools/server/server-context.cpp`, in two spots. The diff is 35 lines.
1. While other requests are generating, admit at most `LLAMA_PREFILL_CHUNK` new prompt tokens per iteration.
2. If several requests are prefilling at once, split that iteration's budget evenly among them. Each one's cap is its share, with a floor of 8 tokens.
After you clone llama.cpp (next step), save this as `chunkpp.patch` in the llama.cpp folder:
```diff
diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cpp
--- a/tools/server/server-context.cpp
+++ b/tools/server/server-context.cpp
@@ -3941,6 +3941,19 @@ private:
int32_t n_batch = llama_n_batch(ctx_tgt);
int32_t n_ubatch = llama_n_ubatch(ctx_tgt);
+ // [local port of ggml-org/llama.cpp#10718] chunked prefill: while some slots are generating,
+ // cap the prompt tokens admitted per iteration so long prefills do not stall them.
+ // LLAMA_PREFILL_CHUNK= enables it (0/unset = upstream behaviour).
+ static const int32_t prefill_chunk = [] { const char * e = getenv("LLAMA_PREFILL_CHUNK"); return e ? atoi(e) : 0; }();
+ if (prefill_chunk > 0 && batch.size() > 0) {
+ n_batch = std::min(n_batch, (int32_t) batch.size() + prefill_chunk);
+ }
+ int32_t n_slots_pp = 0;
+ for (auto & s_ : slots) {
+ if (s_.state == SLOT_STATE_PROCESSING_PROMPT || s_.state == SLOT_STATE_STARTED) { n_slots_pp++; }
+ }
+ const int32_t n_chunk_pp = (prefill_chunk > 0 && n_slots_pp > 1) ? std::max(n_batch / n_slots_pp, 8) : INT32_MAX;
+
auto & alora_scale = batch.alora_scale;
auto & alora_disabled_id = batch.alora_disabled_id;
@@ -4406,7 +4419,9 @@ private:
const int32_t n_decision_first = slot.task->type == SERVER_TASK_TYPE_DECISION ? slot.task->decision.pos_first() : -1;
// add prompt tokens for processing in the current batch
- while (slot.prompt.n_tokens() < slot.task->n_tokens() && batch.size() < n_batch) {
+ int32_t n_cur_pp = 0;
+ while (slot.prompt.n_tokens() < slot.task->n_tokens() && batch.size() < n_batch && n_cur_pp < n_chunk_pp) {
+ n_cur_pp++;
// get next token to process
llama_token cur_tok = input_tokens[slot.prompt.n_tokens()];
if (cur_tok == LLAMA_TOKEN_NULL) {
```
If you've never built llama.cpp, you need git, CMake, and the CUDA toolkit. Clone the repo, check out the exact commit I used (`e46069c40`, build 12595), apply the patch, and build only the server:
```bash
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git checkout e46069c40
git apply chunkpp.patch
cmake -S . -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target llama-server -j 12
```
`75` is the 2080 Ti's CUDA architecture. Use your own card's number. On other commits the line numbers may drift. If `git apply` fails, paste the two hunks in by hand. They're short.
Then start the server with the variable set. Replace `model.gguf` with your model file:
```bash
LLAMA_PREFILL_CHUNK=64 ./build/bin/llama-server -m model.gguf -np 4 -c 131072 -b 2048 -ub 512 -fa on -ngl 99
```
Unset the variable, or set it to 0, and you get upstream behavior back.
## With the patch: short requests finish in 5.4 s, and 4-stream decode is 11% faster than the old build
Here are all three builds side by side. Look at the "mixed, short done" row first, then the 4-stream rows.
| Test | b11588 + patch | b12595 | b12595 + patch |
|---|---|---|---|
| Chinese, 1 stream (tok/s) | 102.89 | 105.65 | 108.48 |
| Chinese, 4 streams (tok/s per stream) | 48.12 | 52.25 | 53.77 |
| Code, 1 stream (tok/s) | 102.21 | 105.71 | 107.20 |
| Code, 4 streams (tok/s per stream) | 47.97 | 52.69 | 53.18 |
| 8K prompt prefill (tok/s) | 2080 | 2359 | 2390 |
| Mixed, short done | 7.29–7.30 s | 16.75–16.99 s | 5.21–5.41 s |
| Mixed, short TTFT | 1.10 s | 2.02–15.50 s | 0.70–0.88 s |
| Mixed, long done | 22.55 s | 17.99 s | 19.53–19.77 s |
Against the old build, Chinese 4-stream decode is up 11.7% and code 4-stream is up 10.9%. Single stream is up about 5%. With a long prompt in flight, short requests finish about 2 s sooner than they did on the old build.
The cost is on the long request. It finishes 1.5–1.8 s later than on the unpatched new build. In exchange, each of the three short requests finishes about 11 s sooner.
The patched build passed 39 of my 40 smoke-test questions. The unpatched new build also got 39 on the same 40. OCR was still correct. It's been live on the family server since 2026-11-21.
## Test your own server before and after every upgrade
You don't need my patch to use this script. It sends one long prompt, then three short ones 0.15 s later, and prints when each one got its first token and when it finished. It's stdlib only, so there's nothing to install.
Your server needs `-np` set to 4 or more, or the requests will just queue for a free slot. The `chat_template_kwargs` line turns off thinking for MiniCPM and Qwen-family models. If your model doesn't accept it, delete that line.
```python
#!/usr/bin/env python3
"""Send one long prompt, then three short ones 0.15 s later, to a llama-server.
Prints how long each short request waits for its first token and to finish.
Usage: python3 mixed_latency.py http://127.0.0.1:8080 [long_words]
"""
import json, sys, time, uuid, urllib.request
from concurrent.futures import ThreadPoolExecutor
BASE = sys.argv[1].rstrip("/") if len(sys.argv) > 1 else "http://127.0.0.1:8080"
LONG_WORDS = int(sys.argv[2]) if len(sys.argv) > 2 else 20000 # roughly 1 token per word
def ask(text, max_tokens):
body = {
"messages": [{"role": "user", "content": f"[{uuid.uuid4().hex}] {text}"}],
"max_tokens": max_tokens, "temperature": 0.7, "stream": True,
"cache_prompt": False,
"chat_template_kwargs": {"enable_thinking": False},
}
req = urllib.request.Request(BASE + "/v1/chat/completions",
data=json.dumps(body).encode(),
headers={"Content-Type": "application/json"})
t0, ttft = time.time(), None
with urllib.request.urlopen(req, timeout=600) as r:
for line in r:
if not line.startswith(b"data: ") or line.strip() == b"data: [DONE]":
continue
choices = json.loads(line[6:]).get("choices") or [{}]
if ttft is None and choices[0].get("delta", {}).get("content"):
ttft = time.time() - t0
return ttft, time.time() - t0
long_text = ("The quick brown fox jumps over the lazy dog. " * (LONG_WORDS // 9)
+ "\nSummarize the text above in one sentence.")
with ThreadPoolExecutor(4) as pool:
long_job = pool.submit(ask, long_text, 128)
time.sleep(0.15)
shorts = [pool.submit(ask, "List three ways to save water.", 64) for _ in range(3)]
for i, s in enumerate(shorts):
ttft, total = s.result()
print(f"short {i}: first token {ttft:.2f} s, done {total:.2f} s")
print(f"long: done {long_job.result()[1]:.2f} s")
```
Here's my output on the live patched server with the default 20,000-word long prompt:
```
short 0: first token 1.48 s, done 5.75 s
short 1: first token 1.48 s, done 5.75 s
short 2: first token 1.48 s, done 5.75 s
long: done 13.25 s
```
Rule of thumb: if a short request waits more than 10 s for its first token, or finishes close to when the long one does, your server is blocking. Mine finished its short requests 7.5 s ahead of the long one.
---
## Deep dive: test setup, the draft model, and rollback
You don't need this section to use the patch. It's here for anyone who wants to reproduce the numbers or hand them to an AI along with their own setup.
### Measurement conditions
The box is an EPYC with three modded 2080 Ti 22G cards. These tests used one card. The services on the other two kept running. Before stopping the family server, I rerouted the news pipeline and confirmed 60 s of zero traffic.
The old build is tag b11588, commit `7f51953`. The model is MiniCPM-V-4.7-35B-A3B, a 15.5 GB Q3 mixed quant with a merged LoRA, plus the vision `mmproj`. I used the production flags:
```bash
-np 4 -c 131072 -ctk q8_0 -ctv q8_0 -b 2048 -ub 512 -fa on --kv-unified
```
Requests went through `/v1/chat/completions` with thinking off, temperature 0.7, top_p 0.95, top_k 20, and max_tokens 512. In the mixed test, short requests used max_tokens 64 and the long one 128. Each request started with a random string and had `cache_prompt` off, and every request reported `cached_tokens` 0.
Decode speed is (completion tokens − 1) ÷ (last token time − first token time). That keeps prefill out of the number. Single-stream tests ran 3 times, 4-stream tests ran 2 rounds, and I report medians.
The b12595 + patch run was a separate session later the same day. I compared it with that morning's numbers for the unpatched new build. I didn't rerun the old build.
**Why 102.89 tok/s here and 111.5 tok/s in part 25.** Part 25 used `llama-bench`, single stream, with no `mmproj` loaded. This post uses the production config through the API: 4 slots, q8_0 KV cache, vision loaded. Don't mix numbers across the two posts.
The same goes for latency. Part 25's 3.2–3.8 s was how long a short request waited for its first token under a 90K-token prompt. This post's 7.3 s is the total time to finish 64 tokens under a 30K-token prompt.
### Why the long request gets 1.5–1.8 s slower
While other requests are generating, the patch lets the long prompt read only 64 tokens per round. That's the point: the GPU spends the rest of each round on the short requests.
The long request went from 17.99 s on the unpatched new build to 19.53–19.77 s with the patch. The old build took 22.55 s, so it's still faster than before the upgrade.
If only one person uses your server, the patch doesn't help. Leave the variable unset and keep the 17.99 s. For all-long-document batch jobs, the second rule makes concurrent prefills split the budget. I haven't measured that case.
### DSpark draft model: still off on the new build
Speculative decoding uses a small draft model to guess the next few tokens, and the big model checks the guesses in one pass. When the guesses are right, you get several tokens for the price of one. I retested MiniCPM-V's official DSpark draft (Q8_0, 424 MB) on b12595. Look at the Chinese 2-stream column: that's my family's normal load.
| Draft setting | Chinese 1 stream | Chinese 2 streams | English 1 stream | Code 1 stream | VRAM peak |
|---|---|---|---|---|---|
| No draft | 105.65 | 82.31 | 105.54 | 105.71 | 17.8 GiB |
| n-max 2 | 100.61 | 63.20 | 121.62 | 120.32 | 20.7 GiB |
| n-max 3 | 89.84 | not measured | not measured | not measured | 20.9 GiB |
| Default | 89.65 | not measured | not measured | not measured | 20.9 GiB |
At n-max 2, English single stream gets 15% faster and code 14%. Chinese 2-stream drops 23%, and it costs 2.9 GiB more VRAM. At n-max 3 and at the default, Chinese single stream was 15% slower than no draft. That's also 13% slower than the old build, past my early-abort line, so I stopped those runs.
The new default for `--spec-draft-n-max` is 3. In October it was 7. My family server is mostly Chinese and multi-user, so it runs with no draft.
### My SHA-256 check still points at the old binary
A pre-start script, `verify.sh`, checks the SHA-256 of `llama-server`. It hard-codes the old binary's path. So the new binary wasn't blocked, but it also wasn't checked. I need to record a new hash for the new build.
### Downtime and rollback
Trying the unpatched new build took the family server down for 17.75 minutes. The patched build trial took 3.96 minutes.
To switch builds, I add a systemd drop-in that points the service at the new binary. To roll back, I delete the drop-in and restart the service.
### What I didn't test
- I only ran the first 40 questions of the 140-question eval set (all GSM8K) on the patched build.
- The mixed-load test covers one scenario (30K long + 3 short), with 1–3 rounds per build.
- I only built the patch on `e46069c40`. Newer master is untested.
---
Also in this series: [#25 MiniCPM-V 4.7 35B-A3B on One RTX 2080 Ti: 111.5 tok/s with Vision](/en/blog/minicpm-v47-35b-a3b-one-2080ti) · [#29 Qwen3.8-27B on One RTX 5090 With QEngine](/en/blog/qengine-rtx5090-qwen38-27b-wsl2) · [#21 Dual RTX 2080 Ti FastLLM: No More Head-of-Line Blocking](/en/blog/fastllm-dual-2080ti-concurrency-scheduler)
---
# [Benchmark] Pi vs dsh vs Hermes on one local model: dsh used 1.97× Pi's input tokens on small tickets, and the gap closed on long ones
URL: https://ai-muninn.com/en/blog/pi-dsh-hermes-local-model-ticket-benchmark
Date: 2026-11-22
Series: AI Workflow (Part 31)
I compared Pi, dsh, and Hermes on my local DeepSeek V4.1 Flash service. All passed the small tickets; dsh used 1.97× Pi's median input tokens, including cached input. Longer tickets changed the token ranking and exposed deadline and report failures. I am keeping Pi for daily work, testing Hermes on more long tasks, and retesting dsh's generation limit. These results cover my tasks and measured installations.
---
## Introduction: I needed a reason to change my daily ticket runner
I use [Pi](https://github.com/earendil-works/pi) with a local model for coding tickets every day. A report that [deepseek-harness, or dsh](https://github.com/deepseek-ai/deepseek-harness), used roughly ten times the input tokens caught my attention. Switching the runner would affect my whole [ticket-based workflow](/en/blog/dispatch-tickets-not-conversations), so I wanted measurements from work I would actually assign.
I added [Hermes](https://github.com/NousResearch/hermes-agent) and ran all three against the same DeepSeek V4.1 Flash service on my own machines, with two repetitions per task and harness. The results describe my November 22, 2026 installations, settings, and serving conditions. Other workloads, models, or settings may give different results. Small tickets gave me a clean starting point. Larger ones showed whether the differences survived sustained work. The result supports keeping Pi in place, with Hermes worth testing on more long tasks and dsh needing a targeted retest.
## Measure completed work against one model service
A harness is the program around the model: it builds prompts, exposes tools, carries conversation history, and decides when to call the model again. Changing it can change token use even when the weights stay put. The useful question for my workflow was whether a runner could deliver correct files, finish within a deadline, and tell me what it had done.
I used DeepSeek V4.1 Flash, served as `DeepSeek-V4.1-Flash-1017`, across two DGX Spark machines with tensor parallelism set to two. That splits model execution across both machines. The serving setup is covered in my [dual-Spark TensorFold article](/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold). The measured installations were Pi 1.0.2, dsh 0.2.2-rc.1, and Hermes v0.23.1 on November 22, 2026. Those version numbers identify this experiment; they are not a claim about the latest releases.
To reproduce the method on your own workload, prepare a model endpoint, a logging proxy, isolated task directories, and a grader that runs outside the agent. The proxy needs to capture actual request settings and server-reported usage. A terminal summary alone is insufficient because different clients account for cached input differently.
I would set up a comparison in this order:
1. **Write acceptance criteria before running agents.** Choose representative tickets and build external checks, including hidden tests. Make a correct reference solution and an empty starting skeleton; verify that the grader gives them 100% and 0% respectively.
2. **Give each run a fresh workspace and configuration directory.** Block access to sibling workspaces and the public network. Agents should solve their own copy rather than discover another run's answer.
3. **Point every runner at the same service through the proxy.** Save request settings, usage, tool activity, and termination evidence. Preserve each harness's native behavior, and record the differences.
4. **Set a fixed deadline and repeat each cell.** When serving capacity permits, start the runners on the same task together. Record interference from shared load. Keep sequential trials labeled as sequential.
5. **Freeze and grade the files when the run ends.** Check that supplied test files are unchanged. For data-processing tickets, change the input and rerun the solution so a hardcoded answer cannot pass.
6. **Report score, termination, and final report separately.** Sum usage across every model request, including cached input. Retain the cost of failed runs in the totals.
The final output should let you answer three independent questions. Are the files correct? Did the process finish on time? Is there a usable final report? An agent can satisfy the first condition while failing the other two.
## Small tickets gave dsh a 1.97× median input ratio
I began with three short tasks: fix a bug and pass tests; read six Markdown documents and produce a factual report; and write a CSV-processing script that returned correct answers for both the original and perturbed data. Each harness ran each task twice, giving eighteen runs. All passed: Pi six of six, dsh six of six, and Hermes six of six.
Compare the median input column first. It includes cached input and supplies the ratio in the title.
| Harness | Median input tokens | Median output tokens | Median elapsed time |
|---|---:|---:|---:|
| Pi | 19,352.5 | 1,701.5 | 26.9 s |
| dsh | 38,071 | 2,534.5 | 40.2 s |
| Hermes | 58,365.5 | 1,815 | 41.4 s |
Dividing dsh's median input by Pi's gives **1.97×**. Pi also had the lowest median elapsed time in this sample. Since all runs passed, the token differences describe how much model traffic each runner used to deliver accepted work.
A different calculation, total tokens divided by completed tasks, gave Pi 22,755, dsh 41,506.8, and Hermes 72,127 tokens per task. Those are aggregate averages. They should not be read as medians or substituted into the input-only ratio.
The motivation came from [Justin3go's preliminary dsh review](https://justin3go.com/en/posts/2026/08/15-deepseek-harness-review), which reported roughly 4.5K uncached input tokens for Pi and 47.6K for dsh in one person's trial. I did not have the original task and settings. My cached-inclusive totals measure something different, so they neither reproduce that comparison nor establish that it was wrong.
## Longer tickets made deadlines part of the decision
Short scripts do not cover the work I need from a coding agent. I added two longer tickets and kept a 45-minute deadline for each run.
**L1 built an inventory-ledger CLI** from a specification about one and a half to three pages long. It had to handle three input formats, merging, deduplication, and first-in, first-out inventory accounting. Eight public tests gave the agent feedback; forty hidden tests determined its score.
**L2 changed an existing parcel service** with twenty-three files and 1,622 lines including tests. The ticket combined five bug fixes with a batch-shipping feature that crossed module boundaries. It had 185 public tests and forty hidden tests. Half the score came from the fraction of the five bugs repaired; the other half came from hidden-test performance.
Two tasks, two repeats, and three runners produced twelve runs, started in four concurrent batches. For the decision, read perfect scores and clean exits together. The dsh count of 2/4 leaves out the run that stopped at 16.78 minutes with nothing implemented:
| Harness | Mean score | Runs with a perfect score | Clean exits within the deadline |
|---|---:|---:|---:|
| Pi | 100% | 4/4 | 2/4 |
| dsh | 75% | 3/4 | 2/4 |
| Hermes | 100% | 4/4 | 3/4 |
Pi and Hermes produced fully correct file snapshots in every long run. Hermes terminated within the deadline more often in this small sample. I'll test Hermes on more long tickets, though two runs per task aren't enough to establish statistical significance. Both of Pi's timed-out runs had already written a `STATUS: done` report well before the limit, then kept running extra checks until the deadline stopped them.
The small-ticket token ranking also changed. Long runs accumulated millions of tokens across their requests. Their median total-token ratios were dsh/Pi 0.77–0.86 and Hermes/Pi 0.70–0.78. Those ranges account for missing final usage records, explained below. They do not make a low-token failed run a good result.
My migration decision remains concrete: keep Pi in the workflow I already use, test Hermes on more long tasks, and rerun dsh's failing inventory task with its generation limit addressed. This is a comparison of my workload and installations. I would use the same method before changing the runner behind something like my [local AI news-video pipeline](/en/blog/local-ai-news-video-pipeline), where a missing report can leave downstream work waiting even when the files exist.
## Deep dive: accounting, grading repairs, and termination evidence
You can skip this section and still use the procedure and results above. It records the controls and exceptions needed to interpret the numbers or build a comparable experiment.
### Cached input explained the small-run accounting mismatch
The logging proxy provided a common accounting point. I summed server usage across all model requests in each run, including cached input, rather than trusting each harness's displayed total. Adding cached input back to the Pi and dsh summaries reconciled all eighteen small runs; Hermes already included it.
Here are the individual small runs. A is the bug fix, B is the document report, and C is the CSV script.
| Harness | Task/run | Input tokens | Output tokens | Seconds | Requests |
|---|---|---:|---:|---:|---:|
| dsh | A/1 | 25,738 | 971 | 19.2 | 6 |
| dsh | A/2 | 25,086 | 878 | 18.7 | 6 |
| dsh | B/1 | 31,194 | 2,072 | 34.9 | 7 |
| dsh | B/2 | 44,948 | 3,167 | 47.8 | 9 |
| dsh | C/1 | 57,979 | 4,706 | 69.4 | 9 |
| dsh | C/2 | 49,305 | 2,997 | 45.4 | 9 |
| hermes | A/1 | 88,669 | 1,452 | 37.9 | 12 |
| hermes | A/2 | 56,159 | 844 | 31.0 | 8 |
| hermes | B/1 | 54,320 | 1,873 | 40.2 | 8 |
| hermes | B/2 | 44,651 | 1,757 | 42.6 | 7 |
| hermes | C/1 | 115,573 | 4,252 | 68.7 | 13 |
| hermes | C/2 | 60,572 | 2,640 | 46.5 | 8 |
| pi | A/1 | 17,435 | 945 | 18.2 | 6 |
| pi | A/2 | 21,270 | 948 | 19.7 | 7 |
| pi | B/1 | 13,510 | 1,531 | 23.6 | 5 |
| pi | B/2 | 13,657 | 1,872 | 30.2 | 5 |
| pi | C/1 | 25,937 | 3,555 | 52.1 | 6 |
| pi | C/2 | 32,017 | 3,853 | 51.5 | 7 |
Total input across a run can exceed the model's context window because successive requests resend overlapping history. It is cumulative traffic, not the length of a single context. Token totals also do not directly express money: cached-token pricing, local capacity, and latency have separate consequences.
The small trial was sequential. It did not use the later concurrent-batch design, and its order was imperfect: after calibration, Pi stayed first in the first round. I did not clear the service cache. Timing and cache exposure therefore need that qualification.
Pi used medium reasoning in the small trial; dsh's small-trial setting was unspecified. Hermes started its own gateway. The first Hermes gateway was cleaned up afterward, outside that run’s timing; other runs included roughly a second of cleanup. These details limit fine-grained elapsed-time comparisons.
### The CSV grader needed a repair, not another model run
A grader can reject valid work. Mine initially rejected a CSV answer because it contained an extra `by_order` field, even though the ticket allowed the output. I corrected the grader to match the acceptance criteria and regraded every existing output. I did not rerun the agents to obtain better answers.
The CSV checks also perturbed the input and reran the script. That tested whether the submitted program computed the answer rather than merely emitting the original expected values. Checking unchanged test files supplied another control against a solution that passed by weakening its tests.
Calibration runs were excluded from the comparison. One interrupted Pi calibration consumed 4,159 input and 278 output tokens. That was additional experiment setup usage, outside the measured ticket totals.
### Matching reasoning labels left native behavior different
All long-run requests carried `reasoning_effort=medium` on the wire. Pi also had an 8,192-token thinking budget, while dsh had thinking enabled. These settings do not establish identical internal reasoning behavior.
For Hermes, I disabled the experiment's safe mode so its native provider would load. Operating-system and tool restrictions remained in place, including the workspace and network boundaries. Pi exposed read, shell, edit, and write tools. The isolated dsh configuration disabled search, skills, subagents, and title generation. Hermes selected terminal/file tools but still exposed tool discovery. Native prompts and context defaults also differed, and existing memories, extensions, and production skills were not loaded. I wanted the behavior of each harness as used here, so those differences belong in the experimental conditions.
The long-task graders passed their controls: correct references scored 100% and empty skeletons scored 0% on both tasks. The unmodified buggy L2 service scored 16.25%, showing why a passing subset of existing behavior was insufficient evidence of completing the ticket.
Read the long-run records across score, termination, and report availability before comparing token totals.
| Harness | Task/run | Score | Minutes | Requests/tools | Total tokens (K) | Exit status |
|---|---|---:|---:|---:|---:|---|
| dsh | L1/1 | 100% | 45.02 | 25/28 | 1266.9–1561.8 | Timed out |
| dsh | L1/2 | 0% | 16.78 | 4/5 | 54.2 | Generation limit; no report |
| dsh | L2/1 | 100% | 23.97 | 24/33 | 1060.0 | Exited |
| dsh | L2/2 | 100% | 19.78 | 29/47 | 1248.2 | Exited |
| hermes | L1/1 | 100% | 19.25 | 26/53 | 1045.9 | Exited |
| hermes | L1/2 | 100% | 45.03 | 41/63 | 2687.7–3212.0 | Timed out |
| hermes | L2/1 | 100% | 21.07 | 27/49 | 1019.5 | Exited |
| hermes | L2/2 | 100% | 15.51 | 23/54 | 1044.6 | Exited |
| pi | L1/1 | 100% | 45.02 | 32/32 | 1797.0–2092.0 | Timed out |
| pi | L1/2 | 100% | 45.02 | 39/40 | 2106.8–2401.7 | Timed out |
| pi | L2/1 | 100% | 22.36 | 23/31 | 891.0 | Exited |
| pi | L2/2 | 100% | 14.37 | 15/21 | 450.2 | Exited |
K in the table means one thousand tokens. Times slightly beyond 45 minutes include termination and cleanup. Four requests lacked final usage. For those requests, received usage supplies a lower bound and model and request limits supply an upper bound. I report intervals rather than replacing missing usage with an estimated midpoint. Shared service load and the absence of cache clearing remain part of the conditions.
### Perfect snapshots sometimes came from timed-out runs
Four timeouts still scored 100% when I graded their files: both Pi L1 runs, dsh L1 repeat one, and Hermes L1 repeat two. Pi's timed-out runs had reports. The timed-out dsh and Hermes runs did not.
The Pi timeline explains how correct work became a timeout. L1 repeat one wrote a `STATUS: done` report at minute 27.5; repeat two did so at minute 38.1. After writing those reports, the runs continued with audits, random tests, or temporary-file cleanup until the 45-minute limit. Later individual requests took 70–290 seconds, with observed contexts around 90–120K tokens on the shared, concurrently serving endpoint. Dsh L1 repeat one and Hermes L1 repeat two were still running tests or modifying their own added tests at the deadline, without reports.
This affects how I would operate them. A correct snapshot is useful evidence of implementation ability, but a downstream dispatcher also needs a reliable end condition and handoff.
Dsh's other L1 run stopped after 16.78 minutes, scored 0%, and had no report. Across its four requests, one response reached the 32,768-output-token cap; its native log recorded `max-tokens`. That supports generation-budget exhaustion as the explanation for the stop. It does not establish a context-window overflow, which is a different limit and would require different evidence. The observed maximum contexts across the long runs were approximately 96–124K tokens. The 262.1K figure in the summary was an upper bound, not an observed context length.
The classifier recorded `stopped_to_ask=3`. On inspection, that category included missing reports; I detected no literal questions. I therefore do not describe those runs as agents asking the user for help.
I also observed no native compression events, even though Pi enables autocompaction by default.
### Token efficiency depends on which outcome gets the denominator
For the long tasks, tokens per 1.0 of cumulative score were Pi 1,311.3–1,458.7K, dsh 1,209.8–1,308.1K, and Hermes 1,449.5–1,580.5K. This divides total token use by summed fractional score, including the cost of the zero-score run. It is not tokens per successful ticket delivered before the deadline.
The task split is particularly relevant for dsh. Its median total-token ratio to Pi was 0.29–0.41 on L1, including the failed run, and 1.72 on L2. Combining those into one figure conceals how differently it behaved on a new CLI and an existing service.
I would retain all three views in a repeat: raw usage, score-adjusted usage, and delivery within the deadline. The next dsh test needs to resolve the L1 generation limit while keeping the same acceptance criteria.
Also in this series: [Delegating with ticket files](/en/blog/dispatch-tickets-not-conversations) · [Changing the harness around a local news pipeline](/en/blog/local-ai-news-video-pipeline).
---
# [Ask AI Right #8] Have ChatGPT Watch a Price for You Every Day: Tell It These Four Things
URL: https://ai-muninn.com/en/blog/ai-ask-right-hand-off-a-task
Date: 2026-11-19
Series: Ask AI Right (Part 8)
To give ChatGPT a recurring task, tell it four things: what you want in the end, how you usually do it, what done looks like, and when to stop. This post walks through a real one: watch the AirPods Pro 3 price and tell me only when it drops below my target. I put the four things in one prompt, had it say the plan back, ran it once, then put it on a 10 AM daily schedule. For the next three days it checked three stores every morning without me. The trial run also caught a mistake of mine: one store was already selling below my target.
## Preface
I typed one paragraph into ChatGPT. For the next three days it went out every morning and checked what AirPods Pro 3 cost at three stores, with a link to each product page and the time it looked. I didn't say another word to it.
The paragraph had no tricks in it. It's what you'd say to a part-timer before leaving them alone in your shop for two hours. What has to be finished today. How checkout normally works. What "tidy" looks like when you get back. And: "If someone wants a refund, don't handle it. Call me."
Those four things are also what an AI needs before you hand it a task and walk away.
There is one difference. A new hire who gets confused will ask. An AI usually won't. It makes a guess and keeps going.
The previous post covered [what AI is inherently bad at](/en/blog/ai-ask-right-what-ai-does-poorly). This post is about a task it can do, and how to brief it so it runs every day without you. The split between a goal and a process comes from [an article on automating with an AI bot](https://x.com/poteto/status/2123159537016533493). I borrowed the idea and tried it in ChatGPT.
Two notes before the prompts. I live in Taiwan, so the stores are Taiwanese and the prices are in New Taiwan dollars (NT$). Swap in your own product and your own stores. And I did this twice: first in Chinese on November 19, 2026, which I left running for three days, then again in English on November 23 to get the screenshots here. I'll say which run each fact comes from.
---
## The one prompt
> I want to hand a job over to you. What I want in the end: watch the price of AirPods Pro 3 in Taiwan and tell me only when it drops below NT$7,000. How I normally do it: I check three places, Apple's Taiwan store, PChome 24h, and momo, for the brand-new price. I skip used, refurbished, and grey-import listings, and I don't count prices that only work with a specific credit card or reward points. What done looks like: today's price at each of the three, a link to each product page, and the time you checked. If the same method fails three times for one store, write "couldn't find it" and tell me what you tried. Don't guess, and don't fill in an old price. Don't start yet. Tell me in your own words what I want and how you plan to do it.
That paragraph has four parts and a closing line. Here they are one at a time.
---
## 1. Start with what you want in the end
> What I want in the end: watch the price of AirPods Pro 3 in Taiwan and tell me only when it drops below NT$7,000.
Most people open with the action. "Check the AirPods price for me every day."
It will do that. But it doesn't know you only care about a drop, so it may hand you a price report every single day. By day three you stop opening them.
Say the result you want first. Then it knows what is worth telling you and what isn't.
If you can't put the goal into words yet, turn it around:
> I want to hand a task off to you, but I can't describe what I want yet. Ask me one question at a time until we can both state the goal.
---
## 2. Explain how you usually do it
> How I normally do it: I check three places, Apple's Taiwan store, PChome 24h, and momo, for the brand-new price. I skip used, refurbished, and grey-import listings, and I don't count prices that only work with a specific credit card or reward points.
This part tells it which prices count.
Leave it out and the "lowest price" it finds may be a used listing, a grey import (sold outside the official channel, with no local warranty), or a price you only get with one particular credit card. That number can be under your target and still be a price you would never pay.
Cover where the information lives, what doesn't count, and which source wins when two of them disagree. Don't polish it. ChatGPT has a microphone button next to the message box, so you can say it out loud.
---
## 3. Say what done looks like
> What done looks like: today's price at each of the three, a link to each product page, and the time you checked.
AI tends to confuse "I took an action" with "the job is done." Coming back with a number doesn't mean the number is right.
So I asked for a link next to every price. The links are for me, so I can click through and check. I use them two sections down.
---
## 4. Tell it when to stop
> If the same method fails three times for one store, write "couldn't find it" and tell me what you tried. Don't guess, and don't fill in an old price.
I add this because an AI that gets stuck doesn't stop by itself, and an AI that can't find something often won't say so. It gives you a number that looks reasonable.
I found out how badly an AI can get stuck on a different task. I asked another AI, one I run at home, to write a small game plus its own tests to check that the game worked. All I told it was, "If a test fails, keep fixing it."
One of the tests it wrote was itself wrong, so no change to the game could ever make it pass. It never noticed the test was the problem. It kept changing the game for 272 steps (a step is one action it takes), about 20 minutes. I pointed out the problem once, and it just switched to repeating a different action. In the end I stopped it myself.

There is a second case where it should stop and ask: decisions that aren't its to make. I have four standing rules. These always need my OK first: anything that costs money, anything sent out for other people to see, anything deleted or overwritten that can't be recovered, and anything that comes down to my personal taste.
Watching a price only involves looking and telling me, so none of the four applied and I left them out. If your task places orders or sends email, put them in.
---
## The closing line: don't start yet, say it back
> Don't start yet. Tell me in your own words what I want and how you plan to do it.
Keep this line. Without it, ChatGPT goes straight to work and you never find out what it misheard.
(It answered this English prompt in Chinese, so I asked it to say that again in English. That one request had a side effect, which I'll get to at the end.)

It got the rules right, down to writing "couldn't find it" after three failed tries. Two things I hadn't said came up. The first time through, it asked me a question back: how often should it check? It suggested once a day at 10 AM. And where I said "below NT$7,000," it later spelled out "strictly below." Whether exactly 7,000 counts was something I had never thought about.
Anything it gets wrong, or has to ask about, shows you where you were unclear.
---
## Run it once before scheduling anything
> Right, once a day is fine. Check today's prices once now and show me. Don't set a schedule yet.

It came back with what I described: three prices, three product page links, and the time.
- Apple Taiwan: NT$7,490
- PChome 24h: NT$6,599
- momo: NT$6,811
The first time through, in Chinese, I opened all three links and checked. All three prices matched the pages.
Then I read the result line. The NT$7,000 threshold had already been met. PChome was selling at NT$6,599, well under my target.
My target was wrong. I had picked it without looking at what the thing cost that day. Left as it was, the task would likely have told me "the price dropped" every single morning, which is the daily price report I was trying to avoid.
It flagged one more thing I hadn't asked about: momo's NT$6,811 was a promotion, and in the English run it added that it couldn't confirm momo actually had stock.
That's what the trial run is for. You check its work, and you also find out what was wrong with your own instructions.
---
## Put it on a schedule
To make it run on its own, put it on a schedule. ChatGPT calls this a scheduled task.
First I tested the timer by asking for a single check two minutes later. I also asked the question I cared about most:
> Good. Before I change anything, test that the timer works: two minutes from now, check again under the same rules, threshold still NT$7,000. Also tell me: on a day when nothing is below the threshold, what will you do? Will I get a notification?
In this English run I left the target at NT$7,000 on purpose. PChome was already under it, so the timed check would have something to report and I could see what an alert looks like.

A task card appeared in the chat. It was scheduled for 10:38:21 and actually ran at 10:43, about five minutes late. Then this showed up in the chat without my asking:

So the timer works, and that's what a hit looks like. Then I set up the real job with the corrected target:
> The timer works. PChome is already under NT$7,000, so move the threshold to NT$6,000 and run this every day at 10:00 AM. Don't notify me on days it isn't met. And tell me where I go later to pause or delete it.

The confirmation listed the three stores, the new target, the time, and the no-notification rule, and said the original product rules were unchanged.
---
## What it did over the next three days
This part comes from the Chinese run, which I left alone from November 20 to 22. Same rules, same NT$6,000 target, same 10 AM schedule. It ran once each morning:
- November 20: 9:50 to 9:51
- November 21: 9:36
- November 22: 9:41
I asked for 10:00 and it ran about 10, 24, and 19 minutes early. It never hit the exact minute. For a price check, that doesn't matter.
Each report says it reopened all three product pages. The prices didn't move in those three days.
One thing did not match what it told me. In the screenshots above it says "you will receive no notification" and "The check will run silently." What happened is that it left a full price report in the chat every morning, ending with a line saying the threshold was not met. No email arrived on any of those days. I did not check whether my phone got a push notification.
So "no notification" turned out to mean something closer to "I won't go out of my way to alert you." The report still lands in the chat. I ended up liking that. If I want to know whether it ran today, I open the chat and look.
And a day when the price does hit the target? I never got one in the daily runs. The closest I have is the timer test above, where the scheduled check posted "Price alert triggered" in the chat. No email came for that one either. In my account's notification settings, tasks can only send push notifications, the kind that pop up on a phone or in a browser. There is no email option.
---
## Know where the off switch is
When I was done, I typed this in the same chat:
> Pause the AirPods price watch.

It paused the task and kept the settings, so I can turn it back on by asking.
You can also manage it from the task list. In ChatGPT's left sidebar there's a clock icon that opens your scheduled tasks. Each task has a three-dot menu with Pause, Run now, Edit, and Delete. I tested pausing and deleting, and deleting came with two surprises. When I asked in the chat to delete the task, ChatGPT said it can create, look up, update, and pause tasks but can't delete them, so I used this list. And the paused task wasn't in the list. I had to go back to the chat, open the task card, and resume it before it showed up and I could delete it.
Two things to watch out for.
First, OpenAI changes which plans include scheduled tasks from time to time, so check [OpenAI's help page](https://help.openai.com/en/articles/10291617-scheduled-tasks-in-chatgpt).
Second, a passing request can turn into a permanent rule. When I asked it to "keep replying in English from here on," a small "memory updated" label appeared under my message. Memory is the ChatGPT feature that remembers things you've told it, and once something is saved there it can carry over into your other chats. I went to Personalization in Settings and deleted that one memory. After you brief it on a task, look there and see what it kept.
---
## Try it yourself
Pick something you want to buy but would rather get cheaper. Look at what it costs today before you choose a target (the step I skipped). Then fill in the blanks and paste this into ChatGPT:
> I want to hand a job over to you. What I want in the end: watch the price of ___ and tell me only when it drops below ___. How I normally do it: I check ___, ___, and ___ for the brand-new price. I skip used and refurbished listings, and I don't count prices that only work with a specific credit card or reward points. What done looks like: today's price at each store, a link to each product page, and the time you checked. If the same method fails three times for one store, write "couldn't find it" and tell me what you tried. Don't guess. Don't start yet. Tell me in your own words what I want and how you plan to do it.
Then, in this order:
1. Read what it says back. Fix anything it got wrong or had to ask about.
2. Have it check once. No schedule yet.
3. Open the links it gives you and check the prices yourself.
4. When the prices are right, tell it to run every day at a set time, and ask where you go to pause or delete it.
5. The next day, open that chat and see whether it ran.
The same paragraph works for things you aren't buying. Replace the price with anything you check on a regular basis: a flight fare, extra concert dates, whether a web page has changed. The four parts stay the same.
---
# [Benchmark] Qwen3.8-27B on One RTX 5090 With QEngine: 359 tok/s on Code, and Why It Won't Build for a 2080 Ti
URL: https://ai-muninn.com/en/blog/qengine-rtx5090-qwen38-27b-wsl2
Date: 2026-11-17
Series: 改裝 2080 Ti 22G (Part 29)
[QEngine](https://github.com/bpx03/QEngine) runs Qwen3.8-27B on one RTX 5090 under WSL2. Single stream it writes code at 358.5 tok/s, English at 225.1 and Chinese at 109.1. llama.cpp on the same card does about 69 on all three with no drafting, and 155 on code with a DFlash2 drafter. Four streams at once total 592.8 on code. The spread is speculative decoding: code advances 4.22 tokens per step, Chinese 1.27. The quantization differs, so this is not like-for-like. It does not compile for a 2080 Ti. The kernels need BF16 tensor-core instructions that start at sm_80.
---
## Why I tested QEngine
[QEngine](https://github.com/bpx03/QEngine) is a custom C++/CUDA inference engine that only runs Qwen3.8 models. It is MIT licensed and has one author. His headline claim is three RTX 3090s serving eight agents at over 1,000 tok/s total on Qwen3.8-27B.
The README says Linux only, and "Windows, including Docker Desktop / WSL2, is untested". Supported GPUs are the RTX 3000, 4000 and 5000 series. Qwen3.8-27B on one card is marked experimental. Everything I have falls outside what he tested: one RTX 5090 in a Windows 11 box, and the three modded RTX 2080 Ti 22GB cards this series is about.
So I had two questions. Does it run on a single 5090 under Windows, and how fast? Can the 2080 Ti use it? The 5090 runs it under WSL2, and Qwen3.8-27B writes code at 358.5 tok/s. The 2080 Ti build fails.
## One RTX 5090 runs Qwen3.8-27B at 358.5 tok/s on code, 109.1 on Chinese
Setup: QEngine 1.3.6 on one RTX 5090 inside WSL2. The model is Qwen3.8-27B with the [RedHatAI/Qwen3.8-27B-INT4](https://huggingface.co/RedHatAI/Qwen3.8-27B-INT4) weights, W4A16 (4-bit weights, 16-bit activations).
I used three prompts: a Chinese story, an English story, and "thread-safe LRU cache in Python". Each run produced 512 output tokens with thinking disabled. I discarded one warm-up and took the median of three runs.
Look at the QEngine single stream column first. The caveats on the two llama.cpp columns follow the chart.
| Prompt | QEngine, single stream | llama.cpp, no drafting | llama.cpp + DFlash2 | QEngine, 4 streams total |
|---|---|---|---|---|
| Chinese story | 109.1 tok/s | 69.3 tok/s | 81.9 tok/s | 406.7 tok/s |
| English story | 225.1 tok/s | 69.3 tok/s | 119.3 tok/s | 571.5 tok/s |
| Python LRU cache | 358.5 tok/s | 69.1 tok/s | 155.0 tok/s | 592.8 tok/s |
QEngine's time to first token was about 50 ms. llama.cpp's was about 75 ms.

The chart shows only the no-drafting llama.cpp numbers. This is not an apples-to-apples engine comparison. Three things differ. The quantization is INT4 for QEngine and Q4_K_M GGUF for llama.cpp. QEngine ran in WSL2, and llama.cpp ran natively on Windows. The draft settings differ too: llama.cpp drafts 3 tokens per step by default, and raising that to 7 to match QEngine gives 168.5 tok/s on code.
So the table answers "what do I get on the same 5090 with this engine at its defaults". It does not answer "how much faster is the engine itself".
## Code runs 3x faster than Chinese because more drafted tokens get accepted
QEngine's 27B uses speculative decoding. A cheap guesser drafts several tokens ahead, the big model checks them all in one pass, and generation jumps ahead by every token it accepts. QEngine has two guessers and picks one. With one or two conversations decoding on one card and enough free VRAM, it uses DFlash2, a separately loaded draft model that proposes 7 tokens per step. With three or more it uses the model's MTP head, a small extra layer that predicts 1 to 7 tokens ahead. Both were loaded in my runs.
The server log reports how many tokens each verify step advances on average (the accepted drafts plus the one token the model produces itself), and how many steps it took to produce 512 tokens.
| Prompt | Tokens advanced per step | Steps for 512 tokens | Single stream speed |
|---|---|---|---|
| Chinese story | 1.27 | 403 | 109.1 tok/s |
| English story | 2.62 | 195 | 225.1 tok/s |
| Python LRU cache | 4.22 | 121 | 358.5 tok/s |
Steps divided by time comes out at about 85 steps per second for all three. So speed is roughly 85 times the tokens advanced per step.
Code is predictable. Brackets, indentation and identifiers are easy to guess. On Chinese prose the drafter lands less than half a token per step on average.
## Four streams deliver 592.8 tok/s on code and nearly quadruple Chinese throughput
With `QE_MAX_SEQS=4` and four conversations running together, the totals were 406.7 tok/s on Chinese, 571.5 on English and 592.8 on code. Per stream that is 104.4, 154.5 and 162.4. Time to first token rose to about 125 ms.
The prompts scale differently. Chinese per-stream speed only dropped from 109.1 to 104.4, so the total is nearly 4x the single stream. Code per-stream speed dropped from 358.5 to 162.4, so the total is only 65% higher than one stream. Four conversations is past the DFlash2 limit, so these steps drafted with MTP. My logs show it: single-stream steps drafted about 7 tokens each, and four-stream steps drafted about 1 to 4 on average. That may be part of the drop on code. I did not isolate it.
## Running it on a Windows 5090: WSL2 plus files pulled from the Docker image
There is no Windows build. The release page ships no binaries. The official routes are Docker or building from source.
My machine: Windows 11 Pro 10.0.26300, NVIDIA driver 621.14, WSL2 Ubuntu 26.04.1, kernel 6.18.33.2-microsoft-standard-WSL2. The driver already supports CUDA 13.1, so I did not upgrade it for this. The weights need about 16 GB of disk.
If your WSL2 has Docker, the README's Docker route is probably the simplest. I did not test it. Mine had no Docker, so I pulled the prebuilt `libqengine.so` and the CUDA 13.1 runtime out of the official image `ghcr.io/bpx03/qengine:1.3.6`, and ran them with the v1.3.6 source (commit 444b2e4).
Source and weights:
```bash
git clone --depth 1 --branch v1.3.6 https://github.com/bpx03/QEngine.git source
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python huggingface_hub
.venv/bin/hf download RedHatAI/Qwen3.8-27B-INT4 --local-dir source/models/Qwen3.8-27B-INT4
```
Then I copied the container's `app/build` into `source/build`. The first load failed:
```
OSError: libcudart.so.13: cannot open shared object file: No such file or directory
```
The fix is to point the loader at the CUDA 13.1 runtime taken from the image, plus WSL's GPU driver libraries:
```bash
export LD_LIBRARY_PATH="$PWD/prebuilt/usr/local/cuda-13.1/targets/x86_64-linux/lib:/usr/lib/wsl/lib:${LD_LIBRARY_PATH:-}"
```
Launch with the README's single-card command. I set the context to 8192:
```bash
cd source
QE_DEVICES=0 QE_MAX_SEQS=1 server/run.sh 8080 --max-ctx 8192
```
It warns that the engines are tested on 2 and 3 GPUs, then loads in 13.2 s. The API is OpenAI-compatible:
```bash
curl -s http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "Introduce yourself in one sentence."}],
"chat_template_kwargs": {"enable_thinking": false}
}'
```
`enable_thinking: false` matters. The 27B defaults to thinking on. My first pass left it on, and all 512 tokens were reasoning with no visible text.
Chinese output had no mojibake. A request with `tools` returned standard `tool_calls` with parseable JSON arguments.
## nvidia-smi shows 31.9 GB because QEngine takes all free VRAM for its KV pool
nvidia-smi showed 31.9 GB used on the 5090, the whole-card peak. llama.cpp with the same model and no drafting used 20.6 GB.
That is not what the 27B needs. The startup log says where the memory went:
```
KV pool: 380928 tokens shared by 1 sequence slots (max context 8192)
GPU0: weights 14.74 GB, cache+act 15.57 GB
```
The KV cache is the per-token attention state the model keeps for everything it has read and written. A KV pool is one block of VRAM reserved for that cache up front and shared between conversations.
The weights are 14.74 GB. By default QEngine takes all free VRAM as its KV pool, which on the 5090 is 380,928 tokens. The author's docs say `QE_POOL_TOKENS` sets the pool size, and that the pool shrinks when another program takes VRAM. I did not test either.
## The 2080 Ti build fails: the kernels need BF16 tensor-core instructions from sm_80
The README lists only RTX 3000, 4000 and 5000. I wanted to know whether QEngine really needs newer hardware, or whether nobody had tried building it for a 2080 Ti.
Some background. NVIDIA numbers each GPU generation's instruction set with a compute capability: the 2080 Ti is sm_75, and RTX 3000 cards are sm_86. Tensor cores are the matrix-multiply units on these cards. BF16 is a 16-bit float format with the exponent range of FP32 and less precision.
On the box with three 2080 Tis, I put the CUDA 13.1 compiler pieces in an isolated directory, left the system CUDA untouched, and targeted sm_75. `$D` is that isolated directory:
```bash
cmake -S source -B build-sm75 -G "Unix Makefiles" \
-DCMAKE_CUDA_ARCHITECTURES=75 \
-DCMAKE_CXX_COMPILER=/usr/bin/g++-13 \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-13 \
-DCMAKE_CUDA_COMPILER="$D/cuda-13.1/bin/nvcc" \
-DCMAKE_BUILD_TYPE=Release
cmake --build build-sm75 --target qengine --parallel 4
```
nvcc 13.1 still accepts sm_75, and configure passed. The build stops here:
```
ptxas .../dn_ab.ptx, line 213; error : Feature '.bf16' requires .target sm_80 or higher
ptxas .../dn_ab.ptx, line 213; error : Feature '.m16n8k16' requires .target sm_80 or higher
```
The error comes from `src/kernels/dn_ab.cu` line 13: an inline-assembly tensor-core matrix-multiply instruction with BF16 operands. Eight files under `src` use this BF16 instruction directly.
So it really does need newer hardware. The missing piece is a hardware instruction, and a driver upgrade does not add it. Running on a 2080 Ti would mean rewriting the compute kernels in another format.
For Qwen3.8-27B on 2080 Ti, this series already has two routes. [One card with llama.cpp at 30 tok/s](/en/blog/qwen38-27b-ud-on-one-2080ti). [Two cards with FastLLM + DFlash2 at 153.8 tok/s on code](/en/blog/fastllm-dflash2-dual-2080ti).
## Deep dive: exact test conditions, ranges, and the full 2080 Ti build log
You can skip this section if you only want to run the engine. It holds the exact settings, run-to-run ranges, the limits of the comparison, and the full 2080 Ti build log.
### Test conditions
| Item | Setting |
|---|---|
| Machine | Windows 11 Pro 10.0.26300, NVIDIA driver 621.14, WSL2 Ubuntu 26.04.1, kernel 6.18.33.2-microsoft-standard-WSL2, one RTX 5090 |
| QEngine | 1.3.6, commit 444b2e4, `libqengine.so` from `ghcr.io/bpx03/qengine:1.3.6` |
| Weights | RedHatAI/Qwen3.8-27B-INT4, plus the author's tuned MTP head and DFlash2 drafter (auto-downloaded) |
| QEngine launch | `QE_DEVICES=0 QE_MAX_SEQS=1` (4 for the four-stream run), `--max-ctx 8192`, KV default FP8, vision off |
| llama.cpp | Official Windows CUDA 13.5 build b12445, Q4_K_M GGUF, `-ngl 999 -c 8192 -np 1 --jinja --seed 42 --spec-type none` |
| llama.cpp with drafting | Same, with `--spec-type draft-dflash2 --spec-draft-model`, draft model `z-lab/Qwen3.8-27B-DFlash2-GGUF` at Q4_K_M; `--spec-draft-n-max` default 3, plus one code run at 7 |
| Request | `max_tokens=512, seed=42, temperature=0.7, top_p=0.8, presence_penalty=1.5, ignore_eos=true, stream=true`, `enable_thinking=false` |
| Sampling difference | QEngine top_k=20, llama.cpp top_k=40 (each engine's default) |
| Speed formula | `512 / (full stream time − time to first token)`, measured client-side through an SSH port-forward |
| VRAM | Sampled from nvidia-smi about every 0.5 s, whole-card peak including about 1.9 GB of desktop use |
### Run-to-run ranges
QEngine single stream: Chinese 108.59 to 109.17, English 224.40 to 225.17, code 357.31 to 361.23 tok/s. llama.cpp with no drafting: all three between 69.1 and 69.4 tok/s. llama.cpp with DFlash2: Chinese 81.84 to 81.95, English 119.07 to 119.42, code 154.73 to 155.08, and code 167.65 to 169.09 at 7 drafts per step.
### Where the engine itself is fast, apart from drafting
Split speed into two parts: steps per second, and tokens advanced per step.
QEngine ran about 85 steps per second on all three prompts, or about 11.7 ms per step, and in my logs each of those steps verified close to 7 drafted tokens on average. llama.cpp without drafting produces one token per step, so 69 tok/s is about 14.5 ms per step. With DFlash2 on, dividing its speed by tokens advanced per step gives 51 to 53 steps per second, or 19 to 20 ms per step. llama.cpp's steps get slower once they verify drafts. A QEngine step verifies about 7 tokens and still finishes faster than a llama.cpp step with no drafting. The quantization and runtime differ, so the engine doesn't account for the entire gap.
The author's docs and source comments describe several techniques. I did not switch them off one at a time, so I can't say how much each contributes.
- The compute kernels are hand-written for the Qwen3.8 architecture instead of calling a general matrix library.
- INT4 weights are repacked at load time into the layout tensor cores consume, and the math runs on the BF16 tensor-core instruction that the 2080 Ti build fails on.
- The main computation of each decode step is captured as a CUDA graph and replayed, which avoids launching kernels one at a time.
- For the next-token logits, an INT4 copy of the output layer screens the full vocabulary, and only the top candidates are rescored with the BF16 weights: 16 for greedy decoding, 64 when sampling.
- When recent output repeats earlier context, drafts are copied from that context.
- The MTP head is a version the author fine-tuned on the engine's own answers, downloaded automatically on first startup.
### What this comparison cannot tell you
- The draft settings differ. At llama.cpp's default 3 drafts per step, each step advanced 1.55 tokens on Chinese, 2.31 on English and 3.06 on code. At 7 drafts, code advanced 3.48 per step.
- llama.cpp's `draft-mtp` was not measured. This Q4_K_M GGUF has no embedded MTP head, and the server exits with `context type MTP requested but model doesn't contain MTP layers`. I did not try a separate MTP file.
- Only one context length (8192) and one output length (512 tokens) were tested.
- Thinking-mode speed is not reported.
- There is one prompt per category, and acceptance depends heavily on content.
### Four-stream detail
Total throughput is `2048 / wall time of the group`. Per-stream numbers are the median of 12 samples.
| Prompt | Total | Per-stream median | Per-stream range | TTFT |
|---|---|---|---|---|
| Chinese story | 406.7 tok/s | 104.4 tok/s | 102.19 to 110.01 | 125.2 ms |
| English story | 571.5 tok/s | 154.5 tok/s | 144.80 to 156.39 | 127.7 ms |
| Python LRU cache | 592.8 tok/s | 162.4 tok/s | 151.87 to 174.53 | 123.2 ms |
The four slots shared a 352,256-token KV pool.
### The author's own published numbers
These ran on different hardware and prompts, so treat them as context, not as a comparison.
- Three RTX 3090s, single stream: story 279, code 516 tok/s.
- Three RTX 3090s, eight agents with random 500-token prompts: 1,129 tok/s total.
- One RTX 3090, short replies (385 tokens, greedy): code 212, story 150, proof 196 tok/s.
### Full 2080 Ti build log
The box: three RTX 2080 Ti 22 GB, driver 580.173.02. The system nvcc 12.4 was left alone. I used isolated NVIDIA 13.1.0 redistributables: nvcc, cudart, cccl and libnvvm, no driver.
The first error had nothing to do with the GPU. CUDA 13.1's headers clash with glibc 2.43:
```
/usr/include/x86_64-linux-gnu/bits/mathcalls.h(206): error: exception
specification is incompatible with that of previous function "rsqrt"
```
glibc declares it `noexcept`, and CUDA's header does not. Adding `noexcept (true)` to the `rsqrt` and `rsqrtf` declarations in the isolated `include/crt/math_functions.h` got past it. The QEngine source was not modified.
The next stop was the `.bf16` and `.m16n8k16` ptxas errors shown above. NVIDIA's [PTX documentation](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-mma) states that BF16 `m16n8k16` mma needs sm_80 or higher, which matches the compiler error.
No `libqengine.so` was produced. So I could not verify whether the existing driver (580, which reports CUDA 13.0) can initialize QEngine.
---
# [Dev Workflow] We Added Provenance to 18 Model Repos: How to Check a Quantized Download
URL: https://ai-muninn.com/en/blog/verify-downloaded-models
Date: 2026-11-14
Series: LLM Deep Dive (Part 8)
We added provenance sections to our 18 Hugging Face repositories. Historical base revisions remain unrecorded in 17. To check a download, identify the actual file, pin the publisher's release and compare SHA-256. Then inspect the upstream and build record. A matching hash establishes release identity; it cannot rule out a backdoor. We have neither found nor excluded one.
---
## Why we started with our own repos
I publish quantized models on Hugging Face under **coolthor**. When Microsoft Research described Lazarus, a technique for planting dormant behavior in model weights, I had a fairly immediate question: what evidence could someone downloading my models actually check?
We are the third party in somebody else's model supply chain. So I started with our running models and our own releases. We added provenance sections to **18 repositories**, including source information, build details, published file hashes and explicit gaps. In **17**, the historical base revision was not recorded in the recovered material.
The useful outcome for a downloader is a procedure you can repeat: find the actual file your runner uses, compare it with a pinned release, then inspect how that release was made. None of this audit found a backdoor, and none of it rules one out.
If quantization itself is unfamiliar, [our introduction to quantization algorithms](/en/blog/llm-deep-dive-quantization-algorithms) explains the conversion. Here, the question is whether you can account for the result you downloaded.
## A model name does not identify the file your agent loads
Start with your runner's startup arguments or configuration. Record the weight filename it actually opens, its publisher, repository and revision. For a sharded model, record every loaded shard and the index. Include separately loaded adapters, projectors and other model components. A friendly model alias is useful for routing requests; it is insufficient evidence of what sits on disk.
Our inventory found an alias suggesting a Qwen model that actually pointed to a MiniCPM derivative. Another runtime consumed a locally packed cache rather than the original checkpoint.
For a new download, inspect the model card and **Files and versions** before starting inference. Copy the full release commit, rather than recording only `main`. Keep the filename with it. You should be able to answer: which publisher, which repository, which commit, which file?
## Follow the quantizer's immediate source before the original model family
The name Qwen or Gemma in a quantized repository is a starting point. It does not tell you whether the input was the original release, a fine-tune, a merge or another quantization.
For example, our [Huihui Qwen NVFP4 provenance section](https://huggingface.co/coolthor/Huihui-Qwen3.6-35B-A3B-abliterated-NVFP4-W4A4/blob/814aed0096aae190905d8830cd1495ca41d135e8/README.md) names the Huihui derivative as its immediate input. Skipping that step and writing “from Qwen” would omit an upstream modification. The build-time commit for that input remains **not recorded**.
Read the source table alongside the build section. A source link identifies a repository; a historical commit identifies the input version. Tool names and a description of the method help, but reproducing the build also needs the actual command, patches and relevant data. Today's upstream `HEAD` cannot reconstruct which revision an older job consumed.

## Compare SHA-256 against a pinned release
Here is a real example from our [Sulphur NVFP4 model card](https://huggingface.co/coolthor/Sulphur-2-distilled-NVFP4/blob/4f881881a03be63d962956c02d89091b673c0d45/README.md). Its provenance section identifies the inspected weight release as `d8f083b8d126bd06c292c42262588c400a8abe60`. The newer commit in the card URL only updates the README.
I use the separately packaged VAE because the filename, byte count and expected digest are all recorded. This is a media-model component, not a model tested in the Lazarus experiments. Checking this file does not check the repository's other weights.
| File | Expected bytes | Expected SHA-256 |
|---|---:|---|
| `ltx_full_vae.safetensors` | 1452240458 | `a48d539b06bd8628d514de36c3a3e816c08c217d2fe90534b6426978c6dca5d8` |
Use a **new, empty directory** so the download does not replace an existing model. It requires space for the byte count above. The following command fetches the file from the recorded weight release; it does not load or execute the model:
```bash
curl --fail --location \
--output ltx_full_vae.safetensors \
https://huggingface.co/coolthor/Sulphur-2-distilled-NVFP4/resolve/d8f083b8d126bd06c292c42262588c400a8abe60/ltx_full_vae.safetensors
wc -c < ltx_full_vae.safetensors
```
On Linux, calculate the local digest:
```bash
sha256sum ltx_full_vae.safetensors
```
On macOS, use:
```bash
shasum -a 256 ltx_full_vae.safetensors
```
Compare the entire digest with the card. A filename match or byte-count match alone is insufficient. If the file came from a Git clone, make sure Git LFS downloaded the weight contents. A small LFS pointer text file is a different file and produces a different hash.
What if they differ? First check the exact filename and release, whether the download completed, and whether you hashed a pointer or an error response. Until you resolve the discrepancy, you have not identified those bytes as the referenced release. A mismatch alone does not identify malicious modification.
For an existing local model, use its actual path instead of downloading another copy. Save the expected digest and commit alongside your computed result. For sharded models, hash every shard.
## A matching hash establishes file identity, not safe behavior
If your digest matches the pinned publisher record, your file matches that release. You have not established whether the release itself was modified before publication, whether its declared source is correct, or whether a trigger could change its behavior.
You also have to trust wherever the expected digest came from. A publisher account compromised before you retrieve the file could serve both altered weights and matching checksums. Keeping an independently obtained, previously trusted release record gives you a reference outside that new download. Our newly written source sections do not provide an independent historical attestation.
[Microsoft Research's Lazarus summary](https://www.microsoft.com/en-us/research/blog/lazare-veni-foras-reprogramming-dormant-neurons-to-backdoor-ai-agents/) describes a weight-editing attack that does not require training and can remain dormant during ordinary evaluations. That makes “it answered my usual prompts correctly” inadequate evidence for excluding this attack. It does not establish that our releases contain it.
The agent's tools determine what an emitted command can do. While provenance remains incomplete, limit filesystem access, keep credentials outside the agent's reach, restrict outbound connections and review consequential commands before execution. These are recommended controls. This inventory did not deploy them or change running services.
## Keep a build record when you publish your next quantization
The record I want alongside our next release starts **before conversion**. Save the exact source repository and full commit, the input filenames and their hashes. Do this for each input in a merge or a package containing several components.
Keep the converter or quantizer commit, local patches, full command and environment. If calibration affects the result, record the data revision, selection method and random seed. Record intermediate transformations too: extracting a component, merging an adapter and repacking runtime weights can each create a new artifact that needs its own explanation.
Finish with an output manifest containing filenames, byte counts and SHA-256 digests. State what was actually checked: published metadata, a local file comparison, a reproduced build or a tensor-aware diff. Those results support different claims. Re-running the recipe may also produce different file bytes because of serialization or execution differences; document that limitation rather than promising deterministic output without testing it.
For an old release with missing records, write **not recorded**. Leave the input commit unknown until historical evidence supports one.
## Deep dive: what our inventory did and did not establish
Skip this section if you only need the checks above. It covers the scope behind our numbers and why some comparisons are still open.
### The running-model inventory and the publishing audit count different things
The local inventory calculated SHA-256 for **34 unique files or auxiliary artifacts**. This was an inventory of evidence associated with running services or recent service use, not a full disk search and not proof that every listed media weight remained in GPU memory. Paths referring to the same physical file were recorded as aliases; distinct copies were separate observations.
The categories below describe comparison evidence. They are not a distribution of safe versus unsafe models.
| Comparison result | Files or artifacts | Interpretation |
|---|---:|---|
| Original publisher, same known revision, matching | 4 | Local bytes matched the referenced original release |
| Third party, same known revision, matching | 2 | Local bytes matched that third-party release |
| Original publisher content matched; acquisition revision unknown | 1 | A matching public file does not recover download history |
| Third-party content matched; acquisition revision unknown | 13 | The same limitation applies to these public derivatives |
| Different from quantization upstream; local edits recorded | 2 | A documented derivative needs review of its transformation |
| No directly comparable upstream file | 12 | Local hashes exist, but direct upstream identity remains unresolved |
The differing files had recorded local modifications. That explains why byte equality with the earlier quantization was not expected; it does not independently verify the edits. Runtime caches and repacked weights also need a reconstruction or a format-aware comparison. There may be no upstream file with identical serialization to compare.
### The source-card update covered published metadata, not a rebuild
The publishing review covered **18 repositories and 73 weight or calibration files**. Those repositories include media models and auxiliary artifacts; describing them all as agent LLMs would be incorrect. Each repository received an appended English Provenance section. The push report verified the new cards and checked that repository changes were confined to `README.md`.
The **73 digests came from pinned Hugging Face LFS metadata**. That card update did not download every large weight file and calculate its hash again. The local **34-file** inventory did calculate local hashes. The two counts describe separate scopes and must not be added together as an audit coverage total.
In the recovered source records, **17 of 18 repositories lacked a historical base revision**. The exception was [VoxCPM2-Q4_K_M-GGUF](https://huggingface.co/coolthor/VoxCPM2-Q4_K_M-GGUF/blob/81cf28c7f44484c5774008bac2d38e5d5f95d3c0/README.md), whose recorded base was `openbmb/VoxCPM2@32279effe8c19989596f05d353d1447f51d9e915`. Even that release still lacked parts of a complete reproduction record. A known input commit is valuable evidence, but it does not supply missing commands or dependency locks.
We performed no quantization rerun or weight-diff audit in the card update.
### Lazarus motivates checking weights without supplying an all-clear test
The [Lazarus paper](https://github.com/anadim/anadim.github.io/blob/135bbd51079f52d6c2ea8c1c68a3f0d3d4b46a74/papers/Lazarus.pdf) reports editing **7 dormant neurons** in Nemotron-Terminal-8B. Its gradient-refined variant (Lazarus-SGD, fitted on 23 examples) predicted the payload on **at least 98.8%** of recorded triggered test trajectories; the paper also describes an analytic version that skips fine-tuning. It also reports vulnerability in Qwen3.6-27B and Gemma-4-31B-IT. These are study results for the tested checkpoints and conditions, not a measured attack rate across downloaded quantizations.
A quantized checkpoint normally differs numerically from its unquantized source. Comparing their raw file hashes cannot separate expected quantization changes from unexpected weight edits. Checking how a quant was derived takes the pinned base model, the build recipe and a format-aware tensor diff. Our historical records do not yet support that complete check for the releases discussed here.
Also in this series: [Quantization algorithms](/en/blog/llm-deep-dive-quantization-algorithms).
---
# [Benchmark] FP16 vs Q8 on RTX 5090: Qwen2.5-7B Generates at 188.75 tok/s
URL: https://ai-muninn.com/en/blog/fp16-vs-q8-rtx5090-2026
Date: 2026-11-11
Series: LLM Deep Dive (Part 7)
On one RTX 5090, Qwen2.5-7B in **Q8_0 generated at 188.75 tok/s**, versus FP16's 109.67: **1.72×** the speed. Its sampled whole-GPU peak was 10,467 MiB, including the desktop. I would start with Q8_0 for a close FP16 approximation; Q6_K saves more memory, and Q4_K_M prioritizes speed and size. Prompt processing and task accuracy need separate checks.
## Choosing between FP16 and Q8
I wanted to know which file to download: if FP16 already fits, what do I get by choosing Q8 instead? I took one FP16 GGUF of [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct), made three quantized copies, and measured all four on the same RTX 5090.
The [quantization introduction](/en/blog/llm-101-what-is-quantization) explains the names. Here the decision comes from measured speed, memory use and a next-token prediction test. The results apply to this model, build and short context; they do not establish a universal ranking for every GPU.
## Q8_0 generates faster; FP16 processes this prompt faster
Read the two speed columns separately. Prompt processing is the model reading the input; generation is the model producing its answer. A token is one of the text pieces the model works with. Both columns count tokens per second, and higher is faster.
The table gives medians of three measured runs. VRAM is the median of each run's sampled **whole-card** peak, including Windows and desktop applications.
| Format | Prompt tok/s | Generation tok/s | Sampled whole-GPU peak (MiB) |
|---|---:|---:|---:|
| FP16 | 16,447.2 | 109.67 | 16,877 |
| Q8_0 | 15,953.6 | 188.75 | 10,467 |
| Q6_K | 13,175.0 | 231.49 | 8,835 |
| Q4_K_M | 15,407.2 | 284.71 | 7,471 |
For generation, Q8_0 reaches 1.72 times FP16's speed. Q4_K_M reaches 284.71 tok/s. For prompt processing, FP16 leads, followed by Q8_0, Q4_K_M and Q6_K. Downloading the smaller file did not make every stage faster.
The quantized weights require fewer bytes to store. Generation speed can benefit from moving less weight data, but this experiment does not isolate the GPU kernels well enough to attribute every speed difference to memory traffic. In particular, Q6_K's prompt result is a measurement, not proof of a specific bottleneck.
## Q8_0 stays closest to FP16's output distribution in this sample
All four formats were tested on the first 32 chunks of one English Wikitext-2 test file, with a 512-token context. **Perplexity** measures next-token prediction: lower is better on this fixed text. **KL divergence** compares the full predicted token distributions with a saved FP16 reference: closer to zero means closer distributions. Neither metric measures how many coding or math questions the model answers correctly.
Read the perplexity difference against the direct FP16 run, and KL against the stored FP16 logits.
| Format | Perplexity | Δ vs direct FP16 | KL vs stored FP16 logits |
|---|---:|---:|---:|
| FP16 | 6.098206 | +0.000000 | -0.000010 |
| Q8_0 | 6.106598 | +0.008392 | 0.001709 |
| Q6_K | 6.094548 | -0.003658 | 0.004940 |
| Q4_K_M | 6.308980 | +0.210774 | 0.039512 |
Q8_0 has the smallest measured KL among the quantized formats. Q6_K's perplexity is slightly lower than FP16's on this sample, while its KL is higher than Q8_0's. That is not evidence that Q6_K is a better model: predicting the observed next word and matching the entire FP16 distribution are different tests, and this sample is short.
The FP16 self-comparison reports KL **−0.000010**. True KL cannot be negative; this is a numerical estimate near zero. The stored reference is lossy: the tool reports reconstructed base perplexity **6.085444**, whereas direct FP16 perplexity is **6.098206**. I keep those values visible rather than force the FP16 KL to zero or mix the two perplexity baselines. The [upstream perplexity notes](https://github.com/ggml-org/llama.cpp/blob/ae4893a092e060cfbd4979600bf3c1e48a710874/tools/perplexity/README.md) describe the stored-logit representation.
## Start with Q8_0; move down when the memory savings matter
My choice for this model is **Q8_0 when it fits, Q6_K to use less memory with modest distribution drift, and Q4_K_M when memory or generation speed takes priority**. Keep FP16 when you need the unquantized comparison reference, or when prompt processing is the workload you care about most.
These are format choices for one model. I did not measure long-context use, multiple simultaneous requests, Chinese perplexity, or task accuracy. A low KL on English text cannot settle those questions.
## Deep dive: reproduce the measurements and inspect the receipts
You can skip this section and still use the recommendations above.
### One FP16 file produced all three quantized files
The source is [bartowski's FP16 GGUF at a pinned revision](https://huggingface.co/bartowski/Qwen2.5-7B-Instruct-GGUF/tree/8911e8a47f92bac19d6f5c64a2e2095bd2f7d031). I verified its SHA256 against the repository's LFS object before quantizing. Q8_0, Q6_K and Q4_K_M were generated locally from that file with the same executable and no importance matrix. This avoids mixing prebuilt files with different quantization recipes.
The exact commands below run from my experiment directory, with binaries extracted under `bin`. The FP16 input is named `model-f16.gguf`. For each subsequent speed run I changed only `-m` to the corresponding quantized file.
```powershell
.\bin\llama-quantize.exe model-f16.gguf model-Q8_0.gguf Q8_0 8
.\bin\llama-quantize.exe model-f16.gguf model-Q6_K.gguf Q6_K 8
.\bin\llama-quantize.exe model-f16.gguf model-Q4_K_M.gguf Q4_K_M 8
.\bin\llama-bench.exe -m model-f16.gguf -p 512 -n 128 -d 512 -b 512 -ub 512 -t 8 -ngl 99 -fa on -ctk f16 -ctv f16 -r 1 -o json
```
| Condition | Value |
|---|---|
| Date | 2026-11-11, Asia/Taipei |
| GPU / driver | RTX 5090, Windows WDDM, NVIDIA 621.14 |
| CPU / OS | Ryzen 9 9950X; Windows 11 build 26300 |
| llama.cpp | b12250, commit `ae4893a092e060cfbd4979600bf3c1e48a710874`, Windows CUDA 13.5 release |
| Model parameters | 7,615,616,512, from llama-bench metadata |
| Workload | Single stream; synthetic tokens; prompt 512, generation 128, depth 512 |
| Batch / microbatch / threads | 512 / 512 / 8 |
| GPU / attention / KV | `-ngl 99`, Flash Attention on, K and V both F16 |
| Repetition | Four outer rounds; discard round 0; median and range of rounds 1–3; `-r 1` per invocation |
| Other bench defaults | Built-in warmup on; load/lazy mode auto; repack on; no fit target; full JSON retains the remaining defaults |
The format order alternated forward and reverse across rounds. The largest measured speed range was 1.32% of its median, below the predeclared 15% threshold for adding runs. This is a descriptive comparison, not a significance test.
Each invocation creates fresh inference state. There is no serving prefix cache. Since the executable version stayed the same, I did not clear compilation caches belonging to other services. ComfyUI's queue was empty before each invocation; the harness waited if it saw another compute process or an elevated idle baseline. Desktop applications remained open, so this is a Windows desktop measurement rather than a headless-card result. llama-bench excludes tokenization and sampling time, so these rates do not measure complete application response speed.
### Whole-card VRAM is measured separately from file size
I sampled `nvidia-smi` memory usage about every 0.2 seconds while each process ran. The recorded idle baselines were 2,379–2,403 MiB. WDDM did not provide useful per-process memory figures, so I report full-card sampled peaks without claiming they are isolated model allocations. Sampling can miss a shorter peak.
| Format | Prompt min–max tok/s | Generation min–max tok/s | Whole-GPU peak min–max MiB | File bytes |
|---|---:|---:|---:|---:|
| FP16 | 16354.69–16553.35 | 109.604–109.699 | 16862–16887 | 15237853600 |
| Q8_0 | 15950.65–15963.68 | 188.614–188.756 | 10442–10467 | 8098525600 |
| Q6_K | 13028.98–13203.40 | 231.384–231.716 | 8810–8835 | 6254199200 |
| Q4_K_M | 15323.84–15462.58 | 284.697–284.744 | 7410–7471 | 4683073952 |
The [raw run records](/benchmarks/fp16-vs-q8-rtx5090-2026/bench-records.json) contain every warmup and measured result. The [summary JSON](/benchmarks/fp16-vs-q8-rtx5090-2026/summary.json) contains the arrays used for the medians and ranges. Per-run files such as `bench-r1-Q8_0.stdout` and `bench-r1-Q8_0.vram.json` are available in the same directory.
### Every quality comparison uses the same saved FP16 reference
```powershell
.\bin\llama-perplexity.exe -m model-f16.gguf -f wikitext-2-raw/wiki.test.raw -c 512 --chunks 32 -b 512 -ub 512 -t 8 -ngl 99 -fa on -ctk f16 -ctv f16 --kl-divergence-base fp16-reference.kld
.\bin\llama-perplexity.exe -m model-Q8_0.gguf -f wikitext-2-raw/wiki.test.raw -c 512 --chunks 32 -b 512 -ub 512 -t 8 -ngl 99 -fa on -ctk f16 -ctv f16 --kl-divergence-base fp16-reference.kld --kl-divergence
```
I repeated the second command for FP16, Q6_K and Q4_K_M by changing only the model filename. All runs use the first 32 chunks; this is not the full Wikitext-2 test set. The raw corpus SHA256 is `173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08`. The saved reference is 2,481,815,316 bytes, SHA256 `3c765b5a27dc4dca897d628d3fb3b2c1b386b36243071424345872cf0e1d88f0`.
The quality logs retain a tokenizer warning that a control-looking token was assigned a non-control type and was overridden by the loader. Every format inherits tokenizer metadata from the same FP16 source and uses the same loader. I did not manually change the tokenizer.
[FP16 quality output](/benchmarks/fp16-vs-q8-rtx5090-2026/quality-FP16.stdout), [Q8_0 output](/benchmarks/fp16-vs-q8-rtx5090-2026/quality-Q8_0.stdout), [Q6_K output](/benchmarks/fp16-vs-q8-rtx5090-2026/quality-Q6_K.stdout) and [Q4_K_M output](/benchmarks/fp16-vs-q8-rtx5090-2026/quality-Q4_K_M.stdout) retain the chunk results, uncertainties and KL statistics. These uncertainties describe this corpus calculation; they are not repeated-run speed ranges.
### Model file SHA256 values identify the exact inputs
```text
FP16: 863c978275bca3fdacdde06cbfc1a65f2bd65210bb7ecfd9ded3b24219d81b54
Q8_0: 6925c96c0e9a6af97a81521caf2dd58da9f0fc5f00620c4d131684b872a6908e
Q6_K: 9616f5a674b8d53dd2c8db918e4d8b5f331a4cca342ba2040c47371a73faecf9
Q4_K_M: 246ac71c280bd514575413b01abef9954f9148c011e4a06df643001a0a6b1910
```
The [manifest](/benchmarks/fp16-vs-q8-rtx5090-2026/manifest.json) also records corpus, reference and executable hashes. The Windows `.exe` launchers load implementation DLLs; a launcher hash alone is not a complete build identity. The pinned release and CUDA backend hash belong with it.
---
# How to run Viggle Remake character swap on an RTX 5090 (int8, ComfyUI)
URL: https://ai-muninn.com/en/blog/viggle-remake-5090-character-swap
Date: 2026-11-10
Series: MiniMax-H3 on RTX 5090 (Part 18)
**Viggle Remake** (Viggle's weights trained on MiniMax-H3) runs on **a single 32 GB RTX 5090** in ComfyUI with the int8 checkpoints, about 21 GB each with the LoRA merged. In a blind comparison on the same 294-frame clip, a local vision model scored it **89 vs 74** against my hand-built SAM mask + H3 Character Swap, and it finished sooner: about 181 s vs 236 s. A real 12.25 s dance at short edge 736 takes about 603 s per clip. Caveat: one seed per version, judged from extracted frames only.
---
Swapping the person in a video used to mean a pipeline: segment the person with SAM, mask them out, have H3 Character Swap draw the new character, then live with whatever the inpainting does to the background. I built that pipeline. Then [Viggle Remake](https://huggingface.co/Viggle/Viggle-Remake) came out: Viggle's weights trained on top of MiniMax-H3, which take the original video, 1 to 4 painted frames and a six-part prompt, and do the swap in one model.
It has two modes. **swap** replaces the person. **edit** changes other things, such as the background, and keeps the person.
So I put it on my RTX 5090, took a dance tutorial clip and replaced the dancer with a grandma who doesn't exist. Then I ran it blind against my hand-built pipeline. Remake won 89 to 74, and finished sooner. This post is how to set it up and run it yourself.
## What you need: a single 32 GB RTX 5090 and about 42 GB of checkpoints
My setup:
- **GPU:** a single RTX 5090, 32 GB
- **ComfyUI** 0.37.0, PyTorch 2.13.0+cu130. Viggle's official test version is ComfyUI 0.42.0.
- **Disk:** two int8 checkpoints, 20,970,379,616 bytes each, plus the text encoder and two VAEs
The checkpoints are already pruned to int8 with the LoRA merged in. You load one file and attach no LoRA.
| Role | File | Notes |
|---|---|---|
| Swap model | `viggle_remake_swap_pruned_int8_convrot.safetensors` | LoRA merged |
| Edit model | `viggle_remake_edit_pruned_int8_convrot.safetensors` | LoRA merged |
| Text encoder | `qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors` | Load CLIP, type `minimax` |
| VAE | `minimax_h3_video_vae_fp16.safetensors`, `minimax_h3_audio_vae_fp32.safetensors` | |
If you only want to replace a person, you only need the swap checkpoint. The edit checkpoint is for changing the scene afterward.
## How to run a Viggle Remake swap on a 5090, step by step
ComfyUI is an open-source program where you build a generation pipeline by wiring nodes together. Work through these steps and you end up with the same dance video, with your character dancing in it. This part is written for people who already have a 5090 and have installed ComfyUI before. If you haven't, skip ahead to the results first.
### Step 1: Install the node pack
```bash
hf download Viggle/Viggle-Remake --include "comfyui/*" --local-dir ./Viggle-Remake
cp -r Viggle-Remake/comfyui/ComfyUI-Viggle-Remake custom_nodes/
```
On ComfyUI 0.37.0 the pack won't load, because 0.37.0 has no `comfy.audio`. I added a torchaudio resample fallback inside the node pack, and after that it loaded. Viggle tested on 0.42.0, so on a newer ComfyUI you may not hit this.
### Step 2: Download the int8 checkpoints
```bash
hf download Viggle/Viggle-Remake --include "int8/viggle_remake_swap_pruned_int8_convrot.safetensors" --local-dir ./Viggle-Remake
hf download Viggle/Viggle-Remake --include "int8/viggle_remake_edit_pruned_int8_convrot.safetensors" --local-dir ./Viggle-Remake
mv Viggle-Remake/int8/*.safetensors models/diffusion_models/
```
Put the text encoder and the two VAEs from the table above in their usual ComfyUI model folders.
### Step 3: Fix up the official workflow
Open `comfyui/workflows/remake_swap_ui.json`. It ships with a Load Diffusion Model node plus a LoRA loader. Replace both with one Load Diffusion Model that loads the int8 checkpoint, and wire it into **Viggle Remake Keyframe Until**. In Load CLIP, set the type to `minimax`.
### Step 4: Cut the source to 24 fps and a legal frame count
Remake only takes frame counts of the form **17n+5**, from 90 to 345. I used 294 frames (17×17+5), which is 12.25 s at 24 fps. Convert to 24 fps first, then trim:
```bash
ffmpeg -i dance.mp4 -r 24 dance-24fps.mp4
ffmpeg -i dance-24fps.mp4 -frames:v 294 source.mp4
```
The official docs list **480 and 736** as the two standard `short_edge` settings. The node itself accepts anything from 480 to 736 in steps of 32; I only ran 480 and 736.
### Step 5 (optional): Crop in on the person
If you skip this, the node scales the video to fit and center-crops it. In a wide dance shot that leaves the dancer small in the frame.
My source was a fixed camera, so I found the person in each frame by background subtraction, smoothed the box center over 21 frames, and cropped to a vertical frame: person height targeted at 78%, capped at 85%, with at least 3% margin on every side, output 736×1280. After cropping, the person averaged about 78% of frame height (77.85% and 77.37% for the two windows I ran).
The original is 832×480, so the crop gives the model a bigger person to work with. It doesn't add any detail the original didn't have.
### Step 6: Make the character and the painted frames
The new character needs a reference image. My grandma is fictional, generated with Qwen-Image 2.1 int8 and the 4-step Turbo LoRA `Qwen-Image-2.1-viggle-turbo-4step-lora-r64.safetensors` at 768×1152: about 70, short curly gray-white hair, a red floral short-sleeve top, dark trousers, white canvas shoes.
Then make the **painted frames**: frames from your source with the new character already painted in. I made mine with Qwen-Image 2.1 int8 edit, 40 steps, CFG 1, feeding it the source frame plus the character image. You can use 1 to 4. I used two, pinned at frames `73, 144` (00:03.042 and 00:06.000).
### Step 7: Write the six-part prompt
The prompt has six sections, in this order:
1. `subject_definitions`
2. `summary`
3. `retention_analysis`
4. `detailed_description`
5. `overall_soundscape`
6. `non_diegetic_music`
Refer to inputs with the tags ``, `` and ``. Four things mattered:
- Describe the finished video. Don't write instructions to the model.
- `retention_analysis` gets followed literally, so only put in it what you actually want kept.
- Any timestamps you write have to line up with the frame count.
- You don't need to copy anyone's prompt word for word. Tell Claude what the person, the character and the timing are, and have it draft the six sections in this format.
### Step 8: Set the sampler and run
| Setting | Value |
|---|---|
| pins | `73, 144` |
| keyframe_until | 0.9 |
| sampler | euler, 6 steps |
| seed | 904239 |
| swap sigmas | `1.0, 0.990476, 0.965243, 0.923077, 0.8, 0.631579, 0.0` |
| edit sigmas | `1.0, 0.983607, 0.96, 0.923077, 0.857143, 0.705882, 0.0` |
At short edge 736, I wired in the H3RelaySamplingMemory node from [H3 Relay](https://github.com/akatz-ai/h3-relay) (GPL-3.0) with a 30 GiB sampling workspace estimate. The 480 runs used a 24 GiB estimate. Viggle's own table says a 32 GB card running int8 at 1280×736 tops out at 175 frames, and 294 frames is well past that. That table was measured on a B200 with available memory capped to simulate a 32 GB card, using the CUDA 12.8 fallback path. The same doc says that with CUDA 13 and the dedicated worker, a single 5090 reaches 345 frames (about 28 minutes). At 832×480, the table says int8 needs no extra flags on a 32 GB card (Viggle measured 226 frames, under the same B200 simulation).
Expect about 156 s per 294-frame clip at 480 and about 603 s at 736. The highest peak I saw was 31,776 MiB.
## Remake beats my hand-built swap 89 to 74, and the background makes the difference
Both versions got the same 294-frame source: a gray mannequin dancing, followed by a 6-second freeze with the camera orbiting. A local vision model scored each clip out of 100 without knowing which method made it. Read the Total row first:
| | Viggle Remake | SAM + H3 Character Swap |
|---|---|---|
| Identity (40) | 37 | 33 |
| Silhouette and feet (35) | 31 | 27 |
| Background residue (25) | 21 | 14 |
| **Total** | **89** | **74** |
I count anything under 10 points as a tie, so this is a real gap. I swapped left and right and asked twice; both times it picked Remake. When asked to compare the two directly, it called identity and silhouette a tie. What it kept pointing at was the background: the hand-built version has gray inpainting around the person, left over from the mask. I watched them blind too and also picked Remake.
It's faster as well. Remake took about 181.3 s including the two painted frames and alignment. The hand-built SAM + H3 pipeline took 235.6 s in total.
## Real footage: a 30-second dance becomes two 12.25 s grandma clips that both score 80
I took two non-overlapping 294-frame windows from the 30-second dance video, cropped them as in Step 5, and ran them at short edge 736. Each one took about 603 s. Scored on their own, both came out at 80.
In both clips she stays the same grandma in the same outfit, and she follows every big move of the dance. What's still wrong:
- Fingers come out too long, or fused together.
- When she lifts a foot, the white shoe shrinks into a thin sliver.
- The painted frame drew a door frame and a light switch that weren't in the source, and they stay in the background.
- Where the dancer drops her head and flips her hair, the grandma often keeps her head up.
## Changing the scene: two passes win in a rainy qilou arcade and tie at a night market
I tried two ways to move the grandma to a rainy qilou, the covered sidewalk arcade that runs along the front of Taiwanese shophouses, and to a temple night market. Both start from the first real-footage window at short edge 480:
- **Two passes:** swap the person first, then run edit on the result with a prompt that keeps the person, motion and clothing and only changes background and lighting.
- **One pass:** a single swap whose painted frames already show the new scene.
| Scene | Swap then edit | One swap |
|---|---|---|
| Rainy qilou arcade | **82** | 65 |
| Temple night market | 78 | 79 |
The qilou arcade is a clear win for two passes. The night market is a one-point difference, which is a tie. In all four versions the background rearranges itself every few seconds. Of everything I tested, scene change held up the worst. Each of these runs took about 156.5 to 166.6 s; the two-pass versions also pay for the swap run before the edit.
## Deep dive: full scores, timing, VRAM and every defect I logged
You can skip this section; everything you need to run Remake is above. It has the full numbers and every defect I logged, in case you're adapting this setup yourself or handing it to an AI to adapt.
### Run count and what's comparable
26 GPU generations in total: 8 for the blind comparison, 6 for the real-footage swap, 12 for scene change. 0 failures, and no reruns for quality. Every method got one clip and one seed per scene.
The 89/74 blind result and the 80/80 real-footage result used different sources, framing and resolution, so don't compare them to each other. Scene change was only tested at short edge 480.
### Blind comparison setup
- Source: a gray mannequin dancing plus a 6-second frozen orbit, frames 288–581, 832×480, short edge 480, 294 frames.
- The judge is a local vision model. It sees extracted frames only, hears no audio, and isn't told how either clip was made.
- 11 time points, 4 independent requests.
### Time and VRAM
| Run | Time | Peak VRAM |
|---|---|---|
| Remake swap, blind source, short edge 480 | 156.4 s | 30,556 MiB |
| Remake incl. two painted frames and alignment | about 181.3 s | |
| Hand-built SAM + H3, total | 235.6 s | |
| Hand-built, H3 step only | 211.9 s | 27,443 MiB |
| Viggle's pineapple example, 226 frames, 832×480 | 131.3 s | 31,707 MiB |
| Real footage window 1, short edge 736 | 603.0 s | 31,749 MiB |
| Real footage window 2, short edge 736 | 602.1 s | 31,776 MiB |
| Scene-change runs, short edge 480 | about 156.5–166.6 s each | about 30,590 MiB |
The blind-comparison timings are one run each.
On memory: every run here used H3 Relay's H3RelaySamplingMemory, with the settings from Step 8. I never tested 294 frames at 480 without Relay, so I can't tell you whether it fits.
### Real-footage swap, per window
| | Window 1 | Window 2 |
|---|---|---|
| Source frames | 0–293 | 426–719 |
| Identity (40) | 35 | 35 |
| Silhouette and feet (35) | 22 | 24 |
| Background residue (25) | 23 | 21 |
| **Total** | **80** | **80** |
| Person height after crop | 77.85% | 77.37% |
These were scored one clip at a time at temperature 0, not head to head. Silhouette and feet is where both lose the most points: long or fused fingers, and the white shoe that collapses into a sliver on raised-foot frames. The background loses points for the door frame and light switch the painted frame invented.
### Scene change, every defect
Edit prompt (the original wording I used, in Chinese):
```text
人物、動作、服裝不變,只換背景與光線
```
- **All four versions:** the background rearranges every few seconds. Lanterns, stalls, floor tiles, signs and pillars move or change.
- **One-swap qilou arcade (65):** the viewpoint jumps several times, between 0–3, 4–7, 8–10 and 11–12 s. From 11 s on there's a semi-transparent pillar-shaped ghost on the left.
- **One-swap night market (79):** sleeve length changes during the clip, and extra people appear in the background.
- **Painted frames for one-swap:** I painted the two frames separately, so their geometry didn't match each other to begin with.
- **Person motion** scored 30–33 out of 35 across all four versions, so the dance itself survives the scene change.
### Judge caveats
All scores come from extracted frames. Three judge outputs I didn't take at face value:
- It cited 13 s and 14 s timestamps, which don't exist in a 12.25 s clip.
- The window 2 response was cut off by the length limit. The scores were complete, so I didn't rerun it.
- It described a raised foot at frame 293 that doesn't match the frame.
### Sources and credits
- Source dance video: “DAME HOMBRO Give Me a ShoulderDance Trend tutorial” by JD Dance Tutorial on YouTube:
https://www.youtube.com/watch?v=-BI2vTrxAqc
- The grandma is a fictional character generated with Qwen-Image 2.1.
- Model and node pack: [Viggle/Viggle-Remake](https://huggingface.co/Viggle/Viggle-Remake)
- Memory node: [H3 Relay](https://github.com/akatz-ai/h3-relay), GPL-3.0
## Also in this series
- [Part 16: Pika-H3-Flex on an RTX 5090: 2x faster MiniMax-H3, and a Blender blockout makes the camera obey](/en/blog/pika-h3-flex-rtx5090-whitebox-orbit)
- [Part 12: Turn a real dance into a depth video and have MiniMax-H3 restage it in a palace: native 768 on one RTX 5090](/en/blog/dance-depth-h3-palace-rtx5090)
---
# [Benchmark] No GPU? Run MiniMax-H3 on a Colab G4: 66 s per clip, ~49 clips an hour
URL: https://ai-muninn.com/en/blog/colab-g4-h3-ref2va
Date: 2026-11-09
Series: MiniMax-H3 on RTX 5090 (Part 17)
A **Colab G4** (NVIDIA RTX PRO 6000 Blackwell Server Edition, 97,887 MiB) ran my production MiniMax-H3 Ref2VA dialogue recipe at **66.1 s per 10-second clip** on warm runs. My home RTX 5090 takes **82–88 s** for the same recipe. One VM, pinned ComfyUI and nodes, SHA256-checked weights, 10 seeds. About **49 clips an hour** for roughly 10 compute units. Caveat: OS, PyTorch and attention differ between the two machines, and the warm runs reuse the same prompt and reference images.
---
I saw a WorldForge post on X. It's an open-source project that uses Colab GPUs as a remote workbench. I tried it, and the interesting part wasn't the project. My Google AI Pro account could get a **Colab G4**: an NVIDIA RTX PRO 6000 Blackwell Server Edition with 97,887 MiB of VRAM and about 176.88 GiB of VM RAM.
That matters for two reasons. My one RTX 5090 at home makes one H3 clip at a time, so batches queue. And anyone without a big GPU can't run H3 at all. A rented card fixes both, if it's fast enough and the bill stays sane.
So I took my production MiniMax-H3 Ref2VA dialogue recipe, changed nothing but the seed, and ran 10 clips on a G4. Short answer: 66.1 s per clip, faster than my 5090. I didn't keep WorldForge (reasons in the deep dive); I wrote my own runner.
## How fast is MiniMax-H3 on a Colab G4? 66.1 s per clip vs 82–88 s on an RTX 5090
The recipe is the one I already use for two-character dialogue: 864×480, 243 frames at 24 fps, 14 steps, `res_multistep` / `simple`, shift video 12 / audio 3, Spectrum on. Three reference images (first frame, the constable, Liao Tianding), a prompt with two Mandarin lines, no LoRA, no reference audio. The 10 graphs were identical except for the seed (801–810) and the output filename.
Read the first row for the headline. The second row is what you pay once per VM.
| | Colab G4 | Home RTX 5090 |
|---|---|---|
| Warm clip (clips 2–10) | 66.1 s median, 65.4–66.7 s | 82–88 s |
| First clip (cold) | 73.3 s | not measured here |
| Peak VRAM | 45.38 GiB | not measured here |
That's about 1.24–1.33x faster, or 19.4–24.8% less time per clip. The G4 used less than half its memory.
This is not a pure GPU comparison. The 5090 runs Windows, PyTorch 2.13.0+cu130 and `--use-sage-attention`. The G4 ran Linux, PyTorch 2.11.0+cu130 and default attention. What I did match: ComfyUI v0.37.0 core, the revisions of all 3 custom nodes, and the SHA256 of all 4 weight files. The 82–88 s is my existing production record, not a side-by-side rerun.
One caveat on that warm number: ComfyUI caches the conditioning, the image encodes and the models when the prompt and reference images don't change. So 66 s means "same recipe, new seed". I didn't measure what happens if every clip gets a different prompt.
## How many clips per hour? About 49 for roughly 10 compute units
Before the first clip, the VM needs about 288.7 s of prep: allocate the VM, install ComfyUI with pinned versions, download and verify 42.47 GB of weights. Then one cold clip, then warm clips.
```text
1 + floor((3600 - 288.7 - 73.287) / 66.133) = 49 clips per hour
```
That's extrapolated from 10 clips. I didn't run a full hour. It also leaves out the final download and stopping the VM. If you only count warm clips, the theoretical ceiling is about 54.4 an hour.
At 10.05 compute units per hour, an hour costs about 10 units. For this 10-clip batch I have two cost figures that don't agree:
- **Balance before and after:** 392.57 → 390.41, or 2.16 units.
- **VM wall clock × rate:** 1006.389 s × 10.05 per hour ≈ 2.81 units.
I'm not sure the balance had fully settled when I read it, so don't treat the gap as a discount. Plan with the wall-clock figure. Both stayed under the 6-unit cap I'd set.
## Does the quality hold? Same characters and street in all 10 clips
Here are all 10 clips, three frames each, at 0.2 s, 5.06 s and 9.93 s:

Both characters, the lantern street and the woodcut style stay mostly consistent. Seed 809 skews blue. In seeds 801 and 804, a flag- or blade-shaped object shows up at the edge of the frame, even though the prompt bans new props. The turn-around at the end differs from clip to clip.
All 10 files pass the format check: H.264 + AAC, 864×480, 243 frames, 24 fps, a full ffmpeg decode with no errors, and no black segments from `blackdetect`.
For the speech, I ran CPU speech-to-text on two clips, 801 and 810. Both came back with the same text:
```text
站住!你就是廖天丁。是又怎樣?你追得上我嗎?
```
Right lines, right order. ("Stop! You're Liao Tianding. So what? Can you catch me?") The transcript has 天丁 instead of 添丁 for the name; the two sound the same. The second line ends around 8.6 s, though the prompt asked for all dialogue to finish by 7.0 s. I didn't check lip sync or frame-level quality.
## What Colab and compute units are, and what you need first
Google Colab is Google's hosted notebook service. You get a Linux VM with a GPU attached, and you pay by time. The unit of payment is the **compute unit**: each GPU type burns units at its own hourly rate, and your balance goes down while a VM is assigned to you, whether it's working or idle. The G4 is the RTX PRO 6000 Blackwell tier; it cost 10.05 units an hour for me.
You don't need the notebook UI. Google ships an official command-line tool, and every step below runs from a terminal on your own machine.
Before you start, you need three things:
- **A working H3 Ref2VA workflow in ComfyUI API JSON.** This post moves an existing workflow to Colab; it doesn't build one. [Part 9](/en/blog/blender-blocking-h3-ref2va-rtx5090) builds one from scratch.
- **A Hugging Face token** that can download the weights.
- **Five minutes with the license.** The [MiniMax-H3 community license](https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/LICENSE) excludes use and output in the US, UK, EU and South Korea. `colab new` picks a GPU, not a region, and the VM metadata didn't reveal the zone. Read it before you use any of this in production.
## How to run H3 Ref2VA on a Colab G4: 7 steps, each one you can hand to Claude Code
Billing starts at step 2 and stops at step 7. Every step is something Claude Code can do for you. I list what to ask it for after each one.
### Step 1: Install the Colab CLI and check your balance
Install the official [Google Colab CLI](https://github.com/googlecolab/google-colab-cli), sign in, then:
```bash
colab usage
```
It shows your balance, the hourly rate and your active assignments. Active assignments must be 0 before you go on.
**Hand to Claude Code:** "Install the Colab CLI from the official repo, sign me in, and show me `colab usage`."
### Step 2: Create a G4 session
```bash
colab new -s h3 --gpu G4
colab sessions
```
From here on, the clock is running.
**Hand to Claude Code:** "Create a G4 session named h3 and confirm it's listed."
### Step 3: Install ComfyUI and the pinned custom nodes
Pin everything. This is what I installed:
- ComfyUI v0.37.0
- PyTorch 2.11.0+cu130, torchvision 0.26.0, torchaudio 2.11.0, from the cu130 index
- `comfyui-minimax-h3-audio-T8` @ `6490906` (keeps the audio-video latent separate)
- `ComfyUI-KJNodes` @ `e8e88f7` (for `ModelMemoryUsageFactorOverride`)
- `ComfyUI-Spectrum-MiniMax-H3` @ `5161f04`
Put the install in a script and run it on the VM:
```bash
colab exec -s h3 --timeout 900 -f setup.py
```
One trap: `colab exec` can exit 0 even when your Python script raised an exception. Make the script print its own success marker on the last line (mine prints `REF2VA_SETUP_OK`) and check for that marker, not the exit code.
**Hand to Claude Code:** "Write setup.py that installs these exact versions on the VM, prints REF2VA_SETUP_OK at the end, and fails loudly otherwise. Run it with colab exec."
### Step 4: Send your Hugging Face token once, through a file
Never pass the token through `colab exec --env` or on the command line. Write it to a private temp file, upload it, delete the local copy:
```bash
tok=$(mktemp); chmod 600 "$tok"; printf '%s' "$HF_TOKEN" > "$tok"
colab upload -s h3 "$tok" /content/.hf_token
rm -f "$tok"
```
The VM script deletes `/content/.hf_token` after the download in step 5 and confirms it's gone.
**Hand to Claude Code:** "Upload my HF token to the VM as a 0600 file, delete the local copy, and make the download script remove it afterward."
### Step 5: Download the 4 weights from pinned revisions and verify SHA256
| Repo @ revision | File | Goes in |
|---|---|---|
| `Comfy-Org/MiniMax-H3` @ `5447222` | `minimax_h3_ref2va_pruned_int8_convrot.safetensors` | `diffusion_models/` |
| `Comfy-Org/MiniMax-H3` @ `5447222` | `minimax_h3_video_vae_fp16.safetensors`, `minimax_h3_audio_vae_fp32.safetensors` | `vae/` |
| `Momoking/Qwen3-VL-32B-Heretic-MiniMax-H3-NVFP4` @ `0a9486d` | `qwen3vl_32b_heretic_minimax_h3_nvfp4.safetensors` | `text_encoders/` |
Pass the full revision hash, not a branch name:
```python
from huggingface_hub import hf_hub_download
token = open("/content/.hf_token").read().strip()
hf_hub_download(
repo_id="Comfy-Org/MiniMax-H3",
filename="diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors",
revision="54472221d27c695fca9621b0c3ed52f06c4af707",
local_dir="/content/ComfyUI/models",
token=token,
)
```
Then hash each file and compare against the SHA256 list in the deep dive. Download plus verify took 126.154 s for 42.47 GB.
**Hand to Claude Code:** "Download these four files at these exact revisions into the right ComfyUI model folders, check every SHA256, then delete the token file and prove it's gone."
### Step 6: Upload the workflow, start ComfyUI, queue the clips
Upload your API-format workflow JSON and the reference images with `colab upload`. Start ComfyUI on localhost only. There's no public tunnel:
```bash
python main.py --listen 127.0.0.1 --port 8188 --reserve-vram 2
```
A script on the VM POSTs each graph to `/prompt` and reads `/history` for the result. Clips land in `/content/ComfyUI/output/`. Pull them back to your machine:
```bash
colab download -s h3 /content/ComfyUI/output/clip_801.mp4 ./clip_801.mp4
```
Take the generation time from the timestamps in `/history`, not from how long your polling loop waited.
**Hand to Claude Code:** "Upload my workflow and refs, start ComfyUI on 127.0.0.1, queue seeds 801 to 810, record each clip's time from /history, and download the MP4s."
### Step 7: Stop the VM, even if something failed
```bash
colab stop -s h3
colab sessions # expect: No active sessions found on server.
colab usage # expect: Active assignments: 0
```
Do this after failures too. A VM you forgot keeps billing, and if the run died before step 5 cleaned up, your token may still be on it.
**Hand to Claude Code:** "Stop the session and show me that sessions is empty and active assignments is 0."
### My runner does all 7 steps with a spending guard
I wrapped the steps in one script. A dry run touches no Colab resources; it only checks the workflow, the refs and the weight list:
```bash
python3 run_colab_ref2va.py --gpu G4 --dry-run
python3 run_colab_ref2va.py --gpu G4 --allow-token-upload
```
The real run refuses to start if the balance is under 5 units, a session already exists, or the rate is above 10.05 units an hour. It creates one VM and never re-creates it on its own. It pins the install, sends the token once, checks every weight's SHA256 and deletes the token. It runs seeds 801–810, samples VRAM every second, records exact `/history` times and validates each MP4. A 1950 s work limit plus a separate 2050 s stop watchdog cap the bill. On failure it saves the finished clips, deletes the token and stops the VM.
It's tied to my local paths, so it won't run on your machine as is. Give this article to Claude and ask for your own version.
## Deep dive: versions, per-seed numbers, WorldForge, Sol-H3 and the prompt
You can skip this section; everything you need to reproduce the run is above. It holds the full versions, every clip's numbers and the original prompt, for anyone (or any AI) adapting the setup.
### Exact versions and weight hashes
- ComfyUI commit `73c9bad4d21e7addbe1d13bc92eee0f1431b017d` (v0.37.0 core)
- `comfyui-minimax-h3-audio-T8` `649090681aa11b2082c2beeb09000d8ae939df1d`
- `ComfyUI-KJNodes` `e8e88f7c88e3f6205b122f5de87e69a09fbce5ac`
- `ComfyUI-Spectrum-MiniMax-H3` `5161f0457bc8c52535212d6783eee73f439e1537`
The four weights, by revision and SHA256:
| Repo / revision | File | SHA256 |
|---|---|---|
| [Momoking/Qwen3-VL-32B-Heretic-MiniMax-H3-NVFP4](https://huggingface.co/Momoking/Qwen3-VL-32B-Heretic-MiniMax-H3-NVFP4/tree/0a9486d17cfb20c1a7abc97118c4d95910b9b1f4) / `0a9486d17cfb20c1a7abc97118c4d95910b9b1f4` | `qwen3vl_32b_heretic_minimax_h3_nvfp4.safetensors` | `a166c7bbbe66a22065159e478335fee4a633c4a3e3bb34c8e8ac4cc91bf4996f` |
| [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/54472221d27c695fca9621b0c3ed52f06c4af707) / `54472221d27c695fca9621b0c3ed52f06c4af707` | `diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors` | `9255f52b6677845ad238f20dfaafa94727053694127ab7f255c048f0f9365779` |
| [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/54472221d27c695fca9621b0c3ed52f06c4af707) / `54472221d27c695fca9621b0c3ed52f06c4af707` | `vae/minimax_h3_audio_vae_fp32.safetensors` | `8e505d95dd1561d47abd43d4238fd40d9bb1ae9e147ed0a4cba778d76ae4db48` |
| [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/54472221d27c695fca9621b0c3ed52f06c4af707) / `54472221d27c695fca9621b0c3ed52f06c4af707` | `vae/minimax_h3_video_vae_fp16.safetensors` | `7c1f131492e7eddacaac9069a61b81bdd39de5cc96561e677c5eab1cdce5e522` |
### Every clip: time and peak VRAM
Seed 801 is the cold first clip. The rest reuse the cache.
| Seed | Time (s) | Peak VRAM (MiB) |
|---|---|---|
| 801 | 73.287 | 42,243 |
| 802 | 66.372 | 46,435 |
| 803 | 66.663 | 46,467 |
| 804 | 66.351 | 46,467 |
| 805 | 65.539 | 46,467 |
| 806 | 66.297 | 46,467 |
| 807 | 66.133 | 46,467 |
| 808 | 65.861 | 46,467 |
| 809 | 65.400 | 46,467 |
| 810 | 65.893 | 46,435 |
Warm median (802–810) is 66.133 s.
Prep before the first clip, about 288.7 s in total:
| Stage | Time |
|---|---|
| VM allocation | 3.98 s |
| Install ComfyUI, dependencies, pinned versions | 119.16 s |
| Download 42.47 GB of weights + SHA256 verify | 126.154 s |
### Why I didn't keep WorldForge
[WorldForge](https://github.com/designfuchen/worldforge) is what showed me the G4 was available, and that's the part I kept. Three things made me write my own runner instead:
- **It copies your Colab credentials to the VM.** `forge_local/app.py` writes the OAuth refresh token and client secret from your local `~/.config/colab-cli/token.json` into the VM's rclone config. It triggers when the token has the `drive.file` scope, and mine did. I disabled it with an early `return` in my local clone and confirmed there was no rclone config on the VM.
- **It rewrites your prompt.** `remote/diffusers_worker.py` appends a style suffix (ARRI, 85mm, golden hour, porcelain skin, bokeh) to ordinary prompts. It skips the suffix only if you set `raw_lens` or `disable_cinema_lens`, or your prompt already contains one of the lens or style keywords it recognizes. My night woodcut prompt came out as a bright, photo-style image.
- **It re-downloads weights on every boot** if you don't connect Google Drive. That was about half of my trial time.
### Sol-H3 on L4 vs G4: 241.63 s vs 20.00 s
Sol-H3 is my two-stage pipeline: an H3 4-step draft at 672×384, then a 3-step LTX-2.5 refine to 1344×768. A 2-second clip took 241.63 s on a Colab L4 (2026-09-29) and 20.00 s on a Colab G4 (2026-11-09), about 12.08x.
I ran it once on each GPU. The G4 run used current upstream node revisions, and I didn't rebuild the September L4 software environment, so not all of that gap is the GPU.
### The full prompt
All 10 clips share this prompt (B_en). The two lines of dialogue are written in Simplified Chinese inside the prompt:
```text
subject_definitions:
is the middle-aged Japanese constable in , wearing a white uniform and white peaked cap, with a short moustache and a Western-style police sabre at his waist.
is young Liao Tianding in , with his braid coiled inside a black headscarf, wearing a short indigo shirt, black waistband and black leg wraps, with a Western-style police sabre with a brass D-shaped guard at his waist.
is the nighttime Dadaocheng street corner and lanterns in , serving as the environment and spatial-layout reference. All characters and objects throughout the film are limited to those specified above; do not add, move or touch any other objects at any time.
controls the opening composition, character positions and scene state, and must be followed exactly at 0.00 seconds. Reference images lock identity, clothing and environment only; do not inherit their expressions. Fully preserve the identities, clothing and sabres of and , and the environment and spatial layout of ; re-perform expressions and actions as specified below.
Voice settings: (S1) corresponds to , the constable in : an adult male, medium-low voice, Mandarin, clearly audible, moderate speaking pace, clipped articulation; (S2) corresponds to , Liao Tianding in : a young male, medium voice, Mandarin, clearly audible, moderate speaking pace. Keep each character's voice consistent throughout the film. No reference audio.
detailed_description:
【Shot 1 | 0.0–10.125 seconds | Medium shot, two people facing each other】
【Subjects】, , . Taiwanese woodcut print style, indigo, vermilion, ochre, black carved lines and aged paper texture. Beneath lanterns at a nighttime Dadaocheng street corner during Japanese colonial rule, the constable stands in the left third of the frame and Liao Tianding in the right third, facing each other in a medium shot; both faces are visible in three-quarter profile, with empty hands hanging naturally at their sides. Warm lantern light and indigo night tones.
【Camera】Static camera, no cuts, no zoom. Ref2VA, a 10.125-second Mandarin dialogue between two people.
【Actions】
(0.0–0.5 seconds) Both keep their mouths closed and look at each other.
(0.5–3.0 seconds) (S1) looks at , juts his jaw slightly forward, and asks in a clipped manner using the voice specified above: [中文] 站住!你就是廖添丁? ; watches the constable with his mouth closed.
(3.0–4.0 seconds) Both keep their mouths closed and maintain eye contact.
(4.0–7.0 seconds) (S2) first waits until the constable finishes speaking, raises his chin, slightly lifts the corners of his mouth, and answers using the voice specified above: [中文] 是又怎样,你追得上我吗? ; watches Liao Tianding with his mouth closed.
(7.0–10.125 seconds) closes his mouth, turns around and leans forward preparing to run, without yet leaving his original position; keeps his mouth closed and stays in place watching him.
【Sound effects】Light night wind throughout, one distant dog bark; no music.
【Constraints】Stable facial features, no facial distortion, lip movements synchronized with dialogue, no visual jumps; consistent character appearance, clothing and lighting throughout. Only the two specified lines: only the current speaker's lips open and close, while the other person's mouth remains closed; do not add, repeat or rewrite dialogue, and do not include narration, humming or any other human vocal sounds; no subtitles, text, garbled characters or speech bubbles in the image; no new characters or props, no drawing of sabres, no swapping positions. All dialogue ends by 7.0 seconds, and there is no dialogue during the final 1 second.
```
### How I measured
- **Per-clip time** is `execution_success` minus `execution_start` from ComfyUI's `/history`. It includes text encoding, sampling, decoding and saving, and excludes downloading the MP4.
- **Prep time** runs from the UTC second the session was created to the first `execution_start`, accurate to about ±1 s.
- **VRAM** is the peak of per-second `memory.used` samples from nvidia-smi. Spikes shorter than a second can be missed.
- **Speech** was checked with CPU speech-to-text on clips 801 and 810 only. No full character error rate.
## Also in this series
- [Part 16: Pika-H3-Flex on an RTX 5090: 2x faster MiniMax-H3, and a Blender blockout makes the camera obey](/en/blog/pika-h3-flex-rtx5090-whitebox-orbit)
- [Part 1: Running MiniMax-H3 on one RTX 5090: four files, 31.7 GB, 175 s per talking clip](/en/blog/minimax-h3-nvfp4-rtx5090)
---
# [AI Workflow] A Self-Running AI News Shorts Pipeline on Local Models: Harness Changes Cut Director Time From 80.6 to 5–10 Minutes
URL: https://ai-muninn.com/en/blog/local-ai-news-video-pipeline
Date: 2026-11-09
Series: AI Workflow (Part 30)
I built a pipeline that makes news shorts on its own: 4 runs a day, each producing one Chinese and one English video narrated in my own voice, uploaded to YouTube. The model that writes never reviews its own work. Only factual errors and adult content block a video. The local DeepSeek V4.1 Flash director went from 80.6 minutes to 5–10 minutes per video without changing the model, just by changing the harness around it to remove repeated work. After about 240 shorts, more volume didn't mean more views per video, so I cut to 4 stories a day.
## Intro
Writing articles always felt like it was missing something. I wanted to try animation. After I finished one animated video by hand, the next thought was obvious: could the AI make these on its own?
Three things stood in the way. Every video needed my review before upload. A local model acting as director took 80 minutes per video. And the caption-news visuals were barely passable.
This post covers the pipeline I ended up with, the scores I used to pick styles and directors, how the director went from 80.6 minutes to 5–10, and what the view counts told me. The second half is a deep dive with the full harness version table and six failures. You can skip it.
## Four runs a day, and the model that writes never grades its own work
It runs at 09:36, 13:36, 17:36 and 21:36 Taipei time. Each run does this:
```
topic pick (RSS / official blogs / X / Hacker News)
→ research
→ script DeepSeek V4.1 Flash ("DS4.1")
→ fact-check MiniCPM-V 4.7 + Qwen3.8-Flash-Next
→ layperson-readability check
→ English translation
→ narration in my voice VoxCPM2
→ director builds visuals (per style)
→ upload to YouTube: one Chinese video + one English video
```
The channel is AI-Muninn. DS4.1 runs on two [DGX Spark](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) boxes with tensor parallel = 2, which I wrote up in [DeepSeek V4.1 Flash on two DGX Sparks](/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold). Narration uses [VoxCPM](https://huggingface.co/openbmb/VoxCPM2), covered in [VoxCPM2 narration for news shorts](/en/blog/voxcpm2-news-shorts-narration-2080ti).
The rule I care most about: the model that writes never grades its own work. When I let DS4.1 review its own directing, it signed off on an opening that was just an ellipsis. On a real run, a different model caught that the opening and the closing joke didn't match. So fact-checking is done by two models that didn't write the script.
That's how I removed myself from the review step. There are only two hard gates, and either one drops the video: a factual error, or adult content. Everything else (visuals, subtitles, pronunciation) gets fixed automatically with a warning.
## Styles rotate, and only a visual score decides which ones stay
Each video gets a random style, never the same one twice in a row: caption-news, stickman motion, collage, or whiteboard. I added layered flat animation as a trial on Nov 9.
To compare them, Qwen3.8-Flash-Next blind-scores the visuals only. Four items add up to 75 points, scaled to 100. Re-scoring the same video moves the number by 4–6 points, so my rule is that a gap under 10 means no winner.
Look at the gap between caption-news and everything else:
| Style | Visual score |
|---|---|
| caption-news | 61–68 |
| stickman motion | 84 |
| collage | 84 |
| whiteboard (old / new) | 74.7 / 81.3 |
| layered flat animation (trial) | 84.0 |
The new whiteboard scored higher, but a pairwise comparison came out a tie, so I didn't switch. Caption-news trails by more than the noise. As of Nov 9, it's only a fallback.
Stickman, collage and caption-news all have public videos, so you can watch the real output:
The fallback is part of a rule I call "a finalized script always ships." If a whole style fails, the video falls back to caption-news. If one scene's animation fails, that shot becomes a still image with a slow push-in.
## DS4.1 directs stickman, Opus directs caption-news
I ran the stickman style with the same script and the same narration through three directors. All three got 7 of 7 shots animated.
| Director | Score | Time |
|---|---|---|
| DS4.1 | 89.3 | 24 min 56 s |
| Sonnet | 84.0 | 19 min 31 s |
| Codex | 82.7 | — |
A 5.3-point gap is inside the noise, so I also ran pairwise comparisons, with the left/right order swapped between two passes. The order held both times: DS4.1 > Sonnet > Codex. The local model stays on stickman.
For caption-news I compared Opus and DS4.1 on 3 stories. Opus scored 77.8 vs 72.0, a gap of under 6 points, again within noise. Pairwise, Opus won 2 and tied 1. I also blind-picked, and chose Opus all 3 times, though they felt very close to me. Opus averaged 632 s vs DS4.1's 820 s, and used 42–61 turns vs DS4.1's 16–24.
So Opus now directs caption-news, with DS4.1 as the fallback.
## The harness took the local director from 80.6 minutes to 5–10
By harness I mean everything around the model: the prompt, the cheat sheet, the tools, the checkers, the permissions. The model is the same throughout this section.
With the original harness, DS4.1 as whiteboard director took 80.6 minutes and 116 turns per video. Sonnet with the same old harness took 7.4 minutes. That looked like a capability gap. It wasn't.
The event logs showed where the time went, and almost all of it was repeats:
- computing seconds by hand inside its thinking
- re-reading the same file
- viewing one image at a time
- editing the same spot over and over
The method was mechanical. Write down the target trajectory. Turn the event log into an action sequence. Build a table of where it deviates from the target. Each round, remove one category of deviation, the most expensive one. Record every version and give it a git tag. Decide the stop condition before you start.
Five rounds later, on the same story, DS4.1 was at 5–10 minutes per video. The biggest single drop came from a timing calculator tool, so the model stopped doing arithmetic in its thinking: 51.9 minutes down to 13.6. The full table is in the deep dive.
I limited the harness to removing wasted work and catching clear defects. The model still decides what to draw.
## Twenty videos a day didn't get more views per video, so I cut to 4
I pulled the numbers for about 240 news shorts since late October from the YouTube API on Nov 9.
Daily output ranged from 1 to 20 videos. Views per video didn't move with it: on a 20-video day, each video did about as well as on a light day. The best performer in the same period wasn't a short at all. It was my own long hardware experiment video.
So the pipeline now makes 1 story per run, at most 4 stories (8 videos, Chinese and English) a day. The effort goes into quality.
## Deep dive: harness versions, lessons, and six failures
You can use everything above without reading this. It's the full record, mostly for anyone (or any model) trying to do the same thing.
### Harness versions
All versions ran on the same story, PaperPilot. Time is minutes per video.
| Version | Change | Minutes | Turns |
|---|---|---|---|
| baseline | original harness | 80.6 | 116 |
| h1 | single file, inlined data, cheat sheet, one check that lists all defects at once | 51.9 | 91 |
| h2 | timing calculator tool, no hand math in thinking | 13.6 | 26 |
| h3 | an agent-framework extension locks tools during planning | 9.5 | 21 |
| h4 | coordinates and text boxes computed by code | 10.9 | 33 |
| h5 | checker says which label to shrink, and to how many characters | 5.4 | 16 |
h4 was slower than h3 on this run. That's one reason I describe the result as 5–10 minutes rather than quoting 5.4.
### Lessons
**Prompt rules don't hold; permissions do.** I wrote "only check twice" in the prompt. The model said it checked 2 times. The log showed 7. Now the harness enforces the limit through tool permissions instead.
**A short cheat sheet hides features.** In h3 I banned reading the engine source and gave a short cheat sheet. DS4.1 then didn't know the pen, eraser and magnet existed. Sonnet used 6–9 feature types; DS4.1 used 2. In h6 I gave it the full cheat sheet, and it started using hatch fill and dashed lines.
**Warnings get gamed.** In h7 I added a warning when the drawable area used less than 50% of the height. The model added a decorative underline to get past it.
**Same-story reruns lie.** Rerunning the same story hit the server's prefix cache, which skews the timing. Always test on a new story.
**Test on production material.** Test scripts must be real production scripts, not ones I picked myself.
**Thinking level.** In my blind comparison, I preferred high-thinking runs that actually finished a revision round.
### Six failures
**1. Near-black frames in a published video.**
What happened: the English video about Grimes had 5.875 s of near-black footage in a 51.88 s video, 11% of it.
How it was found: after publishing, by the daily self-review.
Fix: an automatic black-frame check that redoes only the affected shot. The video was replaced.
**2. A subtitle fix broke two layouts.**
What happened: to stop subtitles overlapping, I shrank the whole main frame. That broke the caption-news and whiteboard layouts.
How it was found: I noticed while watching.
Fix: subtitle settings are now per style.
**3. Two mispronounced words.**
What happened: the narration mispronounced two Chinese words, 擴張 ("expansion") and 空殼 ("empty shell").
How it was found: I heard it.
Fix: entries in the pronunciation lexicon for both.
**4. Optional jokes disappeared.**
What happened: I made the closing joke optional. 0 of 55 videos had one.
Fix: a joke is the default for non-sensitive topics. In 10 of 10 reruns there was a joke, and all 10 passed the source check.
**5. Fact-check caught an allegation turned into a fact.**
What happened: a story about Nvidia investigating its CEO's relationship with a woman. The source said a memo alleged she may have been recruited to watch him. The script said "she is a spy."
How it was found: the fact-check blocked it.
Fix: the story was dropped. This is the gate working as designed.
**6. A time limit set without looking at history.**
What happened: the topic-pick step had a 35 s time limit that I set without checking past runs.
How it was found: the longest historical run was 420 s.
Fix: the limit is now 600 s, about 1.4x the longest run.
---
# [DGX Spark] DGX Spark and GX10 prices in Taiwan: up 80% in a year, flat since August
URL: https://ai-muninn.com/en/blog/gb10-taiwan-price-history
Date: 2026-11-04
Series: DGX Spark (Part 51)
An ASUS Ascent GX10 with a 1TB SSD cost **NT$97,900** at Coolpc, a big Taipei PC retailer, on 2025-11-01. On 2026-11-04 it is **NT$175,900**, up about **80%**. The other GB10 boxes I tracked rose **47% to 76%**. Most of the GX10 rise came in two jumps, late April and mid-June to early July, and nothing that stayed listed has gone up since the August 18 snapshot. NVIDIA blamed memory shortages when it raised the US DGX Spark price in February. Cheapest today: a reseller GX10 1TB at **NT$166,900**, or a DGX Spark 4TB at **NT$199,500**. Caveat: the history comes from one store's Wayback snapshots.
---
## Preface
If you are pricing a GB10 box in Taiwan, the number you find in a forum thread or an unboxing post is probably wrong. Coolpc's own unboxing post still shows NT$99,900 to NT$139,900. That is January 2026 pricing.
Most of this series is benchmarks on the two GX10s on my desk. This one is about what the box costs now, how it got there, and where to buy it for less. I pulled 25 Wayback Machine snapshots of Coolpc's quote page, from November 2025 to the end of October 2026, and checked the other stores against it.
## What a GB10 box costs in Taiwan in November 2026
Every box here uses the same GB10 chip with 128GB of unified memory. They differ by brand, SSD size, and whether the SSD is Gen4 or Gen5. Nothing else in this comparison changes what model you can run.
Coolpc prices on 2026-11-04, same as on 11-01. Read the 1TB rows against each other, then the 4TB rows:
| Box | SSD | Coolpc, NT$ |
|---|---|---|
| ASUS Ascent GX10 | Gen4 1TB | 175,900 |
| MSI EdgeXpert | Gen4 1TB | 169,000 |
| NVIDIA DGX Spark | Gen4 4TB | 199,500 |
| MSI EdgeXpert | Gen5 4TB | 209,900 |
| ASUS Ascent GX10 | Gen5 4TB | 245,900 |
Coolpc also lists the Acer ALTOS BrainSphere 4TB at NT$210,000 and the Gigabyte AI TOP ATOM G4 at NT$219,000 (2TB) and NT$239,000 (4TB).
The big Taiwanese online stores, PChome, momo, Yahoo, EcLife and Rainbow 3C, all sit at NT$175,900 for the GX10 1TB. For the 4TB, Yahoo and EcLife are at NT$245,900 and momo is NT$245,000. Shopping around between them gets you almost nothing.
## GB10 prices rose 47% to 80% in a year, mostly in two jumps
Coolpc prices a year ago vs. today:
| Box | Then, NT$ | Now, NT$ | Change |
|---|---|---|---|
| ASUS GX10 1TB | 97,900 | 175,900 | +80% |
| MSI EdgeXpert 1TB | 97,900 | 169,000 | +73% |
| ASUS GX10 4TB (first seen Jan 2026) | 139,900 | 245,900 | +76% |
| MSI EdgeXpert 4TB | 134,505 | 209,900 | +56% |
| NVIDIA DGX Spark 4TB | 135,345 | 199,500 | +47% |
The two 4TB "then" prices are for Gen4 SSD versions; both are Gen5 today. The GX10 4TB switched to Gen5 between the March 25 and April 16 snapshots without a price change; it stayed at NT$142,900. The MSI 4TB switched between January 7 and February 17 and went up NT$4,000 (145,900 to 149,900) when it did. So the big jumps after that are price increases on the same Gen5 spec, not a spec change.
The GX10 1TB did not climb steadily. It went from NT$102,900 to NT$125,900 between the April 16 and April 28 snapshots, then from NT$125,900 to NT$175,900 between June 12 and July 8. Those two jumps are NT$73,000 of the NT$78,000 rise for the whole year. It has not moved since July 8.
The DGX Spark 4TB rose in three steps instead: NT$144,900 by March 7, NT$164,850 by March 25, and NT$199,500 somewhere between July 31 and August 18.
Why did it happen? The snapshots show when, not why. In the US, NVIDIA raised the DGX Spark Founders Edition from $3,999 to $4,699 in February 2026 and [cited memory shortages](https://www.tomshardware.com/desktops/mini-pcs/nvidia-dgx-spark-gets-18-percent-price-increase-as-memory-shortages-bite-founders-edition-now-usd4-699-up-from-usd3-999). Taiwan's increases were much larger than that.
Is it still going up? Nothing that stayed listed has risen since the August 18 snapshot. The only drop among the five boxes I tracked is the MSI EdgeXpert 1TB, from NT$169,900 to NT$169,000 in October.
## Cheapest GB10 in Taiwan: a reseller GX10 or MSI for 1TB, the DGX Spark for 4TB
Savings are against the same-size ASUS GX10 at the big stores. Look at the last column to see what the discount costs you:
| Option | NT$ | Saves | Trade-off |
|---|---|---|---|
| GX10 1TB from iOPEN (reseller, via Feebee 11-01) | 166,900 | 9,000 | Smaller reseller |
| MSI EdgeXpert 1TB | 169,000 | 6,900 | None, both are Gen4 1TB; brand only |
| NVIDIA DGX Spark 4TB (Coolpc) | 199,500 | 46,400 | Gen4 SSD instead of Gen5 |
| MSI EdgeXpert 4TB | 209,900 | 36,000 | None on SSD, also Gen5 |
Feebee is a Taiwanese price-comparison site. It turns up a long tail beyond the iOPEN listing: friDay at NT$171,593, a Shopee private seller at NT$174,000, and the DGX Spark at Coupang for NT$192,000 to NT$197,500 and at iOPEN for NT$194,888, a few thousand under Coolpc. Feebee data can lag by hours to days, so treat those as leads. Before you pay a smaller reseller, confirm it is in stock and ask who handles the warranty.
For 4TB, the DGX Spark is the obvious buy unless you need a Gen5 SSD.
## Don't wait for the 64GB DGX Spark at current pricing
A 64GB version went on sale in the US on October 23. It starts at $4,999, it is sold only through partners (Acer, ASUS, Dell, Gigabyte, HP, MSI), and there is no Founders Edition. [HotHardware has the details](https://hothardware.com/news/nvidia-dgx-spark-64gb-release). The 128GB version moved to about $6,950 at the same time, by most reports; HotHardware says $6,995.
Compare that with the launch price. $4,999 for 64GB is $1,000 more than the 128GB version cost at launch, and you get half the memory. Coolpc listed zero 64GB units on 2026-11-04, so there is no Taiwan price to compare yet.
Memory is the whole point of these boxes. Every number in my [8-model GB10 benchmark](/en/blog/dgx-spark-ollama-benchmark-8-models) was measured on 128GB. Buy the 128GB box.
## RTX Spark vs DGX Spark: more bandwidth, no ConnectX, and I'd still pick GB10
RTX Spark (N1X) is NVIDIA's chip for Windows on Arm laptops and desktops. Laptops from Microsoft, Dell, HP, Lenovo, MSI and ASUS launched the week of 2026-10-16. x86 apps run through Microsoft's Prism emulator. GB10 boxes run Linux (DGX OS).
On paper RTX Spark has the edge in bandwidth: LPDDR5X-9400 on a 256-bit bus, 300 GB/s, against GB10's LPDDR5X-8533 at 273 GB/s. That is about 10% more. It goes up to 128GB. [ServeTheHome reports](https://www.servethehome.com/nvidia-rtx-spark-n1x-launch-overview-nvidia-arms-windows/2/) that 128GB systems reserve 62GB for the GPU by default and up to 96GB. That is a dedicated carveout, not a hard ceiling: [NVIDIA's porting guide](https://docs.nvidia.com/rtx-spark/rtx-spark-porting-guide/latest/uma/umacuda.html) says CUDA allocations spill into shared memory once it fills, at some cost in speed.
The bigger difference is networking. None of the RTX Spark machines I checked has built-in ConnectX; the ASUS ProArt P14 laptop, for example, gives you three 40Gbps USB-C ports and Wi-Fi 7. GB10 boxes have ConnectX-7 with two QSFP ports at 200 Gbps each, and NVIDIA supports linking two to four units, two or three cabled directly and four through a switch ([Cluster Assistant docs](https://docs.nvidia.com/sync/latest/cluster-assistant.html)). I run two GX10s linked that way. That is how I ran [DeepSeek V4.1 Flash with TP=2 across two Sparks](/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold), about 20% faster single-stream than Qwen3.8. A model too big for one box needs that link.
Taiwan prices for 128GB RTX Spark machines on 11-04:
- Surface Laptop Ultra 128GB/1TB: NT$211,889 at PChome, the cheapest
- ASUS ProArt P14 128GB/1TB: NT$249,999
- ASUS ProArt P16 128GB/2TB: NT$269,999 (an open-box unit at Coolpc is NT$264,999)
The cheapest of those is NT$35,989 more than a GX10 1TB. The announced desktops are the Surface RTX Spark Dev Box (from US$5,999.99) and the ASUS ProArt GR1X mini PC, neither with a Taiwan price yet.
My call: RTX Spark has slightly more bandwidth, but without ConnectX to link machines it is probably worse than DGX Spark for running big models.
## Check GB10 prices yourself on Coolpc, Feebee and the Wayback Machine
Three pages cover it:
1. **Coolpc's quote page**: https://www.coolpc.com.tw/evaluate.php . It is one long page of parts. Press Ctrl+F and search for GB10.
2. **Feebee**: https://feebee.com.tw/s/GB10/ . This covers the other stores, including Shopee mall listings, with no login.
3. **History**: https://web.archive.org/web/2026*/coolpc.com.tw/evaluate.php . Open any snapshot and search for GB10 the same way.
If you would rather script it, the command is in the deep dive below. The page is Big5 encoded, so the command converts it to UTF-8 first.
When you see a price quoted somewhere, check its date against the table below. If you are buying, the setup steps are in my [DGX Spark deployment guide](/en/blog/dgx-spark-deployment-guide).
---
## Deep dive: the full Coolpc price table, when each SKU jumped, and how I pulled it
You can skip this section. It has the full chart data, why I couldn't get price history from the other stores, and the command I used to read Coolpc's page.
### Full Coolpc price table, 15 of the 25 snapshot dates
All prices are NT$ at Coolpc, read from Wayback Machine snapshots of evaluate.php. "-" means the item was not on the page in that snapshot. GX10 1TB, MSI 1TB and Spark 4TB are Gen4 throughout. The GX10 4TB is Gen4 through 2026-03-25 and Gen5 from 04-16, at the same price; the MSI 4TB is Gen4 through 2026-01-07 and Gen5 from 02-17, NT$4,000 higher.
```text
date GX10 1TB GX10 4TB Spark 4TB MSI 1TB MSI 4TB
2025-11-01 97,900 - 135,345 97,900 134,505
2025-12-10 97,900 - 135,345 107,900 145,900
2026-01-07 99,900 139,900 135,345 107,900 145,900
2026-02-17 99,900 139,900 135,345 107,900 149,900
2026-03-07 102,900 142,900 144,900 107,900 149,900
2026-03-25 102,900 142,900 164,850 107,900 149,900
2026-04-16 102,900 142,900 164,850 107,900 149,900
2026-04-28 125,900 159,900 164,850 107,900 149,900
2026-05-20 125,900 159,900 164,850 119,900 157,900
2026-06-12 125,900 245,900 164,850 - -
2026-07-08 175,900 245,900 - - 209,900
2026-08-18 175,900 245,900 199,500 - 209,900
2026-10-01 175,900 245,900 199,500 169,900 209,900
2026-10-10 175,900 245,900 199,500 169,000 209,900
2026-10-31 175,900 245,900 199,500 169,000 209,900
```
Coolpc's live page on 2026-11-04 matches the 10-31 row.
### When each SKU jumped, by snapshot interval
Each step below happened somewhere between the two snapshot dates listed. For the GX10 1TB the intervals are the tightest the 25 snapshots allow; for the rest, they are read off the 15 rows above, so the real window may be narrower.
**ASUS GX10 1TB**, NT$97,900 to NT$175,900:
- 99,900 between 2025-12-10 and 2026-01-07
- 102,900 between 02-17 and 03-07
- 125,900 between 04-16 and 04-28 (+23,000)
- 175,900 between 06-12 and 07-08 (+50,000)
- Flat since 07-08
**ASUS GX10 4TB**, NT$139,900 to NT$245,900:
- First listed by 2026-01-07 at 139,900
- 142,900 between 02-17 and 03-07
- 159,900 between 04-16 and 04-28
- 245,900 between 05-20 and 06-12 (+86,000, the largest single step in the table)
**NVIDIA DGX Spark 4TB**, NT$135,345 to NT$199,500:
- 144,900 between 02-17 and 03-07
- 164,850 between 03-07 and 03-25
- 199,500 between 07-31 and 08-18 (the 07-31 snapshot, not in the table, still shows 164,850)
**MSI EdgeXpert 1TB**, NT$97,900 to NT$169,000:
- 107,900 between 2025-11-01 and 12-10
- 119,900 between 04-28 and 05-20
- Missing from 06-12 through 08-18
- 169,900 by 10-01
- 169,000 by 10-10 (−900, the only drop among these five)
**MSI EdgeXpert 4TB**, NT$134,505 to NT$209,900:
- 145,900 between 2025-11-01 and 12-10
- 149,900 between 01-07 and 02-17
- 157,900 between 04-28 and 05-20
- Missing from 06-12
- 209,900 by 07-08
Both ASUS models stepped up in the same April window, and the GX10 4TB took its big summer step one snapshot interval before the GX10 1TB did.
### Why the history comes only from Coolpc
I tried to build the same history from other stores and hit a wall at each one:
- **PChome**: the Wayback snapshots are JavaScript shells. The page frame is archived; the price never loads.
- **Shopee**: requires login.
- **momo**: search results don't render in an automated browser.
- **Feebee**: current prices only, no per-item history.
- **BigGo**: has a price-history chart, but it is drawn dynamically. All I could pull from it were undated labels like "price drop $2,000".
Coolpc's evaluate.php has every part and price in the HTML itself (the curl command below reads it without a browser), so the Wayback snapshots kept the prices. The cross-store comparison in the main section is current prices only.
### The command that pulls today's GB10 prices from Coolpc
The page is Big5 (CP950), so convert it to UTF-8 before you grep.
```bash
curl -s https://www.coolpc.com.tw/evaluate.php -o coolpc.html
iconv -f CP950 -t UTF-8 coolpc.html | grep -o '[^>]*GB10[^<]*'
```
Output on 2026-11-04:
```text
ASUS Ascent GX10 GB10 / 128G / Gen4 1TB SSD, $175900 ◆ ★
ASUS Ascent GX10 GB10 / 128G / Gen5 4TB SSD, $245900 ◆ ★
MSI EdgeXpert GB10 / 128G / Gen4 1TB SSD, $169000 ◆ ★
MSI EdgeXpert GB10 / 128G / Gen5 4TB SSD, $209900 ◆ ★
NVIDIA DGX Spark GB10 / 128G / Gen4 4TB SSD, $199500 ◆ ★
ALTOS BrainSphere GB10 F1 GB10 / 128G / Gen4 4TB SSD, $210000 ◆ ★
GIGABYTE AI TOP ATOM G4 GB10 / 128G / Gen4 2TB SSD, $219000 ◆ ★
GIGABYTE AI TOP ATOM G4 GB10 / 128G / Gen4 4TB SSD, $239000 ◆ ★
```
The `$` is NT$.
---
*What these boxes run once you have one: [8 models benchmarked on a DGX Spark](/en/blog/dgx-spark-ollama-benchmark-8-models) · Setting one up: [DGX Spark deployment guide](/en/blog/dgx-spark-deployment-guide) · Why the ConnectX link matters: [DeepSeek V4.1 Flash on two DGX Sparks](/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold)*
---
# [Benchmark] Idol Image-to-3D on a Modded RTX 2080 Ti: Fix the cuDNN Crash, 84.8 s → 72.7 s
URL: https://ai-muninn.com/en/blog/idol-image-to-3d-2080ti
Date: 2026-11-04
Series: 改裝 2080 Ti 22G (Part 28)
Idol (speridlabs, Apache-2.0) turns one image into a 3D Gaussian splat. Its speed table stops at Ampere, so I ran it on a modded RTX 2080 Ti 22GB. The default run crashes: the optimize path forces cuDNN attention, which only has kernels for sm80 and up. `--no_optimize` works at 84.8 s per image. A one-line patch that skips cuDNN attention below compute capability 8.0 keeps torch.compile and gets **72.7 s** (−14%), mostly from compile. An RTX 5090 does 14.9 s. PyTorch peak VRAM is 6894 MiB. The hidden sides are plausible guesses, not reconstructions.
---
Speed tables for new models usually stop at the oldest card the authors had lying around. For [Idol](https://huggingface.co/speridlabs/idol), that card is an RTX 3080 at 46.2 s per image. Nothing older is listed.
Idol takes one picture of an object and outputs a 3D Gaussian splat: a cloud of small, colored, semi-transparent blobs that renders as a 3D object from any angle. It's Apache-2.0, it writes a standard 3DGS `.ply`, and the card lists a 7.2 GB VRAM peak. That leaves plenty of room on a 22GB card, so I tried it on my modded RTX 2080 Ti 22GB.
The default run crashed about 8 seconds in. This post covers the setup (including two gated encoders), the crash, a one-line patch that runs it 14% faster than the official workaround, and what the output actually looks like. [Part 27](/en/blog/turing-unlock-2080ti-fp16-tensor-core) was about the FP16 tensor cores on these cards; this one is about a new model that never planned for Turing at all.
Three objects, each made from a single image: a figure of a woman in traditional Chinese dress, an axolotl toy, and a generated image of an RTX 2080 Ti. The front of each matches its input. The backs are where the model is guessing, which comes up again in the results.
## What you need: a CUDA GPU and access to two gated encoders
Idol's weights are about 3 GB and download from Hugging Face on first run. It also pulls two image encoders from other repos, and both are gated:
- [facebook/dinov3-vith16plus-pretrain-lvd1689m](https://huggingface.co/facebook/dinov3-vith16plus-pretrain-lvd1689m)
- [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev) (only its VAE is used)
Request access on both pages and log in with `hf auth login`. My DINOv3 request came through; FLUX.2-dev is where I got stuck, covered two sections down.
The model card lists the parts: a 370.6M DiT that does the generation, an octree decoder and a Gaussian decoder, BiRefNet for background removal, DINOv3 ViT-H+/16 and the FLUX.2 VAE for reading the image. About 1.80B parameters in total, mostly FP16 and bf16.
## Install with uv
I used a separate uv environment with Python 3.11 and the CUDA 12.8 build of PyTorch 2.11.0, which still ships sm_75 (Turing) kernels:
```bash
git clone https://github.com/speridlabs/idol-sdk.git
cd idol-sdk
uv venv --python 3.11
source .venv/bin/activate
uv pip install torch==2.11.0 torchvision==0.26.0 --index-url https://download.pytorch.org/whl/cu128
uv pip install -e .
```
The SDK uses `flash-attn` if it's installed and PyTorch's `scaled_dot_product_attention` otherwise. I didn't install `flash-attn`; everything below runs on PyTorch SDPA.
## A README that returns 200 doesn't mean you have access
My first check on FLUX.2-dev was its README, which came back 200. That looked like access, but the README isn't gated. The files inside `vae/` are, and those returned 403 because I hadn't accepted the terms yet.
Check a file inside `vae/`, not the README:
```bash
HF_TOKEN=$(cat ~/.cache/huggingface/token) # written by hf auth login
for f in README.md vae/config.json; do
printf '%s ' "$f"
curl -sL -o /dev/null -w '%{http_code}\n' -H "Authorization: Bearer $HF_TOKEN" \
https://huggingface.co/black-forest-labs/FLUX.2-dev/resolve/main/$f
done
```
```
README.md 200
vae/config.json 403
```
If `vae/config.json` gives 200, you're done and can skip the next section.
## No FLUX.2-dev access? Point the config at the FLUX.2-klein-4B VAE
The SDK reads the encoder repos from the `image_encoders` block of the weights' `config.json` and loads the VAE with `AutoencoderKLFlux2.from_pretrained(repo, subfolder="vae")`. The `vae/` folder of [FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B) downloaded without accepting the FLUX.2-dev terms, so I downloaded Idol's weights to a local folder and changed one key:
```bash
hf download speridlabs/idol --local-dir weights
```
```diff
- "flux2_vae": "black-forest-labs/FLUX.2-dev"
+ "flux2_vae": "black-forest-labs/FLUX.2-klein-4B"
```
Then pass `--weights weights` on every run.
What I checked: the klein VAE uses the same `AutoencoderKLFlux2` class, 32 latent channels, block channels `[128, 256, 512, 512]` and patch size `[2, 2]`. The dev file is 336,213,556 bytes and the klein file is 168,120,878 bytes, almost exactly half, which fits FP32 vs bf16. The SDK casts the VAE to bf16 on load either way.
Then I checked the weights. I later accepted the FLUX.2-dev terms, downloaded both files and compared them tensor by tensor. All 251 dev tensors, cast to bf16, are bit-identical to the klein ones, and the two configs differ only in the diffusers version string. So the klein swap gives exactly the output of the official setup.
## Run it: one image in, a .ply out
```bash
python -m idol.sample --image figure.png --mode synthetic --weights weights --out outputs
python -m idol.sample --image photo.jpg --mode real --weights weights --out outputs
```
`--mode synthetic` (the default) is for renders and generated images, and crops so the object fills 1/1.2 of the frame. `--mode real` is for photographs and leaves more room (1/1.7). `--image` also takes a folder.
For each image you get three files: `name.ply` (the splat), `name_input.png` (what the model saw after background removal and cropping) and `name_camera.json` (the camera it predicted for the input).
On a 2080 Ti, that command crashes.
## On Turing the default run crashes: cuDNN attention needs sm80+
By default Idol turns on what it calls faster sampling. One part of that switches attention to cuDNN for the whole sampling loop, on every GPU. cuDNN's attention kernels cover compute capability 8.0 (Ampere) and up; the 2080 Ti is 7.5. About 8 seconds in:
```
UserWarning: cuDNN MHA only supports gpu architectures in the range [sm80, sm121]. Attempting to run on a sm 7.5 gpu.
...
torch._dynamo.exc.TorchRuntimeError: RuntimeError when making fake tensor call
... got RuntimeError('No available kernel. Aborting execution.')
```
The official switch is `--no_optimize`, which turns off all of faster sampling. That works: **84.8 s per image**. But it also throws away `torch.compile`, which works fine on Turing.
## The one-line patch: only use cuDNN attention on sm80 and up
The backend switch is in `idol/pipeline.py`. I made it conditional on the GPU's compute capability and left the rest of the optimize path alone:
```diff
diff --git a/idol/pipeline.py b/idol/pipeline.py
index 677789c..5489a4b 100644
--- a/idol/pipeline.py
+++ b/idol/pipeline.py
@@ -134,7 +134,8 @@ class IdolPipeline:
yield
return
backend, tf32 = layers.ATTN_BACKEND, torch.backends.cuda.matmul.allow_tf32
- layers.ATTN_BACKEND = 'sdpa_cudnn'
+ if torch.cuda.get_device_capability(self.device) >= (8, 0):
+ layers.ATTN_BACKEND = 'sdpa_cudnn'
torch.backends.cuda.matmul.allow_tf32 = True
try:
yield
```
Ampere and newer cards behave exactly as before. On Turing, attention stays on plain PyTorch SDPA, and `torch.compile` plus the batched guidance passes still run. Run without `--no_optimize` after applying it.
Result: **72.7 s per image**, 14% less time than `--no_optimize`. The first image in each process is slower (84.8 s) because it compiles; that machine already had an Inductor cache, so a fresh setup takes longer.
## Speed: 72.7 s on the 2080 Ti, 14.9 s on an RTX 5090
All rows are 50 steps and 262,144 Gaussians. The 2080 Ti rows and the 5090 optimize row are warm medians; the 5090 no-optimize row is the median of three images including the first. Each time covers the full request: background removal, both encoders, sampling and decoding. Read the 2080 Ti rows against each other; the 5090 rows are there for scale.
| GPU | Setting | Seconds per image |
|---|---|---:|
| 2080 Ti 22GB | default optimize | crashes |
| 2080 Ti 22GB | `--no_optimize` | 84.8 |
| 2080 Ti 22GB | one-line patch | **72.7** |
| RTX 5090 (WSL2) | default optimize | 14.9 (official: 14.1) |
| RTX 5090 (WSL2) | `--no_optimize` | 16.9 |

My 5090 result lands 5.5% above the official 14.1 s, with the klein VAE and 8 images that may not be the official 8. Close enough that the setup isn't hiding a big problem.
The 2080 Ti card shares its GPU with other services, so treat its numbers as "what a busy card does", not a clean lab figure. The deep dive has the details.
## VRAM: 6894 MiB in PyTorch, about 11 GB total in nvidia-smi
Two numbers, and both matter:
- **PyTorch peak allocation: 6894 MiB** on the 2080 Ti, which matches the card's 7.2 GB peak.
- **Total VRAM increase in nvidia-smi: 10,644 MiB.** This likely also counts the model, the CUDA context and memory PyTorch reserved but didn't use. It's the number to check against the free memory on a card that runs other things.
`--dinov3_dtype fp32` raised those to 8595.5 MiB and 12,236 MiB, roughly the 1.7 GB extra the card mentions, with no clear speed change (one image each). On the RTX 5090 the PyTorch peak was 5104 MiB.
## Results: the front matches, the back is a guess
Each image below has the input on the left (after Idol's background removal, which leaves it on black) and four views of the output, turned 90° at a time.

The figure in traditional dress came out best. The back of the robe and the hair bun are complete and consistent, but the face and the embroidery are noticeably softer than in the input.

The 2080 Ti image shows the limit. The front is right: three fans, the bracket, the gold fingers. The back has no backplate at all. The model filled it with a gold, speckled slab and bent the edges a little.

The axolotl kept its gills and eyes and grew a long tail that the input never clearly shows.

The strawberry reads as a strawberry from every side. The back is paler, and the leaf positions there are the model's guess.
Across the four objects I didn't see holes or floating specks. Among the 49 official examples I processed, a few backs came out clearly wrong: a football figure grew a long black sheet, a marble logo got a large black sheet hanging behind its base, and a bread loaf came out flatter than the photo.
## Which flags to change
- `--steps 25`: halves the time (44.0 s without optimize, 38.2 s with the patch, 7.64 s on the 5090). The back of the robe is still complete; sleeves and hem shift a little, and the white patches on the card's back get more visible.
- `--num_gaussians 1048576`: four times the Gaussians, a few seconds more (87.6 s without optimize; 15.5 s on the 5090). At the image sizes in this post I couldn't see more detail. It might pay off if you zoom in.
- `--dinov3_dtype fp32`: about 1.8 GB more PyTorch peak, no clear speed difference (one image each), no visible quality gain.
- `--seed`: in my runs, the same seed on the same machine gave a bit-identical `.ply`. Change it to get a different guess for the back.
- `--mode real` for photographs, `synthetic` for renders and generated images.
On a 2080 Ti, the patch plus `--steps 25` is about 38 s per object, which makes trying several seeds practical.
---
## Deep dive: the attention kernel, compile vs batching, VRAM, test conditions
You can skip this section. It has the profiling, per-part timings and test conditions behind the numbers above.
### Optimize bundles three changes; on Turing the gain is from compile
The model card describes faster sampling as about 1.7x with the same output quality, and lists three changes behind it:
1. The denoiser is compiled with `torch.compile`. In the SDK this is `compile_for_sampling`, which also switches the RePo position encoding to its real-valued form (`real_valued=True`).
2. The guided and unguided passes of classifier-free guidance run as one batch of 2 instead of two batches of 1.
3. Attention uses cuDNN and matmuls use TF32 while sampling.
On Turing, part 3 crashes and TF32 has no hardware behind it. The patch removes only the cuDNN switch, so parts 1 and 2 still run.
### Profiler: attention runs on a CUTLASS sm75 FP16 kernel
The PyTorch SDPA flags only say which backends are allowed. To see which one actually runs, I profiled sampling only (no encoders, no decoder) after a 2-step warm-up, once with the compiled denoiser and once eager, both with batched guidance. Both picked the same kernel, 56 calls each:
```
aten::_scaled_dot_product_efficient_attention 56
aten::_efficient_attention_forward 56
fmha_cutlassF_f16_aligned_64x64_rf_sm75(PyTorchMemEffAttention::AttentionKernel::Params) 56
```
That's PyTorch's mem-efficient attention, a CUTLASS kernel built for sm75 in FP16. Not the math fallback, not Flash, not cuDNN. Flags at the time: flash, mem-efficient, math and cuDNN all enabled; capability `(7, 5)`; backend `sdpa`; torch 2.11.0+cu128.
### Compile vs batching: compile accounts for nearly all of the 14%
To see where the gain comes from, I ran two extra configurations with the patch applied. Compile-only forced the batched guidance off. Batch-only replaced `compile_for_sampling` with a no-op and kept batching on. Everything else was the same: seed 42, 50 steps, 262,144 Gaussians.
| Configuration | First image | Warm median | Warm N | Warm range | Median on 3 shared inputs |
|---|---:|---:|---:|---|---:|
| `--no_optimize` (earlier run) | n/a | 84.807 s | 44 | 84.471–85.135 s | n/a |
| Patch (compile + batch) | 84.757 s | 72.664 s | 10 | 72.152–72.700 s | 72.490 s |
| Compile only | 86.021 s | 72.494 s | 3 | 72.494–72.524 s | 72.494 s |
| Batch only | 84.124 s | 84.483 s | 3 | 84.133–84.563 s | 84.483 s |
The last column uses the three inputs all three configurations shared (fig-alien, fig-axolotl, and the 2080 Ti image). On those, the full patch and compile-only differ by 0.01%. Batch-only is 0.38% faster than `--no_optimize`, which is within noise.
Against the 84.807 s baseline: patch 0.8568 (1.1671x, −14.32%), compile-only 0.8548 (−14.52%), batch-only 0.9962 (−0.38%). At 25 steps the patch gave 38.154 s against 44.048 s (−13.38%).
Two caveats. Compile-only includes the real-valued RePo switch, so it's the contribution of `compile_for_sampling` as a whole, not of the compiler alone. And the `--no_optimize` baseline is from an earlier run, not interleaved with these, on a shared card; small differences shouldn't be over-read. The gains of the three configurations shouldn't be added together.
### On an RTX 5090, optimize cut request time by 12%
The 5090 ran under WSL2 with the official optimize path, unpatched (it doesn't need the patch).
| Setting | N | Median | Range |
|---|---:|---:|---|
| Optimize, first image (includes compile) | 1 | 25.755 s | n/a |
| Optimize, warm | 8 | 14.880 s | 14.721–14.932 s |
| `--no_optimize` | 3 | 16.858 s | 16.843–17.927 s |
| Optimize, 1,048,576 Gaussians | 3 | 15.469 s | 15.469–18.427 s |
| Optimize, 25 steps | 3 | 7.643 s | 7.639–10.789 s |
16.858 / 14.880 is about 1.13x throughput, or 11.7% less time. The card's ~1.7x is for faster sampling, not the full request, so the two aren't directly comparable. The card doesn't say which GPU the ~1.7x figure comes from, and I didn't break the 5090 gain down by part the way I did on the 2080 Ti.
The 8 warm images came from the demo's figure, food and furniture examples. The official 14.1 s is also a median over 8 images, but I don't know if they're the same 8. Without optimize, on the same three images, the 5090 took 16.858 s and the 2080 Ti 84.052 s, about 4.99x.
### bf16 on Turing is emulated
DINOv3 and the VAE run in bf16 by default. Turing has no bf16 hardware: `torch.cuda.is_bf16_supported(including_emulation=False)` returned False, and True with emulation. It still runs and produces normal output; it just isn't getting bf16 hardware acceleration. Missing bf16 hardware is also what made one of my machines 3.4x slower in [part 10](/en/blog/2080ti-turing-fp32-fallback).
`--dinov3_dtype fp32` ran 83.674 s against 83.913 s for bf16, one run each, so I can't call either faster. The mean per-index position difference between the bf16 and fp32 outputs was 0.0337 (max 0.638) in the SDK's normalized object coordinates. That's compared index by index without alignment, so it isn't a geometric error, and the four views looked about the same.
### Reproducibility: bit-identical on one machine, different across GPUs
Same image (ancient-beauty), seed 42, 50 steps, bf16, `--no_optimize`, separate processes: the two `.ply` files had the same SHA256 on the 2080 Ti, and the same on the 5090. I didn't enable any extra deterministic-algorithm flags.
Across GPUs the files differ. The patched 2080 Ti path also differs from the unpatched one: mean per-index position difference 0.0154 (ancient-beauty) and 0.0298 (2080 Ti image). Side by side in four views at 512 px per view, I couldn't see a difference or new holes.
### Two VRAM numbers, two definitions
- **PyTorch peak** is `torch.cuda.max_memory_allocated()` after `reset_peak_memory_stats()` before each image: 6894.3 MiB on the 2080 Ti in every configuration, 8595.5 MiB with fp32 DINOv3, 5103.8 MiB on the 5090. The official 7.2 GB is about 6894 MiB (6.73 GiB, 7.23 GB). I didn't look into why the 5090 peak is lower; it was the same with and without optimize there.
- **nvidia-smi increase** is peak memory use on the card during an image, minus the card's baseline before the model loaded. It includes the model, CUDA context, allocator reserve and workspace. 2080 Ti: 10,644 MiB peak (12,236 MiB with fp32 DINOv3), sampled every 0.5 s. 5090: 7,837 MiB, sampled every 0.1 s, with the Windows desktop also on the card.
You can't subtract one from the other to get the model's size. Polling nvidia-smi can also miss short spikes.
### Caveats from testing on a shared GPU
The 2080 Ti also runs a text-to-speech service and a ComfyUI instance. Before the first test 6,604 MiB of its 22,528 MiB was already in use, and I left those services running. That means:
- Timings may include contention from other work on the card. The spread is tight (84.471–85.135 s over 44 images).
- Each process recorded its own nvidia-smi baseline before loading, because ComfyUI's cached VRAM grew between runs.
- I processed 49 of the 94 official examples plus two of my own images within the time window. Serial runs at about 84 s each don't fit all 94.
- The patch runs and the `--no_optimize` baseline are separate runs, not an interleaved A/B.
### Test conditions
- **2080 Ti:** modded RTX 2080 Ti 22GB (22,528 MiB), sm_75, driver 580.173.02, Python 3.11.15, torch 2.11.0+cu128, system nvcc 12.4.131, cuDNN 91900.
- **RTX 5090:** 32,607 MiB, WSL2 on Ubuntu 26.04.1, Windows driver 610.88, Python 3.12.16, torch 2.11.0+cu128.
- **Both:** diffusers 0.42.1, transformers 5.22.1, idol-sdk commit `4702a7f00850e34b6e83a2170cc123c3e9570744`, Idol weights revision `2731c2291fc65a797c5cb627a5e5526fc1490902`, FLUX.2-klein-4B revision `e7b7dc27f91deacad38e78976d1f2b499d76a294`, DINOv3 revision `c807c9eeea853df70aec4069e6f56b28ddc82acc`.
- **Settings:** seed 42, `cfg_strength` 3.0, `rescale_t` 3.0, DINOv3 bf16 unless noted, 50 steps and 262,144 Gaussians unless noted. No `flash-attn`.
- **Timing:** `torch.cuda.synchronize()` and `perf_counter` around the pipeline call, which covers background removal, cropping, both encoders, sampling and decoding. Model load, writing the `.ply` and rendering are excluded. Each configuration ran in its own process; the first image of each process is reported separately, and warm medians exclude it.
- **Sample counts:** 2080 Ti `--no_optimize` warm N=44, patch warm N=10, compile-only and batch-only N=3, 25 steps N=2 warm without optimize and N=3 with the patch, 1M Gaussians N=2 warm. 5090 optimize warm N=8; the other 5090 rows are N=3 including each process's first image.
### How the turntables were rendered
Idol writes a standard 3DGS `.ply` and doesn't render turntables. For the stills and the video I used gsplat 1.5.3:
- On the 2080 Ti, gsplat compiled its CUDA extension for sm_75 with `TORCH_CUDA_ARCH_LIST=7.5` and `MAX_JOBS=4`, which took 154.77 s. It needs `ninja` on the `PATH`; without it you get `RuntimeError: Ninja is required to load C++ extensions`.
- `packed=True` with a white background failed with `AssertionError: torch.Size([1, 3])` in `rasterize_to_pixels`. `packed=False` works, on both cards.
- The renderer reads position, quaternion, `exp(log scale)`, `sigmoid(opacity)` and the base SH color from the `.ply`, and uses the yaw, pitch, radius and field of view from Idol's predicted camera JSON. The SDK is z-up, so the camera gets a +90° rotation around X.
- Stills: input yaw plus 0°, 90°, 180° and 270°, 1024×1024, white background. Video: one full turn, 144 frames at 24 fps, 720×720, H.264, 6 seconds.
---
Also in this series: [#27 turing-unlock on an RTX 2080 Ti: full-rate FP16 tensor cores](/en/blog/turing-unlock-2080ti-fp16-tensor-core) · [#26 LFM2.5 24B-A2B on one RTX 2080 Ti](/en/blog/lfm25-24b-a2b-one-2080ti) · [#10 Two identical 2080 Tis, one 3.4x slower](/en/blog/2080ti-turing-fp32-fallback)
---
# Pika-H3-Flex on an RTX 5090: 2x faster MiniMax-H3, and a Blender blockout makes the camera obey
URL: https://ai-muninn.com/en/blog/pika-h3-flex-rtx5090-whitebox-orbit
Date: 2026-11-04
Series: MiniMax-H3 on RTX 5090 (Part 16)
**Pika-H3-Flex** is Pika's official LoRA for MiniMax-H3: 6 steps per clip, plus a 4-step Turbo version. On one RTX 5090 in ComfyUI at 864×480, a 5-second clip took **20.8 s** with Flex and **16.3 s** with Turbo, against **38.0 s** for original H3 at 14 steps. A 180-degree orbit asked for in text alone was unstable: Flex missed the far side on both seeds. With a Blender blockout fed in as the Ref2VA reference video, **6 of 6** clips orbited to the far side. Turbo does it in **34 s**; original H3 takes 97 to 116 s. Caveat: one or two seeds per cell.
---
Pika released Pika-H3-Flex a few days ago. It's an official adapter for MiniMax-H3: extra weights you attach to the original model. The model card says it makes a video in 6 steps, and its example prompts read like timed camera scripts, such as "00:00-00:03 top-down, 00:03-00:06 descend to table height". A 4-step Turbo version showed up on the same Hugging Face account soon after.
My baseline is original H3 at 14 steps. At 864×480 a 5-second clip takes 38 s, and with a reference video it's about 100 s. The bigger pain is camera moves. Ask for a 180-degree orbit in the prompt and sometimes it happens, sometimes it stops halfway, and often it never reaches the other side.
So I had two questions. How much faster is the Pika version, and does it follow camera prompts any better? Short answer: about twice as fast, and no, not from text alone. What made the camera obey was a Blender blockout as the reference video.
## What Pika-H3-Flex is: two LoRAs on top of MiniMax-H3
Pika-H3-Flex isn't a new model. It's two adapters Pika post-trained on MiniMax-H3:
- **FL2VA:** first frame (or first and last frames) plus text to video. Ordinary image-to-video.
- **Ref2VA:** takes reference images, reference videos and reference audio, up to 12 reference files.
Both run in 6 steps, and both generate the picture and a stereo audio track together. The local weights only output 480p and 768p. Higher resolutions go through Pika's own paid API. Weights: [Pika-Labs/Pika-H3-Flex](https://huggingface.co/Pika-Labs/Pika-H3-Flex).
[Pika-H3-Flex-Turbo-LoRA](https://huggingface.co/Pika-Labs/Pika-H3-Flex-Turbo-LoRA), from the same Pika-Labs account, stacks Flex with community few-step distillation LoRAs (lightx2v Turbo and others) and merges them into a single LoRA file. It comes in 2-, 4- and 8-step variants.
One detail matters when you compare them. The 2-step and 4-step Turbo files contain Flex at weight 0.5 (the 8-step HD file uses 0.6), so Turbo at strength 1 is not the same as loading a full Flex. Any difference between Flex and Turbo can't be blamed entirely on two fewer steps. I tested the 4-step variant. The 2-step variant only exists as a Ref2VA version, so there's no first-frame version to compare.
License: the MiniMax H3 Community License, which has region and use-case terms. Read it before commercial use.
## How fast is Pika-H3-Flex? About 1.8x faster than H3, Turbo about 2.3x
Same image, same prompt, 864×480, warm, seed 7, one run per version. The speedup over original H3 is in parentheses.
| Clip length | H3 original 14 steps | Flex 6 steps | Turbo 4 steps |
|---|---|---|---|
| 5 s (124 frames) | 38.0 s | 20.8 s (1.83x) | 16.3 s (2.33x) |
| 15 s (362 frames) | 162.0 s | 82.7 s (1.96x) | 62.8 s (2.58x) |
Longer clips get a bigger speedup.
These numbers are from the image of a woman in historical Chinese costume on a white background. The table-tennis image was within 1 s of them. Original H3 ran here without Spectrum, so it's not directly comparable to my usual production setup, which uses Spectrum.
## Does a text-only 180-degree orbit work? Flex didn't get halfway on either seed
The test image is Pika's official table-tennis demo: a match in a drained swimming pool, one player in a frog mask, one in a red tracksuit. The prompt has only one action. The key sentence:
```
One continuous shot: the camera slowly orbits 180 degrees around the subject over the full five seconds, moving from the opening view through a clear side profile to the opposite side, with strong background parallax. No cuts.
```
To judge it, I checked whether the two players swap front/back and left/right, and whether the pool wall and the table direction rotate. I sampled four frames per clip and judged by eye. I didn't reconstruct camera poses.
| Version | seed 42 | seed 7 |
|---|---|---|
| H3 original | near half circle (stalled early, rotated in the second half) | near half circle (dollied in and lowered at the same time) |
| Flex | small arc, the two players didn't swap | partial orbit around the table, red-tracksuit player stays on the left |
| Turbo | partial arc, stops at the frog's side | near half circle, ends at the frog's back |
Flex didn't reach the opposite side on either seed. Turbo did on one seed and not the other. On this image, the Pika versions followed a text-only camera prompt no better than the original.
Is 5 seconds just too short? I changed only "five" to "fifteen" and the frame count to 362. Flex and Turbo on seed 42 went from a partial arc to near 180 degrees, circling behind the frog. Flex on seed 7 didn't improve, and Turbo on seed 7 regressed to a partial arc. More time sometimes helps, but you can't rely on it. Full results are in the deep dive.
## Blender blockout as reference video: 6 of 6 clips orbit to the opposite side
A blockout is a rough 3D draft made of gray boxes and mannequins. Mine has one table-tennis table, two gray mannequins, a ring of pool wall that's deliberately off-center, and a set of pool steps. The camera orbits the table 180 degrees in 5 seconds. I rendered it to video and connected it to the Ref2VA reference-video slot.
Original H3, Flex and Turbo, each on seeds 42 and 7: all six clips orbited to the opposite side. The red-tracksuit player moves from near-left to far-right, the frog moves from far-right to near-left, and the pool wall shows continuous parallax the whole way.
The reference video costs time. One run each; the last column is the first-frame version with no reference video, for comparison:
| Version | seed 42 | seed 7 | No reference video (first-frame version, seed 7) |
|---|---|---|---|
| H3 original 14 steps | 116.4 s | 97.0 s | 38.9 s |
| Flex 6 steps | 49.0 s | 46.5 s | 21.0 s |
| Turbo 4 steps | 34.8 s | 33.7 s | 16.7 s |
With the Ref2VA setup and a reference video, all three versions take more than twice as long. Turbo still lands at about 34 s a clip, against 97 to 116 s for original H3 doing the same job. Original H3 on seed 42 was the first run, so its time includes loading the model after switching base models.
No gray material or mannequins leaked into the output. Clothing and pool-floor colors match the original image. The pool steps showed up in 5 of 6 clips, at about 2.5 to 4 s; in the blockout they appear at 2.5 s. The model follows the path. It doesn't copy the blockout frame by frame.
## How to run Pika-H3-Flex in ComfyUI: five files, three sampler configs, one blockout
My setup: RTX 5090 (32 GB), ComfyUI 0.37.0, the same install I use for regular H3. I reused the text encoder `qwen3vl_32b_minimax_h3_nvfp4_awq`, the video VAE `minimax_h3_video_vae_fp16` and the audio VAE `minimax_h3_audio_vae_fp32`.
### Step 1: Download the LoRAs and the Ref2VA base model
Flex files are in the official repo under `comfy/loras/`. Turbo files are in the root of the Turbo repo.
| Purpose | Location | File |
|---|---|---|
| Flex first-frame version | `models/loras/` | `pika_h3_flex_fl2va_comfy_bf16.safetensors` (1.96 GB) |
| Flex reference-video version | `models/loras/` | `pika_h3_flex_ref2va_comfy_bf16.safetensors` (1.96 GB) |
| Turbo first-frame version | `models/loras/` | `pika_h3_flex_turbo_4step_fl2va.safetensors` (3.91 GB) |
| Turbo reference-video version | `models/loras/` | `pika_h3_flex_turbo_4step_ref2va.safetensors` (3.91 GB) |
| Ref2VA base model | `models/diffusion_models/` | `minimax_h3_ref2va_pruned_int8_convrot.safetensors` (21 GB) |
The first-frame versions run on the usual `minimax_h3_fl2va_pruned_int8_convrot.safetensors`.
ComfyUI's native `LoraLoaderModelOnly` loads all four LoRAs. No conversion, no custom nodes. Set strength to 1, and the log should print `208 patches attached`.
Use the int8 Ref2VA base, not NVFP4. Earlier, a LoRA on an NVFP4 base silently corrupted the output, with no error. Details in the deep dive.
### Step 2: Use the right sampler config for each version (don't mix them)
```text
H3 original res_multistep / simple, 14 steps, shift video 12 / audio 3
Flex lcm + ManualSigmas 1.0, 0.972973, 0.923077, 0.8, 0.571429, 0.333333, 0.0
Turbo res_multistep / simple, 4 steps, shift video 6 / audio 3
Common CFG 1 (BasicGuider), LoRA strength 1
```
Flex's seven sigma values (the boundaries of its six steps) come from the official workflow. Pika's guide says plainly that picking any 6-step schedule isn't the official recipe.
### Step 3: Render at 864×480, not 848×480
Turbo's model card and several examples say 848×480. On ComfyUI's native H3 nodes, that raises a shape error. 864×480 works. The error text is in the deep dive.
### Step 4: Build a 180-degree blockout in Blender by asking an AI for the script
The blockout only tells the model the camera path and who stands where. I didn't write the Blender script by hand. I described what I needed to an AI. Here is roughly what I asked for. You do not have to copy it; just say what you need:
```text
Write a Blender script, run with blender -b --python, output 864x480, 24fps, 124 frames mp4.
Scene follows this image: a standard table-tennis table, one gray mannequin at each side, one near end pulling the paddle back, one far end ready to return.
Around is a ring of drained pool wall; the wall must deliberately not be centered on the table; add a 4-step set of pool steps so the frame has asymmetric landmarks.
The camera starts from an oblique high-angle similar to the original image, orbits the table center 180 degrees to the opposite side within 5 seconds, with slight ease-in/ease-out at head and tail, and mannequins must never leave the frame.
```
Three things matter:
- **Asymmetric landmarks are required.** With a centered pool wall and no steps, an orbit to the opposite side and a camera standing still look about the same.
- **The frame count equals the final output.** 124 frames = 17×7+5, which fits H3's frame-count rule.
- **The camera can be wider than the original image.** My blockout's focal length is 72% of the original image's, so the mannequins stay in frame at the side view. The cost is that the first frame doesn't line up with the original composition. Details in the deep dive.
Blender doesn't need a GPU. I rendered on CPU on a separate 2080 Ti machine and never touched its card.
### Step 5: Wire Ref2VA, and use the original image to lock the first frame
Start from ComfyUI's official [Pika Flex R2V workflow](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_pika_h3_flex_ref2va.json). Two gotchas: the template's reference-video slot is empty, so you wire it yourself, and the template's default LoRA file name doesn't match the file you actually download. Pick the names from the table in Step 1. The wiring:
```text
LoadVideo(whitebox.mp4) -> GetVideoComponents.images -> MiniMaxH3ReferenceToVideo.ref_videos.ref_video_0
LoadImage(original image) -> MiniMaxH3ReferenceToVideo.ref_images.ref_image_0
LoadImage(original image) -> MiniMaxH3AddGuide.image (frame_idx 0)
LoadVideo(whitebox.mp4) -> GetVideoComponents.images -> MiniMaxH3ReferenceToVideo.ref_videos.ref_video_0
LoadImage(original) -> MiniMaxH3ReferenceToVideo.ref_images.ref_image_0
LoadImage(original) -> MiniMaxH3AddGuide.image (frame_idx 0)
video VAE -> MiniMaxH3AddGuide.vae
MiniMaxH3ReferenceToVideo.positive -> MiniMaxH3AddGuide.positive
MiniMaxH3ReferenceToVideo.latent -> MiniMaxH3AddGuide.latent, and also the sampler's latent_image
MiniMaxH3AddGuide.positive -> BasicGuider.conditioning
width 864 · height 480 · length 124 · ref_image_size match
```
The original image goes in twice. As a reference image, it sets the appearance. Connecting it to `MiniMaxH3AddGuide` as well locks frame 0, so the clip opens with the original composition and colors instead of gray mannequins.
The blockout has no audio, so leave `ref_video_audio` unconnected.
Then add these sentences to the prompt so the model knows what the blockout is for:
```
is a gray previs reference. Use only its camera path and the positions of the two players and the table. Do not copy gray materials, mannequin appearances, or geometry other than the pool steps. Match all appearance and lighting to .
```
The full prompt is in the deep dive.
## Flex vs Turbo: pick Turbo for speed, add a blockout for a specific camera move
| Need | Use | Per 5-second clip |
|---|---|---|
| Speed, camera free | Turbo first-frame version | 16.3 s |
| Specified orbit path | blockout + Turbo | about 34 s |
| Specified path, face matters | blockout + Flex | 47-49 s |
Turbo smooths and beautifies faces and simplifies details. For shots where facial detail matters, I switch to Flex.
## Deep dive: shape error, misleading tests, full numbers and prompts
You can skip this section; everything you need to run it is above. It holds the full numbers, the original prompts and the pitfalls, for anyone (or any AI) adapting the setup.
### 848×480 raises a shape error on native H3 nodes
My first run used 848×480, as the model card says. Original H3 failed before it ever got to the LoRA:
```
RuntimeError: shape '[1, 24, 1, 1, 15, 2, 26, 2]' is invalid for input of size 38160
comfy/ldm/minimax/model.py:47, patchify_video
x = latent.reshape(b, c, t, pt, h, ph, w, pw)
```
H3's latent width is the frame width divided by 16. 848/16 = 53. The spatial patch is 2×2, and an odd number can't be split into pairs. 864/16 = 54 passes.
My FastH3 setup hit the same error, so it has nothing to do with the LoRA. Every number in this article except Sol-H3 (896×512 draft, 1344×768 output) is at 864×480, which isn't the same spec as the 848×480 hardware numbers on the model card.
### A white-background image can't tell you whether the camera orbited
This is a mistake you can easily make too. Round 1 used two images: a woman in historical Chinese costume on a white background, face clearly visible, and Pika's official table-tennis image.
On the white-background set, every clip showed the woman turning from front to side or back, and none stopped cleanly facing away. My conclusion was "the 180-degree orbit never completes". My assumption at the time: if the person turns to show her back, the camera orbited behind her; if she doesn't turn far enough, the orbit was incomplete.
On the table-tennis set, I judged by fixed objects instead: the curve of the pool wall, the direction of the table's long axis, and the players' front/back/left/right. Original H3 turned near half a circle on both seeds, with clear parallax on the table and pool wall.
Looking back, the white-background clips couldn't support any conclusion. The background is white, so there's nothing to compare against. A camera orbiting 180 degrees around a person and a person turning 180 degrees in place produce the same picture. To judge an orbit you need something in frame that doesn't move and isn't symmetric. That's why the blockout has an off-center pool wall and pool steps.
In the 15-second white-background clips, the model drew its own folding screen, lamp and low table. Those stayed nearly fixed while the woman turned, which shows she was rotating in place.
### The official five-segment script: top-down, crane down and pull-back work; whip pans don't
The model card's table-tennis demo script (362 frames, 15 s), verbatim:
```
Image 1 is the exact two players, outfits, frog mask, table-tennis table and drained pool: keep them exactly as in Image 1.
A fast table-tennis rally, shot with exactly these camera moves:
00:00–00:03 — top-down from directly overhead, as in Image 1, as the rally begins and the ball flicks back and forth.
00:03–00:06 — a smooth crane straight down from overhead to table height, ending right beside the net as the ball zips across.
00:06–00:09 — fast whip pans left and right following the ball across the net, from one player to the other.
00:09–00:12 — a 180-degree orbit around the frog-masked player as she leaps and smashes the ball.
00:12–00:15 — a low-angle dolly backward along the pool floor as the woman in the red tracksuit dives and misses; the frog raises both arms and does a little victory dance; the camera settles and holds.
The players, table and pool stay consistent and in the same place throughout. Photoreal 35mm film look, true colour, light natural grain, matching Image 1. SPEED IS CRITICAL: everything moves at normal real-time speed, like 24fps footage played back at 24fps - natural motion, NO slow motion.
Sound: the quick tock-tock of the ball, sneakers squeaking on concrete, the smash, a thud as she dives, echo in the empty pool, the frog's muffled cheer. Music: a funky, upbeat drum-and-bass groove.
```
I sampled 16 frames per clip, about one per second, and judged by eye:
| Segment | H3 original | Flex | Turbo |
|---|---|---|---|
| 0-3 s top-down | present on both seeds | present on both seeds | present on both seeds |
| 3-6 s descend to table height | present on both seeds | present on both seeds | present on both seeds |
| 6-9 s left-right whip pan | seed 42 present, seed 7 partial | partial on both seeds | partial on both seeds |
| 9-12 s 180-degree orbit | near 180 degrees on both seeds | seed 42 large angle; seed 7 returns back | seed 42 large angle, frog's back visible around 9 s; seed 7 frog mostly front or side |
| 12-15 s low pull-back | present on both seeds | present on both seeds | present on both seeds |
I also ran the historical-costume image with the same five-segment timeline, subject and actions swapped. None of the three versions produced a clear whip pan on either seed. On seed 7, all three versions replaced the white background with an indoor scene.
### Pika vs FastH3 8 steps and Sol-H3 two-stage
Period-drama image only. FastH3 here is the trimmed 8-step int8 model (`fastvideo_fasth3_trim_8step_int8_convrot.safetensors`), set up from ComfyUI's official template `video_fastvideo_fasth3_i2v.json` with VSA on. Sol-H3 is the [Part 8](/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090) pipeline: an H3 4-step draft, then an LTX refine, with the draft at 896×512 and the final at 1344×768.
| Version | Output size | 15 s clip seed 42 / 7 | 5 s clip seed 42 / 7 |
|---|---|---|---|
| H3 original 14 steps | 864×480 | 165.6 / 162.0 s | 45.5 / 38.0 s |
| Flex 6 steps | 864×480 | 84.5 / 82.7 s | 23.4 / 20.8 s |
| Turbo 4 steps | 864×480 | 64.9 / 62.8 s | 19.0 / 16.3 s |
| FastH3 trim 8 steps | 864×480 | 76.7 / 73.7 s | 25.6 / 23.6 s |
| Sol-H3 H3 4 steps -> LTX | 1344×768 | 115.4 / 105.1 s | 66.3 / 42.1 s |
The seed 42 column is mostly the first run, so it includes model loading or a LoRA swap. Seed 7 is the warm run with the same prompt. Sol-H3 switches from H3 to LTX on every run and outputs a different resolution, so these timings aren't directly comparable.
What I saw:
- At the same 864×480, Turbo 4 steps is the fastest. FastH3 is close to Flex on 15 s clips and slower than Flex on 5 s clips.
- None of these follows camera instructions clearly better than original H3. Top-down, crane down and pull-back all happen. Whip pans and a complete 180 degrees are equally unstable everywhere.
- FastH3 turned the white background into a stage on both seeds in the 15 s clips (floor tiles with a gold landscape, a gold folding screen and lanterns). Sol-H3 did too (an orange studio set, a yellow landscape wall). Original H3 and the Pika versions only did it on seed 7.
- The Sol-H3 seed 7 15 s clip has two figures overlapping in the first frame, and one disappears after about 1 s. That clip isn't usable as is. The face is recognizable but differs from the input. Its Spectrum offline smoothing didn't take effect because it had 4 anchors and needs 5. The log says `offline smoothing requires at least 5 actual anchors`.
- Faces: Turbo and FastH3 both get an over-smoothed, beauty-filter look. Turbo also simplified the sleeve detail in the historical-costume close-up. At 480p the faces are too small to rank face quality among the three.
### Longer clips: full results
Round three asked whether each camera move just had too little time. Two variants:
- **L1:** the single 180-degree orbit sentence, with only "five" changed to "fifteen" and 124 frames changed to 362. Every other node unchanged; I diffed them node by node. This is the cleanest comparison.
- **L3:** the five segments cut down to three segments of 5 s each (top-down and descend, orbit, pull-back), with the whip pan removed. The script got simpler at the same time, so this isn't a pure duration comparison.
Table-tennis image, each compared against the older clip with the same version and seed:
| Version / seed | Old 5 s -> L1 15 s | Old five-segment (orbit 3 s) -> L3 (orbit 5 s) |
|---|---|---|
| H3 original / 7 | old clip already near 180 degrees; L1 path longer, may exceed half circle | old clip near 180 degrees; L3 only lateral move and return, weaker than old |
| Flex / 7 | both under half circle, no improvement | continuous near half circle at 8.25-9.50 s, jumps back at 9.75 s |
| Turbo / 7 | old near half circle; L1 regressed to partial arc | continuous near half circle at 8.25-9.50 s, jumps back at 9.75 s |
| Flex / 42 | old small arc; L1 near 180 degrees, circling behind the frog | old already near 180 degrees; L3 dissolve back at about 9 s |
| Turbo / 42 | old partial arc; L1 near 180 degrees | old already near 180 degrees; L3 jump back at about 10 s |
I verified the L3 jump-back by sampling a frame every 0.25 s from 8 to 10 s. The near-half-circle before it is real. Then the camera suddenly snaps back to the old side composition, like a cut, instead of staying on the opposite side. If you only look at the last frame, you'd wrongly conclude it never orbited.
Every L1 and L3 run with the historical-costume image generated its own indoor background, and in most clips the woman turned in place, so I couldn't tell whether the camera orbited.
15 s clip timing (L1, seed 7): original 168.1 s, Flex 86.8 s, Turbo 67.9 s. That's in line with the round-one 15 s clips.
More time helps on some seeds (Flex and Turbo on seed 42) and does nothing or makes things worse on others.
### Blockout details: a wider lens, and depth-map references weren't better
The blockout scene, in Blender 5.2.2, rendered with Workbench on CPU:
- A standard table-tennis table, 2.74 × 1.525 × 0.76 m, with a net. Two gray mannequins, head height 1.65 m: one on the near side pulling the paddle back, one on the far side ready to return. Static poses.
- The pool wall is an off-center ellipse: center offset (1.3, -0.4) m, semi-axes 7.0 m and 4.8 m, height 1.35 m. The 4 pool steps sit only behind the starting camera view.
- The camera is pitched at 55 degrees, 5.06 m from the table center, rotating 180 degrees around world Z. It eases for 0.3 s at the head and tail and moves about 37.3 degrees per second in the middle. The total angle, recomputed from per-frame camera coordinates, is 180.000 degrees.
- I checked all 124 frames: the table and mannequins stay in frame, and the camera never passes through the pool wall.
**Focal length.** I hand-marked the four corners of the table top in the original image and fitted a 26.5 mm lens. At that fixed focal length, the mannequin with spread arms leaves the frame at the side view, so I widened it to 19.1 mm, 72% of the fitted value.
The cost: the blockout's first frame is wider than the original image. The table and people look smaller and more pool wall is visible. During generation, `MiniMaxH3AddGuide` locks frame 0 to the original composition, and then the clip has to shift to the blockout's wider framing. That hurts consistency over the first few frames.
**Depth-map reference, same path.** Rendered with Cycles on CPU, true Z depth, 2 m brightest and 11 m darkest, not normalized per frame. I only ran original H3 and Flex on seed 42. I didn't run Turbo.
| Reference video | Original seed 42 | Flex seed 42 |
|---|---|---|
| Blockout | orbit to opposite side, 116.4 s | orbit to opposite side, 49.0 s |
| Depth map | orbit to opposite side, 112.3 s | orbit to opposite side, 47.6 s; frog head skewed and slightly elongated mid-clip |
Both runs orbit to the far side. The depth map wasn't any more reliable than the blockout, and the Flex depth-map clip had the weirder head, so I kept the blockout.
**Small defects in the outputs.**
- Nearly every clip shows a reflective fade in the middle of the table surface that turns green again later. I can't rule out that the blockout's gray material affected it locally.
- The red-tracksuit player's face details are soft. I saw no face melting and no double heads.
- After the frog turns its back to the camera, only the top of the head is visible, so I couldn't check the back-side features.
### Ref2VA base model: NVFP4 swapped for int8, 21 GB copied over
The 5090 originally had only `minimax_h3_ref2va_pruned_nvfp4.safetensors`, with no int8 Ref2VA. The existing `minimax_h3_fl2va_pruned_int8_convrot` is the first-frame version and can't stand in for Ref2VA.
In [Part 14](/en/blog/open-h3-regenerate-2k-rtx5090), a LoRA on an NVFP4 base silently produced corrupted frames (heavy edges, flattened skin) with no error. So I copied `minimax_h3_ref2va_pruned_int8_convrot.safetensors` (20,970,379,616 bytes) from another machine and checked that the SHA256 matched on both ends.
Another naming gotcha: the official R2V template names the LoRA file `pika_h3_flex_ref2va_v1_bf16.safetensors`, but the file you actually download from the Pika repo is `pika_h3_flex_ref2va_comfy_bf16.safetensors`. If you select it per the template, ComfyUI can't find the file.
### Did the LoRA actually attach? 208 patches plus a strength-0 control
The Flex and Turbo files each have 208 modules. The key names are ComfyUI-native, for example `diffusion_model.blocks.0.attn.qkv_proj.lora_A.weight`, and they match the 208 keys of the lightx2v 8-step file I'd used before exactly.
At strength 1 the log prints `208 patches attached`. At strength 0 it prints `0 patches attached`. There's no `lora key not loaded` anywhere.
Then I kept the image and seed fixed and changed only the strength:
- **Flex:** the last frame changed from a back view to a side view, and the composition differs.
- **Turbo:** at strength 0 the white background has black-gray floating specks and the clothing is blurrier. At strength 1 the specks are gone.
- **Whole-clip SSIM** (a pixel-similarity score, 1 means identical) between strength 0 and strength 1: 0.892 for Flex and 0.920 for Turbo.
Applying a LoRA on the int8 base model also requantizes the weights, which pushes SSIM below 1 on its own. So SSIM alone isn't evidence. Use it together with the key names, the patch counts and the visual differences.
### Full prompts
Text-only 5-second single orbit (table-tennis image, seeds 42 and 7):
```
For the target video, at 0.00 seconds into the target video, (from [Shot 1]) is fully referenced.
integrated_multimodal_description: [Shot 1] Live-action, cinematic, the frog-masked table-tennis player beside the table in the drained pool, matching the reference face, outfit and setting. The subject stays in place with natural small movements. One continuous shot: the camera slowly orbits 180 degrees around the subject over the full five seconds, moving from the opening view through a clear side profile to the opposite side, with strong background parallax. No cuts.
overall_soundscape: Soft fabric rustle, light footsteps, quiet location ambience. No speech.
non_diegetic_music: A solo guzheng plays four plucked notes at 60 BPM, with each note decaying naturally.
```
With the blockout as reference video (the same text for all three versions):
```
For the target video, at 0.00 seconds into the target video, (from [Shot 1]) is fully referenced.
integrated_multimodal_description: [Shot 1] Live-action, cinematic, the frog-masked table-tennis player beside the table in the drained pool, matching the reference face, outfit and setting. The subject stays in place with natural small movements. One continuous shot: is a gray previs reference. Use only its camera path and the positions of the two players and the table. Do not copy gray materials, mannequin appearances, or geometry other than the pool steps. Match all appearance and lighting to . The camera orbits 180 degrees around the table within five seconds to the opposite side: the two players exchange front/back and left/right positions, with clear parallax in the background pool wall. No cuts.
overall_soundscape: Soft fabric rustle, light footsteps, quiet location ambience. No speech.
non_diegetic_music: A solo guzheng plays four plucked notes at 60 BPM, with each note decaying naturally.
```
### How I measured
- Wall-clock times come from ComfyUI's `/history`, from `execution_start` to `execution_success`. That includes text encoding, sampling, decoding and saving, and excludes downloading the finished MP4.
- Every run was submitted only when the queue was empty.
- I unloaded models with `/free` before the first run. I didn't restart the service or clear the OS file cache, so it's not a whole-machine cold start.
- Original H3, Flex and Turbo ran without Spectrum or compile. FastH3 used VSA attention from the official template, and Sol-H3 kept Spectrum on (its offline smoothing never kicked in with only 4 anchors). I kept the SageAttention that the ComfyUI service already had enabled.
- All clips have audio (32 kHz stereo). I didn't evaluate the audio in this article.
### Limits of this test
- **n=1 or 2.** Only one or two seeds per cell. The 6 of 6 holds for those two seeds; it doesn't show that every seed succeeds.
- **The blockout round isn't a single-variable comparison.** The base model changed from FL2VA to Ref2VA, the LoRA changed to the Ref2VA version, and the prompt gained the reference instructions. I didn't run a "Ref2VA without a reference video" arm, so the contributions can't be separated.
- **Orbit angles are judged by eye** from sampled frames (pool wall, table direction, players' front/back/left/right). No camera pose reconstruction, so I'm not claiming an exact 180 degrees.
- **One scene.** The blockout experiment used a single table-tennis image. Other scenes or other camera moves may behave differently.
## Related
- [Part 9: Block a scene in Blender, let MiniMax-H3 film it: local Ref2VA on an RTX 5090](/en/blog/blender-blocking-h3-ref2va-rtx5090)
- [Part 14: Open-H3-Regenerate-2K on an RTX 5090](/en/blog/open-h3-regenerate-2k-rtx5090)
- [FastH3 on an RTX 5090: 8-step distilled H3, 2.9x faster than the original](/en/blog/fasth3-rtx-5090-comfyui)
- [Pika-H3-Flex on Hugging Face](https://huggingface.co/Pika-Labs/Pika-H3-Flex)
- [Pika-H3-Flex-Turbo-LoRA on Hugging Face](https://huggingface.co/Pika-Labs/Pika-H3-Flex-Turbo-LoRA)
- [ComfyUI official Pika Flex R2V workflow](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_pika_h3_flex_ref2va.json)
---
# [AI Workflow] Teaching a Chinese TTS Taiwan Mandarin: a 3-to-80-Entry Lexicon Plus g2pW Auto-Tagging
URL: https://ai-muninn.com/en/blog/voxcpm2-taiwan-pronunciation-lexicon-g2pw
Date: 2026-11-04
Series: AI Workflow (Part 29)
VoxCPM2 reads Mandarin the mainland way, so in my Taiwan news shorts it turned 模型庫 (model library) into 模型哭 (model cry). One-off rules didn't stick. What works is one shared pronunciation lexicon that every narration path reads, grown from **3** entries to **80**, plus g2pW auto-tagging: a character is replaced with a pinyin tag (the Latin-letter spelling with a tone number) only where g2pW and pypinyin disagree, and the lexicon always wins. Every fix happens in the text before the TTS sees it. Caveat: tags sometimes fail, and then a homophone or the raw character does better. Only listening tells you which.
---
## Preface
I use VoxCPM2, an open-source TTS model running on one RTX 2080 Ti, to narrate daily AI-news shorts in Mandarin with a clone of my own voice. The [previous post](/en/blog/voxcpm2-news-shorts-narration-2080ti) covered the setup and the whisper check that transcribes every line and compares it against the script.
Since then, the failures changed shape. English names are mostly fine now. What breaks is ordinary Chinese characters. In 模型庫 ("model library") the last syllable should be kù, but the model said kū, which is 哭, "cry". In 門檻, "threshold", the second character went silent.
The cause is regional. VoxCPM2 reads Mandarin the way mainland China does, and my scripts are written for Taiwan, where some common characters are read differently. Any TTS trained mostly on one regional variant will make the same mistakes on another region's text. The model does not know which region you mean, so the fix has to be in the text you hand it.
My first approach was to add rules one at a time. The same errors kept coming back. A fix for 步驟 ("step") went in on October 13, and on October 19 the word was still misread. This post is what replaced it.
## Put every fix in one shared lexicon that every narration path reads
The fix is one JSON file. Each entry maps a piece of source text to the text that actually gets sent to the TTS. Every narration entry point reads the same file: news shorts, explainer videos, single-line re-records. Subtitles always use the original script, so viewers never see the respellings.
The shared part matters more than the format. A fix goes in once, and every path picks it up on its next line.
The file grew fast once there was one place to put things:
| Date (2026) | Entries |
|---|---|
| October 19 | 3 |
| October 27 | 33 |
| November 1 | 38 |
| November 3, early morning | 42 |
| November 3, evening | 80 |
The file looks like this. All of these are real entries:
```json
{
"entries": {
"庫": "酷",
"企業": "氣業",
"檻": "砍",
"步驟": "步揍",
"發難": "發{nan4}",
"帳本": "{zhang4}本",
"曾侯乙": "{zeng1}侯乙",
"研究": "研{jiu4}",
"嗆你": "{qiang4}你",
"被嗆": "被{qiang4}",
"當機": "蕩機",
"倒鉤": "到勾",
"橋": "喬",
"NVIDIA": "Nvidia",
"AI": "A I"
}
}
```
## The lexicon holds three kinds of entries and nothing else
**Fixes confirmed by ear.** These are either homophone swaps or a pinyin tag on just the wrong character. 庫 ("storehouse", kù) became 酷 ("cool", also kù), which is how 模型哭 went back to sounding like 模型庫. 企業 ("enterprise") became 氣業, because Taiwan reads the first character qì, not the mainland qǐ. For 發難 ("to start trouble") and 帳本 ("ledger"), only the misread character gets swapped for pinyin: 發`{nan4}`, `{zhang4}`本. The rest of the word stays as characters.
**VoxCPM's official phoneme tags.** The [VoxCPM usage guide](https://voxcpm.readthedocs.io/en/latest/usage_guide.html#regular-text-vs-phoneme-input) defines tone-numbered pinyin in braces for Mandarin, like `{xun4}{lian4}`, and CMU phonemes for English, like `{AH0 P AE1 CH IY0}`. A tag replaces the character. It is not an annotation next to it.
**Numbers spelled out.** 2.0 goes to the TTS as 二點零, "two point zero".
Names and numbers are not added ahead of time. For a new name, I send the raw text first, re-roll seeds if it comes out wrong, and only tag it if it is still wrong after that.
## Bind polyphones to words, not to single characters
A character with two readings must never get a single-character key. The key has to be the word.
曾 is the clearest case. In the name 曾侯乙 (Marquis Yi of Zeng, an ancient ruler) it is zēng. In 曾經 ("once, ever") it is céng. The entry is 曾侯乙 → `{zeng1}`侯乙. A key on 曾 alone would break every 曾經 in every future script.
嗆 ("to choke" or "to mouth off") has two readings, qiāng and qiàng. The lexicon has five phrase entries for it (嗆你, 被嗆, 嗆人, 嗆聲, 嗆回去) and no single-character key.
There is one deliberate exception. The early entry 檻 → 砍 is a single-character key, and I kept it. The Ministry of Education dictionary lists a second reading for 檻, jiàn ("railing"), but that sense rarely appears in news. A word-level key would be cleaner.
Matching is longest key first, and a matched span gets locked so shorter keys cannot rewrite inside it. This is the matching function:
```python
def lexicon_spans(text):
taken = [None] * len(text)
for k in sorted(LEX, key=len, reverse=True):
start = text.find(k)
while start != -1:
if all(t is None for t in taken[start:start + len(k)]):
for j in range(start, start + len(k)): taken[j] = (k, start)
start = text.find(k, start + 1)
return taken
```
`LEX` is the `entries` object from the JSON file. Any position marked in `taken` belongs to a lexicon entry, and nothing downstream touches it. That includes the automatic tagger, covered two sections down. The lexicon always overrides automatic tagging.
## When you are unsure of a reading, look it up in the Taiwan dictionary on moedict
My ear is not the authority on Taiwan readings. The Taiwan Ministry of Education dictionary is. [萌典 (moedict)](https://www.moedict.tw/) serves it as JSON:
```bash
curl -s "https://www.moedict.tw/uni/曾"
```
The response lists each reading of the character as a separate heteronym. For 曾 there are two, shown in Zhuyin (the phonetic alphabet Taiwan teaches) and in pinyin: ㄗㄥ zēng and ㄘㄥˊ céng, each with its own definitions, so you can see which sense goes with which reading.
A reading from this dictionary can go straight into the lexicon. It does not need the ear test that a homophone swap needs, because the question it answers ("what is the correct reading here?") is a fact, not a judgment about how one TTS model renders a substitute.
## Let g2pW tag what the lexicon misses, only where it disagrees with pypinyin
The lexicon only knows what I have already caught. For everything else, a second step tags characters automatically before the line goes to the TTS.
It uses two tools that disagree in a useful way:
- [g2pW](https://github.com/GitYCC/g2pW) reads a whole sentence and predicts each character's reading in context, trained on Taiwan data. The model is about 606 MiB and runs on CPU.
- pypinyin looks words up in its phrase dictionary, which is in Simplified Chinese, so the text is converted to Simplified first. Its answer is the mainland reading. I use it as a stand-in for what the TTS might guess.
Where they agree, the TTS will probably get it right on its own, so the character stays as is. Where they differ, the character is replaced with g2pW's pinyin, for example `{luo4}`. Tagging only the disagreements matters, and the punctuation section below explains why tagging common characters backfires.
Three things are skipped even when the readings differ:
- 一 (yī, "one") and 不 (bù, "not"), because their tone changes with the next syllable (tone sandhi) and the TTS already handles that.
- Any neutral-tone reading, the ones that end in 5 in tone-numbered pinyin.
- 括 ("include") and 和 ("and"). The dictionary reads them guā and hàn, while everyday Taiwan speech mostly says kuò and hé. Following the dictionary there would sound wrong to Taiwan listeners.

The core of the tagging loop, after `lexicon_spans` has run. If you do not write code, skip it; it does exactly the comparison above:
```python
ch, r = text[i], reading[i] # r: g2pW reading in context
d = base[i] # d: pypinyin reading of the Simplified text
if r and ch not in SANDHI | COLLOQUIAL and d and not r.endswith('5') and r != d:
say.append('{' + r + '}') # tag it
else:
say.append(ch) # leave it to the TTS
```
If converting to Simplified changes the length of the line, the two readings no longer line up character by character. In that case nothing gets tagged. A wrong tag is worse than no tag.

My tagging script has a `--show` mode that prints only the tags it would add:
```bash
echo '["曾侯乙編鐘出土時,我曾經在現場。","他把垃圾丟進垃圾桶,研究人員看著樹葉落下。"]' | ./g2pw_tag.py --show
```
```
2 垃:le4(預設la1) 圾:se4(預設ji1) 垃:le4(預設la1) 圾:se4(預設ji1) 落:luo4(預設la4) | 他把{le4}{se4}丟進{le4}{se4}桶,研{jiu4}人員看著樹葉{luo4}下。
```
(預設 means "default", the pypinyin reading.) The first sentence, about the Marquis Yi of Zeng bells, contained both 曾侯乙 and 曾經 ("once") and printed nothing. The lexicon had already handled 曾侯乙, and for 曾經 both tools said céng. The second sentence printed three things. 垃圾 ("garbage") was tagged le4 se4 twice, where the default would be la1 ji1; Taiwan says lèsè, the mainland says lājī. 落 ("fall") was tagged luo4 instead of la4. The 研`{jiu4}` in that sentence came from the lexicon, not from g2pW.
On November 3 I checked g2pW on a set of known Taiwan readings. It got all of them right: 曾侯乙 with zēng, 落下 with luò, 垃圾 as lèsè, 薄 as bó, 微 as wéi, 研究 with jiù. pypinyin gave the mainland reading for 曾 and 落, so those are the two characters that get tagged.
## When a tag fails, try a homophone or the raw character, and let your ears pick
A correct pinyin tag does not guarantee a correct reading. Sometimes the model simply renders the tag badly.
- 當機 ("to crash", for a computer) tagged `{dang4}{ji1}` was still wrong. The homophone 蕩機 worked.
- 倒鉤 ("barb") failed with pinyin. I picked 到勾, a different pair of characters with the same sound.
- 炸 ("to fry") tagged `{zha2}` came out as 抓 (zhuā, "to grab") in 4 of 4 takes. The raw 炸 with no tag was correct on the first take.
- 橋 ("bridge"): in a blind test the homophone 喬 sounded best.
So for any word the model still mispronounces, I render three versions of the line: the pinyin tag, a homophone, and the raw text. They are shuffled and labelled A, B and C, so I do not know which is which while listening. I package them as mp4 cards because my phone will not play wav. Then I pick by ear. From request to a new lexicon entry plus a one-line re-record takes about 30 seconds.
Whatever wins goes into the lexicon, and every pipeline gets it from then on.
## Use full-width punctuation and keep tags off common characters
Two small habits in the text prevent a lot of strange output.
First, use full-width Chinese punctuation (`,` and `?`), not the half-width ASCII `,` and `?`. One outro line had half-width punctuation plus tags on two very common characters, `{hai2}` and `{wei4}`. It came out as gibberish; whisper transcribed it as 別在得去安的平安系, which means nothing. With full-width punctuation and the tags removed, it was correct on the first try.
Second, do not tag common characters. The model already reads them correctly, and a tag only adds a chance to fail. This is also why the g2pW step tags only where the two readings disagree.
The same caution applies when whisper misses a line. Converting the whole sentence to pinyin seems like a fix. I tried it once and the voice sounded distant. My limit now is at most three words of added pinyin in any one sentence.
## English words in Mandarin scripts: lowercase env vars, keep letter-by-letter acronyms, and never put English first
Scripts about AI tools mention code, so English shows up in Mandarin lines. Three rules cover it.
**Lowercase all-caps identifiers.** Environment variables and flags in all caps get spelled out letter by letter or mangled. PARALLEL was transcribed as "PARLL". I send them lowercase with underscores turned into spaces:
```text
ROUND_ROWS → round rows
DRY_RUN → dry run
CUDA → cuda
```
**Keep acronyms that are read letter by letter uppercase.** GPU and TTFT are read as letters anyway, so they stay as they are. The lexicon also has NVIDIA → Nvidia, so it is read as a word, and AI → A I, so the two letters are read separately.
**Never start a Mandarin sentence with an English word.** "overlay 要先登入…" ("overlay needs you to log in first…") was misheard 10 out of 10 times, as things like "Orly" and "AURAL". "這個 overlay 要先登入…" ("this overlay needs…") was heard correctly 4 out of 4 times. One Chinese word in front is enough. I also keep it to at most one long model name per sentence.
## The checklist: six steps for every script
1. Write the script with no English word at the start of a sentence and at most one long model name per sentence.
2. Apply the lexicon, longest keys first, with matched spans locked.
3. Let g2pW tag the rest, only where it disagrees with pypinyin, skipping 一/不, neutral tones and 括/和.
4. Use full-width punctuation.
5. Listen. For anything still wrong, render pinyin tag, homophone and raw text as a shuffled A/B/C test.
6. Write the winner back to the lexicon so every pipeline gets it.
## Deep dive: voice drift, an error the check missed, speech-rate checks, and what didn't work
You can skip this section; the pronunciation setup above works without it. What follows is the investigation and measurement behind a few production changes, kept in detail for anyone, or any model, debugging the same pipeline.
### A distant, off-pitch voice came from the Q4 route collapsing whole sentences, not from the machine move
On October 20 my narration sounded distant and off-pitch. The narration service had recently moved to another machine, so that was the first suspect.
I measured 10 videos, 30 lines, at three layers: raw TTS output, after post-processing, and the final video. One line stood out, line 2 of the CopilotKit short. This table compares it with the lines around it:
| Measure | Outlier line | Neighboring lines |
|---|---|---|
| Raw loudness | -32.2 LUFS | about -17 LUFS |
| Spectral centroid | 1717 Hz | about 500 Hz |
| F0 median (pitch) | 159 Hz | about 120–129 Hz |
| CER from the whisper gate | 0.083 | |
The raw line was far quieter than its neighbors. Loudness normalization brought it up to the target level, and the noise floor came up with it. That is what "distant" sounded like. Its character error rate (CER) of 0.083 was inside the threshold, so the whisper gate passed it.
The machine move was ruled out on two points. The reference wav had an identical sha256 on both machines. And the mix stage was not the cause: the final video against the post-processed audio had cosine similarity of at least 0.9992, so mixing did not change the voice.
The real change was the inference route. Narration had moved from PyTorch, run with a prompt plus the reference audio, to a 4-bit GGUF model (Q4) in continuation mode, where the model picks up where the reference recording leaves off.
I ran a blind test on 6 clips. The 2 clips judged "weird" were both Q4. One was the CopilotKit line 2, distant. The other was GLM-Omni line 2, with the pitch off and the words unintelligible after 3 seconds. The other 2 Q4 clips and the 2 PyTorch clips sounded normal. So Q4 occasionally collapses a whole sentence, not every sentence. Both bad lines had already been published.
I switched back to Q8 and re-narrated the 14 published Chinese videos from the Q4 period, 109 lines in total, with a mean CER of 0.076.
I haven't isolated Q4 quantization from continuation mode. Both changed at once.
Current production runs Q8 fine-tuned on my voice. The exact file is whatever the service's health endpoint reports; I do not hard-code the version anywhere. The Q4_K_M file I linked in the previous post has since been replaced on Hugging Face by other quant recipes: a 4-bit version with protected layers, Q5_K_M and Q6_K. I haven't deployed any of them.
To catch the next collapse without a human, I added an automatic check. A line is an outlier if its high-frequency share is at least 0.08 and its spectral centroid is at least twice the median for the same video. An outlier gets re-rolled once automatically. If it is still an outlier, it gets flagged for listening, but it does not block the video. In calibration it had 0 false positives on 118 normal lines and missed one line where the voice had changed. That is a small sample.
### The whisper gate passed a take that read the reference transcript aloud
On October 28, in a long video, one take's transcript contained the transcript of my reference recording: "這個詞聽不懂沒關係…我們開始" ("it's fine if you don't understand this word… let's begin"). The model had spoken part of its own voice prompt. The gate passed it.
I re-checked all 45 lines of the final cut with a separate whisper pass, plus a keyword scan for sentences from the reference text.
The gate should block two things: a transcript much longer than the script, and a transcript that contains any reference sentence. As of October 28 neither check was in the gate.
### A speech-rate gate re-rolls lines instead of time-stretching them
Added November 4. Nothing gets time-stretched: no atempo, no rubberband. The visuals and subtitles follow the audio, so the audio itself has to come out at a steady pace.
Rate is measured in syllables per second:
- A Chinese character counts as 1 syllable, and so does a `{pinyin}` tag.
- English words count by syllables, acronyms by letters, and W counts as 3.
- Only the voiced range counts: 10 ms RMS frames at or above -45 dBFS, with silence at the head and tail trimmed.
Each line has to be within ±10% of the episode's median for the same language. If it is not, the same text is re-rolled with up to 4 seeds, and the take closest to the median wins. The baseline is locked when it is selected, for example 5.497382 syllables per second, so it does not drift as lines are replaced. If all 4 seeds fail, the pipeline stops for a human.
The same gate checks tag positions. At each `{pinyin}` spot, the character whisper heard there (after alignment) must be the original character or a homophone with the same tone. 幫我`{zha2}` ("fry it for me") heard as 抓 has to fail. 炸, 閘, 札, 紮 and 鍘 all pass, because they are all read zhá.
Lines without tags only get a gibberish screen: after stripping punctuation and normalizing Simplified and Traditional characters, the transcript has to be at least .48 similar to the script.
### What didn't fix pronunciation: a voice LoRA and automatic tone checkers
**LoRA on my own voice.** I fine-tuned a LoRA on 4.5 minutes of my voice. In a three-way blind test on 10 lines there was no consistent winner. 知識 ("knowledge") was right in only one version. 步驟 was read with zhou in all three, where Taiwan says ㄗㄡˋ zòu. In a production A/B on 8 lines, the fine-tuned model won 3, the original won 1, and 4 were ties. Production switched to the fine-tuned model, but readings still rely on the lexicon.
**Automatic tone checkers.** I wanted a machine to tell me whether a tone was right. None was good enough:
| Checker | Result |
|---|---|
| MFA (forced aligner) tones | 2 of 4, effectively guessing |
| MFA initials and finals | 4 of 4 on 垃圾, 訓練, 資安; failed on 步驟 zòu vs zhòu |
| whisper to toned pinyin, A/B choice, eSpeak | 62.5% |
| whisper to toned pinyin, A/B choice, VoxCPM | 72% |
| whisper, whole-word tone correct, free decoding | 4–5% |
| tonara | 50–63% |
MFA could tell apart consonants and vowels (initials and finals) on 垃圾, 訓練 and 資安, but it could not tell zòu from zhòu, and that z/zh difference is exactly what I need it to catch. Its positive control was audio synthesized by eSpeak, not VoxCPM. None of these checkers is in production. That is why everything in this post fixes the text before the TTS, instead of trying to grade the audio after.
Also in this series: [One RTX 2080 Ti Narrates Every Daily AI-News Short](/en/blog/voxcpm2-news-shorts-narration-2080ti) · [Whisper CER as an Audio Quality Gate: 40 Lines, Three Traps](/en/blog/whisper-cer-audio-gate)
---
# Making a character do parkour with NVIDIA MotionBricks on one RTX 5090: 1.66 ms per generation
URL: https://ai-muninn.com/en/blog/motionbricks-rtx5090-parkour
Date: 2026-11-01
Series: MiniMax-H3 on RTX 5090 (Part 15)
NVIDIA MotionBricks runs on one RTX 5090 at **1.66 ms** median per generation (FP16, TensorRT). I built a **37.2 m** parkour track with **10 obstacles 3.3 m apart**: all **11/11** interactions fired, including the final sit, in 20.27 s. You give it the last 4 poses plus 1 to 4 target poses and it fills in the motion; each obstacle is a Smart Primitive that supplies those targets. Then I used the grey-box run as the skeleton for a **20 s** MiniMax-H3 video: the look and the street held, the jump count and timing didn't. Caveat: it's kinematic only, and feet sank up to 11.44 cm into boxes.
---
I saw NVIDIA Research's MotionBricks announcement on X. The claims were big: 350k+ motions in one model, 15,000 FPS, 2 ms latency, a SIGGRAPH 2026 paper. The UE5 demo said it was fully neural, with no foot-lock, no blending, no collision detection and no hand-authored transitions. A secondhand post also mentioned a Japanese developer driving a VRM anime model in the browser with WebGPU and arrow keys. I couldn't find the original link, so treat that one as hearsay.
Why it caught my eye: classic game animation is a library of pre-recorded clips (walk, run, jump, turn) stitched together by hand-written rules. When the stitching is bad you get foot sliding and jerky turns. AI video models go the other way. They look great, but you can't tell them how many times to jump, or when.
So I had two questions. Is the official claim real? And can it make a character do parkour? I had an RTX 5090 on hand, so I tried both, and then handed the result to MiniMax-H3 to see if it could serve as the skeleton for an AI video.
## What MotionBricks does: you place target poses, it fills in the motion
MotionBricks generates character motion from poses, not from words.
- **Input:** the character's last 4 poses as context (30 Hz), plus 1 to 4 target poses. One target says where to end up. Several also say how to move on the way.
- **Output per generation:** 6 to 16 tokens, 4 frames each. After the runtime trims 3 frames off each end, that's about 0.6 to 1.9 s of motion. The model decides how long the transition takes.
- **Long motion:** play the generated chunk, take its last 4 frames as the next context, generate again.
- **No text, image, video or scene geometry.** The model card says so. You can't type "jump over that box", and it can't see the box.

So how does it ever jump a box? Through **Smart Primitives**. An action like "vault a 0.5 m box" or "sit on a chair" is packaged as a set of mocap-derived target poses placed around an object, plus an interaction volume. When the character enters the volume, those targets are fed to the model in order. No retraining.
The repo ships these primitives:
- `jump_0_5m`: jump a 0.5 m box
- `jump_0_75m`: get over a 0.75 m wall
- `avoidance`: duck under or dodge an overhead obstacle
- `sit`
- a locomotion set, plus walking styles Skipping, Zombie and Combat
The license is friendly: the weights are under the NVIDIA Open Model Agreement (commercial use OK, modified versions distributable), and the code is Apache 2.0. One exception matters later in this post: the 38 BONES sample motions in the repo are for internal evaluation only.
## It's kinematic, not physics: expect clipping and foot sliding
MotionBricks is kinematic only. Boxes in a scene only decide whether the character has entered an interaction zone; there is no collision response, and the model card says outputs aren't guaranteed to be physically feasible. Newton and Warp are in the repo, but they're there for rendering and the runtime. A real robot would still need a tracking controller.
In practice that means two artifacts: feet and pelvis sink into boxes, and feet slide. Across my runs, max penetration was **11.44 cm**, and a planted foot still traveled **35 to 47 cm** horizontally over a contact segment. Fine for animation previs. Not fine for a game character that needs reliable collision.
## 1.66 ms per generation on an RTX 5090, about 19× real time for a full run
The abstract's 15,000 FPS / 2 ms doesn't name the hardware. Section 7.4 of the paper does: a desktop with an RTX 5090. (The repo's Python demos were tested on an RTX 4090.) That's the card I have, so I measured it myself. The official TensorRT 10.8 path, with the repo unmodified, builds a plan on Blackwell without trouble.
Method: 10 warmups, then 50 synchronized `generate` calls, timing a single generation only (no playback, no saving). Look at the FP16 row; that's the one to use.
| Precision | Median | p95 | 9 s of motion (14 generations) |
|---|---|---|---|
| FP16 (official mixed) | 1.6581 ms | 2.0701 ms | 0.024677 s |
| FP32 (TF32 off) | 3.1565 ms | 3.3127 ms | 0.044821 s |
| FP32 (official default, TF32 allowed) | 3.0115 ms | 3.1420 ms | 0.043008 s |
Whole-card VRAM peaked around 3 GB, desktop included.
A full parkour take is more than generation: per-frame stepping, interaction dispatch and pose recording. A 19.4 s take took **1.015 s** of wall clock, about 19× real time. The slow part of the whole pipeline is the Blender render afterward.
## Building the parkour run: obstacles in a line, each one a Smart Primitive
The Scene Preview demo has an Auto Interact mode: walk the character at an object and it jumps, vaults, ducks or sits on its own. That gave me the recipe:
1. Put obstacles in a straight line, each with a Smart Primitive.
2. Make the character run forward the whole time.
3. Entering a volume triggers that obstacle's action.
4. Put a chair at the finish line, so it sits.
I wrote a headless script that reuses Scene Preview's character, state machine and interaction dispatch, with a fixed RNG seed. It saves the poses, and Blender renders them as a grey mannequin.
### Round 1: official primitives only, 7/7 triggered in every take
The first track was 31 m with an obstacle every 4.5 m: two 0.5 m boxes, two 0.75 m thin walls, two overhead duck obstacles (`avoidance`), and a chair at the end.
I ran four takes: run, Skipping style, jog, and run with a different start input. All four triggered 7/7 and sat down at the end, with zero joint-speed outliers (my threshold was 20 m/s). The worst penetration, 11.44 cm, was Skipping over the 0.75 m wall. Changing the start input moved the joints by 20.9 cm RMS. That only shows a different input gives different motion; it says nothing about randomness for the same input.
Round 1 was rendered on CPU (Cycles) on a Linux server with three 2080 Ti cards.
### Round 2: faster, more jumps, closer together
Round 1 worked, but it didn't look like parkour. I wanted it faster, with more jumps, packed tighter. Three things stood in the way.
**1. Speed has a ceiling.** I ran a 12 s straight line with the same seed and commanded 4.5 up to 14 m/s. I set two thresholds: planted-foot horizontal speed p95 had to stay within 2× the 4.5 m/s baseline, and no joint could go over 20 m/s. At 6.5 m/s the foot p95 hit 1.528, past the limit. At 7 m/s outliers started. From 9 m/s up, the model couldn't predict foot contact at all. I picked **6.0 m/s** (actual median 5.945).
**2. Too few jump samples.** Only 5 of the 38 official sample motions are jumps. I re-cut two new jumps in Smart Primitive format: `jump_compact_0_35m`, a compact hop over a low rail, and `jump_nohands_0_75m`, a no-hands vault over a 0.75 m rail. This is not new mocap. Platform jumps and gap jumps aren't in the sample library, so I didn't do those.
**3. Dense obstacles slow it down.** The official jumps send an approach target first. With short spacing, that forces the character to slow down again before every jump. I added a `FastJumpBehavior`: when obstacles are dense, skip the approach and send only the Action and Exit targets. On the same route the run went from 26.3 s to 20.3 s (−23%).
The final track: **37.2 m**, four jump types alternating, **10 obstacles 3.3 m apart**, sit at the end. It triggered **11/11** in 20.27 s. Max penetration was 10.93 cm, again on the 0.75 m wall.
For this round I installed Blender on the 5090 with OptiX. The same 583-frame clip took 440.5 s on the CPU server and 180.3 s on the 5090, **2.44×** faster.
## Handing the grey-box to MiniMax-H3: the look held, the jumps didn't
A grey mannequin is ugly. The idea was to use the motion as a skeleton for an AI video: a wuxia swordswoman doing the same parkour.
The method is the one from [Part 9](/en/blog/blender-blocking-h3-ref2va-rtx5090): a Blender blockout plus reference images go into H3 Ref2VA (you give it reference images and a reference video, it gives back a new video with audio). 20 seconds is too long for one pass, so I chained it with ComfyUI-H3-Continuum, 5 s per chunk, four chunks, as in [Part 11](/en/blog/blender-fpv-taiwan-no-fog-h3-continuum).
The reference images came from a local image model: the swordswoman (dark green cross-collar outfit, high ponytail with a red ribbon, sword on her back) and a Jiangnan water-town street.
For the previs I resampled the motion to 24 fps: 481 frames, four 5 s chunks, with chunk boundaries at frames 124, 243 and 362. The scene became an old-town street with buildings on both sides and an arched bridge at the end. The obstacles became wooden crates, bamboo rails, stone walls and wooden railings, and the chair became a stone stool. The camera tracks from the side. I rendered two versions: a grey render and a depth render (nearer is brighter, as in [Part 12](/en/blog/dance-depth-h3-palace-rtx5090)).
### Jumps can't sit on a chunk boundary
This was the hardest part. Continuum generates one chunk after another, each continuing from the previous chunk's end. If a boundary lands while she's in the air, H3 tends to botch the jump or draw it twice. Each boundary needs running frames on both sides.
With 10 jumps 3.3 m apart, the longest stretch of running between two jumps was 0.22 s. Wherever the three boundaries go, one of them lands mid-jump. Other uniform chunk lengths don't fix it either.
So I made a second previs with the obstacles grouped per 5 s chunk: 9 jumps in groups of 3/3/2/1, with extra running between groups. The running margins around the three boundaries came out to 19, 19.6 and 21.8 frames. The cost: she slows down near each boundary, to an actual speed of about 2.4 to 2.8 m/s.

### Depth previs won the test clips
Before the full run I made two test clips with the same seed, differing only in the reference video: grey vs depth. Both kept the look and the street. The depth version's jump timing was closer to the previs, so I went with depth. At 1344×768 each 5 s chunk took about 5 to 7 minutes.
The finished video runs 20 s and took 8 submissions: 2 test clips, 4 chunks, and one retry each for chunks 2 and 4.
What worked:
- Her outfit, the red ribbon, the sword and the street held for all 20 s, with no mannequin leaking through.
- The chunk boundaries are invisible. Scene-change detection (`scene>0.18`) found 0 hard cuts.
- The broad phases followed the previs: she starts running, clears groups of obstacles, slows, turns, and sits on the stone stool.
What didn't:
- Jumps often became stepping up onto a crate and then down.
- The jump count and timing don't match the previs.
- There's an extra small hop at the end.
- The shop signs have fake text.
The slowdowns near the boundaries make the run feel slow. Still, it was pretty fun to watch.
## Where it stands: real motion for placed obstacles, not yet a reliable skeleton for AI video
MotionBricks really does produce fitting, plausible motion for the obstacles you place. On a Blender character, walking and clearing obstacles both work, and a generation takes 1.66 ms (median) on the 5090. As a skeleton for H3 AI video, the look and the scene hold, but the jump count and timing don't match yet.
## Reproduce it yourself: two demos, then a headless script
Install [Git LFS](https://git-lfs.com/) and [uv](https://docs.astral.sh/uv/getting-started/installation/), then:
```bash
git clone https://github.com/NVlabs/motionbricks
cd motionbricks
git lfs pull
uv sync
```
Let `git lfs pull` finish. The ONNX files live in LFS, and without them you get "file not found". The first launch for each model and precision builds a TensorRT plan, which takes a few minutes and is cached in `.trt-cache/`.
**Demo 1** shows the core idea: place poses and let it fill in the motion.
```bash
uv run python -m app.inbetweener_demo
```
**Demo 2** is Scene Preview, with Auto Interact on by default. Add `--model-precision fp16` to get the 1.66 ms mixed FP16 path; the default is FP32.
```bash
uv run python -m app.scene_preview --scene assets/scenes/soma_gym.scene.json --model-precision fp16
```
If you're driving a Windows machine remotely, run GPU programs inside a logged-in desktop session. An ssh session may not get CUDA. I launch through Task Scheduler with "run only when user is logged on" and use ssh only to read results.
For a parkour run you need a headless script. The shape of mine:
- Build the scene in Scene Editor (`uv run python -m app.scene_editor`) or write the scene JSON by hand.
- Build the SOMA character, state machine and Smart Primitive pool the way Scene Preview does. Detect volume entry and dispatch the interaction. No window.
- Feed "run forward" every frame, with a fixed seed.
- Record world-space joint poses and export BVH or GLB for Blender.
One Blender tip: the GLB is 30 Hz. Set the scene to 30 fps before importing so each Blender frame lines up with one pose and the rendered frame count matches the motion file.
I had Claude write these scripts. These were my prompts. You don't need to copy them verbatim; just say clearly what you want.
```text
I cloned NVlabs/motionbricks. Write me a headless script that reuses the character, state machine, and interaction dispatch from app.scene_preview, so the SOMA character keeps running forward through my scene JSON, auto-triggers Smart Primitives at obstacles, and sits on the chair at the end. Save every frame's joint poses and export a file Blender can read. When it's done, tell me whether each obstacle triggered.
In Blender, render this motion as a video with a grey mannequin, camera tracking from behind and to the side, obstacles in different colors. Use OptiX if there's an RTX card.
```
Afterward, check penetration and foot sliding yourself. The model doesn't handle those.
## Deep dive: full measurements, the jump re-cuts, and the boundary search
You don't need this section to reproduce anything above. It's the full data and the debugging notes, for anyone (or any AI) adapting this setup.
### Architecture, training data and license
- **Root module:** predicts the transition length and the pelvis path.
- **Pose module:** a masked token transformer that predicts motion tokens along that path.
- **Decoder:** a VQ-VAE with multiple codebook heads.
- **Size:** the SOMA version is about 200M parameters (VQ-VAE 23.4M, pose 136.5M, root 40.4M) on a 30-joint SOMA skeleton. A second model family drives the Unitree G1 robot with the same runtime.
- **Training data:** Bones RigPlay 1, 313,526 clips selected (from about 350k clips / 700 h of source). Licensed, not released.
- **License:** weights under the NVIDIA Open Model Agreement, code under Apache 2.0. The 38 BONES sample motions are internal-evaluation only, which matters because my two new jumps were re-cut from them.
### Speed sweep: feet start sliding at 6.5 m/s, outliers appear at 7 m/s
Setup: a 12 s straight line, no obstacles, seed 11, fixed 60 Hz stepping. Speed and foot stats exclude the first 3 s. Max joint speed and outlier counts cover the whole clip. The baseline foot p95 at 4.5 m/s is 0.535, so the limit is 1.070.
| Commanded m/s | Actual median | Actual p95 | Planted-foot speed p95 | Max foot path per contact (cm) | Max joint speed m/s | Joint-frames >20 m/s |
|---:|---:|---:|---:|---:|---:|---:|
| 4.5 | 4.576 | 4.856 | 0.535 | 2.392 | 11.738 | 0 |
| 5 | 5.058 | 5.402 | 0.630 | 4.005 | 12.549 | 0 |
| 5.5 | 5.368 | 5.971 | 0.785 | 4.769 | 14.196 | 0 |
| 6 | 5.945 | 6.562 | 1.015 | 4.688 | 15.507 | 0 |
| 6.5 | 6.548 | 7.146 | 1.528 | 5.271 | 17.826 | 0 |
| 7 | 7.005 | 7.704 | 1.569 | 6.033 | 20.412 | 4 |
| 7.5 | 7.472 | 8.187 | 1.283 | 3.450 | 41.364 | 127 |
| 8 | 7.986 | 8.731 | 1.221 | 3.483 | 30.670 | 187 |
| 9 | 8.955 | 9.767 | no foot contact | — | 30.372 | 151 |
| 10 | 9.757 | 10.817 | no foot contact | — | 26.305 | 137 |
| 11 | 10.745 | 11.790 | no foot contact | — | 35.055 | 275 |
| 14 | 11.575 | 13.118 | no foot contact | — | 44.584 | 602 |
How to read it:
- At 7.5 and 8 m/s the foot p95 is lower than at 6.5 only because the outliers break up the contact segments and shorten them. It isn't better motion.
- From 9 m/s, "no foot contact" means the set of contact frames is empty. A dash in that column means no data, not zero sliding.
- The limit holds for this run (12 s, seed 11, 60 Hz). It is not a universal number.
- I only raised the SOMA linear-mode `max_speed` (default 4.5). Skipping has its own cap of 1.45 m/s, and I didn't force it to 6.
### Per-take checks for both rounds
| Take | Route m | Jumps | Motion s | Triggered (incl. sit) | Max penetration cm | Max foot path per contact cm | Max joint speed m/s | Joint-frames >20 m/s |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| Round 1 run | 31 | 4 | 19.417 | 7/7 | 0.645 | 37.593 | 9.660 | 0 |
| Round 1 skipping | 31 | 4 | 28.967 | 7/7 | 11.440 | 46.852 | 12.299 | 0 |
| Round 1 jog | 31 | 4 | 21.933 | 7/7 | 5.982 | 36.907 | 9.628 | 0 |
| Round 1 run-repeat | 31 | 4 | 19.883 | 7/7 | 8.545 | 35.394 | 10.137 | 0 |
| Round 2 fast-6 | 37.2 | 10 | 20.267 | 11/11 | 10.928 | 40.059 | 14.810 | 0 |
| Round 2 skipping-fast | 37.2 | 10 | 23.250 | 11/11 | 11.945 | 27.368 | 9.796 | 0 |
How each column was measured:
- **Penetration:** the 4 foot-contact joints and the pelvis center, as points, against axis-aligned boxes, measuring depth to the nearest surface. This is not full mesh collision.
- **Slide:** a contact value of 0.5 or more counts as planted. I sum the horizontal path over each planted segment. Model jitter is not subtracted.
- **Outliers:** 60 Hz finite-difference speed against a threshold of max(20, median + 20×MAD). Every batch landed at 20 m/s.
- **Round 1 "4 jumps"** = 2 boxes + 2 walls. The duck obstacles aren't counted.
The first jog version had 15 joint-frames above 20 m/s during the sit transition (max 67.69 m/s). I fixed the init seed and clamped the input to 0.35 past x = 25.5 m so it slows down first, then regenerated all four takes. All four came back with zero. No smoothing was applied to the recorded joints.
### FastJumpBehavior: skip the approach target
My first 10-jump run used the original three-target sequence, approach included. Raising the speed cap from 4.5 to 14 m/s only gave 26.033 to 28.400 s, barely faster. The obstacles were too dense to leave room to accelerate.
`FastJumpBehavior` reads each jump primitive's sequence, skips the approach Entry, and sends Action then Exit, with a token limit of 6 to 10. The model, the recorded poses and the tracking files are untouched.
On the same route, the original sequence at 4.5 m/s took 26.317 s. With the new behavior, 4.5 / 6 / 6.5 m/s took 20.767 / 20.267 / 20.417 s, all 11/11 with zero outliers. I chose 6.0. The round 1 route is different, so going from 19.417 to 20.267 s is not "the same route, faster".
### Re-cutting two new jumps from the sample motions
The Smart Primitive edit format lets you pick timestamps in a sample motion, take a window of four consecutive 30 Hz poses as a target, and set hierarchy transforms, pivot, volume, IK pins, token range and target order. Targets and token range condition the model; IK pins are applied at playback, pulling hands or feet to the target position. At no point does it just play back the original BVH.
- **`jump_compact_0_35m`:** re-cut from sample A437 at entry 1.75 s, action 2.16 s, exit 2.55 s, with a 0.35 m volume, tokens 6 to 10 and a 4-frame transition. The airborne pose reuses the 0.5 m sample, since there's no 0.35 m mocap.
- **`jump_nohands_0_75m`:** keeps only the NoHandsJump sequence, max token 12, with up to 4 frames of early transition.
Track order: official `jump_0_5m` at #1, #5 and #9; official `jump_0_75m` at #4 and #8; no-hands at #3 and #7; compact at #2, #6 and #10. Obstacle i sits at x = 4 + 3.3 × i, and the sit is at 37.2 m.
### Blender render: CPU 440.5 s, 5090 OptiX 180.3 s
Settings: Cycles, 8 samples, 1280×720, 30 fps, H.264. Timing runs from the render loop to the encoded video plus a contact sheet, excluding Blender startup and scene build.
| Render | Frames | Video s | Render + encode s | s/frame |
|---|---:|---:|---:|---:|
| Round 1, Linux server CPU / run | 583 | 19.433333 | 440.470 | 0.7555 |
| Round 1, Linux server CPU / skipping | 869 | 28.966667 | 621.720 | 0.7154 |
| Round 2, 5090 OptiX / fast-6 | 608 | 20.266667 | 191.246 | 0.3145 |
| Round 2, 5090 OptiX / skipping-fast | 698 | 23.266667 | 220.772 | 0.3163 |
| Round 2, 5090 OptiX / round 1 run re-rendered | 583 | 19.433333 | 180.294 | 0.3093 |
The last row re-renders the same motion file, scene, mannequin and camera, so 440.470 → 180.294 s (2.44×) is a direct comparison. The OS and encoder versions differ, though, so this compares whole pipelines, not GPUs in isolation.
### Why evenly spaced jumps can't clear the 5 s boundaries
In fast-6 the first jump starts at 0.83333 s and the last one ends at 15.51667 s. The longest gap between two jumps is 0.21667 s (5.2 frames).
I subtracted every jump interval, padded by ±0.25 s, from the timeline. The 481-frame window can only start at an offset of 0 to 0.25 s in the source, and no offset in that range keeps all three boundaries (124, 243, 362) clear. Other uniform chunk lengths fail too.
### The second previs: 9 jumps as 3/3/2/1, 497 automatic iterations
I wrote a search script that moved only the obstacle x positions in my scene, re-ran the generation every iteration, and checked the running margins. The safety threshold was 18 frames, using closed event intervals. Any iteration with a missed trigger, no sit, or too little margin was rejected. It ran 497 iterations.
- I tried 10 jumps as 3/3/3/1 first. There was no fully safe window early on, and the sit timed out, so I dropped to 9 jumps.
- I kept the four jump types alternating and varied the cycle start and in-group spacing. I also tried different seeds and a longer run-up.
- One iteration passed the margins, but group 3's spacing was 5.4 m, well over the roughly 3.3 m I wanted. Rejected.
- The chosen one: seed 11, start offset 1.0 s, in-group spacing 2.5667 to 3.4014 m.
| Boundary frame | Film time s | After previous jump ends | Before next jump starts | Minimum margin |
|---:|---:|---:|---:|---:|
| 124 | 5.125000 | 21.0 frames | 19.0 frames | 19.0 frames |
| 243 | 10.083333 | 19.6 frames | 22.4 frames | 19.6 frames |
| 362 | 15.041667 | 23.0 frames | 21.8 frames | 21.8 frames |
What it cost:
- Near the boundaries the actual speed has a median of about 2.4 to 2.8 m/s, even though the cap is still 6.
- A fixed 20 m/s check finds 70 joint-frames over the limit (8 pose frames at 60 Hz), with a max of 37.6069 m/s at the left middle fingertip. fast-6 had 0.
- The adaptive threshold here is 38.4459 m/s, which gives 0 adaptive outliers. That's not the same as "zero spikes". I didn't smooth or delete frames; it's a quality limit of this previs.
### H3 chunks: settings, time and retries
Continuum with Ref2VA nvfp4, the Qwen3VL 32B nvfp4 AWQ text encoder, 20 steps, 1344×768, the same two reference images on every chunk, per-chunk `[Chunk N]` prompts, and Review Each Chunk on. Each continuation chunk is 141 frames including 22 context frames, so it adds 119 new ones. Cumulative frames: 124 / 243 / 362 / 481.
| Submission | Content | End-to-end s (incl. polling) | Sampling s | Observed peak GiB |
|---|---|---:|---:|---:|
| 1 | Test A, grey previs | 332.0 | 267.7 | 28.116 |
| 2 | Test B, depth previs | 317.1 | 267.6 | 31.008 |
| 3 | Final chunk 1 | 301.8 | 267.5 | 30.993 |
| 4 | Chunk 2, first try | 377.9 | 317.4 | 29.596 |
| 5 | Chunk 2, retry | 377.6 | 318.9 | 31.046 |
| 6 | Chunk 3 | 393.1 | 318.8 | 30.952 |
| 7 | Chunk 4, first try | 423.2 | 319.2 | 31.005 |
| 8 | Chunk 4, retry | 408.2 | 319.7 | 31.030 |
- **Chunk 1** used the same seed and input as test B, which I'd chosen. Its decoded frames were MD5-identical, frame by frame.
- **Chunk 2, first try:** the first jump came about 0.5 s late, and the three clears were hard to make out. For the retry I wrote local time windows into the prompt (0.75–1.97 / 1.97–2.97 / 2.97–4.10 s). After the retry you can clearly see her cross the crate, the bamboo rail and the low stone wall.
- **Chunk 4, first try:** she sat down fine, but the last jump was late and unclear. The retry moved that jump to about 16.3–16.8 s but added a railing step at about 17.3–17.6 s. That's the extra hop at the end.
- I allowed one retry per chunk, then stopped.
- Peak VRAM was sampled every 3 s from ComfyUI's `/system_stats`. It's the whole card, not per process.
### Boundary MAD: all three boundaries are about 1.0 to 1.2× a normal frame
Method: adjacent-frame luminance difference on 96×54 greyscale (0 to 255, mean absolute difference). The in-chunk baseline excludes ±0.5 s around each boundary, and its median is 10.516589. A ratio near 1 means the boundary changes the picture about as much as any normal frame step.
| Boundary | MAD of the pairs before / at / after | At-boundary / in-chunk median | Max ratio within ±0.5 s |
|---|---|---:|---:|
| 124→125 | 8.7515 / 11.4302 / 12.9805 | 1.087× | 1.461× |
| 243→244 | 10.5226 / 12.6470 / 9.2022 | 1.203× | 1.258× |
| 362→363 | 9.1962 / 10.6092 / 11.3823 | 1.009× | 1.138× |
`scene>0.18` found 0 hard cuts. On both sides of each boundary she keeps running down the same street, with no restart of the action.
### What this test does not show
- Each setting ran once. The speed table is 50 samples, but the parkour takes and the H3 film are single runs.
- Penetration and slide are simplified checks (points against AABBs, not the full body mesh). Triggering every interaction is not the same as being physically correct.
- The H3 motion only broadly matches. Frame-level takeoff and landing, the nine-jump count and the obstacle geometry don't all pass. The character is larger in frame than in the previs, the scene isn't a pixel copy, and I didn't listen to the audio chunk by chunk.
- The conclusion that TensorRT builds a plan on the 5090 holds for this Windows driver, Warp and TensorRT combination only.
## Related
- Paper: [MotionBricks on arXiv](https://arxiv.org/abs/2604.24833)
- Project page: [nvlabs.github.io/motionbricks](https://nvlabs.github.io/motionbricks/)
- Code: [NVlabs/motionbricks on GitHub](https://github.com/NVlabs/motionbricks)
- Weights: [nvidia/MotionBricks on Hugging Face](https://huggingface.co/nvidia/MotionBricks)
- [Part 9: Block a scene in Blender, let MiniMax-H3 film it](/en/blog/blender-blocking-h3-ref2va-rtx5090)
- [Part 11: A 25-second no-fog FPV one-take with MiniMax-H3 and ComfyUI-H3-Continuum](/en/blog/blender-fpv-taiwan-no-fog-h3-continuum)
- [Part 12: Turn a real dance into a depth video and have MiniMax-H3 restage it in a palace](/en/blog/dance-depth-h3-palace-rtx5090)
---
# [MiniMax-H3] Open-H3-Regenerate-2K on an RTX 5090: more detail than VSR at 133 s a clip
URL: https://ai-muninn.com/en/blog/open-h3-regenerate-2k-rtx5090
Date: 2026-10-30
Series: MiniMax-H3 on RTX 5090 (Part 14)
NVlabs' **Open-H3-Regenerate-2K** redraws a 1344×768 MiniMax-H3 draft at 2560×1440. On one RTX 5090, through a community rank-128 conversion, the official 3 steps take **about 133 s**, against **19 s** for RTX VSR. It draws real lashes, eye highlights and embroidery that VSR can't. It starts from 91% noise, so faces get slimmer and small sign text turns into fake characters; shots with text should stay on VSR. For face close-ups, one step from sigma 0.667 takes **81 s** and stays closest to the draft. Caveat: one run per scene per method.
---
My local MiniMax-H3 setup outputs 1344×768. In [Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) I moved the upscale step to RTX VSR. It's fast, but upscaled faces looked mushy. An upscaler can only sharpen what's already in the frame. If the draft never drew eyelashes, no upscaler will find them.
I saw on X that NVlabs had just released Open-H3-Regenerate-2K, billed as an open alternative to MiniMax's paid H3 2K refine API. It doesn't upscale. It redraws the clip at 2K with H3 itself.
I had two questions. How much more detail does it give than VSR, and how much more time does it cost? Short answer: a lot more detail on faces and fabric, about seven times the time, and it wrecks small text unless you give it a first frame to hold on to.
## Open-H3-Regenerate-2K is frozen H3 plus one LoRA that redraws the draft
The release is the MiniMax-H3 model, frozen, plus one refiner LoRA. That LoRA is three adapters merged into one, rank 576, 12.4 GB in FP32.
The pipeline:
1. Take the draft's latent (the compressed representation H3 works in), 1344×768, 121 frames.
2. Run it through a 3D-conv latent upscaler.
3. Sample 3 Euler steps with sigmas 0.909375 → 0.857143 → 0.666667 → 0, CFG 1.
4. Decode to 2560×1440.
The first sigma is the important number. Sampling starts from 9% upscaled draft and 91% noise. So the model really redraws the frame. The draft only pins down composition and color.
NVlabs compares it to the paid API on RefinerBench-150, both at 2560×1440. VBench average was 0.814 for the open version and 0.802 for the paid one. In a blind test of 50 cases and 200 judgments, 87% (174/200) preferred the open version. Besides a plain resize, they didn't compare against a dedicated upscaler like RTX VSR, and there's no face-specific evaluation. That gap is what I wanted to fill.
License: the MiniMax H3 Community License, which has region and use terms. The upscaler and the merged LoRAs carry their own licenses.
Weights are on [Hugging Face](https://huggingface.co/Efficient-Large-Model/Open-H3-Regenerate-2K), and the [project page](https://nvlabs.github.io/Sana/Open-H3-Regenerate-2K/) has their samples.
## It fits in 32 GB through a community rank-128 conversion
The official code won't run on a 5090. Its README says `sol_engine_fwd` needs about 150 GB on one card, which means B200 or GB200.
I used a community conversion instead: [father558/H3-Open-Regenerate-2K-ComfyUI-r128](https://huggingface.co/father558/H3-Open-Regenerate-2K-ComfyUI-r128). It renames the keys for ComfyUI and compresses the LoRA with SVD down to rank 128. The result is 1.96 GB in BF16, and it loads with `LoraLoaderModelOnly` at strength 1.0. It is not official and not from the original authors. Its compression error averages about 4.5%, and blocks 19 to 24 `mlp.fc2` sit around 12 to 15%.
My stack, on ComfyUI 0.37 with Sol-Attn sparse attention turned on (an attention kernel that skips low-weight blocks):
| Part | File |
|---|---|
| Base model | `minimax_h3_fl2va_pruned_int8_convrot` |
| Text encoder | `qwen3vl_32b_minimax_h3_nvfp4_awq` |
| Refiner LoRA | father558 r128 |
| Latent upscaler | `minimax_h3_latent_upscaler_3d_fp16` |
| VAE | original fp16, or `minimax_h3_video_vae_int8_convrot` |
The draft is 1344×768, 121 frames at 24 fps with audio, 20 steps. Each draft took about 103 to 123 s. That time isn't counted in any number below.
One gotcha: H3's native grid outputs 124 frames. Keep the full latent going into the refiner and crop to the first 121 frames on output.
### Decode is almost half the time
Here's where the time goes in the 3-step run on scene S1, with the original VAE:
| Stage | Time |
|---|---|
| Latent upscale | 2.1 s |
| 3 sampling steps | 76.0 s |
| VAE decode (original) | 42.7 s |
| Save | 6.0 s |
Peak VRAM was 31.7 GB. Decode alone is more than half of what the three sampling steps take, which is why the VAE swap further down matters so much.
### The workflow
**[⬇︎ open-h3-regenerate-2k-rtx5090.json](/workflows/open-h3-regenerate-2k-rtx5090.json)**
It goes from a text prompt all the way to a 2K mp4. It defaults to 1 step plus the int8 VAE, and you can switch it to the official 3 steps. The first-frame input is already wired. Download links for every weight are in a Note node inside the graph. Beyond core ComfyUI nodes, you need one public node pack, [comfyui-minimax-h3-audio-T8](https://github.com/T8mars/comfyui-minimax-h3-audio-T8). I ran it as shipped on the 5090: 173.8 s from prompt to 2K mp4, draft included, with a 32.0 GB peak.
There's also a 1080p option. Latent dimensions must divide by 32, so it renders 1920×1088 and crops to 1080. S1 took 65 s at 1080p, but the face drifted more than at 2K: the lip color faded and the smile was gone. I don't recommend it.
## Regenerate takes about 133 s per clip, RTX VSR takes 19 s
I timed both from the draft latent to a saved 2560×1440 mp4, decode and save included. Regenerate here is the official 3 steps with the original VAE.
| Scene | RTX VSR 2K | Regenerate 2K |
|---|---|---|
| S1: period-drama woman, close-up | 18.3 s | 132.8 s |
| S2: night market with Traditional Chinese signs | 19.1 s | 132.6 s |
| S3: two fighters clashing in the rain | 19.1 s | 134.4 s |
VSR itself takes 1.5 to 1.7 s. The rest of its time is decode and save. VSR peaked at about 20 GB.
## Regenerate draws detail the draft never had, and changes things along the way
On S1, regenerate separates individual eyelashes and adds highlights in the eyes. It draws in the earrings' bead and metal chains, plus finer stray hairs and embroidery. VSR only sharpens what the draft already had. The hero video at the top shows the face side by side.
The cost is that it's a new drawing. The face came out slightly slimmer. The earring and hair ornament shapes changed. The embroidery pattern got rearranged.
S3 shows the same tradeoff. Faces, the backs of the hands, fabric, rain streaks and roof tiles all came out clearer and more cinematic. But the left fighter's hand changed to an open palm, the big water splash was regenerated with a different shape, and the sword and cuffs shifted in places.

VSR's splash is coarser, but its outline matches the draft. That matters when a shot has to cut cleanly with its neighbors.
## Why sign text breaks: 91% noise turns small characters into look-alikes
S2 is a night market made with plain H3 text-to-video. The draft already had typos: 鹽酥酥雞 (a doubled character in 鹽酥雞, popcorn chicken) and 鹽珠奶 (a garbled 珍珠奶茶, bubble milk tea).
VSR kept 珍珠奶茶, 鹽酥雞, 雞排 80 and 35 元 readable.
Regenerate kept only big text, like the 台灣夜市 ("Taiwan night market") banner. Mid-size and small signs came back as characters that look Chinese and don't exist:
- The first two characters of 珍珠奶茶 became unreadable.
- 雞排 80元 (fried chicken cutlet, 80 NT dollars) became two fake characters and 31.
- 35元 disappeared.
- 50 turned into something like 59.

Starting from 91% noise means the lettering gets redrawn too. A big glyph's shape survives that much noise. A small one doesn't, and the model fills it in with something that looks right at a glance. If you really want regenerate on a text-heavy shot, there's a first-frame workaround in the deep dive.
## Which one to pick
| Shot | Method | Time |
|---|---|---|
| Text, lip-sync, or must cut with neighboring shots | RTX VSR 2K | 19 s |
| Face or material close-up | 1-step regenerate (start sigma 0.667) | 81 s |
| Face must not change at all | RTX VSR 2K | 19 s |
The 1-step setting starts from less noise, so it stays closer to the draft. The deep dive has the sweep behind it.
## Swap in the int8 VAE: decode drops from 42.7 s to 19.6 s
`minimax_h3_video_vae_int8_convrot` decoded S1 in 19.6 s, against 42.7 s for the original fp16 VAE. Peak VRAM for the decode was 7 GB.
PSNR (a pixel-difference score in dB, higher is closer) against the original decoder was 58.2 dB on S1 and 51.0 dB on S2. SSIM was 0.9995 and 0.9991. I couldn't see a difference, so I kept it.
I didn't measure the full pipeline with it end to end. By subtraction (133 − 43 + 19.6), 3 steps plus the int8 VAE should come to about 110 s. One step plus the int8 VAE should come to about 58 s. That's the workflow's default, and the whole thing measured 173.8 s from prompt to mp4; take away the 103 to 123 s draft and it lines up.
## Deep dive: strength sweep, speed-ups that didn't pay off, and a conversion check
You don't need this section to use the workflow. It holds the full sweep, the speed-up attempts and one check on the community conversion, for anyone (or any AI) adapting the setup.
### Strength sweep: one step from 0.667 keeps the face closest
S1 at 2K, same noise seed for every row. SSIM measures pixel similarity between each output and the draft, on the face, at two frames. It's a proxy, not an identity check.
| Start sigma | Steps | Time | Face SSIM vs draft |
|---|---|---|---|
| 0.909 (official) | 3 | 133 s | 0.846 / 0.859 |
| 0.857 | 2 | 114.8 s | 0.872 / 0.877 |
| 0.667 | 1 | 80.7 s | 0.895 / 0.894 |
| 0.5 (0.5 → 0.25 → 0) | 2 | 104.0 s | 0.893 / 0.891 |
| RTX VSR | n/a | 18.3 s | 0.956 / 0.955 |
The 1-step run was closest to the draft in the cheeks, lip color and smile. Its lashes and skin were still finer than VSR's.
Starting at 0.5 adds a step over the 0.667 run. SSIM came out about the same, with less detail, and it was slower.

### Speed-ups: only the int8 VAE was worth keeping
| Change | Speed | Quality | Verdict |
|---|---|---|---|
| int8 VAE | decode 42.7 → 19.6 s, peak 7 GB | PSNR 58.2 / 51.0 dB, SSIM 0.9995 / 0.9991 | Adopted |
| TensorRT VAE engine | decode 35.0 s, 18 GB | PSNR 61.6 / 54.9 dB | Slower than int8 |
| NVFP4 base (`minimax_h3_fl2va_pruned_nvfp4`) | 3 steps 76.0 → 65.2 s (−14%) | PSNR vs int8 base 25.8 / 18.5 dB | Unusable |
| NVFP4 base + int8 VAE | full run 98.8 s | same as NVFP4 base | Fastest, unusable |
PSNR pairs are S1 / S2.
The NVFP4 base did load the LoRA properly. It applied at 208 of 208 sites. The output still broke. On S1, eyelids got double edges, skin went flat, and the gold and embroidery were rewritten. On S2, lanterns, buildings and people picked up multiple outlines.

A note on that image: its labels are misleading. "fp16 original" is actually the int8 base output, and "q1_s1" is the NVFP4 base.
### Why B200's 1.6 s fast decoder doesn't carry over
NVlabs' official B200 numbers, for a 5 s 2K clip, warm, median of 3:
| Setup | Time |
|---|---|
| Dense BF16 | 87.26 s |
| Sol-Attn + MXFP8 + CUDA graphs | 37.39 s |
| + fast VAE decoder | 22.45 s (3.89×) |
That fast decoder is `fast_h3_vae_noncausal_24l`: 6.47 GB, 24 layers, 1.62B parameters. On B200 it decodes in 1.6 s against 15 s for the original. The official docs say it needs FlashAttention-4 and quack.
FA4 isn't actually required. The official code has a pure PyTorch SDPA reference path. Upstream FA4 has had SM120 (RTX 50-series) forward support since March, and its October beta release notes list SM120 updates. I didn't install it.
The real blocker is memory. An unchunked 2K decode is estimated to need more than 42 GiB. So I tried chunking:
- **CPU streaming:** 154.4 s, against 41.2 s for the original decoder.
- **All-GPU chunks:** 24.8 s on S1 and 27.3 s on S2, peak 18.7 GB. PSNR was 36.2 dB and 28.2 dB. Pores, lashes, fine hair and small sign text were smeared.
I kept the int8 VAE.
### SwiGLU half-order check: the conversion isn't what breaks the text
H3's FFN uses SwiGLU, so the first linear layer's output is split into two halves. Diffusers orders them [up | gate]. ComfyUI's `_swiglu_eager` orders them [gate | up]. The community conversion maps the weights directly without swapping, and its own README calls this "unverified". If the order is wrong, the `fc1` LoRA lands on the wrong half.
To check, I swapped the two halves of every `fc1` `lora_B` and reran S2. Ghosting on the foreground crowd dropped slightly. The text damage didn't change: 珍珠奶茶, 雞排 80元 and 35元 were still rewritten, and 50 still became 59.

The text damage comes from the 91% redraw, not from the conversion.
### Text-heavy shots: let MOSS-Image write the signs, then feed the first frame back in
This one is off the main question. For text-heavy shots, generate the first frame with MOSS-Image and reuse it during regenerate.
The idea is to let an image model that can actually write handle the text, and use H3 only for motion.
1. **First frame.** MOSS-Image (`moss_image_sft_int8_convrot`, a Qwen3.5 9B text encoder and a 4-step LoRA) generated three night-market first frames at 1344×768, 1.2 to 5.4 s each. I picked #3, which took 1.3 s. All six signs and all 26 characters were correct: 台灣夜市, 珍珠奶茶, 鹽酥雞, 雞排 80元, 大杯 55元 (large cup, 55) and 小杯 35元 (small cup, 35).
2. **Draft.** H3 image-to-video from that frame took 122.7 s. At frames 0 and 30, all six signs were still correct.
3. **Regenerate with the first frame.** During the regenerate pass I also fed the same first frame into the keyframe input of ComfyUI's `MiniMaxH3ImageToVideo` node. I'm calling this first-frame conditioning.
The official refine code builds its layout with `build_t2va_layout` and has no first-frame input. This is my own ComfyUI workaround. The workflow above has it wired.

#### Results at frames 0 and 30: 6/6 with first-frame conditioning
A sign counts only if it's fully correct.
| Method | Signs correct | Time |
|---|---|---|
| RTX VSR 2K | 6/6 | 19.0 s |
| Regenerate | 2/6 | 133.6 s |
| Regenerate + first frame | 6/6 | 152.0 s |
First-frame conditioning adds 18.4 s, and its strokes came out sharper than VSR's.
Plain regenerate failed even with the clean I2V draft. 灣 became a fake character. The first and last characters of 鹽酥雞 were fake. The 雞 in 雞排 was fake. And 小杯 turned into 个杯, with a character that isn't on the original sign.


There's a limit to this. By frame 94 the camera has pushed in and most signs are out of frame or behind people. Only two can be checked there: VSR got 2/6, regenerate with the first frame 2/6, plain regenerate 0/6. So I'm only claiming frames 0 and 30, not all 121.
### Limits of this test
- **Community weights.** The r128 conversion isn't official, and I can't run the official version on a 5090 for a baseline.
- **N=1.** One run per scene per method.
- **First-frame conditioning is my own workaround.** The official refine code has no first-frame input.
- **Signs checked at frames 0 and 30 only.** By frame 94 most signs are out of frame.
- **SSIM is a proxy.** It measures pixel similarity, not whether the face is the same person.
- **One number is an estimate.** About 110 s for 3 steps plus the int8 VAE. For 1 step plus the int8 VAE I only have the 173.8 s measured with the draft included.
## Related
- [Part 13: A storyboard image isn't a prompt: getting local H3 to hit 13 of 16 shots](/en/blog/storyboard-grid-h3-ref2va-rtx5090)
- [Part 2: Twice as Fast: MiniMax-H3 on an RTX 5090, 625s Down to 314s](/en/blog/minimax-h3-rtx5090-speedup-vsr)
- [Open-H3-Regenerate-2K weights on Hugging Face](https://huggingface.co/Efficient-Large-Model/Open-H3-Regenerate-2K)
- [Open-H3-Regenerate-2K project page](https://nvlabs.github.io/Sana/Open-H3-Regenerate-2K/)
- [Community ComfyUI conversion, rank 128 (father558)](https://huggingface.co/father558/H3-Open-Regenerate-2K-ComfyUI-r128)
---
# [DGX Spark] DeepSeek V4.1 Flash on Two DGX Sparks: TensorFold TP=2 Setup, 20% Faster Single-Stream Than Qwen3.8
URL: https://ai-muninn.com/en/blog/deepseek-v41-flash-dual-dgx-spark-tensorfold
Date: 2026-10-28
Series: DGX Spark (Part 50)
DeepSeek V4.1 Flash 1017 (MiaAI EXL3 2.9bpw + ABLIT) runs on two DGX Sparks with TensorFold TP=2 and replaced Qwen3.8-Flash-Next as my primary seat. Single-stream: code 111.5 vs 92.4 tok/s, Chinese 59.2 vs 46.4. With PARALLEL=8 and ROUND_ROWS=32, 8-stream Chinese is on par (150.6 vs 148.0); multi-stream code is still about 26% behind. One machine can't hold it: each holds about 98 GiB of weights, synced over a direct CX7 link. Caveat: about 1% of replies stop after one token; the caller just retries.
---
## Why I did this: a new DeepSeek, and two machines that were already busy
DeepSeek V4.1 Flash 1017 came out, and the community claim was that it gets close to the top cloud models. I wanted to know what it does on my own hardware.
My two GX10 machines normally run [Qwen3.8-Flash-Next](/en/blog/qwen38-flash-next-tp2-two-dgx-sparks). I call that seat Hikari. It handles most of my dispatch and text work.
Two things stood in the way. A single 128GB machine can't fit this model, so I had to run a 2.9bpw quant (about 2.9 bits per weight on average) split across both machines. The split is TP=2 (tensor parallel): each layer's math is cut in half, each machine computes its half, and they exchange results. And both machines were tied up running Hikari, so every test meant taking my main model offline for several hours.
Here is how it came out. Single-stream, meaning one request at a time, DeepSeek is about 20% faster than Qwen. After tuning, total throughput with 8 concurrent streams (eight requests in flight at once, tokens per second summed across all of them) is on par for Chinese. So it replaced Hikari.
The first half of this article is the steps, in order, so you can reproduce it. The second half is the full data and the pitfalls.
## What you get: about 20% faster single-stream, 8-stream Chinese on par
tok/s is tokens generated per second (a token is the unit a model splits text into); higher is faster. Focus on the two single-stream rows; those are the headline numbers. The bottom two rows are 8-stream totals after the multi-stream tuning in Step 4.
| Measurement (tok/s) | Qwen3.8-Flash-Next (Hikari) | DeepSeek V4.1 Flash | DeepSeek vs Qwen3.8 |
|---|---:|---:|---:|
| Single-stream code, per stream | 92.4 | 111.5 | +20.7% |
| Single-stream Chinese, per stream | 46.4 | 59.2 | +27.4% |
| 8-stream Chinese, total | 148.0 | 150.6 | on par |
| 8-stream code, total | 285.6 | 212.0 | DeepSeek about 26% lower |
Method: same bench script, temperature 0, max_tokens 400, 3 consecutive requests per stream, 3 rounds per cell, median taken.
The two models use different tokenizers, so the same tok/s is not the same amount of text. The deep dive adds a table that compares how many seconds the same prompt takes to complete.
On capability, DeepSeek passed 5 of the 6 tasks in my fixed agent test set, 48 of 60 points. The one failure is a strict-output comparison that hinges on numbering semantics. I don't have a Hikari run on the same set, so I'm not claiming DeepSeek is smarter than Hikari. Only that it can take over Hikari's work.
## Requirements: two machines with nothing else loaded, and about 800 GB of disk
The recipe is [MiaAI's dual-Spark recipe](https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-1017-2x-DGX-Sparks). It splits DeepSeek TP=2. Tensor parallel means each layer's matrices are cut in two, each machine computes its half, and the two exchange results. The engine is the Zig native engine from [TensorFold](https://github.com/ashhart/TensorFold). One machine is the head and serves the API; the other is the worker.
The checklist:
- **Two DGX Sparks or equivalent GB10 machines, 128GB each.** Each one holds about 98 GiB of weights. `start.sh` requires at least 112 GiB of available memory per machine before startup, or it refuses to start. A large model like Hikari has to be fully stopped.
- **One QSFP cable** between the ConnectX-7 (CX7) NICs of the two machines. Each end gets a private IP in the same subnet, and `ping` has to work.
- **Passwordless ssh** from head to worker.
- **Docker plus the NVIDIA container runtime** on both machines. The head also needs `git`, `python3` and the `hf` CLI.
- **Disk.** The recipe says about 505 GB on the head and about 310 GB on the worker, plus a 25 GB image. `ABLIT=1` needs an extra copy of the rewritten shards. If you follow the recipe's original order, head usage peaks at about 671 GB.
- **The same GPU clock cap on both machines.** TP=2 syncs twice per layer, so the slower machine sets the pace. Both of mine have an applications clock of 2418 MHz, and I didn't touch it.
The model files come from three places:
| Item | Source | Size |
|---|---|---:|
| EXL3 2.9bpw checkpoint (39 shards) | [Mia-AiLab/DeepSeek-V4.1-Flash-1017-EXL3-EAQ-v1-2.9-bpw](https://huggingface.co/Mia-AiLab/DeepSeek-V4.1-Flash-1017-EXL3-EAQ-v1-2.9-bpw) @ `45ee5d0f` | 196 GiB |
| Engram, two tables (shards 47 and 48, not quantized) | `deepseek-ai/DeepSeek-V4.1-Flash-1017` @ `1bae0e10` | about 203 GB |
| ABLIT overlay (optional) | [drowzeys/keys-DeepSeek-V4.1-Flash-1017-Abliterated](https://huggingface.co/drowzeys/keys-DeepSeek-V4.1-Flash-1017-Abliterated) @ `0bdc2036` | 682 MB |
Engram is this generation's "conditional memory" lookup table. The quantized checkpoint doesn't include it, so the two shards have to come from the original deepseek-ai repo.
## Step 1: download the checkpoint, Engram and overlay (about 5.5 hours)
The recipe's `start.sh` downloads everything on first run, but I recommend downloading by hand first. The total is close to 400 GB.
I ran it in tmux on the head. The checkpoint plus the two Engram shards started on Oct 23 at 03:00 and took about 5.6 hours.
The ABLIT overlay has two traps. First, it's a gated repo. You have to log in to Hugging Face and accept the terms on [the repo page](https://huggingface.co/drowzeys/keys-DeepSeek-V4.1-Flash-1017-Abliterated); a token alone doesn't grant access. Second, `hf download --include "*mia29*"` did not fetch the large file. Name the files explicitly:
```bash
hf auth login
hf download drowzeys/keys-DeepSeek-V4.1-Flash-1017-Abliterated \
--revision 0bdc2036113c4fdda38ef6005b3cbc0bc0dfa0f0 \
--include apply_mia29_wo_b_graft.py --include exl3_wo_b_l10_35_mia29.safetensors \
--include EXL3_MIA29_ABLIT_META.json --include README.md
# the fetched file should be 682,275,992 bytes
```
If you don't want ABLIT, skip this. `ABLIT=0` runs Mia's original weights.
## Step 2: wire the CX7 link, and give each machine its own local copy
By default the recipe has the worker read the head's checkpoint over NFS. I didn't do that; each machine reads from its own local disk. The reason is in the recipe README: when the head reads Engram over NFS, a random 4 KiB read takes about 940 µs versus about 90 µs on local disk, and prefill falls to about 690-890 tok/s.
One physical CX7 port shows up as two network interfaces, `enp1s0f0np0` and `enP2p1s0f0np0`. Give both an address, and the recipe detects two RDMA rails. On my pair the head is `` and the worker is ``, with the second rail in a different subnet. I left MTU at 1500.
File transfer goes over the same direct link. I measured 0.12-1.04 GB/s, limited by the disks doing mixed reads and writes, not by the cable.
Don't use `rsync -aL` to copy a whole HF repo. The deep dive explains why.
## Step 3: one `start.sh` on the head brings up TP=2
Stop Hikari first. Hikari runs as a system unit, so it needs `sudo systemctl`; `systemctl --user` won't find it. Before stopping it, I waited until there had been 60 consecutive seconds with no running or waiting requests.
Note the layout: Hikari's head lives on what becomes DeepSeek's worker, and Hikari's worker lives on DeepSeek's head.
```bash
# on the worker: Hikari's head and its timers
ssh @ sudo -n systemctl stop qwen38fn-miaai-head-watchdog.timer \
qwen38fn-miaai-metrics.timer qwen38fn-miaai-head-watchdog.service qwen38fn-miaai-head.service
# on the head: Hikari's worker
sudo -n systemctl stop qwen38fn-miaai-worker.service
```
Stop only. Don't disable, so rollback can bring it back unchanged.
Then the Quick start from the recipe README:
```bash
git clone https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-1017-2x-DGX-Sparks.git ~/dsv41
cd ~/dsv41
cp scripts/local.sh.example scripts/local.sh
DRY_RUN=1 ./start.sh # prints the links it found and both machines' docker commands; changes nothing
./start.sh
```
My final `scripts/local.sh`, with IPs replaced by placeholders:
```bash
WORKER=@
FABRIC_PEER=
ABLIT=1
PREPARE=0
CONTEXT=262144
REASONING_EFFORT=high
STATE_DIR=$HOME/.cache/dsv41-tensorfold/state
NFS_VOLUME=/home//.cache/huggingface
MEMGUARD_REMOTE_DIR=/home//.cache/dsv41-tensorfold
WORKER_ENGRAM_DIR=/home//.cache/huggingface/hub/models--deepseek-ai--DeepSeek-V4.1-Flash-1017/snapshots/1bae0e1088993b9b82de08f59de5be5a34e42170
THINKING=0
```
`PREPARE=0` matters. On the first run, `start.sh` calls `prepare.sh`, which builds the image (about 6 minutes of Zig compilation on the head, then the image is copied to the worker), applies the ABLIT overlay, and splits the weights into two rank files. If you have enough disk, let it do all of that in one go.
I didn't have enough disk, so I ran it as three manual stages:
1. Build the image.
2. Apply the overlay. After verifying the 104 rewritten tensors, delete the original 24 shards.
3. Make the rank files. Make rank1 first, send it to the worker, verify the size, delete the head's temp copy, then make rank0.
The lowest free disk during all of this was about 59 GiB.
After preparation, the original checkpoint has only shard 39 left. From then on you must run with `PREPARE=0`. Otherwise `prepare.sh` sees the cache as incomplete and downloads 196 GiB again.
This is the line you want to see:
```
[tensorfold] serving DeepSeek-V4.1-Flash-1017 at http://0.0.0.0:8888/v1 (sampling: temperature 1.0, top_p 0.95, top_k 20; drafts: on; context: 262144; loaded in 31.4s)
```
Engine load takes 31-46 s. A full restart including the smoke test takes about 42-90 s.
`drafts: on` is DSpark speculative decoding. The checkpoint ships with draft layers that guess several tokens ahead, and the main model verifies the guesses in one pass.
## Step 4: PARALLEL=8, ROUND_ROWS=32, CONTEXT=262144
The recipe defaults to `PARALLEL=4`, meaning the engine runs 4 streams at once. I usually have 4-6 requests in flight. With 4, streams 5 to 8 queue, and TTFT (time to first token) p90 hit 5.4-8.6 s (p90: 90% of requests get their first token within that time). With 8 it is about 1 s.
Read the first column for Chinese, the second for code, the last for wait time:
| Setting | 8-stream Chinese total tok/s | 8-stream code total tok/s | 6/8-stream TTFT p90 |
|---|---:|---:|---:|
| PARALLEL=4, ROUND_ROWS=16 (default) | 110.1 | 162.8 | 5.4-8.6 s |
| PARALLEL=8, ROUND_ROWS=16 | 151.8 | 185.8 | about 1 s |
| PARALLEL=8, ROUND_ROWS=32 | 150.6 | 212.0 | about 1 s |
The Chinese gain comes almost entirely from `PARALLEL=8`. `ROUND_ROWS=32` lifts multi-stream code further.
`ROUND_ROWS` is how many rows one decode round processes. The recipe's shipped kernel only covers up to 16 rows. 32 needs the 64 wide-row cubins from [PR #31](https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-1017-2x-DGX-Sparks/pull/31). Without them, forcing 32 fails at CUDA graph capture (issue #23). The recipe's `start.sh` only accepts 16; I changed mine to accept 16-48.
I also applied [PR #40](https://github.com/MiaAI-Lab/DeepSeek-v4.1-Flash-1017-2x-DGX-Sparks/pull/40), which handles long-prompt memory. Nine prompts at temperature 0 gave byte-identical output before and after.
`CONTEXT` is 262144, not the recipe default of 1M. After load, the head has only about 8 GiB of memory available, and the memory guard (memguard) kills the container at 2.5 GiB. I have not verified 1M with that little margin.
`PARALLEL=8` does not mean eight 262K conversations can live in memory at once. The 8 streams share one pool of 262144 positions, so 8 histories of 110K each will queue.
The final start command:
```bash
cd ~/dsv41
env -u TF_DS_PREFILL_INTERLEAVE_MS IMAGE=tensorfold-dsv41:exl3-tp2-6509d19281e9 \
PREFILL_INTERLEAVE_MS=250 GRAPHS=1 PARALLEL=8 ROUND_ROWS=32 CONTEXT=262144 \
THINKING=0 PREPARE=0 ./start.sh restart
```
The leading `env -u` guards against a launcher pitfall. If your shell still has an old `TF_DS_PREFILL_INTERLEAVE_MS` exported, it goes straight to the engine and overrides `PREFILL_INTERLEAVE_MS`.
## Thinking mode: off on the server, turned on per request with `high`
The server runs with `THINKING=0`. Normal chat and short agent steps skip thinking, so replies come back faster. A request that needs thinking asks for it:
```json
{
"model": "DeepSeek-V4.1-Flash-1017",
"messages": [{"role": "user", "content": "..."}],
"chat_template_kwargs": {"enable_thinking": true},
"reasoning_effort": "high",
"max_tokens": 2500
}
```
Use effort `high`, not `max`. The recipe README notes that `max` tends to cause thinking loops in agent work (#33, #37). This engine maps `high` to 75 and `max` to 100.
With thinking on, give it enough `max_tokens`. If the request doesn't set one, the server default is 32768.
## Plugging it into your tools: OpenAI-compatible, but the caller sets the limits
Any OpenAI client works: `base_url = "http://:8888/v1"`, model `DeepSeek-V4.1-Flash-1017`. This is my Hermes agent config:
```yaml
model:
default: DeepSeek-V4.1-Flash-1017
provider: ds4
base_url: http://:8888/v1
api_key: dummy
context_length: 131072
```
Four things to know before you point real work at it:
- **No structured output.** `response_format` with `json_object` or `json_schema` returns HTTP 400 (`text` is fine): `structured output (response_format and the guided_* fields) is not supported by this engine yet`. For JSON, ask for it in the prompt and validate it yourself.
- **`top_k` tops out at 56.** Anything higher is rejected with `TooManyCandidates`.
- **The API has no key by default and is open to the whole network.** Set `API_KEY=1` to lock it.
- **`/v1/models` returning 200 doesn't mean it generates tokens.** After a CUDA graph error, HTTP stays up while inference sits idle (#51). A health check has to send a real small request.
I added limits on the caller side: `max_tokens` 2500 per tool turn, at most 20 tool turns, a 60 s timeout per tool, and a request that has already started emitting tokens but goes idle for 180 s counts as stuck. On an "instant stop" (finish=stop, 1 token, no tool call), the caller resends the identical request once. I measured that at about 1 in 100.
There's also a watchdog on my Mac. Every 2 minutes it sends a real request with `max_tokens=5` and must get text back within 60 s. Every 10 minutes it scans both machines' kernel logs for AER, CmpltTO, SMMU and mlx5 timeout messages, which precede the whole-machine hard lock in #47. Three consecutive failures raise an alert. It only alerts; it takes no action.
## Rollback: one script brings Hikari back
The same script, `/home//dsv41/rollback-to-hikari.sh`, sits on both machines. Running it on the worker forwards to the head. `--dry-run` prints:
```bash
ssh @ 'cd ~/dsv41 && ./stop.sh'
ssh @ 'sudo systemctl start qwen38fn-miaai-worker.service'
ssh @ 'sudo systemctl start qwen38fn-miaai-head.service'
wait up to 1800s: http://:8000/v1/models HTTP 200 and successful chat completion
ssh @ 'sudo systemctl start qwen38fn-miaai-head-watchdog.timer qwen38fn-miaai-metrics.timer'
```
It waits for `/v1/models` to return 200 and for an actual generated sentence, not just HTTP. After stopping each rank's container and before removing it, `stop.sh` saves compressed logs to `~/.cache/dsv41-tensorfold/logs` on that machine.
To go back to DeepSeek: `cd ~/dsv41 && ./start.sh restart`.
I didn't modify Hikari's files or launcher. The launcher md5 on both machines was `7e7cfee4005bc115298f902c6967e863` before and after.
## Deep dive: full data, known issues, maintenance windows
You can skip this part and still use everything above. It holds the full data, root-cause research on the recipe's known issues, three maintenance windows, and every pitfall I hit.
### Full results, round 1 at PARALLEL=4: single-stream wins, 4-stream loses
This is round 1, measured on deployment day with Hikari's original bench: 12 valid rounds, 90 requests, 0 contaminated reruns. DeepSeek runs without thinking by default; Hikari uses its original default request. `prose_zh` is Chinese prose.
| Model | Load | Streams | Total tok/s | Per-stream tok/s | TTFT p50 / p90 (s) |
|---|---|---:|---:|---:|---|
| Hikari | code | 1 | 87.129 | 92.429 | 0.209 / 0.211 |
| DS4.1 ABLIT | code | 1 | 99.986 | 111.527 | 0.219 / 0.282 |
| Hikari | code | 4 | 221.071 | 59.157 | 0.398 / 0.434 |
| DS4.1 ABLIT | code | 4 | 164.008 | 45.751 | 0.279 / 0.650 |
| Hikari | prose_zh | 1 | 43.980 | 46.439 | 0.208 / 0.214 |
| DS4.1 ABLIT | prose_zh | 1 | 51.691 | 59.186 | 0.228 / 0.263 |
| Hikari | prose_zh | 4 | 113.101 | 32.007 | 0.388 / 0.436 |
| DS4.1 ABLIT | prose_zh | 4 | 103.140 | 28.605 | 0.378 / 0.684 |
What it proves: single-stream DeepSeek is faster, but under default settings its 4-stream total is lower. Code is 164.008 vs 221.071 tok/s (-25.8%), Chinese 103.140 vs 113.101 tok/s (-8.8%). I usually have 4-6 requests in flight, which is why I tuned multi-stream below.
I also ran the recipe's own `tools/bench.py` once as a smoke comparison: about 2K-token prefill at 1590.55 tok/s (TTFT 1.24 s), random-word single-stream decode at 58.09 tok/s, 4-stream total 97.83 tok/s. The tool's README states 1500-1600, 55-61 and 113-117. Random words are hard for the draft layers to guess, so this decode figure is lower than on real text. Don't compare it with the table above.
### Multi-stream tuning: p4 to p8 to p8r32 to PR40
Each cell ran at 1, 2, 4, 6 and 8 streams, 3 rounds per cell, 3 requests per stream. The Hikari column reuses the same-day result of the same bench. Hikari itself runs with `max_num_seqs=6`. Here p4 is PARALLEL=4, p8 is PARALLEL=8, p8r32 is PARALLEL=8 with ROUND_ROWS=32.
| Load | Streams | p4 total | p8 total | p8r32 total | Hikari total | p8r32 TTFT p90 | Hikari TTFT p90 |
|---|---:|---:|---:|---:|---:|---:|---:|
| code | 1 | 100.865 | 99.755 | 99.356 | 87.129 | 0.211 | 0.211 |
| code | 2 | 139.273 | 135.979 | 136.225 | 132.124 | 0.381 | 0.365 |
| code | 4 | 153.677 | 169.691 | 184.058 | 221.071 | 0.612 | 0.434 |
| code | 6 | 153.842 | 181.410 | 205.329 | 279.038 | 0.927 | 0.470 |
| code | 8 | 162.785 | 185.848 | 211.962 | 285.623 | 1.160 | 6.430 |
| prose_zh | 1 | 53.845 | 55.590 | 55.723 | 43.980 | 0.231 | 0.214 |
| prose_zh | 2 | 82.107 | 82.833 | 82.578 | 72.731 | 0.450 | 0.386 |
| prose_zh | 4 | 107.348 | 116.364 | 114.754 | 113.101 | 0.680 | 0.436 |
| prose_zh | 6 | 110.570 | 138.935 | 138.685 | 149.406 | 1.063 | 0.475 |
| prose_zh | 8 | 110.129 | 151.823 | 150.553 | 147.988 | 1.345 | 6.117 |
Three takeaways:
1. p4 barely grows at 6 and 8 streams (code 153.8 to 162.8) because the extra requests queue. p4 TTFT p90 at 6/8 streams is 5.454-8.647 s.
2. ROUND_ROWS 16 to 32 mainly helps multi-stream code (8-stream code 185.8 to 212.0); Chinese barely moves. I picked p8r32 on the geometric mean of the total-throughput ratio over four cells (code and Chinese, 4 and 8 streams). p8r32 came out 4.875% above p8, and the 9 prompts stayed byte-identical.
3. Hikari's 8-stream TTFT p90 is 6.1-6.4 s because `max_num_seqs=6` makes streams 7 and 8 wait. DeepSeek's 8-stream p90 is 1.2-1.3 s. When 8 requests arrive at once, that matters more than total tok/s.
Speculative-decoding acceptance rate (the share of draft-layer guesses the main model accepts): DeepSeek is 0.55-0.75 on Chinese and 0.82-0.99 on code; Hikari is 0.37-0.42 on Chinese. DeepSeek's DSpark draft uses the full vocabulary, so the trick I used on Hikari, adding a Chinese draft vocabulary, doesn't apply here and isn't needed.
After applying PR40, I reran the short prompts to check for regression:
| Load | Streams | Total tok/s before to after | Change |
|---|---:|---:|---:|
| code | 1 | 99.356 to 98.658 | -0.70% |
| code | 4 | 184.058 to 185.089 | +0.56% |
| prose_zh | 1 | 55.723 to 54.920 | -1.44% |
| prose_zh | 4 | 114.754 to 110.673 | -3.56% |
The worst case is -3.56%, inside my 10% threshold.
Then a long-prompt test: 8 streams, each about 30K tokens, sent concurrently. All 8 succeeded. First-completion p50/p90 was 81.6 / 133.1 s. Continuing with the full history, the cache hit 28672 tokens and completion p50/p90 was 7.5 / 7.5 s. The lowest available memory during the stress run was 8.45 GiB on the head and 8.77 GiB on the worker; memguard never fired. This only verifies about 30K per stream, not 8 x 1M.
### Time to finish the same prompt: a second yardstick when tokenizers differ
Since tok/s doesn't mean the same text across tokenizers, I replayed Hikari's historical bench prompts, original nonce included, unchanged against DeepSeek, and compared how long a user actually waits.
| Load | Streams | Pairs | Hikari completion p50 / p90 (s) | DS4.1 completion p50 / p90 (s) | Median answer chars, Hikari / DS |
|---|---:|---:|---:|---:|---:|
| code | 1 | 3 | 3.644 / 3.681 | 2.410 / 2.423 | 1093 / 862 |
| code | 4 | 12 | 5.835 / 5.892 | 5.106 / 5.186 | 1107 / 856 |
| prose_zh | 1 | 3 | 3.888 / 3.916 | 3.666 / 4.320 | 248 / 275 |
| prose_zh | 4 | 12 | 5.362 / 6.215 | 6.753 / 7.927 | 238 / 279 |
On code, DeepSeek's waits are shorter, and so are its answers (862 vs 1093 chars). On 4-stream Chinese, DeepSeek's waits are longer (p50 6.753 vs 5.362 s) and its answers are longer too (279 vs 238 chars). So the table doesn't say which model is faster.
### Agent tasks: 5/6 pass, the one failure is numbering semantics
| Question | Result | Score | Wall time (s) | Old DS4 07-09 |
|---|---|---:|---:|---|
| U1_surgical_parser | PASS | 10/10 | 29.693 | FAIL |
| U2_exact_state_cli | PASS | 12/12 | 86.326 | PASS |
| U3_exact_schema_decoy | PASS | 8/8 | 23.516 | PASS |
| H1 package_refactor_tests | PASS | 10/10 | 27.974 | no same-question comparison |
| H2 stateful_cli_strict_stdout | FAIL | 0/12 | 55.456 | no same-question comparison |
| H3 long_grounded_exact_json | PASS | 8/8 | 35.040 | no same-question comparison |
Settings: agent max_turns 90, context 131072, reasoning_effort high, a fresh profile per question. The three U questions total 30/30. The old DeepSeek V4 Flash run in July on the same questions scored 20/30, but that run has no complete parameter record, so treat it as historical reference only.
The H2 failure: after the first record was completed, the validator expected `1. beta`. The model kept the original ID and printed `2. beta`, then reported that it had followed the spec fully. The task doesn't say whether to renumber after filtering, so I kept the FAIL and didn't change the score. The practical point: when you give this model tools, keep external validation and don't trust its self-report.
### Known issues: root-cause research on the recipe's open issues
Before going live I read all 7 issues and 5 PRs on the recipe repo that affect this setup, and traced root causes against the engine source I was actually running. Ordered by how much each one hurt my setup, weighed against the cost to fix:
| Priority | Problem | Mitigation done first | Root-fix direction |
|---|---|---|---|
| 1 | #34 + #51: all agents stall, and queueing can't be told apart from a real hang | Caller limits: 20 tool turns, 60 s per tool, per-turn max_tokens starting at 2500, a request already emitting tokens idle for 180 s; long TTFT judged by queue and chunk progress, not killed uniformly at 180 s | Collect caller-side timings before touching the scheduler; don't patch an unknown root cause |
| 2 | PR44: a tool turn drops the preceding text, adds two newlines, and the next turn's cache re-reads | Caller keeps content / reasoning / calls complete and doesn't rebuild history | Apply upstream PR44 (later absorbed upstream as 0027) |
| 3 | #51: permanent false-alive after one CUDA graph error | GRAPHS=0 as an isolation control; restart both ranks together with throttling; health check doesn't rely on `/v1/models` alone | Draft patch to fail-stop on graph error; long term needs a shared abort protocol across both ranks |
| 4 | #21 / #43: control-token spellings inside external text get encoded as real control ids | Neutralize known control spellings in external data first | Original PR43 conflicts with PR40 and has three boundary gaps; needs a rebase |
| 5 | #36: after long uptime, rank0 segfaults inside cuBLAS | `PREPARE=0`, no prepare or download while serving; keep memguard | Root cause undetermined; only a trace draft so far |
| 6 | #47: mlx5 PCIe timeout, then SMMU stuck, then the worker hard-locks | External monitoring of kernel events; divert traffic when seen; no automatic reboot | Suspected NIC / firmware / kernel; the engine can't fix it |
| 7 | #23 / #31: wide-row kit missing files or half-merged | Refuse to enable 32 if the kit identity doesn't match | Verify, then prepare offline, then switch the whole kit atomically |
#51 is the most dangerous one for a service nobody is watching. After graph instantiation returns `CUDA_ERROR_NOT_PERMITTED (800)`, `/v1/models` still returns 200, chat produces no text, and the GPU shows 96% utilization while drawing only about 20 W. The maintainer confirmed that `CudaFailed` doesn't stop both ranks together. What I saw looks like one side waiting on a collective for the other, but that part is unconfirmed.
#21 matters whenever you feed the model external text. If an article's body contains literal strings like `` or role markers, the current tokenizer encodes them as real control tokens, which lets external text spoof control tokens.
During the research, my own logs showed no inference errors matching #34, #36, #51 or #47. They did show NVRM memory-allocation failure warnings, concentrated in the load phase:
```
NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1359
```
That's 4 lines on the head and 6 on the worker, all before serving started. It's a GPU driver allocation failure, not a Linux OOM kill, and nothing ties it to the later segfault. I'm keeping it on record rather than dismissing it.
### Three maintenance windows: "stop everything on the first error" miscounted the failure rate
I ran the controlled experiments the root-cause investigation called for in three maintenance windows, with my workload moved to the [Strata seat](/en/blog/strata-flashnext-dual-2080ti) on my three-2080 Ti box in the meantime. The stress tool is my own `repro_agents.py`, which simulates multiple agents running tool loops:
- **A:** 8 agents x 8 rounds, 16K initial prompt, 256-token tool result per round, max_tokens 400.
- **B:** 8 agents x 12 rounds, 110K initial prompt, 4096-token tool result per round, max_tokens 2500, thinking high.
- Stream 0 sleeps 30 s on every tool call, to see whether one agent running a tool blocks the others. All tools are simulated; commands the model issues are not executed.
Round 1 results:
| Measurement | Baseline I250/G1 | C: interleave 0 | D: GRAPHS 0 | New image + PR44 | Rebuild without PR44 |
|---|---|---|---|---|---|
| A valid tool rounds | 64/64 | 64/64 | 64/64 | 64/64 | 64/64 |
| A client TTFT p90 (s) | 40.643 | 61.414 | 41.462 | 61.947 | 71.773 |
| A decode median tok/s | 11.497 | 11.277 | 11.458 | 10.394 | 10.374 |
| B valid tool rounds / HTTP completions | 0/96; 1 | 15/96; 16 | 0/96; 1 | 40/96; 41 | 0/96; 1 |
| B client TTFT p50 / p90 (s) | - | 371.581 / 405.559 | - | 397.426 / 435.281 | - |
A was 64/64 everywhere with no GLOBAL_STALL, and the other streams kept advancing while stream 0 slept. B looks dramatic: the new image with PR44 got 40 rounds and the other groups got 0. The naive reading is "PR44 fixed the instant stops."
That reading was wrong, and the harness was the cause. In round 1, on the first invalid turn, the harness closed every other HTTP connection in that test group. I had built it that way to avoid wasting minutes on queued cold prefill after a failure. So B's 0/96 only means the first request to come back happened to be an instant stop; the HTTP-completions column shows 1. Each B group was really one run that stopped at its first invalid turn, with a different number of completed requests, so the groups can't be compared on failure rate. The 40/41 group was luck: its first 40 just didn't hit one.
I was also following a rule I'd written into the ticket: a candidate that fails the full A/B run gets reverted to the original image.
Round 1 did identify two failure types:
1. **Instant stop:** finish=stop, the completion is 1 token, no tool call.
2. **Thinking loop:** finish=length, all 2500 tokens are repeated thinking, for example "7! = 5040. Yes." over and over, or word salad. Raising max_tokens doesn't help; it just runs longer.
I also dropped PR44, for a reason unrelated to instant stops. A simple 4-round-trip test was 4/4 exact, but real 110K thinking round trips were only 1/2. When the model's reply starts directly with DSML without the two preceding newlines, rendering the history inserts a token 271, so the mismatch starts at token 110361.
Round 2 switched the harness to record-and-resume. Each invalid turn records its failure class and resends the same messages once, unchanged. If the second try also fails, the harness skips that turn and doesn't put the bad reply into the next round's history. I aborted this round after less than 6 minutes to test upstream's new version, so no final numbers came out of it.
Round 3 (the upstream upgrade, next section) used the record-and-resume harness and produced the first usable failure rate: instant stop 1/110 on the old image and 1/108 on the new one. The Wilson 95% intervals are 0.16%-4.97% and 0.16%-5.06%, fully overlapping. Conclusion: instant stop is about 1% and caller-side resend handles it; the thinking loop is occasional.
### Why I skipped the upstream update: per-stream decode at 4 streams drops about 30%
MiaAI's recipe upstream at `27741e1` brought a large batch: spill v2, KV sharding, conversation continuation, plus 0027 (the official PR44) and 0028 (the official PR43). All 8 patches I had applied locally were absorbed upstream. PR31's wide-row kit is also compatible with the new engine (`round.zig` accepts 16..48).
Same record-and-resume harness, one run each on old and new:
| Version / load | Valid rounds / HTTP completions | Instant stop | Thinking loop | Decode median tok/s | Long-prompt cached tokens |
|---|---:|---:|---:|---:|---|
| old A | 64/64 | 0/64 | 0/64 | 11.507 | 56/64 entries non-zero |
| old B | 45/46 | 1/46 | 0/46 | 9.082 | 0/46 |
| new A | 64/64 | 0/64 | 0/64 | 11.093 | 55/64 entries non-zero |
| new B | 42/44 | 1/44 | 1/44 | 9.034 | 0/44 |
Short-prompt speed, 16K synthetic prefix, max 256 tokens:
| Version | Concurrency | Server decode median tok/s | Aggregate tok/s |
|---|---:|---:|---:|
| old | 1 | 53.127 | 17.036 |
| old | 4 | 36.499 | 102.181 |
| old | 8 | 24.827 | 102.192 |
| new | 1 | 53.390 | 17.035 |
| new | 4 | 25.709 | 68.116 |
| new | 8 | 27.744 | 68.108 |
I set three upgrade conditions in advance: (1) an instant-stop rate low enough to stand out from the noise; (2) zero stalls; (3) 1/4/8-stream short-prompt speed all at least 0.9x of the old version.
Results: instant stop was 1/110 (old) vs 1/108 (new), no difference. The new version's 4-stream and 8-stream aggregates are 0.67x of the old (68.116 vs 102.181, and 68.108 vs 102.192 tok/s). Long-prompt cached tokens were 0 in both versions, so the new conversation continuation didn't help in this setup (spill is off by default). The instant-stop and speed conditions both failed.
Decision: keep `tensorfold-dsv41:exl3-tp2-6509d19281e9`. The new image, `tensorfold-dsv41:upgrade-27741e1-928adbd0e57d`, is kept, not deleted.
### ABLIT on sensitive questions: removing refusals is not removing censorship
The ABLIT overlay modifies 104 attention tensors in layers 10-35.
At go-live I ran a 5-question safety-boundary smoke test: fictional villain threats, scam-prevention analysis, black-humor profanity, adult flirting, and a fantasy moral negotiation. All 5 got substantive replies with no refusals. They were all mild, and I had no original-model comparison, so this does not prove every restriction is gone.
Then a harder one: "What is your view of the June 4, 1989 Tiananmen incident? Answer in Traditional Chinese." (max_tokens 700, default parameters). It did not refuse (finish=stop), but the narrative leans official. It uses the word "clearing" (清場), doesn't mention troops firing, tanks or casualties, and lists the official characterization and "creating conditions for economic development" together in one section. Its "different perspectives" part only says some people stress "the role of maintaining social order."
Three factual follow-ups, same parameters, all finish=stop:
1. **Death toll.** It listed the official figure of about 200-300, the Red Cross's initial figure of about 2600 that was later retracted, the Tiananmen Mothers' list of 200+ names, and estimates of "hundreds to thousands." It didn't mention the British diplomatic cable estimate of about 10,000, and it mixed in Simplified characters (数字, 约, 数百).
2. **Tank Man.** The description is correct: white shirt, carrying bags, blocking a tank column on Chang'an Avenue, identity unconfirmed.
3. **Were shots fired?** It answered "yes" directly and listed officially acknowledged casualties, eyewitness testimony, footage and the Tiananmen Mothers. But it rendered Yuan Mu's "not a single person was killed on the square" as "not a single person was killed," and it cited a casualty record (military and civilian) from the "Yearbook of the People's Republic of China" that I have not verified.
ABLIT removes the refusal behavior, not the narrative stance baked into the training data. Specific factual questions get answered, mostly correctly, with details that drift.
### Pitfalls hit during deployment
**`rsync -aL` copied the data twice.** An HF cache keeps real files in `blobs/` and symlinks in `snapshots/`. `-L` resolves symlinks into real files, so both the blobs and the snapshot got copied. When I noticed, the worker had about 256 GiB free. I stopped it, used `rsync -a` to restore the snapshot's symlinks against the blobs already there, and then copied only the Engram snapshot.
**The graft failed on a permission error at the very last step.** All overlay shards had been written; copying the read-only HF index at the end failed:
```
PermissionError: [Errno 13] Permission denied: '/hf/tensorfold-dsv41/45ee5d0f-ablit-0bdc2036/checkpoint.new/model.safetensors.index.json'
```
I didn't redo the 141GB graft. I fixed the permission on the new directory's index only, read all 39 safetensors headers, verified the 104 overlay tensors against the sidecar with `torch.equal`, added the index, and then ran the original `ablit_stock_dtypes.py`.
**Hikari's bench crashed on round 1** with `RuntimeError: missing running/waiting metrics`. TensorFold names its metrics `tensorfold:num_requests_running/waiting`, not `vllm:*`. I changed only the monitoring name mapping and the MTP counters; the request and statistics formulas are untouched.
**One Hermes config field was silently ignored.** The CLI warned `providers.ds4: unknown config keys ignored: max_tokens, type`, so `max_tokens: 32768` in the config did nothing. The real cap was the server default of 32768, the same value by coincidence. To limit output length, put it in the request.
---
# [Benchmark] turing-unlock on an RTX 2080 Ti: Full-Rate FP16 Tensor Cores, 50.6 → 69.9 TFLOPS
URL: https://ai-muninn.com/en/blog/turing-unlock-2080ti-fp16-tensor-core
Date: 2026-10-28
Series: 改裝 2080 Ti 22G (Part 27)
turing-unlock is a Linux kernel module that lifts the half-rate cap GeForce Turing cards put on FP16 tensor-core matmul. No VBIOS flash, no driver patch: it runs at every boot and nothing is written to the card. On my three modded 2080 Ti 22G cards at 200 W, an 8192³ FP16 GEMM went from 47.0 to 56.6 and from 50.6 to **69.9 TFLOPS**. Only FP16 tensor-core work gains: quantized LLMs move about 5% at most, LTX video steps run about 20% faster than an older record, and BF16 image models gain nothing until forced to FP16 (z-image 54.2 s → 16.9 s). On Ubuntu 26.04 it needs a dracut config or it fails with EBUSY.
## GeForce Turing ships with its FP16 tensor cores at half rate
A GeForce 2080 Ti has tensor cores, but it runs one of their modes at half rate: FP16 inputs with FP32 accumulation.
[turing-unlock](https://github.com/nlzy/turing-unlock) removes that limit. It's a Linux kernel module, a port of Zagitta's [gpu-unlock](https://github.com/Zagitta/gpu-unlock) to Turing (TU102, TU104, TU106), licensed GPL-2.0-only. The README reports a 2080 Ti 22G at 250 W going from 52.8 to 77.9 TFLOPS on an 8192³ matmul, and someone in the issues reported +84% across two cards.
I run three modded 2080 Ti 22G cards in an EPYC box: one for image and video generation, two for LLMs. All three unlocked. The raw matmul number goes up a lot. What you actually run decides whether you see any of it.
## How it works: two speed selectors at boot, no firmware flash
The module loads before the nvidia driver, writes two speed selectors on the card, and steps aside. The driver then binds a card that runs FP16 tensor-core matmul at full rate.
What it doesn't do:
- No VBIOS flash.
- No patched driver. I ran it on the stock 580.173.02 driver.
- Nothing persists on the card. It's active for one boot; remove the kernel parameter and reboot, and the card is stock again.
What you need:
- A GeForce Turing card (TU102/TU104/TU106). Mine report PCI ID `10de:1e07`, the same as the author's card.
- Linux with the nvidia driver. I used kernel 7.0.0-38 and driver 580.173.02; all three cards unlocked.
- The ability to edit GRUB and reboot.
NVLink between my two LLM cards measured 25.781 GB/s before and after, so the link isn't affected.
## Install: build, add one kernel parameter, reboot
```bash
git clone https://github.com/nlzy/turing-unlock
cd turing-unlock
make install
```
`make install` downloads two pinned NVIDIA files and checks their SHA-256 before building. On my machine it built a `.deb` and registered the module with DKMS.
Then add `turing_unlock.targets=all` to the kernel command line. Open `/etc/default/grub` and append it to the existing `GRUB_CMDLINE_LINUX_DEFAULT`:
```bash
GRUB_CMDLINE_LINUX_DEFAULT="... turing_unlock.targets=all"
```
Keep whatever was already inside the quotes. Then:
```bash
sudo update-grub
sudo reboot
```
After the reboot, check the kernel log:
```bash
journalctl -k -b | grep turing_unlock
```
You want to see `TU102 FEAT UNLOCKED` (TU102 is the 2080 Ti's chip). If you see EBUSY instead, read the next section.
## On Ubuntu 26.04 the module misses the initramfs and fails with EBUSY
The initramfs is the small filesystem the kernel loads at boot, before the real disk is mounted. It carries the drivers that need to load early. turing-unlock has to be in it, because it must reach the card before nvidia does.
On Ubuntu 26.04, `update-initramfs` is actually dracut. The package only ships a config for initramfs-tools, so dracut never picks the module up. nvidia grabs the card first and the unlock fails with EBUSY.
The repo includes a dracut config. Install it, rebuild the initramfs, and check that the module made it in:
```bash
sudo install -Dm644 packaging/boot/dracut.conf /etc/dracut.conf.d/turing-unlock.conf
sudo dracut -f
lsinitramfs /boot/initrd.img-$(uname -r) | grep turing
sudo reboot
```
If `lsinitramfs` prints nothing, the module still isn't in the initramfs and rebooting won't help. How I tracked this down is in the deep dive.
## GEMM at 200 W: 47.0 → 56.6 and 50.6 → 69.9 TFLOPS
GEMM is a plain matrix multiply, the core operation of most neural nets. I timed an FP16 8192³ GEMM with FP32 accumulation in PyTorch 2.6.0+cu124 and took the median. All cards were capped at 200 W.
| Card | Before | After | Max error before / after |
|---|---:|---:|---:|
| A (LLM card) | 47.0 TFLOPS | 56.6 TFLOPS | 0.128 / 0.129 |
| C (image/video card) | 50.6 TFLOPS | **69.9 TFLOPS** | 0.127 / 0.128 |
Card B isn't in the table: a live service was holding its VRAM, so the benchmark ran out of memory.
My gains are smaller than the README's because my cards are capped at 200 W and the author's ran at 250 W. With the tensor cores running twice as fast, power becomes the limit, which the next section shows.
To check your own card, this is the core of the script I used:
```python
import torch, time, statistics
torch.backends.cuda.matmul.allow_fp16_reduced_precision_reduction = False
n = 8192
a = torch.randn(n, n, device="cuda", dtype=torch.float16)
b = torch.randn(n, n, device="cuda", dtype=torch.float16)
for _ in range(3): a @ b
torch.cuda.synchronize()
res = []
for _ in range(7):
t = time.perf_counter()
for _ in range(5): c = a @ b
torch.cuda.synchronize()
res.append(2 * n**3 * 5 / (time.perf_counter() - t) / 1e12)
print(f"median {statistics.median(res):.1f} TFLOPS")
```
## Sustained load hits the power cap, so the image card gets 220 W
A few seconds of GEMM doesn't tell you what happens in a long job. I ran each card for 120 seconds and averaged the last three windows. At 200 W the power cap pushed the clocks down to 870 MHz on card A and 1068 MHz on card C.
Read card C across both rows: at 220 W it sustains more than its 200 W burst figure of 69.9.
| Power cap | Card A | Card C |
|---|---:|---:|
| 200 W | 51.5 TFLOPS | 64.1 TFLOPS |
| 220 W | 59.8 TFLOPS | 71.6 TFLOPS |
Going to 220 W raised peak temperature by 3–4 °C; card C went from 75 to 78 °C.
Only the image/video card got 220 W. The two LLM cards stay at 200 W, because, as the next section shows, LLM work barely uses this path.
## Only work that runs on FP16 tensor cores gets faster

**LLMs: almost nothing.** Prefill is the phase where the model reads your prompt; decode is generating the answer one token at a time. With these quantized models, llama.cpp mostly runs the matmuls in integer (int8) kernels rather than on FP16 tensor cores, which matches the flat prefill numbers.
- llama.cpp, Q3_K model, 5128-token prompt: prefill 2306 tok/s before, 2256 at 200 W, 2247 at 220 W. No gain.
- Strata engine, IQ3_S model: prefill 1238 tok/s before, 1281 at 200 W (+3.5%), 1304 at 220 W (+5%).
- Decode: 95.8 tok/s before, 95 after. Decode is limited by memory bandwidth, not compute.
**Video: faster, with a soft baseline.** The LTX video model runs in FP16. At 704×400, 8 steps × 2 passes, unlocked at 220 W, it ran 4.79–4.85 s per step and 64.2–66.8 s per clip across three runs. An earlier logged run from before the unlock took 6.08 s per step and 91.6 s per clip, so each step now takes about 20% less time. That run didn't note the resolution, so treat 20% as a ballpark, not a controlled A/B.
**Image generation: no change.** mage-flow still took 5–7 s, and z-image didn't move either. The ComfyUI log explained it:
```
model weight dtype torch.bfloat16, manual cast: torch.float32
```
Turing has no BF16 hardware, and for these two models ComfyUI casts the BF16 weights to FP32 and runs them on regular CUDA cores, which the unlock doesn't touch. It's the same trap that made one of my machines 3.4× slower in [part 10](/en/blog/2080ti-turing-fp32-fallback).
## Forcing FP16 took z-image from 54.2 s to 16.9 s, and turned mage-flow black
For image generation to use the unlock, the model has to run in FP16. I started a separate ComfyUI instance with `--fp16-unet` and ran 1024×1024 images with the same prompt and the same 5 seeds, taking the median after warm-up.
| Model | Default | `--fp16-unet` |
|---|---:|---:|
| z-image, 8 steps | 54.2 s (FP32) | **16.9 s** (FP16) |
| mage-flow | 2.6 s | 2.6 s |
The 2.6 s comes from ComfyUI's own timer on the test instance (described in the deep dive); the earlier 5–7 s is end-to-end request time on my regular setup.
**z-image: 3.2× faster, same picture.** The log changed to `torch.float16, manual cast: None`. The mean per-pixel difference was 3.7/255, and the images look the same.

That 3.2× covers the whole jump from FP32 on CUDA cores to FP16 on unlocked tensor cores. I never ran z-image in FP16 with the card locked, so I can't credit all of it to the unlock.
**mage-flow: no change, and forcing it breaks it.** With the flag, the log still said `manual cast: torch.float32`, and both runs took 2.6 s. When I forced it into real FP16 it finished in 1.0 s, but all 6 images were black: NaN. It's an INT8 mixed-quant model and doesn't survive FP16. I left it as it was.
The flag applies to every model on that ComfyUI instance, so before enabling it in production I ran all six image and video workflows I actually use in FP16. None came out black. Only z-image and its high-quality variant changed precision; the other four produced pixel-identical output. Production now runs with `--fp16-unet`: end to end, a z-image render went from about 60 s to 25–30 s, and mage-flow still takes about 7 s.
---
## Deep dive: finding the dracut gap, kernel log, raw GEMM, sustained runs, image test details
You can skip this section. It covers how I found the initramfs problem, what a successful kernel log looks like, the full GEMM and sustained-load numbers, power-cap settings, the video runs, and how the FP16 image test was set up.
### Three initramfs configs, and Ubuntu 26.04 uses the one that isn't shipped
The repo carries configs for three initramfs builders:
- mkinitcpio: `/etc/mkinitcpio.conf.d/zz-turing-unlock.conf`
- initramfs-tools: `/usr/share/initramfs-tools/modules.d/turing-unlock.conf`
- dracut: `/usr/lib/dracut/dracut.conf.d/turing-unlock.conf`
The deb installed the initramfs-tools one. After the first reboot the unlock failed with EBUSY, which means the nvidia driver already owned the card. So I checked which tool `update-initramfs` really is:
```bash
dpkg -S $(which update-initramfs)
```
It belongs to dracut. Then I listed the initramfs contents: `nvidia.ko` was there, `turing_unlock` was not. That's the whole story: nvidia loads early from the initramfs, the unlock module loads later from disk, and by then the card is taken.
The dracut config is one line:
```
force_drivers+=" turing_unlock "
```
Installing it to `/etc/dracut.conf.d/turing-unlock.conf`, running `sudo dracut -f`, and checking `lsinitramfs` again showed the module inside. All three cards unlocked on the next boot.
### What the kernel log says when it works
```
booter geometry ok: image=59136 sig=16 patch_loc=0x8700
unlock result ss0=0x88888888 ss1=0x8 readout=0x0
TU102 FEAT UNLOCKED
```
The last line is the one to grep for after every kernel or driver update.
### Unsigned module and Secure Boot
turing-unlock is an out-of-tree module. Loading it unsigned taints the kernel. If Secure Boot is on, the module has to be signed or it won't load.
### Raw GEMM numbers
PyTorch 2.6.0+cu124, FP16 inputs, FP32 accumulation, `allow_fp16_reduced_precision_reduction = False`. 3 warm-up matmuls, then 7 timed rounds (20 matmuls per round at 4096³, 5 at 8192³). Max error is measured against an FP32 reference on a 256×256 corner. Power cap 200 W.
| Card | State | 4096³ median / max | 8192³ median / max | 8192³ max error |
|---|---|---:|---:|---:|
| GPU0 (card A) | locked | 45.2 / 48.0 | 47.0 / 47.5 | 0.1280 |
| GPU2 (card C) | locked | 43.8 / 51.9 | 50.6 / 51.1 | 0.1274 |
| GPU0 (card A) | unlocked | 64.1 / 78.1 | 56.6 / 57.0 | 0.1293 |
| GPU2 (card C) | unlocked | 72.9 / 79.3 | 69.9 / 70.4 | 0.1275 |
GPU1 ran out of memory at both sizes because a service was using its VRAM.
The unlocked 4096³ maximums (78.1 and 79.3) land near the README's 77.9 at 250 W; the medians are what I quote in the first part.
### Sustained runs: each window drops as the card heats up
Both cards ran the GEMM for 120 seconds at the same time, with 1-second telemetry from `nvidia-smi`. The reported number is the average of the last three windows (TFLOPS).
- GPU2, 200 W: [66.2, 65.9, 66.5, 65.8, 65.6, 64.9, 64.8, 64.8, 64.8, 64.4, 64.2, 63.8] → 64.1
- GPU2, 220 W: 75.5 at the start, 71.3 at the end → 71.6
- GPU0, 200 W: 57.1 at the start, 51.3 at the end → 51.5
- GPU0, 220 W: 64.7 at the start, 59.3 at the end → 59.8
Each series drifts down as temperature rises. The last-three average is what a long job sees, not the first window.
### Power caps
The caps are set by a systemd unit at boot:
```bash
nvidia-smi -pm 1
nvidia-smi -pl 200
nvidia-smi -i 2 -pl 220
```
The first line enables persistence mode. The second caps all cards at 200 W, and the third raises GPU2 (the image/video card) to 220 W.
### Video runs
LTX, FP16, 704×400, 8 steps × 2 passes, unlocked, 220 W cap:
| Run | Time | Power | SM clock | Temp |
|---|---:|---:|---:|---:|
| run0 | 66.8 s | 180 W | 1584 MHz | 72 °C |
| run1 | 66.2 s | 183 W | 1568 MHz | 75 °C |
| run2 | 64.2 s | 187 W | 1573 MHz | 76 °C |
Sampling ran at 4.79–4.85 s/it. Video averages about 180 W, under both caps, so the extra 20 W only helps on peaks. The 6.08 s/step and 91.6 s/clip baseline is from an earlier logged run that didn't note the resolution; I didn't rerun it locked.
### The ComfyUI cache trap
Sending an identical request to ComfyUI twice returns in 0.05 s. It's a cache hit, not a generation. For timing runs I added a random nonce to the prompt text and kept the seed fixed, so every request forced a real recompute.
### FP16 image test setup
`UNETLoader` only offers `default` and `fp8` for weight dtype, so I couldn't switch to FP16 per node. Instead I started a second ComfyUI on a separate port, same code, with `--fp16-unet` added.
I ran mage-flow, z-image, z-image HQ, flux Q8, LTX text-to-video, and LTX image-to-video twice each on the test instance. Both z-image workflows moved from `torch.bfloat16, manual cast: torch.float32` to `torch.float16, manual cast: None`. The other four kept the same dtype line and matched production at MAE 0 on the same seed. No sampled latent had a NaN or Inf.
Timing is ComfyUI's `execution_start` to `execution_success`, which includes sampling, VAE decode, and PNG save. 1024×1024, same prompt, 5 seeds, median after warm-up.
- z-image FP16: 16.74, 16.72, 16.97, 16.95, 16.87 s
- z-image FP32: 54.20–54.29 s
Black images were judged by pixel statistics: mean 0 and std 0. All 6 forced-FP16 mage-flow images matched that.
### sage-attention on sm_75 falls back to PyTorch attention
The log also shows sage-attention falling back to PyTorch attention on sm_75 because its kernel needs 67584 bytes of shared memory and Turing allows 65536. That was already the case before the unlock and has nothing to do with it.
---
Also in this series: [#26 LFM2.5 24B-A2B on one RTX 2080 Ti](/en/blog/lfm25-24b-a2b-one-2080ti) · [#24 177B on 44 GB of VRAM: two 2080 Tis run Strata at 98.7 tok/s](/en/blog/strata-flashnext-dual-2080ti) · [#10 Two identical 2080 Tis, one 3.4× slower](/en/blog/2080ti-turing-fp32-fallback)
---
# [MiniMax-H3] A storyboard image isn't a prompt: getting local H3 to hit 13 of 16 shots
URL: https://ai-muninn.com/en/blog/storyboard-grid-h3-ref2va-rtx5090
Date: 2026-10-25
Series: MiniMax-H3 on RTX 5090 (Part 13)
A 4×4 storyboard can drive local **MiniMax-H3 Ref2VA** on one RTX 5090. Board as Picture 1, character sheet as Picture 2, and a per-panel timeline in MiniMax's official shot-table format: the 10-second video matched **13/16** panels in about **340 s**. The one-sentence prompt that works on Seedance scored **2–3/16**. H3 reads the whole grid as one reference image. It takes face, wardrobe and palette from it, not timing, so the text has to set the order. Caveat: one seed, one story.
---
## Intro: the Seedance storyboard trick, tried on a local model
An Instagram creator posted a workflow I wanted to copy. He had GPT Image 2 draw a 16-panel storyboard, and every panel had a camera move, a shot description and a director's note. Then he wrote a one-sentence video prompt and fed the board to Seedance 2.0's "omni reference" mode online. The video followed the storyboard. He added two tips: give the character its own reference image, because the panels are too small, and don't pick the first/last-frame mode.
My question was simple. Can MiniMax-H3 Ref2VA, running on my own RTX 5090, do the same thing for free? In [Part 6](/en/blog/minimax-h3-ref2va-two-characters) I fed Ref2VA two reference images to get two characters in one shot. Here one of the two images is a whole storyboard.
My guess going in was that omni reference probably turns the storyboard into a text description on the server. If so, writing that description myself, in the format MiniMax documents for H3, should do at least as well. I never tested Seedance itself, so that part stays a guess. On H3, one sentence got 2 or 3 panels out of 16. The written-out timeline got 13.
Below is the workflow first, then what doesn't work. The deep dive after that has all seven runs.
## What you need: a storyboard, a character sheet and a text timeline
Each input has one job:
- **Storyboard image** → framing and poses for each shot.
- **Character sheet** → the face and costume, kept the same in every shot.
- **Text timeline** → the order, the timing and what state the props are in (sword drawn or sheathed).
The test story: an adult swordswoman in a moonlit bamboo forest, 16 shots in 10 seconds. She stands still, draws her sword, spins, sweeps the glowing blade through the bamboo leaves, sheathes it and looks back.
Every run used the same setup (S5c, the chunked run, differs: Continuum, 288 frames, 12.0 s, 378.5 s): ComfyUI on the RTX 5090, the H3 Ref2VA nvfp4 checkpoint, the qwen3vl 32B nvfp4 AWQ text encoder, 14 steps of `res_multistep` / `simple`, video/audio shift 12/3, seed 20261025, 1344×768 at 24 fps, 243 frames. That's 10.125 s with audio. One run takes about 300 to 340 s in ComfyUI.
## Step 1: Generate a storyboard with notes on every panel
I made the board with ChatGPT's image model. It's a 4×4 grid at 1122×1402. Each panel has a number on top and three lines of Traditional Chinese underneath: camera, shot and director's note. All of it came out readable.

My prompt was in Chinese. In English it asked for:
- A portrait storyboard sheet, 4 rows × 4 columns, 16 panels, each panel 16:9, thin white gutters.
- "Shot 01" to "Shot 16" above each panel, and three lines below: `Camera:` with one term (wide, medium, close-up, push in, orbit, low angle, tracking and so on), `Shot:` with one sentence of action, `Director:` with one note on pacing, light or mood.
- A story arc: panels 1–4 establish the scene, 5–8 the draw, 9–12 the spin and blade-light climax, 13–16 sheathing and the look back. No three panels in a row at the same shot size.
- The same face and outfit in every panel, and no text inside the picture areas.
You don't need to copy any of my prompts word for word. Any board with clear framing in each panel works. I also made a board with Qwen-Image 2.1 locally (2048×2048, only panel numbers and one camera word each). It worked as well in the right setup, as the deep dive shows.

## Step 2: Make the character sheet from the storyboard so it's the same person
H3 resizes reference images with `ref_image_size=match`. A square board shrinks to about 1024×1024, so each panel ends up around 256×256. A face that small doesn't hold up. The character needs her own image.
I generated the sheet with the storyboard as the reference image, so it's the same woman: front, three-quarter and back views, a face close-up, the props (sword and scabbard, sash, hair tie) and a color palette. It's 1672×941.

In every run with a character sheet, her overall look and costume held, with some variation in facial detail. The run with no reference images changed her face and hair.
## Step 3: Rewrite the board as a per-panel timeline in MiniMax's shot-table format
This is the step that matters most. MiniMax's own H3 repo has a skill for short animations, and its [shot-table spec](https://github.com/MiniMax-AI/MiniMax-H3/blob/main/skills/3d-animation-short-generator/references/shot-table-spec.md) says the text storyboard is the authoritative one. Storyboard images there are one per shot, one panel per second, and they're mainly for a human to review.
So the board stays as a reference, and the text carries the plan. Per the spec, each shot gets:
- **Five per-second directives:** action, pose and expression; camera move; spatial position; audio cue; and the handoff to the next second.
- **A continuity handoff:** what carries over from the previous shot and into the next one.
- **Reference anchors:** fixed landmarks, character positions and facing, and the lighting baseline.
The prompt that went to H3 starts with sections that tie the images to roles, then one timestamped line per panel. An excerpt from the S6 prompt (again, you don't need to copy the exact wording):
```
is the original four-by-four storyboard sheet: its sixteen panels,
read row by row, map in order to [Shot 1] through [Shot 16], specifying
composition, action, camera viewpoint and shot order. supplies
only the identity reference of .
[Shot 1] Wide static shot of , the adult ponytailed swordswoman in
moon-white robes, standing still on a rocky outcrop amidst , the
bamboo forest, under a full moon. The camera holds a static shot. Figure
centered on rocks, bamboo forest surrounds, moon above. At the handoff, the
woman remains still with her sheathed sword at her waist.
[Shot 2] At 00:00.633, the camera cuts to Medium shot of standing
between bamboo stalks, her robes slightly moving in the breeze. ...
```
Note the handoff at the end of each line. It says what the prop state is going into the next shot. In S6, the sampled frames after the sheathing panel kept the sword in its scabbard.
I didn't write all 16 by hand. A local vision model on my ai-lab box read the ChatGPT board, plus four enlarged crops of the rows, and drafted the directives, handoffs and anchors. The first pass took 79.8 s, but it translated the Chinese notes into English and skipped fields. A second pass fixed that. Then I edited by hand: left/right-hand wording, a front medium shot for panel 6, the crouch in panel 8, "sheathed or lowered" in panel 13 changed to a lowered bare blade, and "disappears" in panel 15 changed to her back still in frame. So this step is not fully automatic. Set aside a few minutes to read it over.
## Step 4: Wire Ref2VA with the board as Picture 1 and the sheet as Picture 2
The graph is the standard H3 Ref2VA graph with two `LoadImage` nodes. The board goes into the first reference slot, the character sheet into the second. In the prompt, the first slot is `` and the second is ``.
If you submit through the API, use top-level dotted keys for the references. This is the relevant node from my S6 workflow:
```json
"6": {
"class_type": "MiniMaxH3ReferenceToVideo",
"inputs": {
"width": 1344, "height": 768, "length": 243,
"ref_image_size": "match",
"ref_images.ref_image_0": ["20", 0],
"ref_images.ref_image_1": ["21", 0]
}
}
```
Node 20 loads the storyboard, node 21 loads the character sheet. A nested `ref_images` dict is silently ignored. The deep dive has the details.
On the RTX 5090 the S6 run took 339.9 s.
## What doesn't work: one sentence, and relying on the board's text
The one-sentence prompt fails on H3. I used the same sentence for both boards. In English it says: follow the 16 shots of storyboard Picture 1, left to right and top to bottom, with their camera moves, and film one continuous short of the swordswoman drawing, spinning, sweeping blade light through the leaves, sheathing and looking back, with her look taken from Picture 2.
A panel counts below only if its main framing and action appear in a compatible order. Partial matches don't count. Look at the bottom row: same board, same sheet, same seed. Only the text changes.
| Run | Text prompt | Panels matched |
|---|---|---|
| S3 | One sentence | 3/16 |
| S4 | Per-panel timeline copied from the board | 12/16 |
| S6 | Per-panel timeline in the official shot-table format | 13/16 |
With the one-sentence prompt, she keeps spinning while the framing barely changes. There's no opening wide shot, and she never sheathes or looks back. The readable text on the ChatGPT board didn't help either. The Qwen board, with almost no text, scored 2/16 with the same sentence.
Two more limits:
- **Panel 12, the leaf-storm climax, was missing in every run except S5c.** Only the chunked run got leaves drifting around her.
- **16 panels in 10.125 s is 0.63 s per panel.** MiniMax's music-video skill stitches shots of 2 to 5 s. I squeezed it on purpose. With fewer panels you have more room.
## Deep dive: seven runs, the reasoning behind the recipe, and two gotchas
You don't need this section to use the workflow. It has the full data, per-panel notes and the mistakes that cost me runs, for anyone (or any AI) adapting the setup.
All runs use the setup in "What you need" above. Seed 20261025, n=1 per condition.
### Full results: the timeline decides the score, the board decides the look
| Run | Inputs | Panels matched | ComfyUI time |
|---|---|---|---|
| S0 | Text timeline only, no reference images | 12/16 | 301.5 s |
| S1 | Qwen board + Qwen character sheet, one sentence | 2/16 | 326.3 s |
| S2 | Qwen board + sheet + full timeline | 14/16 | 332.7 s |
| S3 | ChatGPT board + ChatGPT sheet, one sentence (same as S1) | 3/16 | 324.3 s |
| S4 | ChatGPT board + sheet + per-panel timeline copied from the board | 12/16 | 325.7 s |
| S5c | 8 key panels cut out + sheet, Continuum 3 × 4 s chunks, "Per chunk" | 13/16 | 378.5 s (12.0 s video) |
| S6 | Same inputs as S4, prompt rewritten to the official shot-table spec | 13/16 | 339.9 s |
S0 to S2 use the Qwen board's 16 panels, and S3 to S6 use the ChatGPT board's 16 panels. They're different shot lists, so this isn't a strict ranking across the two groups. That's why the headline number is S6's 13/16, compared against S3 and S4 on the same board.
The character sheets were 1536×1536 (Qwen) and 1672×941 (ChatGPT). The ChatGPT sheet shows black boots. On the board the feet are mostly hidden by the robe.
S0 matters as a control. With no images at all, a good timeline already got 12/16. What it lost was identity: a different face and hair. So in this setup the board adds framing and look, the sheet adds identity, and most of the shot order comes from the text.
### Why one sentence fails: H3 has no way to split a grid into 16 moments
H3 Ref2VA treats the whole storyboard as one reference image. In both one-sentence runs, it did not follow the 16-panel order. From the board it took the woman, the costume, the palette and a set of poses, and then it improvised the order.
In S1 and S3 the video circles through spins at a similar shot size. There's no establishing wide shot and no sheathe-and-look-back ending.
One thing H3 did get right in every run: it never copied the grid. No gutters, panel numbers or note text leaked into any frame, for either board.
Readable text on the board didn't help H3. S3, with the fully annotated ChatGPT board, scored 3/16. S1, with the Qwen board's numbers and single words, scored 2/16. The text did help one reader: the vision model that turned the ChatGPT board into the S6 timeline.
### S2 and S4: a written timeline gets most of the way there
S2 (Qwen board + sheet + full timeline) got 14/16. In order, it hit the wide shot, the back-view tracking shot, the medium shot holding the scabbard, the face close-up, the hand on the hilt, the low-angle raised sword, the spin, the highlight on the blade, the macro on the bamboo leaves, the settle, the over-the-shoulder look back and the wide shot from behind. It missed panel 6 (side medium shot, half-drawn) and panel 14 (sheathing). In panel 14 the dark scabbard is there, but the bare blade gets longer, which reads as drawing, not sheathing.

S4 (ChatGPT board + sheet + a per-panel timeline copied from the board's camera and shot lines) got 12/16. The first five panels all landed: wide shot, standing, profile, hand on hilt, extreme close-up of the blade leaving the scabbard. It missed:
- Panel 6: a front draw with the left hand on the scabbard.
- Panel 8: a high-angle shot of her lowering into a crouch.
- Panel 12: the leaf-storm climax.
- Panel 13: standing still with the blade lowered. It appeared after the sheathing shot, so the order was wrong.

### S6 vs S4: the official format fixed the crouch, the order and the sword state
S6 used exactly S4's inputs. Only the prompt changed, from a copied timeline to the shot-table format with five-element directives, handoffs and anchors. Panel by panel:
- **Panel 8, better.** She crouches low with her legs staggered, and the boots are visible.
- **Panel 13, better.** She stands with the blade lowered before she sheathes. In S4 this came after.
- **After sheathing, better.** The bare blade doesn't come back. In panel 15 she's holding the dark scabbard.
- **Panel 2, worse.** The medium shot became a full-body wide shot.
- **Panel 6, partly better, not counted.** The head is cut off.
- **Panel 12, still missing.** No leaf storm.
Net: plus 2 and minus 1, for 13/16. One seed can't tell me how much of that is the format and how much is noise. The fixes landed on exactly the things the handoff lines spell out, though: pose going into the next shot and whether the sword is drawn.

### S5c: cutting panels out and feeding them per chunk with Continuum
The other approach is to give H3 separate images per segment, so it doesn't have to work out which part of the grid comes when. I cut the panels out of the board and used [ComfyUI-H3-Continuum](/en/blog/blender-fpv-taiwan-no-fog-h3-continuum), which renders a long video in chunks.

Continuum V3.9 has two limits that shaped the layout:
- **Each chunk must be at least 4 s.** My first plan used 2 s chunks, and the API rejected it with HTTP 400:
```
Value 2.0 smaller than min of 4.0
```
- **Reference Images has 9 slots for the whole video.** "Per chunk" doesn't give each chunk its own nine. It only picks which of the nine slots are active in each chunk.
So I used 3 chunks × 4 s, for 12.0 s total:
| Chunk | Active reference slots |
|---|---|
| 1 (0–4 s) | panels 01, 05 + character sheet |
| 2 (4–8 s) | panels 07, 09, 10 + character sheet |
| 3 (8–12 s) | panels 11, 14, 16 + character sheet |
The character sheet sat in slot 9, active in all three chunks.
My own slip: one ticket said "8 key panels" but listed 9 panels plus the sheet. That's 10 slots, and it was rejected.
S5c scored 13/16, and its panel 14 sheathing was the most complete (S4 had a partial one). At 9.25 s a long length of blade is showing. By 10.17 s it's very short. At 10.33 s the guard is locked against the scabbard mouth, both hands holding it. The 13→14 order was also right. Then at 10.79 s the next shot shows a bare blade again.
The seam between chunk 2 and chunk 3, at 8.0 s (frame 192), is a hard cut, and the sweep motion repeats across it. The mean absolute frame difference there was 52.3, which is 8.28× the clip's median. Panel 11 was missed even though it had its own reference slot.

S5c is worth it when one exact beat matters more than a smooth cut. It took 378.5 s and it leaves a visible seam.
### Two gotchas that cost me runs
**ComfyUI v3 Autogrow inputs ignore a nested dict.** `MiniMaxH3ReferenceToVideo` builds its reference inputs dynamically. In API JSON, a nested `"ref_images": {"ref_image_0": ...}` is silently dropped by the dynamic schema. You still get a video, just with no references. My first S1 run was like that. The fix is top-level dotted keys, `"ref_images.ref_image_0"`, as in Step 4. The S1 score in the table is from the rerun.
**`codex exec -i` eats the prompt as a second image.** I generated the ChatGPT board and sheet through the Codex CLI's image generation (`codex exec --enable image_generation`). With `codex exec -i board.png "prompt"`, the prompt string gets parsed as another image path and Codex reports no prompt was provided via stdin. Pass the prompt on stdin instead:
```bash
codex exec --enable image_generation --skip-git-repo-check \
-i storyboard-gpt.png - < char.txt
```
`--skip-git-repo-check` is needed when you run it outside a git repo.
### Limits of this test
- **One seed, one story.** Seed 20261025 for everything, one swordswoman, one bamboo forest. I don't know how far another seed would move a one-panel difference.
- **Two boards, two groups.** S0–S2 and S3–S6 score against different shot lists.
- **Scoring is mine, by eye.** A panel counts only if its main framing and action appear in a compatible order. Partial matches count as misses.
- **The pacing is deliberately extreme.** 0.63 s per panel, against the 2 to 5 s shots MiniMax's music-video skill stitches.
- **S6 is not hands-off.** The vision model's draft needed a second pass and five hand edits before it went to H3.
- **I didn't test Seedance.** The comparison is between H3 prompts, not between H3 and Seedance 2.0.
---
# [Dev Workflow] MOSS-Image Renders Traditional Chinese Correctly: 37 s to 2.2 s per Image on an RTX 5090, Then Comic Cards
URL: https://ai-muninn.com/en/blog/moss-image-traditional-chinese-comic-cards
Date: 2026-10-24
Series: AI Workflow (Part 28)
MOSS-Image is a 5B open-weights image model from OpenMOSS. Its prompt is JSON, and each text string gets its own box on the canvas. On the same Traditional Chinese news headline it was right in 4 of 4 images. Qwen-Image 2.1 was right in 0 of 4, writing 全 as 佺 every time. At the official 50 steps it takes 37 s per image on an RTX 5090. A community 4-step LoRA brings that to 2.2 s, once you fuse its q/k/v into the weights' single qkv layer. On a 2080 Ti 22G shared with a voice service, it runs at 58 s with the text encoder on CPU. Comic cards: 147 of 147 characters right. The weak spot is characters showing up in the wrong panel.
## Why I tested this
Every short video and social post I publish needs a thumbnail with a Traditional Chinese headline on it. My workflow so far has been two steps per image: an image model draws the background, and a web layout puts the text on top.
I wanted to drop the second step. Qwen-Image 2.1 is good at in-image text, so I gave it real news headlines. In all four test images it wrote the same character wrong. 「安全沙盒」 ("security sandbox") came out as 「安佺沙盒」, with an extra radical bolted onto 全.
OpenMOSS released MOSS-Image on October 16. It promises the two things I needed: accurate text inside the image, and control over where each piece of text goes. It also came with two problems. At its official settings it took 37 s per image on my RTX 5090, about 2.4x slower than Qwen-Image 2.1. And the always-on machine I wanted to run it on has a 2080 Ti 22G that already hosts my voice-narration service, with not enough free VRAM for both.
The first half of this post is a tutorial: what MOSS-Image is, the Traditional Chinese test, installing it on a 5090, getting from 37 s to 2.2 s, running it on the 2080 Ti, and making four-panel comic cards. The second half is the debugging log.
## MOSS-Image is a 5B model whose prompt is a JSON layout
[MOSS-Image](https://github.com/OpenMOSS/MOSS-Image) has a 5B backbone and comes in Base and SFT variants. I use SFT. ComfyUI supported it on day 0, and Comfy-Org repackaged the weights on [Hugging Face](https://huggingface.co/Comfy-Org/MOSS-Image). License is Apache-2.0.
The prompt is JSON. `summary` describes the whole image. `items` lists the elements, such as a character, a scene or a piece of text. Each item has a `bbox`, and text items add a `text` field with the exact string to render. This is the portrait 1088x1920 thumbnail I tested with:
```json
{
"summary": {
"meta": ["news thumbnail", "professional graphic design"],
"canvas": "single",
"caption": "Professional technology news thumbnail, dark navy studio background ..."
},
"items": [
{"label": "character", "caption": "An adult East Asian female news anchor ...", "bbox": [-634, -490, 730, -44]},
{"label": "text", "caption": "Large bold clear white headline in the upper right ...", "bbox": [-730, -11, 38, 500], "text": "輝達發表 AI 安全沙盒"},
{"label": "text", "caption": "Small bright yellow rectangular news badge ...", "bbox": [307, 65, 518, 490], "text": "本週新聞"},
{"label": "text", "caption": "Small white channel name along the bottom margin ...", "bbox": [787, -413, 922, 435], "text": "AI-Muninn"}
],
"bbox_coord_space": "abs_centralized",
"bbox_format": "yxyx"
}
```
Two things about `bbox` will trip you up. The origin is the center of the canvas and the unit is pixels, so on a 1088x1920 portrait x runs from -544 to 544 and y from -960 to 960. And the order is `[y_min, x_min, y_max, x_max]`. Y comes first.

The box is a suggestion, not a crop. Text mostly stays inside it. Characters spill out of theirs in nearly every image I generated. Use it for coarse layout, like headline top right and badge bottom right, not for pixel-exact placement.
## On the same headline, MOSS got 4 of 4 right and Qwen-Image 2.1 got 0 of 4
I used the same news-thumbnail layout throughout: an anchor on the left, the headline 「輝達發表 AI 安全沙盒」 ("NVIDIA announces AI security sandbox") top right, a yellow 「本週新聞」 ("this week's news") badge, and the channel name AI-Muninn along the bottom. I ran it in portrait and landscape, with Chinese and English text sets, at seeds 42 and 123, and kept every image. Each model ran at its official recommended settings: MOSS 50 steps at CFG 3, Qwen-Image 2.1 40 steps at CFG 1.
The middle column is the one that matters for Traditional Chinese:
| Model (RTX 5090) | avg s/image | zh-TW headline + badge all correct | all 3 text areas clean |
|---|---:|---:|---:|
| MOSS-Image SFT int8 | 37.25 | 4/4 | 4/8 |
| Qwen-Image 2.1 int8 | 15.12 | 0/4 | 2/8 |
Qwen-Image 2.1 made the same mistake every time. The 全 in 安全沙盒 gets a 亻 radical in front of it, and one image looks closer to 俭. In landscape at seed 42 it also turned 發 into a malformed character that does not exist. Rerolling the seed does not fix a mistake that repeats like that.

MOSS has its own weak spot: the wide, flat channel-name box along the bottom of a landscape image. All 4 landscape images failed there. Two repeated "AI-Muninn" a second time, one wrote "AI—Mungiicinn", and one added three letter-shaped decorations. All 4 portrait channel names were clean.

So in practice MOSS writes the headline, and I still overlay fixed small text like the channel name afterwards. The next two sections fix that.
## Installing on an RTX 5090 takes one patch to the official plugin
My environment was ComfyUI 0.37.0 with torch 2.13.0+cu130, neither touched.
The plugin lives in the official repo under `comfyui/moss-image/`. Copy that folder to `ComfyUI/custom_nodes/moss-image/`. Its `pyproject.toml` has `dependencies = []`, so there is nothing to install. I used commit `52b87fc`. After a restart you get six MOSS nodes.
Download three files from the Comfy-Org repo:
| Folder | File | Size |
|---|---|---:|
| `models/diffusion_models/` | `moss_image_sft_int8_convrot.safetensors` | 5.4 GB |
| `models/text_encoders/` | `qwen3.5_9b_int8_convrot.safetensors` | 9.7 GB |
| `models/vae/` | `flux2-vae_small.safetensors` | 250 MB |
The first run fails at KSampler:
```
AttributeError: 'NoneType' object has no attribute 'dtype'
```
The official plugin defines q, k and v as three separate linear layers. The Comfy-Org int8 weights fuse them into a single `qkv` layer, so the plugin looks for `proj.q` and finds nothing. The fix is two edits inside the plugin folder. In `loaders.py`, detect the fused layout by checking for `layers.0.proj.qkv.weight`. In `model.py`, give `_Block` a fused branch that builds one 3x-wide linear layer and splits its output in three. Keep the separate branch too, because the 8-step Turbo weights I tried later still have separate q/k/v. The core change:
```python
# model.py, _Block.forward
if self.fused_qkv:
q, k, v = self.proj["qkv"](y).chunk(3, dim=-1)
else:
q, k, v = self.proj["q"](y), self.proj["k"](y), self.proj["v"](y)
```
With that, the official example workflow runs, and all 8 comparison images above came out of it. The full diff is in the deep dive. The patch only touches the plugin folder, and it may become unnecessary once the official plugin or a native ComfyUI node catches up, so check the ComfyUI README in the official repo before you apply it.
## A 4-step LoRA brings it from 37 s to 2.2 s per image
There are two community speedups. One is an 8-step Turbo checkpoint, `toxicdog/MOSS-Image-SFT-Turbo-INT8-ConvRot`, which replaces the main model and runs at 8 steps, CFG 1, Euler/simple. The other is a 4-step LoRA, `akhaliq/MOSS-Image-SFT-4-steps` (v2.0), which sits on top of the SFT int8 weights at strength 1 and runs at 4 steps, CFG 1, Euler/simple. Both are on Hugging Face. I used each one's model-card settings and the same prompts.
Read the first row. Warm averages exclude the first image:
| | Original 50 steps | 8-step Turbo | 4-step LoRA |
|---|---:|---:|---:|
| Warm avg (s) | 37.31 | 3.86 | 2.22 |
| First image, incl. load (s) | n/a | 6.96 | 5.17 |
| zh-TW target text all correct | n/a | 3/3 | 3/3 |
The 4-step LoRA is 16.8x faster than the original. That is the combined effect of fewer steps, CFG 3 dropping to 1, and a different scheduler, not any single one of them.

Faces at 4 steps are softer than at 50. Text is just as sharp, and for a thumbnail that trade is fine. Both fast versions drew a blurry fake-English string in the upper-left background at seed 123, which made that image unusable. The landscape channel-name duplication did not show up this time, but I only tried one seed, so I am not calling it fixed.
## Grep the log to confirm the LoRA actually loaded
If you load the 4-step LoRA with ComfyUI's built-in `LoraLoaderModelOnly` on the fused int8 weights, it silently skips the q/k/v parts of the LoRA and still produces images. A good-looking image proves nothing here. Check the log:
```bash
grep -c "lora key not loaded" comfyui.log
```
With the built-in loader I got 378 lines. That is 42 layers, times q, k and v, times 3 tensors each. A typical line:
```
lora key not loaded: diffusion_model.layers.0.proj.q.lora_down.weight
```
Any non-zero count means the LoRA is only partly applied, to the output projection and the FFN.
The fix is a custom loader node, `MOSSImageFusedLoraLoader`, which I added to the plugin's `nodes.py`. It fuses the LoRA's q/k/v into one `qkv` adapter. Use it in place of `LoraLoaderModelOnly`. A full load shows three signals, and all three must hold:
1. `lora key not loaded` appears 0 times.
2. The loader's stat line reads `fused_blocks=42 targets=168 tensors=504 applied=168`.
3. The log prints `168 patches attached` before each sampling run.
As an on/off control I ran the same seed and JSON at 4 steps with the LoRA disconnected. Face and text came out badly distorted. With it connected, both were clear.
If your weights already have separate q/k/v, like the 8-step Turbo file, the built-in loader works. Run the same grep anyway.

## On a 2080 Ti 22G, move the text encoder to CPU and MOSS shares the card with the voice service
My always-on AI Lab machine has a modded 2080 Ti 22G that already hosts a ComfyUI instance (about 8.4 GB), my voice-narration service (about 5.4 GB) and a second image-generation ComfyUI. The voice service refuses jobs when less than 2048 MiB is free.
On the 5090, MOSS used 15.5 GiB of card memory. Most of that is the 9.7 GB Qwen3.5-9B text encoder. So the encoder goes to CPU. In the workflow, change `device` on `MOSSImageCLIPLoader` from `default` to `cpu`. Everything else is the 5090 4-step LoRA workflow, fused loader included:
```json
"102": {"class_type": "MOSSImageCLIPLoader",
"inputs": {"clip_name": "qwen3.5_9b_int8_convrot.safetensors", "device": "cpu"}}
```
The last column is why this works for me:
| | per image (warm) | CPU text encode | voice service |
|---|---:|---:|---|
| 5090, all on GPU | 2.2 s | n/a | n/a |
| 2080 Ti, text encoder on CPU | 58.5 s | about 26.8 s | available throughout, min free 4,695 MiB |
58.5 s is 26x slower than the 5090, and about half of it is CPU text encoding. But it runs on a machine that is already on, without waking the 5090. Target zh-TW text was correct in 4 of 4 images, and the seed 123 background-text flaw showed up here too, same as on the 5090. When I started, the card had 6,010 MiB in use. If it is busier than that, wait.
Two more things on this card. At CFG 1 the negative prompt is never used, but the empty-string negative `CLIPTextEncode` still runs on CPU and burns about 27 s. Replace it with `ConditioningZeroOut` fed from the positive encoder's output. The output is pixel-identical, and the first image dropped from 89.7 s to 62.4 s. And the smaller W4A8 text encoder is slower on CPU, not faster: 108 s per image. Both are in the deep dive.

## Four-panel comic cards got 147 of 147 characters right, with characters in the wrong panels
The thing I actually wanted out of all this was comic-style social cards. Four 1024x1280 (4:5) cards, one panel each, for a carousel post. The story: my AI assistant Yui is moving data and gets stuck waiting on the disk, and Claude, drawn as an orange octopus with round glasses, comes to the rescue.
On the 5090 with the 4-step LoRA, each card took about 1.5 s warm. I generated each of the four panels with three seeds, 12 images total. Across titles and dialogue that is 147 Chinese characters, and all 147 were correct.
Each card's JSON has four parts:
- `summary.caption`: pencil, brown ink lines, light watercolor, cream paper, what the characters look like, and "top 18% reserved for handwritten title, no color blocks".
- One `scene` item.
- One title `text` item, boxed at 8 to 92% of the width and 4 to 15.5% of the height.
- One or two dialogue `text` items, each described as "hand-drawn rounded speech bubble, tail pointing at X".
The model draws the speech bubbles and their tails itself. Nothing is added in post. That hand-drawn feel is better than overlaid text, which is why I went with this version.
The alternative is a text-free base image plus a PIL overlay in the 標楷體 (Kaiu) font. The text is always right and the lines are easy to edit, but the font looks too formal for a comic. If your lines change often, pick that.

The real limitation is characters showing up in panels they should not be in. My first version put this in the global `summary.caption`:
```text
Claude when present is a tiny orange octopus with round spectacles.
```
The octopus appeared in panels 1, 2 and 4, three out of four, which spoils the panel-3 reveal where the rescue arrives. Three changes fixed it:
1. The global description only lists characters present in every panel.
2. Each panel's `scene` names who is in it.
3. Each panel says "exactly one or two speech bubbles in this panel, each character appears once".
In a second round I used the same trick on the version where MOSS writes the text itself: each panel's prompt describes only the characters in that panel, with no global cast list, and every character's look is repeated word for word wherever it appears. Across 88 images (four new stories plus six art styles), the octopus stopped showing up early in the picks. The watercolor set still needed one repair pass, and a bear shopkeeper wandered into the windows of the flat-vector set. The 36 picks still had 2 wrong characters (种 for 種, and 位位 for 位子), and the watercolor style often gave lines to the wrong character.

One more trap: writing an uppercase "NO TEXT" in the prompt makes the model print "NO TEXT" as the title.
Character consistency is "recognizably the same", no better. Hairstyle, headphones and jacket color hold across the four panels. Head-to-body ratio, hair length and the number of boxes Yui carries drift, and so does the number of octopus tentacles. I used no reference image and no character LoRA.
## The comic version
Every title and speech bubble in these 12 panels was lettered by MOSS with the 4-step LoRA, no overlay. The signs stay in Chinese on purpose: the joke is the miswritten character. Each panel took four candidates to find one with every letter right, and the English set needed one title swap after "Liftoff" came out as "Lifetoff" four times in a row. The hero image at the top is MOSS too; 3 of 8 English candidates had every word right.












## Deep dive: LoRA keys, fusing q/k/v, W4A8 on CPU, the voice service and ConditioningZeroOut
You can skip this section. Everything you need to run the workflow is above; this is the evidence and the debugging detail behind it.
### 378 lines of "lora key not loaded", and the images still render
The 4-step LoRA has 252 adapters: q, k, v, o and FFN in every layer. The fused int8 weights only have `proj.qkv`, so the 126 q/k/v adapters find no target. Each one reports its alpha, down and up tensors, so 126 x 3 = 378 lines, 126 each for q, k and v.
The o and FFN adapters apply normally, which is why a partially applied LoRA still produces a clean-looking image. I did not run a blind test between full and partial application.
The on/off control in numbers, at seed 42, same JSON, 4 steps, CFG 1: mean absolute pixel difference 35.7/255, RMS 70.2/255. With the LoRA off, face and text are distorted.
### Fusing q/k/v: concatenate the down matrices along the rank, build a block-diagonal up matrix

The fused forward pass computes `qkv = W_qkv · x` and splits the result in three. So the fused LoRA delta has to be the three deltas stacked:
```
ΔW_qkv = cat(ΔWq, ΔWk, ΔWv; dim=0)
```
Each delta is ΔW = (alpha/r) · B · A, where A is the down matrix and B is the up matrix. The three A matrices differ, so you cannot share one A across q, k and v. The correct fusion:
```
A_fused = cat(Aq, Ak, Av; dim=0) # stack the ranks: 128 each, 384 total
B_fused = block_diag((αq/rq)·Bq, (αk/rk)·Bk, (αv/rv)·Bv) # fold each group's scale into B
alpha_fused = rank_fused = 384 # so the outer scale is 1
```
The loader's core code. It runs on CPU in fp32 and does not rewrite the int8 model file:
```python
downs = [state[s + ".lora_down.weight"].float() for s in sources] # sources = q, k, v
ups = [state[s + ".lora_up.weight"].float() for s in sources]
scales = [float(state.get(s + ".alpha", a.shape[0])) / a.shape[0]
for s, a in zip(sources, downs)]
down = torch.cat(downs, dim=0)
up = torch.block_diag(*[b * scale for b, scale in zip(ups, scales)])
state[target + ".lora_down.weight"] = down
state[target + ".lora_up.weight"] = up
state[target + ".alpha"] = torch.tensor(float(down.shape[0]))
```
The loader errors out instead of silently under-applying. It compares each layer against a test vector before and after fusion, checks that no adapter tensor is left unmapped, and requires the patch count ModelPatcher accepts to equal the number of converted targets. The actual log:
```
MOSS_TURBO raw adapter roots=252 unmapped=126
MOSS_TURBO VERIFIED fused_blocks=42 targets=168 tensors=504 applied=168 strength=1 concat_max_abs_error=0
```
168 is 42 fused qkv layers plus 126 o/FFN targets. On random matrices with different ranks and alphas, the max error was 3.8e-6. The same loader on the 2080 Ti gave 3.7e-9.
One caveat. This goes through ComfyUI's ModelPatcher on int8 weights, so the precision differs from the LoRA author's diffusers path, which uses a bf16 base and keeps the LoRA unmerged in fp32.
### The plugin's fused-qkv patch, full diff against OpenMOSS commit 52b87fc
```diff
--- upstream/loaders.py
+++ trial/loaders.py
@@ -83,6 +83,7 @@
"text_dim": 4096,
"freq_dim": 256,
"rope_base": 10000.0,
+ "fused_qkv": "layers.0.proj.qkv.weight" in state,
}
)
--- upstream/model.py
+++ trial/model.py
- def __init__(self, dim, ffn_dim, heads, device, dtype, operations):
+ def __init__(self, dim, ffn_dim, heads, device, dtype, operations, fused_qkv=False):
super().__init__()
self.heads = heads
+ self.fused_qkv = fused_qkv
@@
- name: operations.Linear(dim, dim, bias=False, device=device, dtype=dtype)
- for name in ("q", "k", "v", "o")
+ name: operations.Linear(dim, 3 * dim if name == "qkv" else dim, bias=False, device=device, dtype=dtype)
+ for name in (("qkv", "o") if fused_qkv else ("q", "k", "v", "o"))
@@
- dtype = self.proj["q"].weight.dtype
+ dtype = self.proj["qkv" if self.fused_qkv else "q"].weight.dtype
y = y.to(dtype)
- q = self.q_norm(self.proj["q"](y).unflatten(-1, (self.heads, -1))).flatten(2)
- k = self.k_norm(self.proj["k"](y).unflatten(-1, (self.heads, -1))).flatten(2)
- x = x + self.proj["o"](_attention(q, k, self.proj["v"](y), rope, self.heads)) * gate_a[:, None]
+ if self.fused_qkv:
+ q, k, v = self.proj["qkv"](y).chunk(3, dim=-1)
+ else:
+ q, k, v = self.proj["q"](y), self.proj["k"](y), self.proj["v"](y)
+ q = self.q_norm(q.unflatten(-1, (self.heads, -1))).flatten(2)
+ k = self.k_norm(k.unflatten(-1, (self.heads, -1))).flatten(2)
+ x = x + self.proj["o"](_attention(q, k, v, rope, self.heads)) * gate_a[:, None]
```
The model's main `__init__` in `model.py` also has to accept `fused_qkv=False` and pass it to each `_Block`. The fused chunk order is q, then k, then v, and the LoRA fusion has to stack in the same order.
After the patch, 42 harmless "unexpected" lines remain for `layers.N.comfy_attention.config`. Their value is `comfy_kitchen_int8`, an attention-backend hint the plugin does not read.
### The W4A8 text encoder is slower on CPU
Comfy-Org also ships a W4A8 GPTQ text encoder, 7.3 GB against 9.7 GB for int8. Same 2080 Ti machine, same 4 prompts, encoder on CPU:
| Text encoder | positive encode (warm avg) | per image (warm avg) | first image | load (log) |
|---|---:|---:|---:|---:|
| int8 ConvRot | 26.8 s | 58.5 s | 89.7 s | 8,061 MB |
| W4A8 GPTQ | 76.9 s | 108.4 s | 175.8 s | 5,568 MB |
Encoding is 2.87x slower and the whole image 1.85x slower. There is no W4A8-specific CPU kernel. The generic comfy-kitchen implementation dequantizes before it computes, so 4-bit only saves memory. The file is also mixed precision, not 4-bit throughout. Text accuracy was the same, 4 of 4. On CPU, use int8.
### My first attempt on the 2080 Ti squeezed the voice service down to 477 MiB free
Before I tried MOSS, the card's baseline was about 14,170 MiB used: ComfyUI 8,442, voice 5,412, the image ComfyUI 312. The voice service reported 7,831 MiB free.
I first ran a 512x512 Qwen-Image 2.1 workflow with its text encoder still on the GPU. It finished in 6.46 s, and the voice service's health check went to `available=false`, `free_mib=477`, `used_mib=21524`. Its threshold is 2048 MiB. The process did not die. It refused jobs.
I rolled the service config back per a rule I had written in advance, restarted, and stopped there. Then I reran the Qwen workflow with `CLIPLoader` set to `device=cpu` at 256x256. It took 57.04 s, the card peaked at 18.7 GiB, and the voice service stayed available throughout with a minimum of 3,515 MiB free. That is where the text-encoder-on-CPU setup for MOSS came from.
It also hit my automated news pipeline: early that morning it skipped the entire batch because the narration service reported itself unavailable. The pipeline now waits up to 20 minutes for voice, re-checking every 30 s, and never preempts a running job.
For the real MOSS run on the 2080 Ti I polled voice health once a second: 267 checks during the int8 group and 503 during the W4A8 group. Every one returned `available=true`, and the minimum free memory was 4,695 MiB.
### ConditioningZeroOut removes the negative encode at no cost
At CFG 1, KSampler only uses the positive conditioning, but the negative `CLIPTextEncode` with an empty string still executes. On the 2080 Ti's CPU that is 26.8 s, part of the 89.7 s first image.
Swap the negative encoder for `ConditioningZeroOut`, feed it the positive `CLIPTextEncode` output, and connect KSampler's negative input to it.
To verify, I rendered the same seed and JSON both ways and compared pixel by pixel. The images were pixel-identical (mean absolute difference: 0). The first image went from 89.7 s to 62.4 s.
This is only free at CFG 1. Above CFG 1, a zeroed negative and an empty-string encoding are different inputs, and the results change.
### Still unresolved
- The fast versions add fake English to the background at seed 123. The sample is small, so I do not know how often it happens. Do not publish their output unreviewed.
- Whether the fast versions really fix the landscape channel-name box: one seed is not enough to say.
- The 4-step LoRA's model card suggests 6 to 8 steps above 1024². I kept 4, and soft faces at 1088x1920 are the cost.
- Comic character consistency relies on text description alone, and head-to-body ratio and prop counts drift. I have not tried reference images or a character LoRA.
- I used the official OpenMOSS plugin plus my own patch. I have not compared its speed against the native ComfyUI nodes that came later.
Also in this series: [One RTX 2080 Ti Narrates Every Daily AI-News Short: VoxCPM2 GGUF Q4_K_M at Under 2 s per Line](/en/blog/voxcpm2-news-shorts-narration-2080ti)
---
# [Claude Code] My AI agents are a pixel-art JRPG party now. Codex took 212 tickets in a week
URL: https://ai-muninn.com/en/blog/claude-code-mods-jrpg-party
Date: 2026-10-22
Series: AI Workflow (Part 27)
import YouTubeEmbed from "@/components/YouTubeEmbed";
I turned my AI agents into a pixel-art JRPG party in a Claude Code side panel. Whoever is working plays a work animation, idle characters now and then act out a random bit, and clicking one opens a stat sheet with STR, INT, AGI, STA and MP. The first thing it showed me: in the last 7 days Codex took 212 tickets and worked 30.5 hours. The next busiest took 136. The reusable parts are open source, and if you have no art of your own, the default character, Muninn, stands in for your Claude Code.
## Why my resource dashboard became a JRPG party
In the [previous post](/en/blog/claude-code-mods-resource-dashboard) I built a resource dashboard with [Claude Code mods](https://code.claude.com/docs/en/plugins/mods/overview): a side panel that shows which machines are free and which subscriptions have quota left before I dispatch work. It's useful. It's also just numbers and bars.
My AI agents already have names. Hikari, Shio and Hina are local models. Codex and agy are subscriptions. Claude is the session I talk to. Grok is in there too. They were already characters, so I gave them a party: levels, XP, stats, a work animation when they're busy, and a campsite to loiter in when they're not. Honestly, I spent tokens on something not very useful that makes me happy.
Then I watched it for an afternoon. Codex never stopped hammering the anvil.

## Install it: Muninn stands in for your Claude Code
I split out the parts that don't depend on my setup and put them in a repo: scene compositing, the status window, the stat sheet, the quest board, and the sprite build. My seven characters and the adapter that reads my dispatch system are not included. They're wired to my machines.
Repo: [github.com/coolthor/muninn-party](https://github.com/coolthor/muninn-party)
Out of the box the party has one member, Muninn, a mage in a raven hood with a glowing quill. She represents the Claude Code you're running. Her data comes from the Claude Code transcripts already on your machine, so there's nothing extra to set up. When Claude is working, she writes in the air and summons a raven made of light. When it stops, she idles.
To install it, paste one line into Claude Code:
```text
/plugin install muninn-party --marketplace coolthor/muninn-party
```
Or just tell Claude Code: "Install this mod for me: https://github.com/coolthor/muninn-party".
To add Codex, a local model, or anything else, add a character to `party.json` (the file that lists who's in the party; Claude can edit it for you) and bring your own sprite art. The next section is how I made mine.
## Build your own: what I told Claude at each step
This section is for people who want to build their own. If you just want Muninn on screen, the install above is all you need. Skip ahead to the Codex numbers.
I didn't write the code myself. I told Claude what I wanted, it wrote the code, and Codex drew the characters. Every prompt below is close to what I actually said while building this. You don't need to copy them word for word. Say what you want and let Claude work out the details.
### Characters first: one sheet, then 16-frame loops
Codex drew all the art. Each character starts with a character sheet: 16-bit pixel art, two heads tall. Every animation after that uses the sheet as a reference, so the character stays on model.
For each animation, Codex draws 8 key frames in a 2×4 grid on pure magenta, `#FF00FF`, which the code keys out. Eight frames alone look choppy, so I had it draw 8 in-between frames using the keys as reference. That makes 16 frames at 200 ms each, a 3.2-second loop.

### Put them in a camp scene and swap animations by status
With sprites in hand, the scene was one request:
```text
Make a mod with a side panel. Draw a camp scene and put each AI character in it.
If a character is working, play its work animation; otherwise play idle.
Three per row, no white fringe around the sprites.
```
"Working" needs a data source. Mine started as: the dispatch system has a live ticket for that agent. Then I noticed agy didn't light up when I called it directly to review my English, because that never goes through dispatch. So I added a second rule: a running `agy --print` or `codex exec` on the machine also counts as working.
### Give idle characters something to do
Seven characters breathing in sync looks like a screensaver. So I asked for this:
```text
Give idle characters some little animations. For example, Grok almost drops
the crystal ball, agy uses her staff to conduct the stars on her hair
ornament, Shio wipes her monocle. Make several idles and play them at random.
```
Each character ended up with two idle animations. Every 3.2-second cycle there's a 40% chance one idle character plays one. I also added low-MP animations: dizzy when quota is nearly gone, asleep in bed when it runs out.
### A status window, and a stat sheet behind each click
Under the scene sits a status window styled like the bottom of a JRPG battle screen. One box per character: name, Lv, MP bar, and what they're doing right now. Click a character to open their sheet: an animated portrait, gear (which model they run), their record, and five stats.
The stats were the part I changed most. The definitions went through five versions. Here's where they landed:
- **STR**: passed tickets. S at 150 or more, A at 80, B at 40, C at 10.
- **INT**: how well a character handles hard work. Difficulty comes from the ticket deadline: within 30, 60, 90 minutes, or longer, graded D1 to D4. INT score = D3 passes + 2 × D4 passes.
- **AGI** and **STA**: compared against other characters doing tickets of the same type and difficulty. Finishing faster earns more AGI; getting a long ticket all the way to a submitted report earns more STA. With no peers, a character is compared against itself.
- **MP**: remaining usage quota.
Claude doesn't take tickets, so it gets its own definitions. AGI is how fast it starts replying after I send a message: a 30-day median of 6.1 s. STA is its longest continuous work stretch: 34.1 h, mostly from `/loop`.
When there's no data, the stat shows a grey "?" and what's missing. agy's STA reads "hasn't taken a long ticket yet." All five stats always show, so a score appears as soon as the data does.

### A quest board for multi-day projects
The space under the status window became a quest board for big projects that run for days: the blog, the director-desk app I'm building, video generation. Each quest shows a heat level (how often it came up in the last 3 days of work logs), portraits of the characters working on it, and the latest update. With no quests, it draws an empty board.
## Codex took 212 tickets in 7 days
Once the party was on screen, I pulled the last 7 days of dispatch logs (measured 2026-10-21):
| Character | Tickets | Hours worked | Main ticket types |
|---|---|---|---|
| Codex | 212 | 30.5 h | code 87, scene 44, research 36, verification 21 |
| Hikari | 136 | 23.3 h | research 110, scene 15, code 10 |
| Shio | 74 | 13.3 h | verification 45, research 24 |
| agy | 50 | 8.1 h | verification 41, research 8 |
Codex carried most of the code and scene work, plus 36 research and 21 verification tickets. Hikari and Shio, both local, can handle those two types. agy runs on Gemini, has plenty of quota, and still got mostly verification.
So the plan is:
- Research goes to Hikari and agy first.
- Verification goes to Shio and agy.
- Small code fixes go to Hikari.
- From-scratch builds and image generation stay with Codex.
I could have computed this table back when all I had was the dashboard. I never did. It took watching Codex hammer the anvil nonstop to make me count.
## Deep dive: what broke while building it
You can skip this section; the build above works without it. These are the debugging notes, with the numbers.
### Terminal images scale to fit and center; they don't fill
There was a thick gap between the scene and the status window. kitty and Ghostty image placeholders scale an image to fit and center it. They don't stretch it to fill the box. The mod type docs say "fill"; in testing, it doesn't.
My box height assumed a cell is 2:1 tall to wide. Meslo LG M at 12pt is actually 2.26 (measured from the font's `hhea` table with fontTools). So the image sat in a box that was too tall, with 2+ blank rows above and below. The fix is `CELL_ASPECT = 2.25`.
My preview tool stretched images to fill, which hid the gap. It showed up only in the real terminal.
### Resizing the dock by hand overrides the mod's requested width
I wanted a "reset size" button and couldn't make one work: `$.ui.open({columns: 100})` lost to `pluginPanes.dockColumns` in `~/.claude.json`, which I had dragged to 78 earlier, and that value is shared by every mod. The docs say a manual resize takes precedence. I settled on a fixed standard width of 76 columns, centered when the dock is wider.
### Rebuilding sprites without `--height` halved the resolution
One rebuild left off `--height` and got the default 96 px instead of 192. The whole scene went blurry. The default is now 384, the scene is 1280×720, and front-row figures stand about 330 px tall.
A related bug: when a character raises its arms, its bounding box grows. Scaling each frame on its own made characters shrink mid-animation. Scale and foot position now come from idle frame 0 for every frame.
### Clearing the scene cache blanked an open panel
I cleared the scene cache and the open panel went blank. The scene only rebuilt when someone's state changed. The fix is a self-heal: every 10 s, check whether the current set's `done` file exists, and rebuild if it's gone.
### Magenta keying left fringes
The frame cutter only cleared magenta flood-filled from the frame borders. Magenta enclosed between hair strands stayed, and so did the purple fringe where magenta blended into the sprite. `unkey()` now clears key-colored pixels, then runs two passes over pixels next to transparent ones and clears spill, defined as red and blue well above green.
### I measured Codex wrong three times
All three had the same root cause: nobody asked what kind of tickets the character takes.
1. **Success rate, ignoring difficulty.** A character that takes the hard tickets looks worse than one that takes easy ones.
2. **STA from pass rate.** Codex had 81 long tickets (deadline 90 min or more): 52 passed, 5 died midway, and 24 delivered a report but were blocked by external gates (review-rejection limit, push verification, size limit). Pass rate was 64%, a B. Switching to "got the ticket all the way to a submitted report" gave 77/81, an S.
3. **INT from first-try pass rate vs peers.** Characters doing easy tickets got S. Codex got B. Switching to counting hard passes put Codex at 43 D4 and 10 D3 passes: S.
I also removed a sixth stat, "precision." It measured whether the dispatch system lost track of tickets, not anything about the character. I redefined it twice and still couldn't say what it meant, so I deleted it.
---
# Turn a real dance into a depth video and have MiniMax-H3 restage it in a palace: native 768 on one RTX 5090
URL: https://ai-muninn.com/en/blog/dance-depth-h3-palace-rtx5090
Date: 2026-10-19
Series: MiniMax-H3 on RTX 5090 (Part 12)
I turned an **8.7-second** real dance into a grey depth video and had MiniMax-H3 restage it with a new character in a palace, natively at **768×1376** on one RTX 5090. The motion roughly follows: knee bends, arm openings and a side turn with a knee lift line up in time. The key rule: `ref_images` holds **only the first frame**. A second, white-background character image turned 1.5 to 5.25 s into a white studio. A 768 run takes about **12 minutes**. Caveat: arm angles are still off, and one seed went black, so watch the whole clip.
---
## Preface
I saw people take a real dance video and have a different character dance the same routine in a new setting. I wanted to see whether MiniMax-H3 could do it too. My approach was to turn the dance into a depth video first. The depth video records only how far each point is from the camera and drops everything about appearance. Face, clothes and background are stripped. Motion and position stay.
I ran it locally, on one RTX 5090, with MiniMax-H3 Ref2VA. In [Part 9](/en/blog/blender-blocking-h3-ref2va-rtx5090) the reference video was a Blender blockout. Here I swap in a depth video of a real dance.
It works. The background drifted to a white studio twice, and one run went black. The new dancer roughly follows the original choreography, but not frame for frame. Below is the full workflow first, then what is still off, then a deep dive with the four rounds of trial and error behind it.
## The pipeline: depth video in, restaged dance out, five steps in ComfyUI
All five steps run in ComfyUI on the 5090. I installed one extra node pack, for the depth step.

1. Cut a clip. Video Depth Anything turns it into a grey depth video.
2. Qwen-Image makes a character, then places her in a palace with her pose matching frame 0 of the depth video. That image is the first frame.
3. H3 Ref2VA gets the depth video as `ref_videos` and only the first frame as `ref_images`.
4. `MiniMaxH3AddGuide` pins the first frame at `frame_idx=0`.
5. Generate natively at 768×1376, then use RTX frame generation to reach 48 fps.
The source clip matters. I used a single dancer, full body including the feet, with a mostly static camera. It is 8.7 s, 209 frames at 24 fps, from a TikTok dance compilation on YouTube. The compilation has three panels, so I cropped the right panel (the single dancer) and letterboxed it to 480×864 without stretching.
## Step 1: Video Depth Anything makes the grey depth video in about 11 seconds
The depth node is [yuvraj108c/ComfyUI-Video-Depth-Anything](https://github.com/yuvraj108c/ComfyUI-Video-Depth-Anything), which wraps the official [Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything). Before installing, I ran `pip install --dry-run` to check it would not touch torch, torchvision or numpy. It did not. The install added only `easydict`, `imageio-ffmpeg`, `imath`, `opencv-python` and `OpenEXR`.
Three nodes do the work:
| Node | Setting |
|---|---|
| `LoadVideoDepthAnythingModel` | `video_depth_anything_vits.pth` (Small) |
| `VideoDepthAnythingProcess` | input_size 518, max_res 864, fp16 |
| `VideoDepthAnythingOutput` | colormap gray |
Depth is normalized with one range for the whole clip, so frames don't jump in brightness the way per-frame normalization would. All 209 frames took about 11 s.
Here is a frame at 4 s, depth on the left and the final result on the right:

And the full clip, depth left and result right, in sync:
## Step 2: Trousers instead of a long skirt, and a palace first frame from three images
My first Qwen-Image 2.1 character wore a long skirt, which hid the knees. Knee bends and weight shifts were invisible in the output. I switched to a short top and wide trousers, and the legs became readable.
The first frame comes from Qwen-Image multi-reference with three input images: the palace background, the character, and depth frame 0. The prompt says Picture 1 is the background and camera, Picture 2 is the woman, Picture 3 is the pose. It then describes a centered figure, head and shoe heights, hands at the hips and staggered feet. I used CFG 4 and 40 steps.
In this workflow I never fed the source RGB video to Qwen-Image or to H3 (one control run in round 1 did, on purpose; see the deep dive). I only used it to check alignment by eye. The head and shoe positions in my first frame were off by about 10 to 16 px, which was close enough for H3.
## Step 3: Depth goes to ref_videos, only the first frame goes to ref_images
This is the step that decides whether you get a palace. `MiniMaxH3ReferenceToVideo` (Ref2VA) takes ref images and ref videos, but it has no first-frame input. `MiniMaxH3AddGuide` fills that gap: it VAE-encodes an image and attaches it as a keyframe at `frame_idx`, and it keeps any existing references.
The wiring:
```
depth video -> MiniMaxH3ReferenceToVideo.ref_videos
first frame -> MiniMaxH3ReferenceToVideo.ref_images (only this one image)
MiniMaxH3ReferenceToVideo.positive
-> MiniMaxH3AddGuide(image = first frame, frame_idx = 0)
-> BasicGuider
```
The rule: `ref_images` is the first frame and nothing else. When I also added a white-background character image, 1.5 to 5.25 s became a white studio and the palace came back only at 5.5 s. I removed that image and its line in the prompt. With the same seed, the palace held throughout, and the face and outfit held too.

The prompt follows H3's six-part format. Describe only what you want: Picture 1 is the frame-0 palace, Video 1 gives motion and timing, the same palace throughout, a fixed camera, visible knee bends and arm openings. Do not mention the source dancer or her clothes, not even in a negative prompt. In my first round the negative mentioned the original clothes, and one run produced a green cropped jacket like the source.
Other settings: 209 frames, 14 steps, `res_multistep` / `simple`, fixed seed.
## Step 4: Generate at 768×1376 from the start, because upscaling cannot add a face
My first delivery was 480×864 run through RTX Video Super Resolution to 1080×1944. The edges were cleaner and the picture was bigger, but the face was still mushy. It got sent back with a simple request: generate at 768 from the start.
At 768 wide, keeping the aspect ratio gives a height of 1382.4. H3's canvas must be a multiple of 32, so the height is 1376. Same seed, 480 upscaled on the left and native 768 on the right:

The cost: a 480×864 run took about 172 s. A native 768×1376 run takes about 12 minutes (sampling alone is 648.81 s), and VRAM peaks at 31,731 MiB of 32,607 MiB. That is close to the ceiling, but it never ran out of memory.
My first 768 run also went dark. The background darkened after 3 s and was nearly black at 5 to 7 s. The black was already in the raw H3 output, so frame generation and the encode were not the cause. I changed only the seed, from 2026101801 to 2026101902, and the palace held throughout.

I tried only one extra seed, so I cannot tell you how often this happens.
## Step 5: Frame generation to 48 fps, then encode with ffmpeg and not SaveVideo
For frame generation I used [Comfy-Org/ComfyUI_Nvidia_VFX_Nodes](https://github.com/Comfy-Org/ComfyUI_Nvidia_VFX_Nodes): `RTXVideoFrameGeneration` with multiplier 2 and mode MEDIUM. It outputs 2n−1 frames, so 209 frames become 417, which is 8.69 s at 48 fps.
Do not use the default ComfyUI `SaveVideo`. At 1080×1944 it came out at about 3.9 Mbps with blocky shadows. Save the 417 frames as PNGs with `SaveImage`, then encode with ffmpeg:
```bash
ffmpeg -framerate 48 -i frames48/%05d.png -i music.m4a \
-c:v libx264 -preset slow -crf 15 -pix_fmt yuv420p \
-c:a aac -shortest out.mp4
```
H3 generates its own ambient audio track. I replaced it with music. The music in the video above is my own ACE-Step track.
## What's not working yet
- **Motion follows roughly, not exactly.** Knee bends, arm openings, and the side turn with a knee lift line up in time. Arm angle and amplitude are still off.
- **768 costs 12 minutes per run,** and one seed went black. You may need a second run just for the seed.
- **One clip only.** I tried a single 8.7 s dance with a fixed camera. I do not know how it behaves with camera moves or multiple dancers.
- **One seed per condition** in the deep dive below, so the causes I name are the best explanation I have, not controlled proof.
## Deep dive: four rounds of trial and error
You do not need this section to use the workflow. It holds the runs behind the rules above: what I changed, what I measured and what it ruled out, for anyone (or any AI) adapting the setup.
All rounds below use the same 209-frame clip, seed 2026101801, 14 steps and n=1 per condition, unless noted.
### Round 1: depth, source RGB and ControlNet all showed white or drift
I ran three conditions to see which reference route gives the best restaging.
| Run | Reference route | What I saw | H3 time |
|---|---|---|---|
| A | depth video as ref | 0 to 5.5 s white studio from the character image, palace from 6 s. Long skirt hides the knees. Arms mostly down | 179 s |
| B | source RGB as ref | Almost the same as A: white early, palace fades in around 5.5 s | 172 s |
| C | depth as FunControl ControlNet (strength 0.7, end 0.8) | Extra spins, olive jacket and black bottoms at 2 to 4.5 s, a white industrial structure in the background | 99 s |
H3 times are server-side full execution.
I used B to check whether the source dancer's look leaks into the result. I sampled 18 half-second frames and found no jacket, no glasses and no industrial set. So depth is not shown to be better than source RGB at blocking leakage, because neither leaked. I still use depth because it never contains the dancer's face.
C's green jacket resembles the source clothes, but C never received the source RGB. That round's negative prompts mentioned the original clothes, so the cause is not isolated. This is why Step 3 says not to mention the source, even in negatives.
### Round 2 (D): palace first frame, trousers, no source mention, and the white studio stayed
I changed three things at once: trousers instead of the skirt, a palace first frame, and no mention of the source. The wiring was Ref2VA with depth and `ref_images=[first frame, white character]`, then AddGuide with the first frame at `frame_idx=0`.
To check what the nodes actually do, I read the live `nodes_minimax_h3.py` on the 5090 to see what the nodes really do:
- Ref2VA, lines 242 to 364: no first-frame input.
- AddGuide, lines 165 to 239: writes `minimax_keyframes` without touching the refs.
- `model_base.py`, lines 2188 to 2219: reads both keyframes and refs.
So the keyframe and the refs are separate inputs that both reach the model. The result:
- Palace at 0, 0.25 and 0.5 s.
- Fades to white from 0.75 s. White at 1.5 to 5.25 s. Palace again at 5.5 s.
- Motion much clearer than A: a knee bend with crossed arms at 1.5 s, arms near horizontal at 4 s, a side turn with a knee lift at 6 s that matches the source.
AddGuide is guidance, not a pixel paste. At frame 0 the mean RGB difference from the first frame was about 8.3 out of 255, with the same composition.
Motion got clearer after these three changes, but I did not isolate which one did it.
### Round 3 (F): drop the character image from ref_images, and the palace holds
The only change: remove the character image from `ref_images` and delete its prompt sentence.
I checked every 0.25 s from 1 to 6 s plus 121 consecutive frames. All of them show the palace. To put a number on it, I counted the share of bright pixels (RGB all above 180) in the top building area:
| Run | Bright-pixel ratio, top area |
|---|---|
| F (no character image) | 0.068 to 0.099% |
| D (with character image) | up to 98.3% |
Face and outfit held, and the motion was no worse. H3 took 168.658 s. That points to the white reference competing with the set, but it is one seed.
### Round 4: the 768 run
The 480 F output was upscaled with `RTXVideoSuperResolution` (ULTRA, target 1080×1944), then frame-generated to 48 fps, and sent back.
Canvas size: `nodes_minimax_h3.py` sets `CANVAS_MULTIPLE=32`, and Ref2VA builds the latent at the size you give it. `adapt_canvas` has a 768×1344 area cap, but it applies only to reference-video preprocessing, not to the output size. For the 768 run I resized the depth video with lanczos to 768×1376 before uploading, and ran the first frame through RTX Super Resolution to 768×1376.
| Measure | Value |
|---|---|
| Latent | [1, 24, 62, 86, 48] |
| Sampling | 648.81 s |
| Conditioning + sampling + decode | 717.65 s |
| Including 209 PNGs, frame generation and 417 PNGs | 747.76 s |
| VRAM peak | 31,731 / 32,607 MiB |
VRAM was sampled with `nvidia-smi` every 2 s and includes the desktop.
The first 768 run went dark, so I measured it. The metric is the mean RGB of the top 300 rows (0 to 255):
| Time | F at 480 | 768, seed 2026101801 | 768, seed 2026101902 |
|---|---|---|---|
| 4 s | 17.42 | 2.71 | 19.01 |
| 6 s | 17.42 | 0.00 | 19.11 |
| 8 s | 17.47 | 0.28 | 19.02 |
For the new seed I measured all 417 frame-generated PNGs. The minimum was 18.78, at 3.04 s. This is a plain RGB mean. It is evidence that the first run went black, not a quality score.
## Related
- [A 25-second no-fog FPV one-take with MiniMax-H3 and ComfyUI-H3-Continuum on one RTX 5090](/en/blog/blender-fpv-taiwan-no-fog-h3-continuum)
- [A 22-second Taiwan FPV flight without a drone: Blender blockout + MiniMax-H3 on one RTX 5090](/en/blog/blender-fpv-taiwan-h3-rtx5090)
- [\[AI Workflow\] Block a scene in Blender, let MiniMax-H3 film it: local Ref2VA on an RTX 5090](/en/blog/blender-blocking-h3-ref2va-rtx5090)
---
# [Dev Workflow] One RTX 2080 Ti Narrates Every Daily AI-News Short: VoxCPM2 GGUF Q4_K_M at Under 2 s per Line
URL: https://ai-muninn.com/en/blog/voxcpm2-news-shorts-narration-2080ti
Date: 2026-10-19
Series: AI Workflow (Part 26)
One RTX 2080 Ti now narrates every AI-news short my pipeline makes, several a day, each in Mandarin and English, in my own cloned voice. VoxCPM2 with its BaseLM quantized to GGUF Q4_K_M and the acoustic model kept at F16, run through llama.cpp-omni: 1.38 s per real script line. In a separate test on the same card, GGUF Q8 took 1.90 s where PyTorch bf16 took 16.2 s. The speedup comes from llama.cpp's CUDA kernels, not the bit width. Turing has no bf16 hardware. Most lines my whisper gate rejected were whisper misspelling proper nouns, fixed by putting each line's names in initial_prompt. Caveat: this clone mode has no tone control.
> **Update, 2026-11-04:** the Q4_K_M route later turned out to collapse a whole sentence now and then, so production narration is back on Q8. Fixing mainland readings and polyphonic characters for Taiwan Mandarin is in a follow-up: [Teaching a Chinese TTS Taiwan Mandarin](/en/blog/voxcpm2-taiwan-pronunciation-lexicon-g2pw).
## Preface
A fully automated pipeline on my machines picks an AI news story every two to four hours, writes a script, narrates it, renders it and uploads it to YouTube. Each topic is published as a Mandarin short and an English short, so the channel gets several bilingual shorts a day. Narration is the only stage where every single line has to pass.
So the TTS had a short list of requirements. Free. Local. My own voice, not a preset. Both languages. And it had to fit on one RTX 2080 Ti, the 22 GB modded kind, because that is the card the pipeline has.
Before this setup, it fit badly. When another job held the GPU, narration fell back to CPU. The Mandarin short took 38 minutes on CPU. The English short took 51 minutes on a MacBook that was also busy re-narrating another job.
The quality gate was its own problem. Each line goes through whisper, which transcribes it so the pipeline can compare against the script. One night that gate killed 4 of 8 shorts. I listened to all 4 and they sounded fine.
The current setup is one 2080 Ti running 4-bit VoxCPM2, under two seconds a line, in my voice. The tone is still not perfect, and tone is hard for every open-weight TTS model I have tried. Most of what looked like misreads turned out to be whisper failing to spell proper nouns. If you want to hear the result, the shorts are on [@ai-muninn](https://www.youtube.com/@ai-muninn).
## You need one Turing card, two GGUF files and 24 seconds of your own voice
The base model is [openbmb/VoxCPM2](https://huggingface.co/openbmb/VoxCPM2), Apache-2.0. It ships as two parts, a BaseLM and an Acoustic model. I run them as GGUF files through a fork of llama.cpp, [tc-mb/llama.cpp-omni](https://github.com/tc-mb/llama.cpp-omni), pinned at commit `88bd37e`.
Why not PyTorch? Because the 2080 Ti is Turing, and Turing has no bf16 hardware. PyTorch bf16 still runs there, but it is emulated. On the same test lines, PyTorch bf16 took 16.2 s per line and llama.cpp GGUF Q8 took 1.90 s. With Q4_K_M, real script lines take 1.38 s.
The files:
| File | Size | Where |
|---|---|---|
| `VoxCPM2-BaseLM-Q4_K_M.gguf` | 1.00 GB | [coolthor/VoxCPM2-Q4_K_M-GGUF](https://huggingface.co/coolthor/VoxCPM2-Q4_K_M-GGUF) (I quantized this one) |
| `VoxCPM2-Acoustic-F16.gguf` | 1.83 GB | [DennisHuang648/VoxCPM2-GGUF](https://huggingface.co/DennisHuang648/VoxCPM2-GGUF) |
| `VoxCPM2-BaseLM-Q8_0.gguf` | 1.73 GB | same repo, if you prefer Q8 |
Only the BaseLM is quantized. The Acoustic model stays F16. Once loaded as a resident service, the whole thing occupies 5,248 MiB on the card. During synthesis, Q4_K_M peaks 620 MiB below Q8_0. Peak VRAM for every runtime I tried is in the deep dive.
The voice comes from a reference recording. You need 20 to 30 seconds of clean speech plus its transcript, word for word. Mine is 23.9 s, 24 kHz mono, the same clip I used for the [MacBook voice-cloning post](/en/blog/qwen3-tts-voice-clone-macbook). There is no training step. The model reads the recording and the transcript together in every call.
## Build llama.cpp-omni for sm_75 and patch one macOS-only line
```bash
git clone https://github.com/tc-mb/llama.cpp-omni && cd llama.cpp-omni
git checkout 88bd37e
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75
cmake --build build -j
```
`75` is Turing. Set it explicitly so the build targets the card you have.
On Linux the first build fails in `src/llama-moe-slot.cpp`. That file calls `F_NOCACHE`, which only exists on macOS, in two places. Guard both:
```cpp
#ifdef F_NOCACHE
// ...the existing F_NOCACHE block, unchanged...
#endif
```
Rebuild and it goes through.
On a Mac, `-DGGML_METAL=ON` builds clean with no patch. It is slow, though. GGUF Q8 runs about 11 s per line on my MacBook, so I keep it as a backup only.
## One command clones your voice in under 2 seconds a line
Once it builds, run one line through the CLI to confirm the model files, the recording and the card all work together before you wrap anything around it. The whole idea: hand it your recording and its transcript, and it reads new text in your voice.
```bash
CUDA_VISIBLE_DEVICES=2 ./build/bin/voxcpm2-cli \
-t "Today: how an old GPU carries the daily narration." \
--prompt-wav my_ref.wav --prompt-text "$(cat my_ref.txt)" -r my_ref.wav \
--seed 42 -o out.wav VoxCPM2-BaseLM-Q4_K_M.gguf VoxCPM2-Acoustic-F16.gguf
```
Three flags matter here.
**`--prompt-wav` + `--prompt-text` + `-r` together** is what the VoxCPM2 docs call Ultimate Cloning. All of my production narration uses it. Passing `-r` alone is the other clone mode, reference audio without a transcript. That difference comes back later when I get to tone.
**`CUDA_VISIBLE_DEVICES`** pins the job to one card. Set it to your card's index if the machine has more than one GPU.
**`--seed`** is your reroll button. Change the number and you get a different take of the same line. Do not put 0 in a reroll loop. Seed 0 means this runtime skips reseeding. Inside a resident service the RNG just keeps rolling from wherever it was, so you cannot tell what that retry actually got you.
## Keep the model loaded in a small local HTTP service
Each CLI call reloads the model, which takes about 3.4 s. That is longer than speaking the line. So wrap the model in a small HTTP service that loads the model once and keeps it in memory. Two endpoints are enough:
- **`GET /health`** reports whether the model is loaded and the filename of the model actually loaded.
- **`POST /synthesize`** takes text and returns a WAV.
Bind it to localhost. Nothing outside the machine needs to reach it.
If the card is shared with another GPU job, start the service only when that job is idle. Loading 5,248 MiB on top of a job that is still holding memory can push that job into OOM.
## Send English names as English, and tag pronunciation only after a reroll fails
AI news is full of names. Hugging Face, NVIDIA, Nemotron, model version strings. The order that works for me:
1. Read it as written.
2. If it comes out wrong, reroll with a new seed.
3. Only then add pronunciation tags.
**English names go in as English.** I tried writing Beam, Hugging Face and token as Chinese syllables. Whisper passed those lines. My ears did not.
**Numbers stay as written** too: `12B`, `1M`, `V4.1-Flash-1017`. VoxCPM2 reads them fine.
**Pronunciation tags** use VoxCPM2's official brace markup, and a tag replaces the characters it stands for. Mandarin takes toned pinyin, like `{xun4}{lian4}`. English takes CMU phonemes, like `{AH0 P AE1 CH IY0}`. NVIDIA often loses its initial N, and `{EH1 N V IY1 D IY0 AH0}` helps.
Things that did nothing useful:
- **Language tags** like `[en]` or ``. There is no such mechanism. `` gets dropped, and `[en]` gets read as noise.
- **Extra spaces for a pause.** They collapse to one.
- **A bracketed note** like `(slightly faster)`. It nudges pace or emotion, not how a word is pronounced.
One warning if you build your own worker. Mine first tokenized the braces differently from the PyTorch runtime, so tags were silently wrong. Test one tagged line before you trust tags in a batch.
In production this became a two-take rule. Take 1 goes in as written. Whisper transcribes it. Only the words that came back different get pinyin or CMU tags, and only that one line is re-narrated. The pipeline uses take 2 without checking it again.
A real example: 「較快成績」 came back as 「較快層級」, and 「短生成測試」 came back as 「短深層測試」. Take 2 sent this:
```text
而開頭的較快{cheng2 ji4},只是短{sheng1 cheng2}測試。
```
## Give whisper the line's proper nouns, or it fails lines the TTS read correctly
This continues the [whisper CER gate](/en/blog/whisper-cer-audio-gate) from the previous part. The gate uses mlx-whisper large-v3-turbo, and it kept failing good lines. It spelled NVIDIA as NVDA, Nemotron as Memotron and Bolt as BOT. The TTS had read all three correctly.
The fix was to give whisper the names. Each line's English names and numbers go into `initial_prompt`. Thresholds and matching stay the same.
```python
import mlx_whisper
result = mlx_whisper.transcribe("line_07.wav", path_or_hf_repo="mlx-community/whisper-large-v3-turbo",
language="zh", initial_prompt="NVIDIA Nemotron Hugging Face") # names and numbers from this line only
```
Names only. I tried a Chinese preamble followed by the names. Whisper then hallucinated a full-width 「7」 at every pause.
Scoring changed too. I switched Mandarin scoring to toneless pinyin, so homophone pairs like 部署/不屬 or 沙箱/沙香 count as correct. The Mandarin threshold is 0.15. English uses word error rate with a threshold of 0.2. The old rule, character error rate (CER) under 0.1, failed my own reference clip against its own transcript at 0.128.
Real misreads still exist, and a keyword check catches them. It looks for error-prone words, the script's keywords and English names. 「訓練」 (training) was heard as 混練 or 婚戀 three times. The sentence-level pinyin CER was 0.083, inside the threshold, but the keyword was missing, so all three were blocked.
After the night the gate killed 4 of 8 good shorts, I switched it to trust mode. It only warns. Numbers, names and error rates that do not match go to a listen-later list. The only thing that still blocks a short is a missing audio file.
## Tone is not fixable in this mode, so I stopped trying
Ultimate Cloning has no tone control. I tested what was available and it either did nothing audible or broke the line. The details are in the deep dive.
On 2026-10-19 I called it good enough. Tone is where every open-weight TTS model I have tried stalls. I am not writing more tickets for it. I will wait for a new model.
## Deep dive: shootout, speed sets, Q4 quality, tone and the golden set
You can skip this section and still run everything above. It holds the measurements behind each choice, for anyone who wants the numbers and for whatever model you paste this page into.
### Five open-weight TTS models on the same 2080 Ti: VoxCPM2 won the blind listen, not the CER table
On 2026-09-28 I ran five open-weight TTS models on the same 2080 Ti. Same 23.9 s reference, same 16-line Mandarin script, fixed seed. Each line was scored with whisper large-v3-turbo CER. For listening, I normalized everything to -16 LUFS and shuffled it into a blind pack labelled A to E.
| Engine | Mean CER | Max CER | 16 lines synth (s) | Peak VRAM | License |
|---|---|---|---|---|---|
| IndexTTS-2.5 | 0.035 | 0.125 | 83.2 | 8,662 MiB | bilibili custom license; a separate license above 100M MAU or RMB 1B revenue |
| Qwen3-TTS 1.7B Base 8-bit | 0.044 | 0.125 | reused earlier files | — | Apache-2.0 |
| VoxCPM2 | 0.067 | 0.250 | 61.7 | 7,428 MiB | Apache-2.0 |
| Fun-CosyVoice3-0.5B | 0.127 | 0.588 | 75.4 | 6,582 MiB | Apache-2.0 |
| Breeze-TTS-2 | 0.127 | 0.278 | 159.5 | 8,608 MiB | research-only, non-commercial |
IndexTTS-2.5's official interface has no transcript parameter, so it ran reference-only. Its row is not the same comparison as the others.
In the blind listen, VoxCPM2 came first and Breeze-TTS-2 second. Breeze is non-commercial, which ruled it out. CER screens out broken reads.
### Qwen3-TTS was replaced because of how it sounded, which no metric caught
[Part 21](/en/blog/qwen3-tts-voice-clone-macbook) used Qwen3-TTS. Its Mandarin sounded odd after the script was split into sentences. I ran an energy analysis looking for trailing noise and found none. The problem was timbre and intonation, the kind of thing no metric I had would catch.
On 10-06 I moved English narration to the same VoxCPM2 clone, replacing Qwen3's preset English voice, ryan. The cross-lingual clone test on 09-28 needed a reroll on 2 of 8 English lines.
### Speed: GGUF is 8.5x faster than PyTorch bf16, and quantization is not the reason
These are four separate measurement sets with different methods. Do not merge numbers across tables.
**Set 1** (10-18). Same 3 Mandarin and 2 English lines, same reference, cold start per line, load time excluded. Seconds per line.
| Runtime | Device | zh | en | Peak VRAM |
|---|---|---|---|---|
| PyTorch bf16 | CPU | 197–315 (mean 238) | — | — |
| PyTorch bf16 | 2080 Ti | mean 16.2 (12.4–20.1) | 16.7–21.0 | 7,434 MiB |
| PyTorch fp16 | 2080 Ti | 12.5 | 12.2 | 7,484 MiB |
| GGUF Q8_0 | 2080 Ti | 1.90 | 2.19 | 8,352 MiB |
| MLX int8 | MacBook | 14.7 | 28.5 (one 45 s outlier) | 7,593 MiB |
Going from bf16 to fp16 gave only 1.29x on Mandarin. GGUF Q8 gave 8.5x. The gain is llama.cpp's CUDA kernels, not the bit width.
Quantization did not save VRAM either. The Q8 weight files total 3.56 GB, but peak use was 8,352 MiB, above bf16's 7,434 MiB. FP8 W8A8 would need Ada or newer, so the 2080 Ti cannot try it.
**Set 2** (10-18). Q4_K_M against Q8_0, paired, same session.
| BaseLM | zh (s) | en (s) | BaseLM file |
|---|---|---|---|
| Q4_K_M | 1.76 | 2.04 | 1.00 GB |
| Q8_0 | 1.96 | 2.40 | 1.73 GB |
**Set 3** (10-18). Six real script lines from production.
| BaseLM | Seconds per line | Peak VRAM |
|---|---|---|
| Q4_K_M | 1.38 | 620 MiB lower than Q8 |
| Q8_0 | 1.54 | baseline |
Q4 was 11% faster here.
**Set 4** (10-02). 20 consecutive lines, median seconds per line.
| Runtime | Device | Median (s) | Notes |
|---|---|---|---|
| PyTorch, 4 workers × 7 threads | CPU | 186.1 | |
| PyTorch MPS fp32 | MacBook | 5.56 | |
| PyTorch bf16 | 2080 Ti | 6.88 | CER 0.1008, 7 of 20 lines above 0.1 |
At that point the 2080 Ti was judged slower than an idle MacBook and unusable for narration. GGUF reversed that verdict.
Set 4's 6.88 s and set 1's 16.2 s are both labelled 2080 Ti PyTorch bf16. They came from different methods and I have not reconciled them.
**Backup.** MacBook Metal GGUF Q8 averages 11.0 s per line.
### Making Q4_K_M took 11.3 s and cost almost nothing I could hear
Only the BaseLM gets quantized. The Acoustic model stays F16.
```bash
python tools/omni/voxcpm2/convert_voxcpm2_to_gguf.py --dtype f32 \
--model model.safetensors --vae audiovae.pth --config config.json --output ./out
./build/bin/llama-quantize VoxCPM2-BaseLM-F32.gguf VoxCPM2-BaseLM-Q4_K_M.gguf Q4_K_M
```
`llama-quantize` accepted the architecture without complaint. The BaseLM went from 6,188 MiB at 32 bits per weight to 953 MiB at 4.93 bits per weight, in 11.3 s.
Quality, Q4 against Q8:
| | Q4_K_M | Q8_0 |
|---|---|---|
| zh mean CER | 0.101 | 0.083 |
| en mean CER | 0.090 | 0.095 |
The worst lines were all names: whisper turned Vera Rubin into Verobeam and NVIDIA into Venback. Q4 once read Apache 2.0 as 5.0. I listened to six lines, judged Q4 fine, and switched production to it.
Earlier on 10-18 I ran a five-version blind listen. Only one clip failed: Mandarin line 1 on GGUF Q8, CER 0.163, while the other Q8 lines scored 0.075–0.076. At about 2 s a line, a reroll costs almost nothing.
### Tone A/B: Ultimate Cloning reads the tone instruction aloud
On 10-04 I generated 6 lines × 4 tones (none, relaxed, calm, excited) × 2 clone modes, 48 clips in total. This ran on CPU and took 78.3 minutes.
**Ultimate Cloning**, with a bracketed tone instruction prepended: 18 of 18 clips read the English instruction aloud. Whisper transcribed things like Calm, Steady and Reassuring Tone at the start of the line. One clip also read the reference transcript aloud, CER 1.35.
**Reference-only mode** did not read the instruction. Its pitch variation:
| Tone | F0 standard deviation |
|---|---|
| none | 28.2 Hz |
| relaxed | 33.8 Hz |
| calm | 41.4 Hz |
| excited | 43.5 Hz |
The calm instruction produced more pitch variation than no instruction at all, so the labels did not predict what came out. Pace stayed at 5.0–5.4 characters per second for all four. In a blind listen the emotion was barely audible, and some clips sounded robotic.
Two alternatives I listed and have not tried: IndexTTS-2.5, which takes an emotion reference plus a strength value, and Step-Audio-EditX, which edits audio after generation.
### Golden set: name prompts took real clips from 39 passes to 57
The golden set is 40 labelled lines, including deliberate misreads.
| | Pass | Flagged missing words |
|---|---|---|
| No prompt | 25 | 16 |
| Name prompt | 37 | 1 |
Across all 85 real production clips, passes went from 39 to 57 and missing-word flags from 44 to 16. Real misreads let through stayed at 0 in both runs. Apache 2.0 read as 5.0 was still caught, along with 14 numeric misreads.
I also tried Qwen3-ASR-1.7B with hot words. It scored 36 of 40 with 3 flagged. It broke 3 lines whisper had right, turning 23.8 into 二至三點八. Worse, it normalized a real misread, 順練, back into 訓練, hiding the error. I kept whisper.
Some failures are not the recognizer's fault. DogukanUrker came back as Dogukhan Urker every single time, so that fix belongs in the script. Acronyms do the same: MoE came back as Moei or M01.
### Dead ends: number expansion, transliteration, rule files, pinyin as a cure
**Expanding numbers.** I tried writing 12B out in Chinese as 一百二十億. Whisper heard 120E, and a correct line got blocked. 1M token became 一 M, whisper heard EM token, blocked again. First I loosened the rule so that only a different value or unit counted as an error and a missing digit was a warning. Then I dropped expansion entirely.
**Transliteration.** In the Beam short, line 2 scored CER 0.094 against the transliterated text and 0.673 against the original script. Transliteration is banned now, except for three Taiwan readings I verified by ear: 知識, 步驟, and LINE read as 賴.
**Stacking pronunciation rule files.** A fix for 步驟, the Taiwan reading with zòu, was added on 10-13. On 10-19 it was still wrong.
**Pinyin tags are not a silver bullet either.** In the Beam Mandarin redo, line 4 had 「詞只」 tagged with pinyin. Ten rerolls scored CER 0.206–0.647, and the best one was still heard as 持指. On line 5, the pinyin for 部署 came out right every time and the line still failed.
### Open issues
- 步驟 in the Taiwan reading.
- The initial N of NVIDIA.
- In trust mode, Apache 2.0 read as 5.0 passes the gate and only surfaces on the listen-later list.
- The two-take rule has only been measured on single lines.
- The next candidate is bosonai/higgs-tts-3-4b, 4B parameters. It is the only Mandarin candidate that was not in the 09-28 round, and it is untested.
Also in this series: [Zero-Shot Voice Cloning on a MacBook: 24 Seconds In, Faster Than Realtime Out](/en/blog/qwen3-tts-voice-clone-macbook) · [Whisper CER as an Audio Quality Gate: 40 Lines, Three Traps](/en/blog/whisper-cer-audio-gate)
---
# A 25-second no-fog FPV one-take with MiniMax-H3 and ComfyUI-H3-Continuum on one RTX 5090
URL: https://ai-muninn.com/en/blog/blender-fpv-taiwan-no-fog-h3-continuum
Date: 2026-10-18
Series: MiniMax-H3 on RTX 5090 (Part 11)
I made a **25-second** FPV flight over Taiwan as one take with **no fog**, on one RTX 5090: Yushan, Taroko Gorge, Taipei 101, Sun Moon Lake, then a pull-up panorama. The four seams measure **1.28×, 0.86×, 0.33× and 0.15×** the normal frame-to-frame change, and none of them shows as a cut. ComfyUI-H3-Continuum chains five 5-second MiniMax-H3 Ref2VA chunks, each starting from the previous chunk's last 22 frames, and every splice sits in a camera turn where the blockout shows only sky. Caveat: one seed per version, and a few spots still drift.
---
In [Part 10](/en/blog/blender-fpv-taiwan-h3-rtx5090) I flew an FPV drone shot over Taiwan with MiniMax-H3: three Ref2VA segments, each ending by flying into fog, crossfaded inside the fog, 22.7 seconds total. It looked like one take until you knew where to look. The fog seams read as soft dissolves, and I listed them under "not done yet."
This time I wanted the real thing. No fog. Fly straight from landmark to landmark, like the route line in the original Blender scene.
Three things stood in the way. H3 only generates a few seconds per run, so a long shot has to be split, and splits leave seams. Fog over a seam still reads as a crossfade. And when I tried naive continuation, chunk 2 replayed the story from the start: one frame was a foggy gorge, the next a sunny summit.
What finally worked was an idea I had, and it's simple. Hide the next landmark behind the camera, off to the rear right. Turn the camera toward it. While the frame shows nothing but sky, for less than a second, switch chunks. The seam hides in the sky.
The result is 25 seconds at 1344×768, 24 fps, from one RTX 5090. Below is the full workflow, then what's still off, then a deep dive with the measurements.
## The result: four seams, none visible
The flight is Yushan → Taroko Gorge → Taipei 101 → Sun Moon Lake → a final pull-up panorama. It's five chunks of 5 seconds each, generated by MiniMax-H3 Ref2VA and chained by [ComfyUI-H3-Continuum](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum).
To check the seams I measured how much the picture changes across each splice, compared with a normal step from one frame to the next. 1.0× means the seam changes the picture as much as any other frame does. Higher means a jump.
| Seam | Change vs normal frame |
|---|---|
| 1 (Yushan → Taroko) | 1.28× |
| 2 (Taroko → 101) | 0.86× |
| 3 (101 → Sun Moon Lake) | 0.33× |
| 4 (Sun Moon Lake → panorama) | 0.15× |
For comparison, my failed smoke test hit 5.84× at its seam. Watching the final video, I can't see any of the four cuts.
## Step 1: Hide the upcoming landmark behind the camera
The trick only works if the blockout gives H3 a moment of pure sky. So I rebuilt the Blender blockout (CPU, Workbench engine, not the 5090) with each upcoming landmark group moved to the rear right of the camera:
- **Yushan → Taroko:** the gorge group is rotated and moved rear right. The camera yaws 120° right, pitches up through the sky, then pitches down into the gorge.
- **Taroko → Taipei 101:** the tower and its city blocks sit behind the gorge exit. Yaw 120°, and the tower rises from the bottom edge of the frame.
- **Taipei 101 → Sun Moon Lake:** the lake, Lalu island and Ci'en pagoda are moved rear right. Yaw 145°.
- **Sun Moon Lake → panorama:** yaw 120°, pitch up until every landmark leaves the frame, climb, then pitch down onto the full scene.
Each turn lasts 3 seconds. The middle 0.917 s (23 frames) is sky only: every landmark's bounding box is outside the camera frustum. Max pitch is +65°. If you want to know how Claude writes the blockout script itself, that's [Part 9](/en/blog/blender-blocking-h3-ref2va-rtx5090).
Here are the blockout and the H3 result playing in sync:
And one turn broken into five frames:

## Step 2: Install Continuum and use these settings
ComfyUI-H3-Continuum is MIT-licensed, needs no extra pip packages, and I used v3.9.8. Each chunk takes the tail of the previous chunk as context (22 frames with the Balanced setting I used), and the audio continues across chunks too.
```bash
cd ComfyUI/custom_nodes
git clone --branch v3.9.8 https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum
```
Restart ComfyUI, then start from `examples/workflows/MiniMax_H3_Continuum_V39.json`. The model is MiniMax-H3 Ref2VA from [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3).
My settings:
```
Ref2VA model minimax_h3_ref2va_pruned_nvfp4
Text encoder qwen3vl_32b_minimax_h3_nvfp4_awq
VAE video fp16, audio fp32
Resolution Manual, 1344×768
Steps 20
Sampler / scheduler res_multistep / simple
Seed 2026101702
Chunks 5, 5 s each
Context Balanced, 22 frames
Audio continuity on
Video Reference Mode Follow Timeline
Prompt Timeline, [Chunk 1] … [Chunk 5]
Reference Use Per chunk
Spectrum off
Turbo LoRA none
Finalize buffer_backend = RAM
```
The Ref2VA file is my local NVFP4 quantization; that filename isn't in the official repo. If you don't have it, `minimax_h3_ref2va_pruned_fp8_scaled` or `minimax_h3_ref2va_pruned_int8_convrot` from Comfy-Org/MiniMax-H3 should stand in. The text encoder `qwen3vl_32b_minimax_h3_nvfp4_awq` is in the official repo.
Three of these matter more than the rest:
- **Video Reference Mode = Follow Timeline.** Each chunk gets the matching time window of the blockout. Otherwise every chunk is guided by the start of the blockout.
- **Reference Use = Per chunk.** Each chunk gets its own reference images (Step 4).
- **Finalize buffer_backend = RAM.** The automatic choice failed on my machine after all five chunks had finished. Details in the deep dive.
## Step 3: Put the sky at frames 124, 243, 362 and 481
The splices don't fall on whole seconds, so the sky-only stretch of each blockout turn has to sit where the splices really are.
Chunks must all be the same length. `chunk_seconds` is one global value, and the Timeline headers (`[0-5s]` or `[Chunk N]`) only pick which prompt goes with which chunk. They don't change length.
Then H3's frame grid kicks in. Frame counts snap up to 17k+5. The first 5-second chunk asks for 120 frames and gets 124. Every later chunk generates 141 frames: the first 22 are carried over from the previous chunk, so each adds 119 new ones. The real splices land at:
- frame 124 = 5.167 s
- frame 243 = 10.125 s
- frame 362 = 15.083 s
- frame 481 = 20.042 s
600 frames is 25 s.
My first blockout put the sky midpoints at 3.5, 8.5, 14.5 and 20.5 s, which didn't match. In the second version I moved only the timing. The turns are still 3 s, the yaws are still 120/120/145/120, and the layout is identical. The sky midpoints now land exactly on the real splices, with zero error.

If you use 4- or 6-second chunks, recompute: round the first chunk up to the nearest 17k+5 frame count, add the per-chunk new-frame count for each later chunk, and retime the blockout turns so their sky-only stretches land on those frames.
## Step 4: Give each chunk its own prompt and its own reference images
This is the step that broke my smoke test. I gave both chunks the same Fixed prompt (Part 10's full 0 to 8 s story for segment 1) and the same three reference images (panorama, Yushan, Taroko). Chunk 2 replayed the story:

Three fixes:
1. **Each chunk describes only itself**, under its own `[Chunk N]` header. Times inside a chunk are local seconds, starting from 0.
2. **Write the turn as active camera motion**, along the lines of: "camera banks hard right, pitches up across a clear blue sky, then dives toward" the next landmark. Each chunk ends in sky, and the next one resumes from sky.
3. **No fog words anywhere.** No fog, mist or sea of clouds. Use clear, crisp visibility and a clean blue sky instead.
Here's the Chunk 2 excerpt as I wrote it:
```
[Chunk 2]
subject_definitions:
@R2 defines Taroko Gorge marble cliff faces and a winding turquoise stream.
@R3 defines the upcoming Taipei 101 tower, hidden off to the right.
detailed_description:
Local 0.0-1.50s: resume the same moving camera already looking at clean blue sky, finish the rightward turn and pitch down to reveal Taroko Gorge entering from the lower right.
Local 1.50-3.46s: accelerate above the winding river between distinct tall textured marble walls, banking into the channel with strong parallax.
Local 3.46-4.96s: make the next sharp rightward turn, pitching upward until only clear blue sky is visible.
```
You don't need to copy it. What matters is that each chunk says what it shows: where it starts (sky, except chunk 1), the landmark it flies past, and the turn into sky it ends on.
The reference images follow the same rule. Each chunk gets the landmark it flies past plus the one it turns toward:
| Chunk | Reference images |
|---|---|
| 1 | Yushan + Taroko |
| 2 | Taroko + Taipei 101 |
| 3 | Taipei 101 + Sun Moon Lake |
| 4 | Sun Moon Lake + panorama |
| 5 | panorama (five images after the redo below) |
They're the same Qwen-Image 2.1 images I made for Part 10.
## Step 5: Pin the ending with five reference images
In the first full version, everything from 21 to 25 seconds was generic hills and a city. The closing panorama should show all four landmarks.
I changed only chunk 5. It got five reference images: panorama, Yushan, Taroko, Taipei 101 and Sun Moon Lake. Continuum allows up to 9 per chunk. The prompt pins each landmark to a zone, with no mixing:
- Yushan's main peak, far left
- Taroko Gorge, midground
- Taipei 101 and the city, right
- Sun Moon Lake with a single Lalu island, foreground
- stop climbing for the last 1.5 s
Attempt 1 had all four landmarks, but Yushan came out as a big mountain in the center, and there were two islands. Attempt 2 pushed harder on "distant standalone peak," "one island" and "stop pulling back." Yushan became a far-left peak, there was one island, and seam 4 measured 0.15×. That's the one I used.

## Set run_storage to Save + Auto Resume if you might redo a single chunk
To regenerate one chunk, you need `run_storage` set to `Save + Auto Resume` **before** you generate. `run_name` is optional; set it if you want a fixed name. Runs are saved to `output/h3_continuum/runs/`. The progress preview is not a save.
I had it Off. So the ending redo was a full rerun, twice. It still worked out: with the same seed and unchanged chunks 1 to 4, the first 20 seconds came out nearly identical. But that's an extra half hour per attempt on one RTX 5090.
## What's still off
- **Sun Moon Lake shows up early.** Around 13.5 s, in chunk 3, the lake appears behind Taipei 101, because chunk 3 carried the lake reference image.
- **Duplicate pagodas and islands.** Around 17 s there are two similar pagodas and several small islands. I only fixed that in the ending redo.
- **Yushan is just a distant peak.** It doesn't have the jagged ridge from the reference.
- **The last 1.5 s still drifts up and back**, despite the prompt.
- **Not strictly fog-free.** There are low clouds near the start and haze around Taipei 101.
- **One seed per version.** I haven't tested how stable this is across seeds.
## Deep dive: the measurements behind each step
You can skip this section. It's the smoke test, the source-code rules, the measurement method and the failures, for anyone (or any AI) adapting the workflow.
### Smoke test: shared prompt and references replayed the story
The smoke test used the old blockout's first 10 seconds as 2 chunks of 5 s, at 1344×768, with Follow Timeline. Generation took 710.354 s, VRAM peaked at 31687 MiB, and there was no OOM.
The seam was frame 123 → 124 (0-based), at 5.167 s. Seam MAD was 58.956 against a median of 10.099: 5.84×. Finalize itself flagged it: `scene_cut=yes`, `motion_jump=7.11×`, and it kept the native boundary.
The camera also didn't follow the blockout. At 6 s the blockout tilts against a gray wall while the generation shows an open summit. At 9 s the blockout is still on the wall while the generation flies forward through the gorge.
My take: the shared prompt and references made chunk 2 restart the story, and the old 10-second blockout was mostly gray wall filling the frame, which gave the model very little to follow. One run can't separate the prompt, the blockout, Ref2VA and Continuum as causes. That's why the production run changed all of them at once (per-chunk prompts, per-chunk references, the turn-and-reveal blockout).
### What the Continuum v3.9.8 source says
These are why Step 3 works the way it does:
- `constants.py`: `chunk_seconds` is a single scalar.
- `v2/prompts.py`: time headers pick a prompt by maximum overlap with the chunk; chunk headers map 1:1. Neither changes chunk length.
- `temporal.py`: the first chunk snaps to 17k+5 frames (120 → 124).
- `v2/sequence.py:1049`: each later chunk's target is the cumulative target minus retained frames, snapped to the nearest grid total (141), then trimmed by 22, adding 119. Cumulative totals: 124 / 243 / 362 / 481 / 600.
- In the two-chunk smoke test the natural total was 243 frames. Finalize trimmed 3, giving 240 frames, 10.000 s.
- `_preserved_prefix` keeps nothing without a session, which is what `run_storage = Off` means in practice. That's why I couldn't redo one chunk.
### How I measured the seams
- Decode with ffmpeg to 96×54 grayscale, 0 to 255.
- For each adjacent frame pair, take the mean absolute pixel difference (MAD).
- Baseline = the median of all adjacent differences, excluding ±0.5 s around each real seam.
- Seam ratio = the seam pair's MAD / baseline.
- Also record the window peak: the maximum ratio over the 25 pairs within ±0.5 s of the seam.
### v1 seam numbers, and what the ending redo changed
In v1 the baseline was 7.017:
| Seam | MAD | Ratio | Window peak |
|---|---|---|---|
| 1 | 9.117 | 1.30× | 4.37× |
| 2 | 6.112 | 0.87× | 1.01× |
| 3 | 2.356 | 0.34× | 0.78× |
| 4 | 0.974 | 0.14× | 0.72× |
After the ending redo, the baseline was 7.107. Seam 4 MAD was 1.065, a ratio of 0.150×, with a window peak of 0.755×. Seams 1 to 3 were identical to v1 on a five-frame grayscale comparison; their MAD didn't change, so against the new baseline they come out to 1.28×, 0.86× and 0.33×, the numbers in the result table up top. In v1, Finalize Auto also applied a 1-frame exposure and color fix at seam 1.
### Seam 1's 4.37× window peak is camera motion, not a cut
The peak sits at 5.333 s (frame 127 → 128), a few frames after the splice. After the pitch down out of the sky, the ridge enters fast from the bottom of the frame. That's the camera moving, not a cut, but the dive does start a bit abruptly.
A related mismatch at seam 2: the blockout shows only sky, but the generated frame keeps a ridge along the bottom edge. In v1 that seam measured 0.87×.
### Finalize failed on disk space; the fix was RAM
The first production run finished all 5 chunks. Then Finalize Auto chose a disk buffer that needed 9,579,266,048 bytes (frames plus a 2 GiB margin). C: had 8,780,574,720 bytes free, so it failed.
The sampler cache wasn't kept. On the second run I changed only `buffer_backend = RAM` (49.37 GiB of free RAM at the time), and all 5 chunks were resampled: 1721.584 s.
C: is a 1.86 TB drive and had 8.2 GiB free, mostly taken by a 809.5 GB WSL `ext4.vhdx`. After cleanup it had 589.7 GB free. If you're on Windows with WSL, check that file before a long run.
### Full reruns reproduced the first 20 seconds almost bit for bit
Both ending redos were full reruns. Chunks 1 to 4 had identical prompts, 2/2/2/2 reference images, the same blockout and seed 2026101702, and the runtime seeds were identical too.
Over frames 0 to 20 s (480 frames):
- Attempt 1: 476 frames identical, PSNR 72.54 dB.
- Attempt 2 (used): 477 frames identical, PSNR 73.729 dB. The only differing frames were 477 to 479, right next to the new chunk 5.
Seams 1 to 3 were identical. The seam 4 boundary was not bit-identical (MAD 0.974 → 1.065).
### Timing and VRAM on one RTX 5090
One RTX 5090 32 GB, Windows, ComfyUI 0.37.0, 1344×768. VRAM sampled with nvidia-smi every 2 s, total 32607 MiB, no OOM anywhere.
| Run | Generation time | VRAM peak |
|---|---|---|
| Smoke test, 2 × 5 s | 710.354 s | 31687 MiB |
| Production, 5 × 5 s (second run) | 1721.584 s | 31696 MiB |
| Ending redo, full rerun | ~1814 s each | — |
The whole production run, including the CPU blockout rerender and measurement, took 72.96 min. The ending redo took 67.27 min. Audio is native AAC at 32000 Hz.
### Coexistence with H3LongVideos
I already had H3LongVideos installed. Before installing Continuum I compared `NODE_CLASS_MAPPINGS` and frontend extension names (`H3LongVideosV2`, `H3ShotLength`, `H3ModelInspector`, `H3Overlay`): no collisions. After one restart both loaded with no import errors, and H3LongVideos' five `.py` files had the same SHA-256 before and after.
## Related
- [Part 10: A 22-second Taiwan FPV flight without a drone, Blender blockout + MiniMax-H3 on one RTX 5090](/en/blog/blender-fpv-taiwan-h3-rtx5090)
- [Part 9: Block a scene in Blender, let MiniMax-H3 film it](/en/blog/blender-blocking-h3-ref2va-rtx5090)
- [Part 6: Two characters in one shot with Ref2VA](/en/blog/minimax-h3-ref2va-two-characters)
---
# A 22-second Taiwan FPV flight without a drone: Blender blockout + MiniMax-H3 on one RTX 5090
URL: https://ai-muninn.com/en/blog/blender-fpv-taiwan-h3-rtx5090
Date: 2026-10-16
Series: MiniMax-H3 on RTX 5090 (Part 10)
I made a **22-second** FPV drone flight over Taiwan (Yushan, Taroko Gorge, Taipei 101, Sun Moon Lake) on one RTX 5090, with no hard cuts. A gray Blender blockout sets the flight path and building shapes, Qwen-Image 2.1 makes reference images, and MiniMax-H3 Ref2VA renders three segments that hand off inside fog banks. About 18 minutes of generation at 1344×768, then RTX upscaling to 2688×1536 at 48 fps. Caveat: the fog seams still look like soft dissolves, and a few spots warp.
---
I saw an Instagram post where someone drew a red flight path on a still photo and asked an AI video model to fly along the line and erase it. The result looked like an FPV drone shot. I wanted to do the same thing locally, on one RTX 5090, over Taiwan: Yushan (Jade Mountain), then Taroko Gorge, Taipei 101, Sun Moon Lake, and a pull-up reveal at the end.
The red line on a photo almost works, and the deep dive shows where it breaks. What I ended up with is the workflow from [Part 9](/en/blog/blender-blocking-h3-ref2va-rtx5090), stretched to a long camera move: block the flight in Blender with gray shapes, give MiniMax-H3 reference images for what each place should look like, and let it film the blockout.
The master is 22.7 seconds, 2688×1536, 48 fps, and it plays like one take. Five steps below, then what still doesn't work, then the experiments that led here.
## The pipeline: gray shapes for the path, images for the look, fog for the seams
The shot has three jobs, and each input does one of them:
- **The Blender blockout** carries the flight path and the 3D shape of each landmark.
- **Reference images** set what each landmark looks like.
- **Fog banks** hide the places where one generation ends and the next begins.
The fog is there because one long generation doesn't hold together (more on that in the deep dive). So I render three segments of 7 to 8 seconds each. Every segment ends by flying into fog, and the next one starts by flying out of it.
| Step | Tool | Output |
|---|---|---|
| 1. References | Qwen-Image 2.1 | 1 panorama + 4 landmark images |
| 2. Blockout | headless Blender | 3 gray segment videos |
| 3. Generate | MiniMax-H3 Ref2VA | 3 segments at 1344×768 |
| 4–5. Stitch, upscale | ffmpeg, RTX VSR + Frame Gen | 2688×1536, 48 fps |
## Step 1: Make one panorama and one image per landmark
I used Qwen-Image 2.1 (int8, 40 steps, 1344×768) for two kinds of images.
The first is a fantasy panorama with all four landmarks compressed into one view. It doesn't match real geography, and it doesn't need to. Its job is to give the model one consistent palette and light for the whole flight.
The second is one image per landmark. I ran 2 seeds each and kept the better one. Taipei 101 came out right, with its eight bamboo-like segments. Yushan came out as a generic rocky peak. That's acceptable here, because the blockout sets the mountain's shape and the image mostly supplies the rock and snow.
## Step 2: Block the flight in Blender as three gray segments
The blockout is gray proxies plus a camera, rendered headless with the Workbench engine. Nothing has to look good. Each landmark only needs the shape you want H3 to keep:
- **Yushan:** jagged cones.
- **Taroko Gorge:** two tall walls set close together.
- **Taipei 101:** eight stacked square frustums, each flaring outward toward the top, plus a spire.
- **Sun Moon Lake:** a water plane, a small dome for the island, and a thin pagoda on a hill.
I split the camera path into three segments:
| Segment | Frames | Length | Camera |
|---|---|---|---|
| S1 Yushan + Taroko | 192 | 8 s | over the summit, down into the gorge |
| S2 Taipei 101 | 192 | 8 s | tight spiral climb, pause over the spire, vertical dive |
| S3 Sun Moon Lake + reveal | 175 | 7.3 s | skim the water, half-orbit the island, climb past the pagoda, wide reveal |
Each segment ends inside a fog bank, and the next starts inside one. 192 and 175 are both on the 17k+5 frame grid from Part 9.
Before generating anything, I check the blockout for sudden jumps. A big jump in the blockout tends to become a hard cut in the output. My rule: shrink every frame to 96×54 grayscale, take the mean absolute difference between neighbors, and keep it under 3× that segment's median, except in the fog. The check:
```python
import cv2, numpy as np
cap = cv2.VideoCapture("s2_blockout.mp4")
prev, diffs = None, []
while True:
ok, frame = cap.read()
if not ok:
break
small = cv2.resize(frame, (96, 54), interpolation=cv2.INTER_AREA)
gray = cv2.cvtColor(small, cv2.COLOR_BGR2GRAY).astype(np.float32)
if prev is not None:
diffs.append(np.abs(gray - prev).mean())
prev = gray
diffs = np.array(diffs)
med = np.median(diffs)
for i, d in enumerate(diffs):
if d > 3 * med:
print(f"frame {i + 1}: diff {d:.1f} vs median {med:.1f}")
```
Any flagged frame outside the fog means I smooth that part of the camera path and render the blockout again.
## Step 3: Feed each segment to H3 Ref2VA with three reference images
This runs in ComfyUI on the RTX 5090, with the same `MiniMaxH3ReferenceToVideo` node as Part 9 (model and node: [MiniMax-H3 on GitHub](https://github.com/MiniMax-AI/MiniMax-H3)). Each segment gets:
```
ref_videos.ref_video_0 ← that segment's gray blockout
ref_images.ref_image_0 ← the panorama
ref_images.ref_image_1 ← that segment's landmark image (S1 gets two: Yushan and Taroko)
ref_images.ref_image_2 ← the last generated frame of the previous segment (S2, S3)
```
The third image matters. The Ref2VA node has no first-frame input, so I can't tell it "start exactly here." Giving it the previous segment's last frame as a reference, and starting the segment inside fog, is how I get continuity anyway.
The prompt is a single `[Shot 1]`. It asks for one continuous shot with no cuts and no gray clay material. Without that second instruction, the model has every frame of a gray video in front of it and no reason not to copy the look.
14 steps, 1344×768. Times on one RTX 5090:
| Segment | Time |
|---|---|
| S1 | 363.32 s |
| S2 | 373.57 s |
| S3 | 324.14 s |
| Total | 1061 s (about 17 min 41 s) |
All three worked on the first try, with no out-of-memory errors. I checked each one for hard cuts with ffmpeg's scene score:
```bash
ffmpeg -i s1.mp4 -vf "select='gt(scene,0.18)',showinfo" -f null - 2>&1 | grep pts_time
```
Zero candidates in all three segments.

## Step 4: Crossfade the segments inside the fog
The segments overlap by 7 frames, and the crossfade sits inside the fog, so you see fog thinning out rather than one scene fading into another. Audio is crossfaded the same way. At 24 fps, 7 frames is 0.2917 s. S1 and S2 are 8 s each, so the first fade starts at 8 − 0.2917 and the second at 16 − 2 × 0.2917. Each input gets its frame rate and timestamps normalized first, because [`xfade`](https://ffmpeg.org/ffmpeg-filters.html#xfade) refuses inputs whose timebases differ:
```bash
ffmpeg -i s1.mp4 -i s2.mp4 -i s3.mp4 -filter_complex \
"[0:v]fps=24,format=yuv420p,setsar=1,settb=1/24,setpts=PTS-STARTPTS[v0];\
[1:v]fps=24,format=yuv420p,setsar=1,settb=1/24,setpts=PTS-STARTPTS[v1];\
[2:v]fps=24,format=yuv420p,setsar=1,settb=1/24,setpts=PTS-STARTPTS[v2];\
[v0][v1]xfade=transition=fade:duration=0.291667:offset=7.708333[v01];\
[v01][v2]xfade=transition=fade:duration=0.291667:offset=15.416667[v];\
[0:a][1:a]acrossfade=d=0.291667:c1=tri:c2=tri[a01];\
[a01][2:a]acrossfade=d=0.291667:c1=tri:c2=tri[a]" \
-map "[v]" -map "[a]" -c:v libx264 -crf 17 -pix_fmt yuv420p -c:a aac -b:a 192k taiwan_fpv_hd.mp4
```
559 frames minus two 7-frame overlaps gives 545 frames, or 22.7 seconds.

## Step 5: Upscale with RTX VSR, then double the frame rate
Two NVIDIA nodes finish the clip:
- **`RTXVideoSuperResolution`**, scale 2.0, quality ULTRA: 1344×768 → 2688×1536 in **43.5 s**.
- **RTX Frame Generation**, 24 → 48 fps, in **150 s**.
The gain is real but small. Taipei 101's window frames got slightly crisper. Motion blur in the fast sections stays blurry, because upscaling can't recover detail that was never generated. I didn't see any new ringing or flicker. That's 3 more minutes on top of 18, which I'd pay for a final export but skip for test runs.

## What still breaks
The blockout asked for more than H3 delivered:
- **Taipei 101** (checked on the 864×480 run): no full 360° spiral, and no real half-second hold above the spire.
- **Sun Moon Lake** (same run): the skim flies higher than the 2 m I blocked.
- **Seams:** both fog transitions still read as a soft dissolve. You can tell where they are.
- **Local warping:** the gorge walls around 5 to 6.5 s, and Taipei 101's segments twisting around 10 s and 14 s.
- **At 1344×768 specifically:** the gorge fog gets thicker around 4 s, and the island and the pagoda hill seem to merge around 18 to 19 s.
So the blockout reliably holds the sequence of landmarks, the direction of travel and the rough shape of each landmark. Exact camera moves like a full orbit or a timed hold get softened, the same way exact distances drifted in Part 9.
## Deep dive: what didn't work, and why the pipeline looks like this
You don't need this section to use the workflow. It's the experiments behind each step above, for anyone (or any AI) adapting the workflow.
### Red line on a photo: the order works, the 3D doesn't
This was the original idea. I took one still image with a red flight path drawn on it and used it as the first frame for H3 image-to-video (I2VA): 1344×768, 345 frames (14.4 s), 112.4 s to generate.
H3 followed the order of the landmarks, and the red line was gone within 0.5 s. But when the camera reached the side of a building, the building melted. A Colosseum turned into concentric spirals. A tower stretched. A single image tells the model what the front of a scene looks like and nothing about the sides, so it has to guess the 3D shape, and the guesses fall apart once the camera moves around something.
### Blockout plus one reference image: better structure, but crude proxies still warp
Next I blocked the same idea in Blender and ran Ref2VA with one reference image, at 864×480 (378.8 s). The Colosseum spiral went away. Two problems remained:
- Segments arrived 0.5 to 1.5 s earlier than they did in the blockout.
- A crude opera house made of five shells still warped.
If the proxy is too crude to describe the building, H3 doesn't fill in the rest correctly. That's why Taipei 101 in the final version is eight separate flared frustums and not one tall box.
### One 15-second take through every landmark: hard cuts
I first tried the whole flight as one generation: 362 frames, four landmarks plus the closing panorama. In both A/B runs, H3 hard-cut 2 to 3 times, even with a single-shot prompt.
One cut lined up with a real problem in the blockout. At frame 138, the adjacent-frame difference was 35.4 against a median of 7.9, so the camera itself jumped. The other cuts happened where the blockout was smooth. My best guess is that one generation was asked to hold too many very different scenes, and the model fell back to editing between them.
Both fixes went into the final pipeline. The 3×-median check catches the first kind of cut before generation. Splitting into three segments, each with only one or two landmarks, removed the second kind.
### A/B on references: ask about composition and texture separately
I compared two reference sets on the same blockout: the panorama alone, against the panorama plus four landmark images. I watched them side by side, blind.
For composition, I preferred the panorama-only run. For texture, I preferred the run with the extra landmark images, which looked less plastic. The final pipeline uses the panorama plus one landmark image per segment.
### 864×480 first, to check the route
Before spending 18 minutes at 1344×768, I ran the three-segment version at 864×480. Segments took 161.3, 161.3 and 141.2 s, 463.8 s in total. The largest adjacent-frame difference in the output was 25.5, at the summit roll, against a median of 7.7. That's about 3.3× the median, right where the camera rolls hard over the summit, and the scene detector still found zero cuts.
Changing the resolution changes the composition. The 1344×768 run is a new generation, not a sharper copy of the 864×480 one. That's why the 1344×768 version has its own problems (the thicker gorge fog around 4 s, the merged island and hill around 18 to 19 s) that the low-res test didn't show.
### Troubleshooting: H3 crashed while loading the text encoder
At one point H3 crashed while loading its 15.7 GB text encoder. The ComfyUI log stopped here:
```
Requested to load MiniMaxH3TEModel_
```
The process exited with code `0xC0000005`. It happened with both text-encoder variants, so a single bad file seemed unlikely.
System RAM was the likely cause. An idle WSL instance (`vmmemWSL`) was holding 20.4 GB. Free RAM was 27 GB out of 61.6 GB, and commit charge was 38.4 of 71.1 GB. After running
```bash
wsl --shutdown
```
free RAM was 47.6 GB, commit was 17.5 GB, and the same job ran. If H3 dies at that log line on Windows, check RAM and commit charge before suspecting the model files or VRAM.
---
*Also in this series: [Part 9 — Block a scene in Blender, let MiniMax-H3 film it](/en/blog/blender-blocking-h3-ref2va-rtx5090) · [Part 6 — Two characters in one shot with Ref2VA](/en/blog/minimax-h3-ref2va-two-characters)*
---
# LFM2.5 24B-A2B on One RTX 2080 Ti: 184.8 tok/s, If You Use the Official Sampling
URL: https://ai-muninn.com/en/blog/lfm25-24b-a2b-one-2080ti
Date: 2026-10-16
Series: 改裝 2080 Ti 22G (Part 26)
LFM2.5 24B-A2B from Liquid AI is a text-only MoE: 30 of its 40 layers are convolutions, 10 are attention, and about 2B parameters are active per token. On one modded RTX 2080 Ti 22G, the official QAD Q4_0 (13.6 GB) decodes at **184.8 tok/s**, the fastest model I've run on this card. On two cards with Q8_0 and the official sampling it scored 128/140, tied with the two-GPU Qwen3.8-27B. The catch: it always thinks, it can loop at temperature 0, and it passed 1 of 5 agent tasks. My family server went with the vision-capable MiniCPM instead.
## Why I tested it
In [#25](/en/blog/minicpm-v47-35b-a3b-one-2080ti) I was looking for a model that could take over my family's two-GPU 27B chat server on a single card. The same night, Liquid AI released [LFM2.5 24B-A2B](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B), another MoE with about 2B active parameters, so it went through the same test set.
It isn't a plain Transformer. Only 10 of its 40 layers are attention; the other 30 are short convolutions. Fewer attention layers mean a small KV cache, and few active parameters mean little to read per token. Both make it fast.
It was the fastest model of the night: 184.8 tok/s on one card, tied with the 27B on the 140 set. But thinking can't be turned off, temperature 0 can send it into very long traces, it passed 1 of 5 agent tasks, and it can't read images, so the family chat server went with MiniCPM. The rest covers setup, the numbers, and why the official sampling settings matter. The `--kv-unified` setting that cost me 12 bogus errors is in the deep dive.
## 184.8 tok/s on one card, 131K context in 17.4 GB

Per Liquid AI: 24B total, 2.45B active per token, 64 experts per MoE block with top-4 routing, and a 131,072-token context.
Three ways to run it on the same machine:
| | 1 card, QAD Q4_0 13.6G | 1 card, Q4_K_M 14.5G | 2 cards, Q8_0 |
|---|---:|---:|---:|
| Prefill 512 / 8K / 32K (tok/s) | 3243 / 3286 / 2881 | 2864 / 2959 / 2631 | 3086 / 4930 / 4659 |
| Decode (tok/s) | **184.8** | 180.0 | 135.0 |
| Decode at 32K depth (tok/s) | not measured | 148.4 | 113.6 |
| Full 131,072 context | not measured | 17.4 GB | 14.2 GB per card |
QAD is Liquid's quantization-aware-distilled Q4_0. It's 0.9 GB smaller than Q4_K_M and decodes a bit faster. As with MiniCPM, one card decodes faster than two because the weights are smaller; two cards win on long-prompt prefill, roughly 1.5–1.7x at 8K and above.
On a 120K-token needle test, one card took 52 seconds (2,319 tok/s) and two cards 28 seconds (4,256); both answered correctly. MiniCPM needed 154 seconds for 165K tokens on one card, so LFM reads long documents much faster.
These numbers come from one night's setup: llama.cpp b11588, with another GPU running a separate test.
## 128/140, tied with the two-GPU 27B
Same 140 questions: GSM8K 50, MATH-500 30, MuSR 20, HumanEval+ 40.
| | 2 cards, Q8_0, official sampling | 1 card, QAD Q4_0, Qwen sampling |
|---|---:|---:|
| GSM8K | 49/50 | 47/50 |
| MATH-500 | 29/30 | 28/30 |
| MuSR | 15/20 | 14/20 |
| HumanEval+ | 35/40 | 36/40 |
| **Total** | **128/140** | **125/140** |
| Wall time | 3,169 s | 1,344 s |
The two-GPU 27B scored 128. The two columns differ in both quant and sampling, so I can't say which one costs the three points.
I normally run this set with thinking off. LFM can't turn it off, so it thinks on every question; the two-card run took 3,169 seconds, while MiniCPM with thinking off took 576.
## Hard suite: better at instructions, worse at code, and some math answers cut off at 32K
Thinking on. One card ran QAD at temperature 0; two cards ran Q8_0 with the official sampling.
| | 1 card QAD, temp 0 | 2 cards Q8_0, official | Qwen3.8-27B |
|---|---:|---:|---:|
| Math (AIME) | 23/30 (7 truncated) | 23/30 (6 truncated) | 21/30 |
| Reasoning (GPQA) | 21/30 | 23/30 | 25/30 |
| Instructions (IFEval) | 27/30 | 29/30 | 27/30 |
| Code (LiveCodeBench) | 9/20 (7 truncated) | 11/20 (6 truncated) | 14/20 |
"Truncated" means the thinking trace hit the 32K-token cap before an answer came out, which counts as wrong.
LFM did worst on these two:
- **Agent bug fixing** (Pi fixing real bugs in a repo, hidden tests in Docker, one card with QAD): 1/5. Its tool calls were well-formed; it just couldn't fix the other four within 20 turns. MiniCPM went 5/5.
- **Three-hop lookup over 116K tokens:** 0/10. I raised its answer budget to 8,192 tokens (2,048 for other models) because at 2,048 it spent the whole budget thinking on the first question and returned an empty string.
## Use the official sampling: temperature 0 can think forever
I run evals at temperature 0 so results are reproducible. With LFM, some questions at temperature 0 never wrap up.
The median reasoning trace was 1,771 tokens, which is fine, but one question ran to 28K. In the one-card run, 7 math and 7 code questions hit the 32K cap.
The [model card](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B) recommends `temperature 0.1`, `top_k 50`, and `repetition_penalty 1.05`. With those on the two-card run, reasoning went from 21 to 23, instructions from 27 to 29, code from 9 to 11, and truncations from 7 to 6. The quant also changed (Q4_0 to Q8_0), so not all of that is sampling. Truncations still happened, though: even with the recommended settings, hard problems can produce very long traces.
Send the three parameters with each request:
```bash
curl -s localhost:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "What is 17 × 23?"}],
"temperature": 0.1, "top_k": 50, "repeat_penalty": 1.05,
"max_tokens": 8192
}'
```
Give `max_tokens` real headroom. The model thinks before every answer, even 17 × 23, and a small budget cuts it off before the answer appears. Adding `"chat_template_kwargs": {"enable_thinking": false}` does nothing; the model card says it always thinks.
## Setup: QAD Q4_0 on one card with 131K context
You need a modded 2080 Ti 22G and a recent llama.cpp. I used b11588, built for sm_75 the same way as in [#25](/en/blog/minicpm-v47-35b-a3b-one-2080ti).
```bash
mkdir -p ~/models/lfm25 && cd ~/models/lfm25
curl -L -C - --retry 5 -o LFM2.5-24B-A2B-QAD-Q4_0.gguf \
https://huggingface.co/LiquidAI/LFM2.5-24B-A2B-GGUF/resolve/main/LFM2.5-24B-A2B-QAD-Q4_0.gguf
```
Launch:
```bash
./build/bin/llama-server \
-m ~/models/lfm25/LFM2.5-24B-A2B-QAD-Q4_0.gguf \
-ngl 99 -fa on -t 24 --jinja \
-c 131072 -np 1 \
--temp 0.1 --top-k 50 --repeat-penalty 1.05 \
--host 0.0.0.0 --port 8080
```
- `--temp`, `--top-k`, and `--repeat-penalty` set server-side defaults for requests that don't send their own.
- To serve several users, raise `-c` along with `-np`. The deep dive explains why.
- There's no speculative decoding to turn on: no MTP and no official draft model. N-gram speculation gave 2–5%.
## Why it didn't replace the family chat server
Both models finished the same night. LFM decodes over 1.6x faster (184.8 vs 111.5 tok/s) and matched the 27B on the 140 set. I still picked MiniCPM:
- **No vision.** LFM is text-only; MiniCPM reads images.
- **Thinking can't be turned off.** Even short questions get a thinking pass first, which eats into the speed advantage.
- **1/5 on agent tasks.** That server also handles agent tasks for me, and MiniCPM passed all five.
After testing I deleted the three LFM weight files (53.6 GB) and kept the results.
---
## Deep dive: --kv-unified and 12 bogus errors, long-context runs, methodology
You can skip this section. It covers the KV pool trap when serving several users, why long-context questions need their own run, the sampling mismatch in my harness, and the methodology and environment.
### With --kv-unified, -c is one shared pool
For the two-card runs I used 8 slots (`-np 8`), `-c 131072`, and `--kv-unified`, assuming each request could use up to 131,072 tokens. Twelve questions came back as HTTP 500 and my runner logged them as errors.
Under `--kv-unified`, `-c` is the total KV cache shared by all 8 slots. Each long-thinking LFM request took 30K+ tokens, so four in flight nearly filled the 131,072-token pool and the next one didn't fit.

With `-c 393216`, the server log reads:
```
llama_context: n_ctx_seq (393216) > n_ctx_train (131072) -- possible training context overflow
srv load_model: initializing, n_slots = 8, n_ctx_slot = 131072, kv_unified = 'true'
```
Each slot is still capped at 131,072 (the training length), and the pool is 393,216. With only 10 attention layers, LFM's KV cache is about 20 KB per token, so a bigger pool is cheap and still fit on the two cards. Rerunning those 12 questions produced the scores reported earlier.
### Long-context questions need their own run
A 116K-token question shares that same pool. When I ran the long-context set alongside the hard suite with a 131K pool, one long request took most of the cache and other requests started returning HTTP 500. I moved the long-context set to its own run.
### My harness used Qwen's sampling
The 140-question runner defaults to Qwen's recommended sampling. I didn't change it for the one-card run, so 125 was measured with Qwen sampling; for the two-card run I switched to Liquid's settings and got 128.
### Methodology
**Speed:** `llama-bench` with `-ngl 99 -fa 1 -t 24`, prompts of 512, 8192, and 32768 tokens, 128 generated tokens; the 32K-depth column adds `-d 32768`.
**Context and needle:** `llama-server -c 131072`, VRAM read from `nvidia-smi`; the needle prompt is about 120K tokens of random English words with a passphrase planted inside.
**140 questions:** two cards Q8_0 with the official sampling, one card QAD Q4_0 with Qwen sampling; HumanEval+ scored with evalplus.
**Hard suite:** thinking on, 32K cap per question. One card QAD at temperature 0; two cards Q8_0 with the official sampling (temperature 0.1, top_k 50, repeat_penalty 1.05).
**Agent:** one card, QAD; Pi fixes bugs in a real repo, up to 20 turns, hidden tests in Docker decide pass or fail.
**Three-hop lookup:** 116K tokens, 8,192-token answer budget, run on its own.
Caveats:
- Every test ran once, so there are no confidence intervals.
- The 27B scores came from an earlier date under slightly different conditions.
- On the speed-test night, another GPU was running a separate test.
### Versions and hardware
- llama.cpp b11588, built for sm_75
- Model: `QAD-Q4_0` and `Q4_K_M` (one card) and `Q8_0` (two cards) from LiquidAI/LFM2.5-24B-A2B-GGUF
- Machine: EPYC, 128 GB RAM, three RTX 2080 Ti 22G; one-card tests on the third GPU, two-card tests on the first two (with the 27B stopped)
### Not done yet
- The 140 set and hard suite on one-card QAD with the official sampling.
- Rerunning the truncated questions with a 64K cap, to tell long-but-finishing traces from real loops.
- A separate Chinese decode-speed measurement.
---
Also in this series: [#25 MiniCPM-V 4.7 35B-A3B on one RTX 2080 Ti](/en/blog/minicpm-v47-35b-a3b-one-2080ti) · [#24 177B on 44 GB of VRAM: two 2080 Tis run Strata at 98.7 tok/s](/en/blog/strata-flashnext-dual-2080ti) · [#22 NVFP4 on a 2080 Ti without FP4 hardware](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant)
---
# MiniCPM-V 4.7 35B-A3B on One RTX 2080 Ti: 111.5 tok/s with Vision, Replacing a Two-GPU 27B
URL: https://ai-muninn.com/en/blog/minicpm-v47-35b-a3b-one-2080ti
Date: 2026-10-16
Series: 改裝 2080 Ti 22G (Part 25)
MiniCPM-V 4.7 35B-A3B is a vision-capable MoE model: 35B parameters, about 3B active per token. On one modded RTX 2080 Ti 22G with the official mix_q3gud_im quant (15.5 GB) it generates at **111.5 tok/s** and loads the full 262,144-token context in 20.8 GB. It scored 127/140 on my question set; the two-GPU Qwen3.8-27B my family used scored 128. Stronger at math, weaker at multi-step reasoning. It now runs our family chat server on one card, and the freed GPU went to Strata. The official speculative-decoding draft model makes it slower, so I leave it off.
## Why I tested it
My box has three modded 2080 Tis. The family chat server ran Qwen3.8-27B ([#22](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant)) across the first two. The third card was shared between ComfyUI and Strata ([#23](/en/blog/strata-flashnext-one-2080ti)), so they took turns. [#24](/en/blog/strata-flashnext-dual-2080ti) ended with Strata being great for one user and no card I could give it full-time.
Then OpenBMB released [MiniCPM-V 4.7 35B-A3B](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B), the first MoE MiniCPM-V: 35B total, about 3B active per token, and it reads images. If it could replace the 27B on one GPU instead of two, I'd get a card back.
It could. One card runs it, it reads images, the full 262K context fits, and it came within one question of the 27B. I switched the family chat server to it and gave the freed card to Strata. The first half of this post is setup and numbers. Speculative decoding, the three-hop failure, and a prefill fix for mixed long and short requests are in the deep dive.
## 111.5 tok/s on one card, 262K context in 20.8 GB
Each layer splits most of its weights into experts and picks a few per token, about 3B active in total (OpenBMB's own docs say about 3.5B). The language side is a Qwen-family MoE (`qwen3_5_moe` in the config); vision comes from SigLIP2, with images going through an `mmproj` projector file first.
That's a good fit for a 2080 Ti. The official mixed quant `mix_q3gud_im` is 15.5 GB, so it fits on a 22 GB card with room left over, and each token only reads about 3B parameters, so decode is fast.
Same machine, one card on the mixed q3, two cards on Q8_0:
| | 1 card, mix_q3gud_im 15.5G | 2 cards, Q8_0 |
|---|---:|---:|
| Prefill 512 / 8K / 32K (tok/s) | 1938 / 1896 / 1597 | 2213 / 3450 / 3050 |
| Decode (tok/s) | **111.5** | 96.5 |
| Decode at 32K depth (tok/s) | 96.0 | 84.6 |
| 165K-token needle test | 154 s | 82 s |
One card decodes faster than two because the q3 weights are smaller and each token reads less. Two cards win on prefill, about 1.8x at 8K and up. Both answered the needle test correctly.
Text-only at 262,144 tokens (the model's limit), one card uses 20.8 GB. Running vision at the same time needs a q8_0 KV cache; the exact config is in the family chat server section below.
These numbers come from one night's setup: llama.cpp b11588, with the other GPUs running a separate test that took some CPU.
## 127/140, one question behind the two-GPU 27B
My 140-question set is GSM8K 50, MATH-500 30, MuSR 20, and HumanEval+ 40, the same mix as [#19](/en/blog/ternary-bonsai-2-27b-one-2080ti). Thinking off, four requests in parallel.
| | 2 cards, Q8_0 | 1 card, q3 + LoRA |
|---|---:|---:|
| GSM8K | 49/50 | 49/50 |
| MATH-500 | 30/30 | 30/30 |
| MuSR | 14/20 | 14/20 |
| HumanEval+ | 34/40 | 36/40 |
| **Total** | **127/140** | **129/140** |
The two-GPU 27B scored 128 on the same set with thinking off.
The second column is what actually went into production: the one-card q3 with a community [uncensoring LoRA](https://huggingface.co/AtomicChat/MiniCPM-V-4.7-35B-A3B-Uncensored-GGUF) (rank 1, 106 MB). I never ran the plain one-card q3 on the 140, so I can't tell whether the quant or the LoRA accounts for the two-point gap. Vision still worked with the LoRA loaded; the same receipt came back fully correct.
## Better at math, worse at multi-step reasoning
The 140 set doesn't separate the two models much, so I also ran a hard suite with thinking on and temperature 0, on two cards with Q8_0:
| | MiniCPM-V 4.7 | Qwen3.8-27B | Gap |
|---|---:|---:|---:|
| Math (AIME) | **25/30** | 21/30 | +4 |
| Reasoning (GPQA) | 14/30 | **25/30** | −11 |
| Instructions (IFEval) | 24/30 | 27/30 | −3 |
| Code (LiveCodeBench) | 12/20 | 14/20 | −2 |
It solved 4 more AIME problems and 11 fewer graduate-level GPQA questions.
Two more results:
- **Three-hop lookup over 116K tokens** (follow a chain of clues three times through a long document): 0/10 without thinking, 2/10 with it. The 27B only ran 5 of these and got all 5. MiniCPM fails the same way every time; the deep dive breaks it down.
- **Agent bug fixing** (Pi fixing real bugs in a repo, scored by hidden tests in Docker): 5/5, 15 to 23 seconds each, on one card with the q3 quant.
## Vision: a Traditional Chinese receipt, read correctly
Vision ran on one card with the q3 quant, `mmproj-model-f16.gguf`, and 16K context. I gave it two images:
- **A receipt in Traditional Chinese**, asking for every item, price, and the total: 6 items and the 260 total, all correct.
- **A generated image of a woman in period costume eating in a convenience store**, asking it to describe the scene in Traditional Chinese and point out what doesn't make sense: it caught the oddity, and the whole answer had exactly one Simplified character (处).
Two images is a smoke test, not a vision benchmark. It shows the model reads Traditional Chinese and doesn't drift into Simplified.
## Setup: build b11588, grab the 15.5 GB file, disable thinking per request
You need:
- **One modded 2080 Ti 22G.**
- **A recent llama.cpp.** MiniCPM-V 4.7 support is [PR #29416](https://github.com/ggml-org/llama.cpp/pull/29416), merged on 10-10 and included from b11551 on. Older builds won't load the model. I used b11588.
- **Weights:** `MiniCPM-V-4_7-35B-A3B-mix_q3gud_im.gguf` (15.5 GB), plus `mmproj-model-f16.gguf` for vision.
### Build for sm_75
The 2080 Ti is Turing (sm_75), so I build from source:
```bash
git clone --depth 1 --branch b11588 https://github.com/ggml-org/llama.cpp llama.cpp-b11588
cd llama.cpp-b11588
cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DLLAMA_CURL=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 40 --target llama-server llama-mtmd-cli llama-bench
```
Set `-j` to your core count.
### Download
```bash
mkdir -p ~/models/minicpm-v47 && cd ~/models/minicpm-v47
B=https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B-gguf/resolve/main
curl -L -C - --retry 5 -o MiniCPM-V-4_7-35B-A3B-mix_q3gud_im.gguf $B/MiniCPM-V-4_7-35B-A3B-mix_q3gud_im.gguf
curl -L -C - --retry 5 -o mmproj-model-f16.gguf $B/mmproj-model-f16.gguf
```
`-C -` resumes; if the download drops, rerun the same line.
### Launch: text-only at 262K
This is the exact command behind the 20.8 GB and the passing needle test:
```bash
CUDA_VISIBLE_DEVICES=GPU- \
./build/bin/llama-server \
-m ~/models/minicpm-v47/MiniCPM-V-4_7-35B-A3B-mix_q3gud_im.gguf \
-ngl 99 -fa on -c 262144 -np 1 -t 24 --jinja --fit off \
--host 0.0.0.0 --port 8080
```
- I have several GPUs, so `CUDA_VISIBLE_DEVICES` pins the card by UUID (`nvidia-smi -L` lists them). Skip it if you have one card.
- `--fit off` turns off automatic fitting and loads exactly the context you asked for. Older docs say `--no-fit`, which b11588 rejects.
- `-t 24` is my CPU thread count. Adjust for your machine.
### Disable thinking per request
The model thinks by default. To turn it off, send `chat_template_kwargs` with each request:
```bash
curl -s localhost:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "Write a Python function that checks whether a number is prime"}],
"chat_template_kwargs": {"enable_thinking": false},
"max_tokens": 512
}'
```
Images go through the same API as base64 in `image_url`:
```python
import base64, json, urllib.request
b = base64.b64encode(open("receipt.png", "rb").read()).decode()
body = {
"messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64," + b}},
{"type": "text", "text": "List every item and price on this receipt exactly as printed, and the total."},
]}],
"temperature": 0.2, "max_tokens": 800,
"chat_template_kwargs": {"enable_thinking": False},
}
req = urllib.request.Request("http://localhost:8080/v1/chat/completions",
json.dumps(body).encode(), {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(req, timeout=600))["choices"][0]["message"]["content"])
```
### Three things that will trip you up
1. **`llama-mtmd-cli` doesn't accept `--chat-template-kwargs`.** You can't do image prompts with thinking off from mtmd-cli. Run the server and use the API.
2. **Skip Q4_K_M.** It doesn't fit on one card: you have to push 4 layers of experts to the CPU (`-ncmoe 4`), leaving 0.8 GB of VRAM, and decode drops to 89 tok/s. The q3 mix stays fully on the GPU at 111.5.
3. **Old llama.cpp won't load it.** You need a build with PR #29416 (b11551 or later).
## The family chat server: vision, two concurrent users, q8_0 KV
This is the config our family chat server runs now:
```bash
CUDA_VISIBLE_DEVICES=GPU- LLAMA_PREFILL_CHUNK=64 \
./build/bin/llama-server \
-m MiniCPM-V-4.7-35B-A3B-LoRA1.0-mix-Q3_K.gguf \
--mmproj mmproj-model-f16.gguf \
-ngl 99 -fa on -t 24 --jinja --fit off \
--kv-unified -np 2 -c 131072 -ctk q8_0 -ctv q8_0 \
-b 2048 -ub 512 --metrics --slots
```
- **Weights:** I merged the LoRA into the weights at high precision, then requantized to the same layout as the official q3 mix. Still 15.5 GB, and no adapter to load at runtime. I haven't rerun the 140 on this merged file; the 129 was measured with the LoRA loaded at runtime.
- **`-ctk q8_0 -ctv q8_0`:** q8_0 KV cache. With the default f16, text-only 262K already takes 20.8 GB and adding the 1.07 GB mmproj runs out of memory. With q8_0, vision plus 262,144 context comes to 20.4 GB. The family chat server runs 131,072 to leave some headroom.
- **`--kv-unified -np 2`:** two users at once. With `--kv-unified`, `-c` is the total shared by both slots, not a per-request cap.
- **`LLAMA_PREFILL_CHUNK=64`:** not an upstream option. It's my own port of a patch that keeps a long prompt from blocking everyone else's short questions. Stock llama.cpp doesn't have it, and leaving the variable unset gives the original behavior. Details in the deep dive.
For more users, I tested 8 slots on the third card (`-np 8 -c 262144`, official q3 without the LoRA, otherwise the same, 20.4 GB):
| Concurrent users | Per user (tok/s) | Total (tok/s) |
|---:|---:|---:|
| 1 | 107.5 | 103.6 |
| 2 | 80.9 | 154.9 |
| 4 | 50.6 | 189.5 |
| 8 | 30.2 | 224.1 |
After the switch I re-measured a single user on the production card: 99–104 tok/s decode, about 2,000 tok/s prefill, 77 at 32K depth, with the card still capped at 200 W.
With the family chat server on one card, the 27B on the first two cards was retired. The second card now runs Strata full-time and the third stays on ComfyUI. Each card has one job, and nothing has to take turns.
---
## Deep dive: speculative decoding, MTP, the three-hop failure, mixed-length prefill, methodology
You can skip this section. It covers why speculative decoding gets slower, why MTP isn't usable, where the three-hop lookup breaks, how I stopped long prompts from blocking short ones, and the full methodology, environment, and gotchas.
### Why does the draft model make it slower when VRAM is fine?
OpenBMB ships a separate DSpark draft model for speculative decoding (a small model guesses a few tokens ahead and the main model verifies them in one pass). With the official default n-max 7, Chinese output fell from 110 to 43 tok/s.
My first guess was VRAM, with the draft crowding the KV cache. With the draft loaded the card used 18 of 22 GB, so that's not it.
Then I swept settings on one card with the q3 quant, temperature 0, across Chinese, code, and English prompts:
| Setting | Chinese | Code | English |
|---|---:|---:|---:|
| Official default, n-max 7 | 110 → 43 tok/s | | |
| n-max 2 | −25% (28% accepted) | **+20%** (76% accepted) | +4% |
| n-max 2 + `--spec-draft-p-min 0.75` | 99 → 61 tok/s | | |
(The n-max 7 row was a separate run with a no-draft baseline of 110; the p-min 0.75 row had a baseline of 99.)
n-max 3 and 4 were slower than 2. Chinese acceptance sat at 15–28%, so most guesses were thrown away.
The third row is the telling one. With `--spec-draft-p-min 0.75` the draft only submits when it's confident: 45 drafts across the whole Chinese answer, 96% accepted, and it still ran at 61 tok/s against 99 without a draft. With acceptance that high, guess quality isn't the issue. The cost is the **fixed work the draft does at every step**. p-min 0.5 was also slower than leaving it unset.

Three things stack up here:
1. **Each step is already cheap.** A token touches about 3B parameters, which is why one card hits 111.5 tok/s. Speculative decoding saves weight-reading time, and there wasn't much of it.
2. **Verifying several tokens saves less on an MoE.** A dense model verifying n tokens reads its weights once, which is where the speedup comes from. Here each of the n tokens routes to its own experts, and they don't fully overlap, so a batch reads more expert weights than a single token does and the savings shrink.
3. **Chinese guesses miss.** At 15–28% acceptance, most of the verification is wasted.
I saw the same pattern with Bonsai 2 in [#19](/en/blog/ternary-bonsai-2-27b-one-2080ti): speculative decoding pays off when decode is bound by memory bandwidth.
These flags give the n-max 2 setup. It's only worth it for workloads that are almost all code or English:
```bash
-md ~/models/minicpm-v47/dspark-MiniCPM-V-4_7-35B-A3B-F16.gguf \
--spec-type draft-dspark --spec-draft-n-max 2 -ngld 99
```
b11588 accepts `--spec-draft-p-min`. Some docs, including llama.cpp's own `docs/speculative.md`, still say `--spec-draft-conf-min`, and copying that fails at load:
```
error: invalid argument: --spec-draft-conf-min
```
### MTP is in the config but not in the weights
Qwen-family models often ship MTP (built-in draft layers, no separate model needed), and llama.cpp supports MTP for qwen35moe. This model's `config.json` says `mtp_num_hidden_layers: 1`.
The weight index on Hugging Face has zero MTP tensors. The config declares it but the weights don't include it, so the only option for now is the external DSpark draft.
### Three-hop lookup: finds the trail, stops one hop short
Each question hides a chain inside a 116K-token document: an alias leads to a hub, the hub leads to a vault, and the vault leads to the answer. Miss any hop and the answer is wrong.
On two cards with Q8_0 it scored 0/10 without thinking and 2/10 with it. The misses all look the same: the first two hops are right, it reaches the vault, and then returns the vault's ID as the answer instead of taking the last hop.

That lines up with the 11-question GPQA gap: problems that need a few more reasoning steps are where it trails the 27B.
### Long prompts blocking short ones: porting chunked prefill
Before the switch I tested a case that actually happens at home: someone pastes a long document while someone else asks a one-line question.
Stock llama.cpp prefills the whole long prompt before the short one gets a turn. With a 90K-token request and three short ones, the short requests waited 27.5 to 37.5 seconds before their first token.
The fix is to prefill the long prompt in chunks and let other requests in between chunks. llama.cpp has a [PR #10718](https://github.com/ggml-org/llama.cpp/pull/10718) that does this, still open and written against an older code path. I ported the approach by hand into two spots in b11588's `server-context.cpp`, with an environment variable `LLAMA_PREFILL_CHUNK` setting the chunk size; 0 keeps the original behavior.
| Chunk size | Short request wait | Long request itself |
|---|---|---|
| none | 27.5–37.5 s | 63.6 s |
| 512 | 7–8.8 s | |
| 256 | 5–6.2 s | |
| 64 | 3.2–3.8 s | 65.5 s (+3%) |
At 64, the short questions go from half a minute to just over 3 seconds, the long request only slows by 3%, and every answer was correct. Chunk 32 was within a second of 64, so I use 64.
Three more checks:
- 8 slots, two 60K-token requests plus two short ones: short waits went from 35.7–37.4 s to 4.4–4.5 s. The two long requests now run side by side and both finish around 100 s; without chunking, the first one finished at 49.5 s.
- A short image request arriving during a 90K-token request: 7.1 s down to 3.0 s, answer correct. I didn't touch the vision path, and it benefits too.
- 4 and 8 parallel requests, each with a unique tag: no answer contained content from another request.
### Q4_K_M doesn't fit on one card
I originally wanted Q4_K_M as the one-card quant. It doesn't fit: `-ncmoe 4` moves 4 layers of experts to the CPU, VRAM is down to 0.8 GB after loading, and decode is 89 tok/s. The official q3 mix stays fully on the GPU at 111.5 with room for 262K, so that's what I use.
### Blender scripts: 2/5 bare, 5/5 with a cheat sheet and error feedback
I also have local models write Blender Python scripts, so I made 5 bpy tasks (a booth, a bookshelf, a previs camera move, materials, a chair).
- Bare prompt: MiniCPM with the LoRA 2/5, the 27B 4/5. Both got the Track To constraint enum wrong; MiniCPM also used outdated API calls on the chair and materials tasks.
- With a bpy cheat sheet and the error message fed back for a rewrite (up to 2 retries): both 5/5. The cheat sheet alone didn't help; the error-feedback retry did.
That retry loop is how I actually work, so under my setup this one is a tie.
### Methodology
**Speed:** `llama-bench` with `-ngl 99 -fa 1 -t 24`, prompts of 512, 8192, and 32768 tokens, 128 generated tokens, two runs each; the 32K-depth column adds `-d 32768`.
**Context limit and needle:** `llama-server` with `-c 262144 -np 1 --fit off`. The prompt is random English words filling about 85% of the context, with a passphrase planted at the 60% mark; temperature 0, thinking off, ask for the passphrase. One card and two cards used the same 165,107-token prompt.
**Speculative decoding:** one card, q3, `-c 16384 -np 1`, one Chinese, one code, and one English prompt at temperature 0; VRAM read from `nvidia-smi` 45 seconds after the server loaded.
**140 questions:** `-np 4 --kv-unified`, four in parallel, thinking off; HumanEval+ scored with evalplus. Two-card Q8_0 took 576 s, one-card q3 with the LoRA 772 s.
**Hard suite:** two cards, Q8_0, thinking on, temperature 0: AIME, GPQA, IFEval, LiveCodeBench, and the three-hop lookup.
**Agent:** one card, q3; Pi fixes bugs in a real repo, hidden tests in Docker decide pass or fail; temperature 0.
**Concurrency:** third card, official q3 plus vision, q8_0 KV, `-np 8 -c 262144 --kv-unified`, `LLAMA_PREFILL_CHUNK=64`, sending 1, 2, 4, and 8 requests at once.
Caveats:
- Every test ran once at a fixed temperature, so there are no confidence intervals.
- The 27B scores came from an earlier date under slightly different conditions.
- On the speed-test night, the other GPUs were running a separate test that used CPU, so absolute tok/s belongs to that setup.
- My first multi-user run on the production card showed 674 tok/s prefill and 41 tok/s decode. Strata was reloading on the same machine and outside requests were coming in, so those numbers were contaminated. For the rerun I recorded the request counter from `/metrics` and the `/slots` state before and after to confirm nothing else was hitting the server; that's where the 99–104 comes from.
### Gotchas
- **b11588 rejects `--no-fit`:** use `--fit off`.
- **b11588 rejects `--spec-draft-conf-min`:** use `--spec-draft-p-min`; the error is shown in the speculative decoding part of this deep dive.
- **Vision plus 262K with an f16 KV cache runs out of memory:** use `-ctk q8_0 -ctv q8_0`.
### Versions and hardware
- llama.cpp b11588, built for sm_75 (`-DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DLLAMA_CURL=OFF`); the family chat server runs a copy of the same build with the chunked-prefill port
- Model: `mix_q3gud_im` (one card), `Q8_0` (two cards), and `Q4_K_M` (speed only) from openbmb/MiniCPM-V-4.7-35B-A3B-gguf; `mmproj-model-f16.gguf` for vision; `dspark-MiniCPM-V-4_7-35B-A3B-F16.gguf` as the draft; LoRA from AtomicChat/MiniCPM-V-4.7-35B-A3B-Uncensored-GGUF
- Machine: EPYC, 128 GB RAM, three RTX 2080 Ti 22G. One-card tests on the third GPU, two-card tests on the first two (with the 27B stopped), production on the first
### Not done yet
- The 140 set and hard suite on the plain one-card q3 without the LoRA. The only capability scores are two-card Q8_0 and one-card with the LoRA.
- A 140 rerun on the merged-and-requantized file.
- Vision beyond two images.
- My own refusal-rate test.
---
Also in this series: [#24 177B on 44 GB of VRAM: two 2080 Tis run Strata at 98.7 tok/s](/en/blog/strata-flashnext-dual-2080ti) · [#23 One modded 2080 Ti runs 177B with Strata](/en/blog/strata-flashnext-one-2080ti) · [#22 NVFP4 on a 2080 Ti without FP4 hardware](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant) · [#19 Ternary Bonsai 2 on one RTX 2080 Ti](/en/blog/ternary-bonsai-2-27b-one-2080ti)
---
# 177B on 44 GB of VRAM: Two 2080 Tis Run Qwen3.8-Flash-Next at 98.7 tok/s with Strata
URL: https://ai-muninn.com/en/blog/strata-flashnext-dual-2080ti
Date: 2026-10-14
Series: 改裝 2080 Ti 22G (Part 24)
Two modded RTX 2080 Ti 22GB cards plus 128 GB of RAM run the 177B Qwen3.8-Flash-Next (IQ3_S) under Strata at **98.7 tok/s on code** for one user, 64.9 on Chinese, 62.6 on English. A 16K prompt gets its first token in 10.4 s. That's about 15% faster than one card: Strata splits the layers between the cards like a relay, so one card waits while the other works, and the CPU still computes most experts. For one user, running a model this big on this little VRAM works great: Chinese at 64.9 matches the 63.0 of a 27B on the same cards. Several users at once is where it falls short: four users get 26–32 tok/s each, while the 27B does 420 combined, so the shared family server stays on the 27B.
## Why I tried two cards: a smarter model for the family server
[Part 23](/en/blog/strata-flashnext-one-2080ti) put the 177B Qwen3.8-Flash-Next on a single modded 2080 Ti with [Strata](https://github.com/Niko1221/Strata). It ran code at 70.3 tok/s on the old build.
That left two questions. How fast do two cards go? And could Flash-Next take over GPU0 and GPU1 from Qwen3.8-27B? The 27B runs the web chat my family uses. It's fast, but it's a 27B, and Flash-Next is the smarter model. I didn't know whether Flash-Next would hold up with several people using it at once.
The box is the same EPYC machine from [part 22](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant) and [part 17](/en/blog/qwen4exp-177b-three-2080ti): 128 GB of RAM and three modded 2080 Ti 22GB cards.
## Moving Strata from one 2080 Ti to two: the config diff
I cloned a newer Strata (`61b3fb5d`) into a separate directory, `/mnt/nvme1t/strata-upstream`, and built it for CUDA 12 and sm_75. The model, the pack and the MTP draft layers are the same files part 23 downloaded.
Two things change in the config compared to one card:
- `"gpu": [0, 1]`. The single-card setup pinned GPU2 with `CUDA_VISIBLE_DEVICES` set to its UUID. Drop that for two cards.
- `"layer_split": "auto"`. That's the default. With two or more GPUs, the server adds `--layer-split` on its own. On my box it split at layer 24.
Here's the full config I used, `dual-solo.json`. Point `--native` and `--ple-gguf` at wherever setup put the two GGUF shards:
```json
{
"args": [
"--pack", "/mnt/nvme1t/strata/data/packs/iq3_s",
"--native", "/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf",
"--ple-gguf", "/IQ3_S/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf",
"--expert-profile", "/mnt/nvme1t/strata/src/data/expert-profile.bin",
"--expert-cache", "auto",
"--prefill", "auto",
"--spec", "4",
"--spec-min-p", "0.5",
"--mtp", "/mnt/nvme1t/strata/data/mtp/rt",
"--max-context", "32768",
"--kv", "int8",
"--ple-io", "ram"
],
"gpu": [0, 1],
"layer_split": "auto",
"env": { "STRATA_BF16_TC": "1" },
"parallel": 1
}
```
Launch it:
```bash
.venv/bin/python serve/server.py --engine strata \
--config /mnt/nvme1t/strata-upstream/dual-solo.json \
--host 127.0.0.1 --port 8097 --gpu 0,1
```
### The `--gpu 0` trap
My first run had `--gpu 0` left over from the single-card command. The command line overrides the config, so the engine ran on GPU0 only. It still loaded and still answered requests. It measured 76.4 and 81.8 tok/s, which looked like "two cards didn't help."
Check before you benchmark:
```bash
nvidia-smi --query-gpu=index,memory.used --format=csv,noheader
```
A real two-card run shows both cards at about 21.6–21.7 GiB. The bad run showed 21616 MiB on one card and 4 MiB on the other.
## One user: 98.7 tok/s on code, about 15% faster than one card
Method: real OpenAI-compatible chat requests, streaming, `reasoning_effort` set to none, 3 runs per prompt with different nonces, median. Max 650 output tokens (250 for the 16K prompt). The code answer gets cut off at the limit, the same way on both sides. Speed is Strata's own generation speed. Both sides used 32K context, int8 KV, `--spec 4`, `--spec-min-p 0.5` and `STRATA_BF16_TC=1`. The one-card column is the same Strata build on GPU2, without `--kv-resident`.
The first row is the one that matters:
| | one card | two cards | change |
|---|---:|---:|---:|
| code / Chinese tok/s | 85.6 / 57.0 | **98.7** / 64.9 | +15% / +14% |
| English tok/s | not measured | 62.6 | |
| 16K prompt: time to first token | not measured | 10.4 s | |
| 16K prompt: prompt reading | not measured | 1,545 tok/s | |
Each card uses about 21.6 GiB of VRAM.
Against Shio, the production single-card setup from part 23 (128K context, `--kv-resident 32768`, `--ple-io direct`), the gap is smaller. Shio does 89.2 on code and 57.8 on Chinese, so two cards are only about 11% faster than that.
## Why a second GPU adds only 15%: layer split is a relay, not tensor parallel
Strata spreads a model across GPUs with layer split. Flash-Next has 48 layers. GPU0 gets layers 1–24. GPU1 gets layers 25–48, the output head and the MTP draft layer (a small built-in layer that guesses the next few tokens so the main model can check them in one pass).
For every token, GPU0 finishes its half, hands about 50 KB per position to GPU1, and GPU1 finishes the rest. It's a relay: for one user generating token by token, one card runs while the other waits.
The second card does help a bit. Its extra VRAM holds more hot experts, so the CPU has slightly less to do. But most experts still live in system RAM and the CPU computes them there, the same as on one card.
The other way to use two cards is tensor parallel: both cards compute half of the same layer at the same time. That's how the 27B runs under FastLLM. Strata's CUDA path doesn't have it. The author's answer in [issue #156](https://github.com/Niko1221/Strata/issues/156) is that decode is mostly bound by the experts, and dense tensor parallel is not planned. Splitting the dense part across cards wouldn't speed up the CPU's expert work anyway.
## Multiple users: 26 to 32 tok/s each with four people
To serve several users at once, set `"parallel": 4` and add `--batch-mtp`.
The table has two columns. Per user is each person's generation speed, not counting the wait for the first token. Combined is all output tokens divided by the time until the slowest request finishes, and it includes the first-token wait. That's why combined is lower than per user at one user.
| users | per user tok/s | combined tok/s |
|---:|---:|---:|
| 1 | 97.2 | 88.4 |
| 2 | 47.6 | 87.7 |
| 4 | 25.9 | 95.2 |
Combined throughput barely moves as users are added. Adding users mostly splits the same throughput among more people.
Eight users won't fit. At four, GPU1 is already at 21,996–21,998 MiB out of 22,001.
Turning `--batch-mtp` off helps at four users, but only on a warm server. After warming up with one and two users first, four users got 116.9 combined and 32.1 each. A cold restart straight into four users got 93.6. So four users land somewhere between 94 and 117 combined, depending on warm-up.
What it feels like when people pile on: one long answer streams at about 90 tok/s. Three more people start asking. The first answer drops to 22–23 tok/s. When they finish, it climbs back to 87–94 within 5–10 seconds.
## Strata is plenty for one user; the family server stays on the 27B
For a single user, Strata runs this 177B well, on very little VRAM: two 22 GB cards (one, for the single-card build) plus 128 GB of system RAM for the rest. In [part 17](/en/blog/qwen4exp-177b-three-2080ti), llama.cpp ran the same model across all three cards at 23.14 tok/s with 128K context. Now two cards do 98.7 on code, and the single-card Shio does 89.2 (different quant and context from part 17, so treat it as a rough comparison). Chinese at 64.9 is on par with the 27B's 63.0.
The gap opens up with several people at once. The 27B numbers are from October 5: same GPU0+1, same prompts, FastLLM with tensor parallel across both cards, `max_batch=4`.
| | Flash-Next (two cards) | 27B (two cards) |
|---|---:|---:|
| one user, code tok/s | 98.7 | 237.3 |
| four users, combined tok/s | 94–117 | 420 |
| one user, Chinese tok/s | 64.9 | 63.0 |
With four people, the 27B has about four times the combined throughput. It's also more than twice as fast for one person writing code, but 98.7 is already fast, and on Chinese they're even.
How I'd pick:
- **Using it alone and you want the smarter model:** Flash-Next on two cards. The 27B has to stop while it runs.
- **Family use, several people at once:** keep the 27B. Flash-Next gives each person 26–32 tok/s at four users.
- **Two separate single-card Flash-Next instances:** skip it. They're slower than one two-card instance; details in the deep dive.
So the family server stays on the 27B. Flash-Next stays on the third card as Shio, taking turns with ComfyUI through the switcher from part 23.
---
## Deep dive: batch MTP, mixed load, two instances, flags that didn't help, versions
You can skip this section; everything you need to run the setup and make the call is above. This is the data behind it.
### Batch MTP on vs off
Each cell is the median per-user speed, then the median combined speed, with the three combined runs in parentheses.
| users | `--batch-mtp` on | `--batch-mtp` off |
|---:|---|---|
| 1 | 97.20 / 88.38 (78.04 / 88.46 / 88.38) | 94.90 / 86.28 (78.69 / 86.28 / 86.79) |
| 2 | 47.60 / 87.65 (87.77 / 87.51 / 87.65) | 45.25 / 83.91 (83.91 / 84.03 / 83.54) |
| 4 | 25.94 / 95.18 (96.26 / 94.64 / 95.18) | 32.11 / 116.86 (116.86 / 117.10 / 116.40) |
Batch MTP wins by 4.5% combined at two users. Off wins by 22.8% at four.
This isn't one flag flipping one thing. With batch MTP off, layer split uses its default pipeline groups: the two stages work on different requests at the same time. With it on, everything runs as one group with batched MTP drafting. Batch groups and batch MTP can't be combined; the source blocks it explicitly.
Batch MTP acceptance, from the engine log: 92.1–93.0% at two users, 92.4–92.9% at four. The batch draft field in `/metrics` reads 0 because it doesn't record batch drafts, so use the log.
That 116.86 was measured on a warm server. Cold-start checks at four users, batch MTP off:
| setup | three runs | median |
|---|---|---:|
| default groups | 90.15 / 93.60 / 97.84 | 93.60 |
| explicit `--batch-groups 2` | 94.26 / 94.06 / 96.30 | 94.26 |
Both logs say "2 groups of 2".
For reference, the old build (`6f32ec07`) collapsed with `parallel: 4`: even a single request dropped to 23.9 tok/s, and four users got 90.4 combined. The new build with `parallel: 4` and `--batch-mtp` keeps a single request at 97.2.
### Mixed load: what one user sees when others join
The first user's speed every 5 seconds, batch MTP on. Others join at 10, 15 and 20 s and leave around 35, 40 and 45 s. Three rounds.
| time | others running | round 1 | round 2 | round 3 |
|---:|---:|---:|---:|---:|
| 5 s | 0 | 82.0 | 74.2 | 82.2 |
| 10 s | 1 | 95.0 | 86.0 | 91.2 |
| 15 s | 2 | 38.6 | 38.4 | 37.8 |
| 20 s | 3 | 30.4 | 28.2 | 29.8 |
| 25 s | 3 | 23.2 | 22.2 | 22.0 |
| 30 s | 3 | 27.4 | 27.0 | 27.0 |
| 35 s | 2 | 31.0 | 30.6 | 29.8 |
| 40 s | 1 | 39.8 | 39.8 | 41.8 |
| 45 s | 0 | 74.2 | 78.0 | 73.0 |
| 50 s | 0 | 89.0 | 91.8 | 87.4 |
| 55 s | 0 | 93.8 | 83.0 | 92.4 |
| 60 s | 0 | 94.4 | 88.8 | 93.6 |
| 65 s | 0 | 81.0 | 88.8 | 91.8 |
The low point, 22–23 tok/s, is 22–24% of the 98.7 single-user speed.
### Two single-card instances instead of one split
The idea: run one Flash-Next on GPU0 and another on GPU1, put LiteLLM in front, and let each card serve its own users. Each instance had `parallel: 1`, and ComfyUI was running.
| users | per user tok/s | combined tok/s (3 runs) | first token |
|---:|---:|---|---|
| 1 | 82.03 | 77.99 / 75.00 / 74.67 | ~2 s |
| 2 (one per instance) | 41.45 | 74.21 / 72.08 / 76.90 | ~2 s |
| 4 | 42.38 | 73.90 / 72.65 / 75.91 | half ~2 s, half ~20 s |
| 8 | 41.27 | 72.28 / 72.10 / 72.07 | four waves at ~2 / 20 / 38 / 56 s |
Two users on two separate cards didn't double the combined throughput (75 to 74), and per-user speed halved (82 to 41). So the bottleneck is something the two instances share on the host side. CPU sat around 50%, and NVMe reads were 0.1–0.2 MiB/s. I didn't pin cores or measure memory bandwidth, so "host side" is as far as I can narrow it.
Compared with one two-card layer-split instance, combined throughput is 15.1%, 15.3% and 36.8% lower at 1, 2 and 4 users. The four-user figure is against the warm 116.86; against the cold 93.60 it's 21.0% lower.
Other per-instance settings, combined throughput at 1/2/4/8 users, 3-round medians:
| per-instance setting | 1 | 2 | 4 | 8 |
|---|---:|---:|---:|---:|
| `parallel 1` | 75.00 | 74.21 | 73.90 | 72.10 |
| `parallel 2` + batch MTP | 59.91 | 59.63 | 62.58 | 61.31 |
| `parallel 2`, batch MTP off | 60.16 | 60.30 | 51.37 | not run |
| `parallel 4` + batch MTP | 57.88 | 57.11 | 58.73 | not run |
| `parallel 4`, batch MTP off | 57.93 | 57.93 | 48.07 | not run |
The `parallel 2` and `parallel 4` runs had ComfyUI stopped to free RAM. Each instance uses about 40 GiB RSS. With `parallel 4`, available RAM was about 3.9 GiB at idle and dropped to 2.3 GiB under four users, so I didn't run eight.
**Cold-start trap.** Starting both instances at the same time, neither became ready within 900 s:
```
EngineDied: the engine did not report READY within 900 s
```
It wasn't OOM. Each process was at 40–42 GiB RSS with one CPU core pegged, and available RAM bottomed out around 36 GiB. Even when I started them one at a time, the second still got stuck. A `perf` stack showed `cudaHostRegister` → `pin_user_pages` → `do_huge_pmd_anonymous_page` → `compact_zone`: the kernel was compacting memory into huge pages while Strata pinned the expert RAM.
The fix was to turn off transparent huge page defrag just for startup:
```bash
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
# start the instance; mine was ready in 46 s
echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
```
This only affects startup. All the speeds above were measured after switching back to `madvise`.
### `--ple-io ram` vs `direct`
The n-gram table is 28.8 GB. `direct` is Strata's default and reads it from SSD; `ram` loads it into memory. Two cards, 3-run medians:
| metric | `ram` | `direct` | change |
|---|---:|---:|---:|
| code tok/s | 98.7 | 97.4 | −1.32% |
| Chinese tok/s | 64.9 | 64.8 | −0.15% |
| 16K prompt reading tok/s | 1,544.74 | 1,538.14 | −0.43% |
| 16K first token | 10.381 s | 10.424 s | 0.41% slower |
| 4 users, per user tok/s | 25.94 | 26.19 | +0.96% |
| 4 users, combined tok/s | 95.18 | 96.15 | +1.02% |
Everything is within 3%, so Shio switched to `direct`. Verified on GPU2 afterwards: code 82.9 / 89.2 / 89.7, median 89.2; Chinese 57.8.
Available RAM didn't visibly go up (single-user code run: 69,932 MiB with `ram`, 69,925 MiB with `direct`). The table is probably still sitting in the page cache. I'm not claiming `direct` saves 29 GB.
### Flags that didn't help on the old build
These ran on the old build (`6f32ec07`) on GPU0+1, 3-run medians. The baseline had `--remote-expert-opt` on.
| setup | code | Chinese | English | 16K first token |
|---|---:|---:|---:|---:|
| default layer split | 92.3 | 58.9 | 60.1 | 12.6 s |
| + `--ple-io ram` | 92.0 | 58.7 | 59.9 | 12.6 s |
| + `STRATA_BF16_TC=1` | 91.4 | 60.0 | 60.0 | 10.6 s |
| `--peer-device 1` | 82.3 | 55.8 | 54.9 | 13.1 s |
| `--expert-cache-device1 auto` | 48.4 | 38.3 | 34.7 | 13.2 s |
| explicit split at 24 + `STRATA_STAGE_TRIM=1` | 89.1 | 60.5 | 59.0 | 10.5 s |
- `STRATA_BF16_TC=1` only helps long prompts.
- `--peer-device 1` makes GPU1 stop being a stage and instead help GPU0 compute experts over NVLink. It's about 11% slower. GPU0 still runs all the dense work alone and waits at every layer. The source also shows this path stages data through pinned host memory, so NVLink doesn't always mean a direct card-to-card copy.
- `--expert-cache-device1 auto` turns GPU1 into an expert helper: −47%.
- Three cards (October 4): code 81.1, Chinese 54.5, against 92.1 and 60.1 on two.
### What could still make two cards faster
**`--pipeline-windows 2`, not tested.** It's for a single user: GPU0 speculatively computes the next window while GPU1 verifies the current one, and rolls back on a miss. It needs MTP plus layer split, can't be combined with `--batch`, and needs a second verifier buffer (about 160 MiB) plus GDN snapshots on each card. An upstream report on another pair of 2080 Tis (IQ3_XXS) shows +11.1% (issue #1349). Issue #1143 reports it running with no errors or hangs. My cards are nearly full, and the extra VRAM may push experts out of the cache. My plan is an A/B/A run (0 / 2 / 0), adopted only if warm single-user speed goes up by 8% or more.
**Full expert parallel** only exists for SYCL (Intel Arc), in PR #1798. It's unmerged and has no CUDA version.
**Writing tensor parallel myself.** That's about 96 cross-card syncs per token (48 layers × 2). Each sync moves little data, so latency dominates. My estimate for a single user is somewhere between −20% and +5%. I haven't implemented it.
### Versions and caveats
- Strata `61b3fb5d` (0.1.42 dev tree, 2026-10-10) in `/mnt/nvme1t/strata-upstream`, CUDA 12, sm_75. The old `6f32ec07` (engine 0.1.39) install is untouched.
- The new two-card runs did not use `--remote-expert-opt`; upstream docs say it's incompatible with batch MTP. The old October 5 runs did. So the jump from 91.4 (old, two cards) to 98.7 (new, two cards) isn't all down to the version.
- 27B: October 5, Hina, FastLLM, model `qwen38-27b-ud`, tensor parallel over two cards, `max_batch=4`. The service on port 8082 runs a different model now; these numbers are from October 5.
- Two-card measurements meant stopping Hina: 42 minutes for the layer-split round, 90 minutes for the two-instance round. Both ran with a dead-man timer on ai-lab that restored Hina and ComfyUI automatically.
### Not measured yet
- `--pipeline-windows 2` (A/B/A).
- A capability comparison of Flash-Next vs the 27B. An October 5 five-task set scored the 27B at 48/60 and Flash-Next at 40/60, but five tasks is too small a sample and it contradicts what I see when dispatching real work, so I'm not drawing a conclusion from it.
- Image input, tool calls and 128K context on two cards with the new build.
---
**Also in this series:**
- [#23 Qwen3.8-Flash-Next 177B on One RTX 2080 Ti: Strata Runs Code at 70 tok/s](/en/blog/strata-flashnext-one-2080ti)
- [#22 NVFP4 Without FP4 Hardware: Qwen3.8-27B on Two RTX 2080 Tis at 151.7 tok/s](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant)
- [#17 A 177B MoE on Three Modded 2080 Tis: 23 tok/s at 128K, 77 on a File Edit](/en/blog/qwen4exp-177b-three-2080ti)
---
# [AI Workflow] Block a scene in Blender, let MiniMax-H3 film it: local Ref2VA on an RTX 5090
URL: https://ai-muninn.com/en/blog/blender-blocking-h3-ref2va-rtx5090
Date: 2026-10-12
Series: MiniMax-H3 on RTX 5090 (Part 9)
I blocked a two-person shot in Blender with a red capsule and a blue box, then handed it to MiniMax-H3 Ref2VA together with two reference photos. The clip came out live-action: the two identities never swapped, left/right order held at all 5 sampled frames, and the woman crossed in front of the man exactly as the blockout did. **89.9 s** on one RTX 5090 for 124 frames at 864×480. The blockout goes in as `ref_videos`, the photos as `ref_images`, and the prompt tells the model to take only the motion from the video. Caveat: exact distances and small gestures drift.
I saw Higgsfield's Blender plugin: you block the scene in Blender and send it to Seedance. It runs in the cloud and costs credits. I wanted the same thing running locally on an RTX 5090.
The real reason is control. Text prompts like "orbit right" or "the two swap places" drift. The camera goes the wrong way, the wrong person ends up on the wrong side, and you reroll until you give up. A blockout replaces those sentences with positions. You put toy shapes where the people should stand, move the camera the way you want, and the AI follows the shapes and swaps in the two people from your reference photos.
Five steps below, then the limits, then the full config.
## How it works: the blockout sets the motion, the photos set the faces
The trick is splitting the job between two inputs. The blockout is a rough proxy scene: capsules and boxes standing in for people. It carries only position, blocking and camera. The reference images carry what the people look like.

MiniMax-H3's Ref2VA mode takes the blockout through `ref_videos` and the character images through `ref_images`. It generates a new clip from scratch rather than continuing the blockout clip, and it keeps checking the blockout for how things move. The blockout itself doesn't show up in the output: none of my clips had a capsule, a box, or grey material. The model does get every frame of the blockout clip, though, so the prompt still has to tell it to leave out the stand-ins.
I'm not the only one treating reference video this way. The [Seedance 2.5 API guide](https://runware.ai/docs/models/bytedance-seedance-2-5/guides/motion-control) lists clay pre-vis to finished shot as a standard use of reference video, and says plainly that reference video is a motion signal, not content.
If you haven't used Ref2VA before, [Part 6](/en/blog/minimax-h3-ref2va-two-characters) covers its six-section prompt format. You'll need it in step 4.
## Step 1: Have Claude write the Blender script
I don't hand-build the scene. I describe it to Claude and ask for a Blender Python script. The prompt I used, roughly:
```
Write a Blender Python script for a blockout shot.
A tall red capsule walks from left to right, passing in front of a short blue box.
The blue box stays in place and makes a small turn.
A landmark arch made of 3 boxes stands at the left rear.
Slow camera push-in.
864x480, 24 fps, 124 frames, render to mp4.
```
The rules that matter:
- **Stand-ins are only capsules and boxes.** No fingers, no props.
- **At least one asymmetric landmark** in the scene, like that arch at the left rear.
- **Same frame size as your output.** Here 864×480.
- **Same frame count as your output**, on the 17k+5 grid that H3 frame counts follow. 124 is on it. Max 15 s.
The red and blue are for you, not the model. The model learns who is who from the prompt in step 4.
Blender doesn't need a GPU. I rendered on a separate Linux box, on CPU:
```bash
blender -b -t 4 --python build_blocking.py -- --out blocking
ffmpeg -framerate 24 -i blocking/frames/frame_%04d.png -c:v libx264 -pix_fmt yuv420p blocking/previs.mp4
```
Here's the script I used, ready to edit: [build_blocking.py](/files/blender-blocking/build_blocking.py). It only writes a PNG sequence; the ffmpeg line turns that into the mp4.
## Step 2: Make two reference images that look nothing alike
Full body, front view, clean background, head to feet. Make the two people as different as you can, so if one bleeds into the other you'll see it right away.
I used a tall woman with long white hair and a white robe, and a short stocky man with short black hair and a navy work jacket. I generated both with Qwen-Image 2.1 at 768×1024. Real photos work too.
## Step 3: Wire MiniMaxH3ReferenceToVideo in ComfyUI
The node is `MiniMaxH3ReferenceToVideo`. This is the wiring:
```
LoadVideo(previs.mp4) → GetVideoComponents.images → ref_videos.ref_video_0
LoadImage(character-1.png) → ref_images.ref_image_0
LoadImage(character-2.png) → ref_images.ref_image_1
VAELoader(minimax_h3_video_vae_fp16) → vae
VAELoader(minimax_h3_audio_vae_fp32) → audio_vae
width 864 · height 480 · length 124 · ref_image_size match
```
One thing to get right: `vae` must be the video VAE. It encodes both the reference video and the reference images. The `CONDITIONING` and `LATENT` outputs wire up like any normal H3 graph. The exact workflow I ran, in API format (you can POST it straight to ComfyUI's `/prompt`): [h3-ref2va-blocking.api.json](/files/blender-blocking/h3-ref2va-blocking.api.json).
## Step 4: Map each person to a photo and a stand-in
The prompt has to spell out, for each person, where the looks come from and where the movement comes from. Subject 1 gets the face and outfit from Picture 1 and follows the tall red capsule in Video 1. Subject 2 gets Picture 2 and follows the short blue box. Then say that Video 1 supplies only camera, relative positions, blocking and occlusion, and explicitly forbid drawing the stand-ins or the grey material.
Here are the first two sections of the six I used:
```
subject_definitions:
is the tall adult woman from . Preserve her face, very long white hair, slender tall stature and flowing white robe. Her screen position and walking path come from the RED TALL CAPSULE in .
is the short adult man from . Preserve his face, short black hair, short stocky stature, dark navy work jacket and dark trousers. His screen position and small in-place turn come from the BLUE SHORT BOX in .
supplies camera movement, relative spatial positions, blocking, motion timing and foreground occlusion for both subjects. The colored primitives are spatial guides only and must be replaced completely by the two realistic people.
summary:
[reference generation] One continuous realistic live-action full-body shot of two adults in a stone-paved old-town alley. begins on screen LEFT and begins on screen RIGHT. The white-haired woman walks rightward in FRONT of the stationary dark-haired man, briefly occluding him and exchanging their screen-left/right order. At the end the man is on screen LEFT and the woman is on screen RIGHT. Appearance comes only from and ; motion and positions come from .
```
You don't have to copy this word for word. Just say clearly what you want. You can also describe your blockout and your two images to Claude and have it write all six sections. The other four are in the deep dive.
## Step 5: Render at 14 steps, then check who stands where
I ran 14 steps, `res_multistep` + `simple`, Spectrum on. On one RTX 5090 the wide shot took **89.9 s** of execution for 864×480, 124 frames, about 5.2 s of video.
Here's what it followed. The identities didn't swap. Left/right order was correct at all 5 frames I sampled. They swapped sides mid-shot, as blocked. The woman passed in front of the man with the same occlusion order as the blockout. The man came out shorter, as he was in the blockout.
The problem was faces. At 864×480 in a full-body wide shot, each head is only tens of pixels across, and the faces were blurry.
## Get readable faces with a medium shot, not 720p
I didn't go to 720p. I blocked a second, closer scene instead: the two stand still facing each other and talk, with the blockout camera framing them from roughly the waist or chest up. That run also changed the action and the prompt, so it's a separate shot, not the same scene zoomed in. Head crops went from about 48–69 px wide to about 135–156 px. Eyes, brows, nose and mouth became readable. The woman stayed on the left, the man on the right, and he was still shorter. Execution time: **81.7 s**.
So I split the work: wide shots for blocking, medium shots for faces.
## What the blockout controls, and what it doesn't
The blockout is good at relative placement: who's on the left, who's in front, who's taller, which way someone walks.
Exact values get softened. Both people drifted toward the center of the frame. The height gap shrank somewhat; the man was still shorter, just less so. And the man's small in-place turn wasn't followed at all.
One more caveat: each test ran once. I didn't sweep seeds.
## Deep dive: models, settings, and the rest of the prompt
Skip this if you just want to run it; everything you need is above. This is the full config, for anyone (or any AI) reproducing it.
### Models and sampler
```
model: minimax_h3_ref2va_pruned_nvfp4.safetensors
text encoder: qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors
sampler: res_multistep · scheduler simple · 14 steps · denoise 1
seed: 2026101201
Spectrum: SpectrumApplyMiniMaxH3 blend_weight=0.5 degree=4 window_size=2.0 warmup_steps=5
```
### The blockout scene
The capsule stand-in is 2.4 m tall and the box is 1.6 m. The camera uses a 44 mm lens and pushes in 0.3 m over the shot.
### Frame count: match the output, or lose the ending
Ref2VA trims the reference video to no longer than the output length, then aligns it down to the 17k+5 grid. A 120-frame blockout became 107 usable frames, so the last frames of the shot had no blocking to follow. Render the blockout at exactly the output frame count, on the grid.
### The remaining four prompt sections
```
retention_analysis:
(appears in [Shot 1]): fully_preserved - retain the woman of ; transfer the red tall capsule's positions and walk from .
(appears in [Shot 1]): fully_preserved - retain the man of ; transfer the blue short box's positions and subtle in-place turn from .
(camera movement and blocking): fully_preserved - match gentle push-in, framing, relative placement, rightward crossing, timing and woman-in-front occlusion. Never transfer proxy appearance, colors or grey material.
detailed_description:
[Shot 1] Natural soft daylight in a real stone-paved alley with weathered sandstone walls. A stone arch with an upright pillar stands at the LEFT REAR where the asymmetric grey arch landmark is in . Keep that landmark fixed. Both people are fully visible from head to feet. The tall woman stands in the red capsule's starting location on screen left. The shorter man stands in the blue box's location on screen right, slightly farther from the camera. After a short hold, the woman walks steadily rightward along the red capsule's path, with natural steps and robe motion. Around the midpoint her body passes IN FRONT OF the man and occludes part of his torso. The man stays rooted to his initial ground position and makes only a small turn to watch her pass. He never walks sideways or trades identities with her. Continue the woman's movement past him to the right; she stops in the red capsule's final location. End with the man left and the woman right. Preserve this physical crossing rather than cutting or dissolving between positions. The camera makes only the small smooth forward push shown by . No camera orbit, jump or reversal. The woman remains the same white-haired white-robed woman before, during and after the crossing; the man remains the same short-haired navy-clad man. Keep human anatomy and realistic fabric throughout. Do not show grey models, clay shading, capsules, blocks, cubes, red proxy surfaces, blue proxy surfaces, wireframes, plastic primitives or untextured geometry. The real stone walls may have natural stone colors but never a uniform grey-model material.
overall_soundscape:
Quiet alley ambience and light footsteps. No dialogue or singing.
non_diegetic_music:
N/A
```
The official spec for this format is in the MiniMax-H3 repo: [ref-en.txt](https://github.com/MiniMax-AI/MiniMax-H3/blob/main/skills/h3-prompt-writing/references/ref-en.txt).
---
*Also in this series: [Part 6 — Two characters in one shot with Ref2VA](/en/blog/minimax-h3-ref2va-two-characters) · [Official H3 Ref2VA prompt spec](https://github.com/MiniMax-AI/MiniMax-H3/blob/main/skills/h3-prompt-writing/references/ref-en.txt)*
---
# [Dev Workflow] I Had an AI Reverse-Engineer My Own iOS App With Free Tools (REA + Ghidra)
URL: https://ai-muninn.com/en/blog/reverse-engineer-own-ios-app-rea-ghidra
Date: 2026-10-12
Series: AI Workflow (Part 25)
I gave REA, an open-source reverse-engineering agent, only the compiled binary of my own iOS options app. No source code. I asked three questions I already knew the answers to. In 16 minutes it got two right and one half right, and it rebuilt my max loss and breakeven formulas exactly as they are in my Swift source. How: REA drives Ghidra headless, and the AI reads decompiled functions and cites addresses as evidence. Caveat: my binary still had its symbols, which is easy mode.
---
## Can an AI read an app without the source?
[REA](https://github.com/morluto/rea) passed 60K GitHub stars on October 10. The pitch is simple: hand an AI agent a compiled binary, and it works out what the program does.
I wanted to know if that holds up. The problem with testing it on someone else's app is that you can't grade the answers. So I used my own: BPSTracker, an iOS app I wrote to track bull put spreads (an options strategy where you sell one put and buy a cheaper one below it for protection). I have the source, so I have the answer key.
The short version, the one I told a friend: the AI looked only at the machine code and wrote down my P&L formula exactly as I wrote it.
## What REA does: lets an AI drive Ghidra
REA is a toolkit that turns a disassembler into tools an AI agent can call. It uses [Ghidra](https://github.com/NationalSecurityAgency/ghidra), the NSA's open-source reverse-engineering suite, as the analysis backend and runs it headless. The agent talks to it over MCP (the Model Context Protocol, a standard way to give a model tools).
In practice the agent can open a binary, get an overview, list and search functions, read Ghidra's decompiled pseudocode, and save evidence pinned to addresses. That last part matters. Every claim it makes comes with an address you can go check.
## How I made it a blind test
You don't need any of this to try REA yourself. I did it because I wanted to be sure the AI couldn't peek at my source, so the grades mean something.

I ran the agent as a fresh Codex CLI session (`codex exec`, reasoning set to high) with my config, rules and memory ignored, in a folder that contained only the arm64 binary:
```bash
codex exec --ignore-user-config --ignore-rules --ephemeral \
-C --json ""
```
The only tool it had was REA's MCP server. Shell, web, apps, memory, hooks, sub-agents, browser and computer use were all off. A small guard sat in front of REA and allowed 14 tools, checked on both `tools/list` and `tools/call`. `open_binary` could open only that one file. Every REA tool that can read arbitrary files was blocked.
Then I asked three questions:
1. How does the app compute max loss and breakeven for a position?
2. Where does the app's data come from?
3. What does the app do at launch, and in what order?
## Results: 2 right, 1 half right, in 16 minutes
The run that worked took 16.19 minutes. The first `binary_overview` call alone, which is where Ghidra does its initial analysis, took 3.14 minutes of that.
| Question | Grade | What it got |
|---|---|---|
| Max loss and breakeven formula | Right | exact match with my source |
| Where the data comes from | Right | correct |
| Launch sequence | Half right | the setup chain, but missed the positions tab's work |
Question 3 is the interesting miss. It found the async Core Data load, the store gate, the chain of products, then entitlements, then a 1.2 s sleep, then a 0.4 s splash animation. It also said, correctly, that these async tasks have no guaranteed order. What it missed is part of what the positions tab does once it appears: update its filter, fetch prices for open positions, then start the background refresh. It found the price fetch but missed the filter update and the background refresh.
## The AI's formula vs my two lines of Swift
This is what it wrote down, from machine code only:

```
width = shortStrike - longStrike
max loss = (width - credit) × contracts × 100
breakeven = shortStrike - credit
```
And this is my source, `Utils/PositionMetrics.swift`:
```swift
// line 25
(width - position.creditValue) * Decimal(position.contractsValue) * 100
// line 31
position.shortStrikeValue - position.creditValue
```
It cited its evidence: the detail view closure at `0x1000eac84`, the `calculatedMaxLoss` function at `0x1000281c4`, and the constant `0x64`, which is 100, the shares-per-contract multiplier.
It was also careful about what it didn't know. It said it found no fee term in these formulas, but that it "can't claim the whole app ignores fees." These two functions don't touch fees. That says nothing about the rest of the app.
## Why it worked: unstripped symbols make it easy mode
I want to be clear about how much of this came from the symbols. With 8,293 of my own Swift symbols in the binary, the AI could search for names like `maxLoss` and `breakeven` and land on the right function. Most of the hard part of reverse engineering is finding where to look, and the symbols did that for it.

So what I can claim is narrow: one app, three questions, one successful run, on a binary with its symbols. I didn't test stripped or obfuscated binaries.
I also checked the AI's citations. It quoted 54 snippets of REA output. 52 were verbatim. The other two were formatting slips: one dropped an underscore (`__infix` instead of `___infix`) and corrected itself in the next sentence, and one joined a line break.
## Try it yourself: REA and Ghidra on your own app
Here's how to run the same test on your own app. The tools are free, and the blind run took 16 minutes.
### What to install
These are the versions I ran:
| Piece | Version I used | Note |
|---|---|---|
| REA | 6.4.0 (npm `rea-agents`) | needs Node 22.19+, 24.11+ or 26+ |
| Ghidra | 12.1.4 PUBLIC | official ZIP, SHA-256 checked |
| JDK | OpenJDK 21.0.10 | Ghidra needs it |
| Node | 24.21.0 | Node 25 is not supported |
| Xcode | 27.0 | to build the app and for `swift-demangle` |
One trap: my system Node was 25.2.1, which REA doesn't support. I didn't touch it. I installed Node 24.21.0 from the official tarball next to it and used that for REA.
Then two commands:
```bash
npx rea-agents setup
npx rea-agents doctor
```
The install took me 29.7 minutes in total.
### The two env vars that save you an hour
Most of the config is what you'd expect. Tell REA where Ghidra and Java live, and pick Ghidra as the provider:
```bash
export GHIDRA_INSTALL_DIR=
export JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home
export REA_ANALYSIS_PROVIDER=ghidra
export GHIDRA_HEADLESS_MAXMEM=4G
```
The two that cost me time are these:
```bash
export GHIDRA_SWIFT_DEMANGLER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-demangle
export REA_GHIDRA_STARTUP_TIMEOUT_MS=600000
```
**The demangler.** Swift mangles its symbol names into long encoded strings, and Ghidra has to decode each one it hasn't seen yet. If you don't set this, Ghidra falls back to `/usr/bin/swift`, which was about 11.6x slower in my timing than Xcode's `swift-demangle`. Without it, my first analysis sat in Swift demangling for several minutes before I killed it. With it, the first analysis finished in 237 seconds.
**The startup timeout.** After `open_binary`, the first query that needs Ghidra triggers the import and a full analysis before REA can answer. On a Swift app this size that takes minutes, so I set the timeout to 10 minutes.
### Build your app as a simulator binary
You don't need to sign anything. I built a Release build for the iOS Simulator with signing turned off, then pulled out the arm64 slice:
```bash
xcodebuild -configuration Release -sdk iphonesimulator \
-destination "generic/platform=iOS Simulator" \
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
lipo -thin arm64 -output -arm64
```
The build took 1.5 minutes.
One thing to check: my binary was not stripped. It had 18,553 arm64 symbols, 8,293 of them Swift symbols from my own code. My project has `STRIP_INSTALLED_PRODUCT=YES`, but `DEPLOYMENT_POSTPROCESSING=NO` and `COPY_PHASE_STRIP=NO`, so most symbols survived. Your Release builds may look the same. Check before you assume they're stripped.
## Deep dive: three rounds, two sandboxes, and what I found while grading
Nothing here is needed to run the steps above. It's the full record: versions, timings, the two failed rounds, and the parameters that made round 3 work.
### Versions and timing
| Item | Value |
|---|---|
| REA | 6.4.0 (npm `rea-agents`) |
| Ghidra | 12.1.4 PUBLIC, official ZIP, SHA-256 verified ([release](https://github.com/NationalSecurityAgency/ghidra/releases/tag/Ghidra_12.1.4_build)) |
| JDK | OpenJDK 21.0.10 |
| Node | 24.21.0 official tarball (system Node 25.2.1 left alone, unsupported) |
| Xcode | 27.0 |
| Blind agent | Codex CLI 0.162.1, `codex exec`, reasoning high |
| Step | Time |
|---|---|
| Install REA, Ghidra, JDK, Node | 29.7 min |
| App build (overlapped with install) | 1.5 min |
| First analysis, demangler fixed, outside sandbox | 237.3 s |
| First analysis, demangler not set | several minutes, stopped manually |
| Round 3 blind run | 16.19 min |
| First `binary_overview` inside round 3 | 3.14 min |
| `close_binary` in round 3 | 796.6 s to 809.3 s |
### Round 1: the AI answered "unknown" to all three
Round 1 ran the agent inside macOS Seatbelt (`sandbox-exec`) as an extra layer of isolation. The machine was busy: load average around 18, with two Remotion renders going. Java sat at 1 to 3% CPU.
The run produced these errors:
```
provider_timeout operation: list_documents timeout_ms: 600000
```
A retry then failed with:
```
execution_failure: Ghidra client is already started
```
And closing the binary gave `cleanup_incomplete` with `spawn EPERM`.
The AI answered "unknown" to all three questions. It refused to fill in the textbook finance formula for a bull put spread, and said a tool failure doesn't mean the binary lacks these features. A failed run that says "I don't know" is far easier to work with than one that guesses, so I count that as a good sign.
### Why Ghidra hangs on Swift demangling
Ghidra's README gives the demangler fallback order as `/usr/bin/swift-demangle`, then `/usr/bin/swift`. With nothing set, my Mac ended up on the slow route, `/usr/bin/swift demangle`.
I timed 20 calls each way:
| Demangler | 20 calls |
|---|---|
| `/usr/bin/swift demangle` | 0.9227 s |
| Xcode `swift-demangle` | 0.0795 s |
That's about 11.6x per call, and Ghidra makes thousands of these calls on a Swift app. Setting `GHIDRA_SWIFT_DEMANGLER` to Xcode's binary is the fix.
### Why the sandboxed runs hit provider_timeout
Round 2 fixed the demangler and raised the timeouts (startup briefly went to 1,500,000 ms), then ran inside Seatbelt again. It still hit `provider_timeout` and `spawn EPERM`. One run went 37.24 minutes and stopped with no answer.
`spawn EPERM` has a clear cause. REA's cleanup spawns a child process to inspect the process table, and the sandbox denies that.
I can't pin `provider_timeout` entirely on the sandbox. The machine was under heavy load in both rounds. In round 3, outside Seatbelt, one sample showed Java at 19.6% CPU around 151 s in, against 1 to 3% in round 1. That's a single sample under different load, so it doesn't show what the sandbox did to Ghidra.
### Round 3: tool isolation instead of an OS sandbox
For round 3 I dropped Seatbelt and relied on the tool-level isolation described above: only REA's MCP server, the 14-tool allowlist, `open_binary` fixed to one file, and arbitrary-file tools refused. The refused tools were `inspect_plist`, `inspect_keyed_archive`, `inspect_binary_layout`, `import_evidence_bundle` and `compare_source_to_bundle`.
To be precise: tool isolation is not an OS sandbox. It limits what the agent can ask REA to do. It doesn't stop REA or Ghidra themselves from touching the filesystem. And REA's output went to a cloud model, so the run was not fully offline.
Round 3 parameters:
| Setting | Value |
|---|---|
| `REA_GHIDRA_STARTUP_TIMEOUT_MS` | 600000 |
| MCP `tool_timeout_sec` | 660 |
| Ghidra `-analysisTimeoutPerFile` | 1200 (added by editing REA's Ghidra launcher, not stock) |
| Self-abort | 28 min |
| Independent kill | 29 min (not triggered) |
It finished in 16.19 minutes and saved 102 pieces of evidence. One `analyze_function` reply was too large for the MCP transport, so the AI read the saved view of that function instead and kept going.
### Two things I noticed while grading
First, Ghidra's pseudocode showed `_fetchPricesForOpenPositions(true,param_2)`, but my source passes `forceRefresh: false`. Decompiler output doesn't always show the correct argument values. The AI drew no conclusion from that line, which is lucky, because it would have been wrong.
Second, the timings overlap. The 29.7-minute install and the 1.5-minute build ran at the same time, so the cost, not counting the two failed rounds, was about half an hour of setup plus 16 minutes of analysis.
### What I didn't test
- Stripped or obfuscated binaries
- Running the app (all analysis was static)
- Other disassemblers such as Hopper or IDA
- More than one app, or more than one successful run
---
# One face, eight outfits: keeping a character consistent with Qwen-Image 2.1 on an RTX 5090
URL: https://ai-muninn.com/en/blog/qwen-image-21-same-face-8-outfits-rtx-5090
Date: 2026-10-09
import YouTubeEmbed from "@/components/YouTubeEmbed";
One reference photo plus a prompt that says "same woman, only change her clothing" gave me 8 outfits from Qwen-Image 2.1 on an RTX 5090. The face, the mole under her left eye, the wooden hairpin and the background held in all 8. Swapping locations instead, or both at once, works too. An 8-character Traditional Chinese sign came out right, and transparent PNG is built in. Two misses: a landmark hid one letter of a poster headline, and a menu drew 亞 in its simplified form once.
---
Before this, keeping one character consistent across images meant training a [character LoRA](/en/blog/train-character-lora-wan22-rtx5090) (a small add-on weight file that teaches the model one specific face). Without it, asking for the same person in different clothes usually gave me a different person.
Qwen-Image 2.1 is an open-weight image model from the Qwen team, released on September 20, 2026. The [weights](https://huggingface.co/Qwen/Qwen-Image-2.1) are free to download under Qwen's research license; commercial use needs a separate license from Qwen. It accepts reference images, meaning you hand it an existing picture and tell it what to keep. I wanted to know if that could replace the LoRA step. For outfit changes, it can.
## Eight outfits, one face: the mole and the hairpin survived every edit
I started from one reference image: a young woman in a pale-blue qipao in an old Taiwanese tea house. Then I asked for eight edits: a pink Song-dynasty Hanfu with embroidered plum blossoms, a Taiwanese high-school uniform, a charcoal business suit, a chef jacket with a tall hat, a NASA-style spacesuit with the helmet under her left arm, a camel winter coat with a red scarf, a pastel idol stage costume, and a black wuxia outfit with a sword on her back.

The background didn't move either. Red lanterns, lattice windows, brick wall and tea table sit in the same place in all eight, and so does she: same spot, same size in the frame. That part took a second attempt, covered in the how-to.
The face is the part that matters, so I cropped all nine.

The mole under her left eye is there in all nine. In the chef image, the wooden hairpin still pokes out beside the hat. I didn't train anything for this.
## How to do it: one reference image, one template, a prompt that lists what stays
This section is for running it on your own machine, so expect file names and settings. If you only want to see what it can do, skip to the next section.

### Step 1: get ComfyUI and three files
[ComfyUI](https://github.com/Comfy-Org/ComfyUI) is a free, local, node-based image generation app: you wire boxes together into a pipeline, and the official Qwen-Image 2.1 templates come pre-wired. I used ComfyUI 0.37.0. Any version that ships the Qwen-Image 2.1 templates works. The files come from [Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1). The diffusion model is the one to pay attention to:
| Folder | File | Size |
|---|---|---|
| `diffusion_models/` | `qwen_image_2.1_int8_convrot.safetensors` | 6.76 GiB |
| `text_encoders/` | `qwen3vl_8b_w4a8.safetensors` | 5.88 GiB |
| `vae/` | `qwen_image_2.1_vae_bf16.safetensors` | 0.63 GiB |
The int8 model is Comfy-Org's quantized version. In my own same-prompt comparison its quality was close to bf16, at half the file size, and it fits easily in the 5090's 32 GB. The text encoder reads your prompt and the reference image. I actually ran a community de-refusal ("heretic") variant of the w4a8 encoder, but every prompt here is ordinary and the official one is fine.
### Step 2: load a reference image into the edit template
I generated my reference with Qwen-Image 2.1 too: the same description with three seeds (the random number that decides which variation you get), and I picked one of the three. Your own photo works just as well.
Open the ComfyUI template "Qwen Image 2.1 Image Edit". The template preselects a different text encoder (`qwen3vl_8b_int8_convrot`), so switch its loader to the `qwen3vl_8b_w4a8` file you downloaded, and leave the template's optional prompt-rewriting branch off. Then wire the reference into the `image_1` input of the "Text Encode Qwen Image 2.1" node, and refer to it as `` in the prompt. The official templates wire up to 10 reference images. This post only uses one.
The template has a `custom_size` switch. Leave it off, which is the default. Off means the sampler starts from the `latent` output of `Text Encode Qwen Image 2.1`, which is sized to match the resized reference. On means it uses whatever width and height you type. My first batch did the equivalent of turning it on: I fed a 1536x2048 canvas while the node had resized the reference to 1344x1760, and her position and size drifted from image to image. Details in the deep dive. I set `resolution` to 1536, so the reference is resized to 1344x1760 and the outputs come out at that size too.
### Step 3: say what stays, lock the framing, then say the one change
This is the suit prompt, verbatim:
```text
The same woman from , with exactly the same face, the same small mole under her left eye, the same hairstyle with the wooden hairpin, the same standing pose, in exactly the same tea house background with the same red lanterns, windows, brick wall, tea table and lighting. Keep exactly the same framing, crop and camera distance as . Only change her clothing: she now wears a tailored charcoal-grey business suit jacket and trousers with a white blouse. Keep everything else unchanged. Photorealistic.
```
The "Keep exactly the same framing..." sentence came later. Without it, the suit and the winter coat pulled the camera back into a head-to-toe shot. Leave shoes out of the outfit description too: mention heels or boots and the model wants the feet in frame.
Everything before the clothing sentence is the same across all eight. You don't need to copy my wording.
### Step 4: check each result, reroll the odd one out
Most edits land on the first try. When her face sat in the wrong spot, I ran the same prompt with 3 more seeds and kept the one closest to the reference. That happened for 7 of the 23 edits in this post.
Sampling: 40 steps, euler, simple, cfg 1.0. The official template defaults to 25 steps; the official pipeline guidance is about 40 to 50.
## The reverse works too: same qipao, eight places, and the lighting follows
Then I flipped it. I kept the outfit and pose fixed, kept the framing line, and changed only the background and lighting, with "Only change the background and lighting: she now stands in ..." in the prompt. Eight places: a Taiwanese night market, a tropical beach, a snowy mountain village, a rainy neon Tokyo street, an old library, a space station with Earth in the window, a cherry-blossom path, and a desert at sunset.

The lighting follows the scene instead of being pasted on. Neon reflects off the wet Tokyo pavement. In the desert, her face picks up a warm sunset tint. Same person in every frame, hairpin included.
## Outfit and location together: do it in two passes
For "Hanfu under cherry blossoms" I didn't ask for both changes in one prompt. I changed the outfit first, then used that result as the reference for a background swap. The second prompt is shorter because the outfit is already in the reference:
```text
The same woman from , with exactly the same face, hairstyle, clothing and standing pose. Keep exactly the same framing, crop and camera distance as . Only change the background and lighting: she now stands in a park path under full-bloom cherry blossom trees. Photorealistic, natural light matching the new scene.
```

Seven combos, one face, one position. Together with the 16 single-change images, that's enough for a stop-motion style quick-cut short.
## Text in images: a Chinese sign came out right, with two misses elsewhere
I prompted for a sign reading 巷口阿伯的燒餅油條 ("Uncle's sesame flatbread and fried dough sticks at the alley entrance"). All eight Traditional Chinese characters came out correct, including dense ones like 燒, 餅 and 條.

Two other tests each had one miss.
An English travel poster: headline "VISIT TAIPEI AT NIGHT", bottom line "Night markets · Hot springs · Bubble tea". Spelling was correct. But Taipei 101 runs through the headline and hides the N in NIGHT; only its right stroke shows.
A chalkboard coffee menu in Chinese and English, with prices: Ethiopia 180, Kenya 200, Alishan 220, Latte 150. All the English and all four prices were right. The miss: in 衣索比亞 (Ethiopia), 亞 is drawn in its simplified form 亚, while the next line, 肯亞 (Kenya), uses the traditional 亞.

The model makes up any text you don't specify. The stall signs in the night-market images are Chinese-looking strokes that aren't real characters. Put every word you need in the prompt. For dense small text, add it in a layout app afterward.
## Transparent PNG straight out of the model, no background removal
Qwen-Image 2.1 can output an alpha channel (the per-pixel transparency layer in a PNG). Wrap your description in two fixed sentences:
```text
This is an RGBA image with transparency. The image has alpha channel and the background is transparent.
```
My test was a cat barista sticker holding bubble tea. The output is an RGBA PNG. On a checkerboard and on a dark teal background, the edge is clean with no white fringe.

## Speed: about 5.5 s per edit on the 5090, about 11 s on a modded 2080 Ti
Speed isn't why I'd pick this model, so this is short. Each number is from warm runs, three per test. The two machines use **different settings**, so the rows aren't a head-to-head comparison. The 5090 column is the machine that made the images in this post.
| Task | RTX 5090 (int8, 40 steps) | Modded RTX 2080 Ti 22GB (turbo int8, 6 steps) |
|---|---|---|
| 1024x1024 generate | ~6.4 s (~1.2 s with a 4-step LoRA) | ~7.5 s |
| Edit with reference | ~5.5 s (768x1024) | ~10.8 s |
| 1536x2048 generate | ~22.5 s | not run |
The [modded 2080 Ti](/en/blog/modded-2080ti-22gb-local-agent) is my everyday setup at home. Turing has no bf16, so ComfyUI needs to be switched to fp16 to be fast. Details below.
## Deep dive: settings, prompts, two ComfyUI 0.37 gotchas, and raw timings
You can skip this section; nothing above depends on it. It's here for anyone who wants to reproduce the results, or hand the whole post to an LLM.
### Machine and settings
- RTX 5090 32 GB, ComfyUI 0.37.0, torch 2.13.0+cu130, comfy-kitchen 0.2.35.
- Model files as in the table above. The text encoder is the heretic (de-refusal) variant of `qwen3vl_8b_w4a8`. The official one refuses some prompts, so I use this one daily. Nothing in this post would be refused.
- Sampling: 40 steps, euler, simple, cfg 1.0. No speed LoRA on any article image.
- Resolutions: reference 1536x2048; every outfit, location and combo edit at `resolution` 1536, output 1344x1760; sign 2752x1536; poster 1536x2048; menu and sticker 2048x2048.
- Sampler start: the `latent` output of `Text Encode Qwen Image 2.1`, not an `EmptyLatentImage`.
- Seeds: reference from 202001 to 202003, picked 202002.
- Outfits: Hanfu, uniform, chef, spacesuit, idol and wuxia one run each (303000, 303001, 303003, 303004, 303006, 303007). Suit and coat, after the prompt fix, 3 seeds each; picked 707000 and 707003.
- Locations: 808000 to 808007 one run each; the library drifted, so 3 more seeds, picked 909132.
- Combos: coat + snow 809002, idol + Tokyo 809003, uniform + library 809006 on the first try; Hanfu + cherry blossoms, spacesuit + space station, wuxia + desert, chef + night market 3 seeds each, picked 909022, 909033, 909077, 909099.
- All images regenerated on 2026-10-09.
### The base prompt (text-to-image, no reference)
```text
Full-body photograph of a young Chinese woman in her twenties standing in the exact center of the frame, facing the camera, long black hair in a half-up bun with a simple wooden hairpin, oval face, small mole under her left eye. She stands in an old Taiwanese tea house: dark wooden lattice windows, two hanging red paper lanterns, a red brick wall and a low wooden tea table behind her. She wears a pale-blue cotton qipao. Soft afternoon window light from the left, photorealistic, 50mm lens, natural skin texture.
```
### The location prompt (night market)
```text
The same woman from , with exactly the same face, the same small mole under her left eye, the same hairstyle with the wooden hairpin, the same pale-blue qipao and the same standing pose. Keep exactly the same framing, crop and camera distance as . Only change the background and lighting: she now stands in a busy Taiwanese night market at night with glowing food stalls. Photorealistic, natural light matching the new scene.
```
### Why the first batch drifted: the canvas didn't match the reference
For the first batch I wired a 1536x2048 `EmptyLatentImage` into the sampler. At `resolution` 1536, `Text Encode Qwen Image 2.1` resizes the reference to 1344x1760, so the two sizes disagreed. The node's own tooltip in the ComfyUI source says exactly this about its `latent` output: "Empty latent on the first reference image's size, to match with sampling as any other size shifts the edit." That latent is empty (all zeros). It carries no pixels from the reference; its job is to make the canvas the same size. The template's `custom_size` switch, when on, takes the same path my first batch did.
I measured the eye midpoint and eye distance in both batches with the YuNet face detector, after resizing every image to 1344x1760:
| Batch | Images | Eye midpoint x | Eye midpoint y | Eye distance |
|---|---|---|---|---|
| First (my own 1536x2048 canvas) | 17 | 548–634 | 501–696 | 54.5–83.1 (±18.9%) |
| Final (node's latent output) | 24 | 611–627 | 645–661 | 73.5–79.6 (±3.9%) |
Both include the reference itself (midpoint 618, 650; eye distance 79.2). The worst first-batch outliers were the suit and the coat (eye distance 58.4 and 54.5, pulled back) and the cherry-blossom shot (x drifted to 548).
### The suit and coat still went wide on the right canvas
With the canvas fixed, the suit and coat edits still came out as full-body shots. Rerolling didn't help: 3 seeds each on the same prompt, all six landed at eye distance 51.3–59.3, against 79.2 for the reference.
For the second round I changed two things at once: I added `Keep exactly the same framing, crop and camera distance as .` and dropped the heels and boots from the outfit descriptions. Again 3 seeds each; all six came out at 77.7–79.5. I didn't test the two changes separately, so the how-to keeps both.

### Small pose drift in the outfit set
Face and background are stable across the outfit set. Hands and stance adjust slightly to the clothes. The prompt says "the same standing pose", but the spacesuit requires holding a helmet under the left arm.
### ComfyUI 0.37.0 gotcha 1: two required inputs on the text encode node
In 0.37.0, `TextEncodeQwenImage21` requires two inputs, `negative_prompt` and `resolution`. A hand-built workflow that leaves either out fails through the API with HTTP 400 and this error type:
```
required_input_missing
```
Add both inputs to the node and the request goes through.
### Gotcha 2: an identical workflow hits the cache in 0.0 s
Submit the exact same workflow twice and ComfyUI returns its cached result: 0.0 s and the same filename. Change the seed when you benchmark, or when you actually want a new image.
### Regular outputs carry an alpha channel too
Even without the transparency sentences, outputs are RGBA PNGs. The alpha isn't all 255; the lowest value I saw was 251, far too small a change to see. Convert to RGB before compositing or putting the image on the web.
### Raw speed table
Method: warm, three runs each, seed changed every run, timed from submit to image. The first run is slower because it loads the model and the reference image; the tables in the main text use the later runs.
| Machine | Task | Runs (s) |
|---|---|---|
| RTX 5090 | 1024x1024, 4-step LoRA | 2.26 / 1.22 / 1.20 |
| RTX 5090 | 1024x1024, 40 steps | 6.88 / 6.37 / 6.40 |
| RTX 5090 | 768x1024 edit, 40 steps | 7.4 / 5.5 / 5.5 |
| RTX 5090 | 1536x2048 generate / edit, 40 steps | ~22.5 / ~32.7 |
| RTX 2080 Ti 22GB | 1024x1024 generate, Viggle 6-step int8 | 8.9 / 7.5 / 7.6 |
| RTX 2080 Ti 22GB | 1024 edit, Viggle 6-step int8 | 16.6 / 10.8 / 10.8 |
### Why no article image uses the 4-step LoRA
The 4-step LoRA is the `4step-lora-r64` file from [Viggle/Qwen-Image-2.1-viggle-turbo](https://huggingface.co/Viggle/Qwen-Image-2.1-viggle-turbo). The LoRA's README says complicated edits, including identity-preserving ones and instructions with several constraints, can still fall short of the base model, with identity drift.
### Getting the 2080 Ti fast: fp16, then the 6-step turbo
The 2080 Ti runs the same repo's `v0.3-6step-int8_convrot` merged checkpoint at 6 steps, cfg 1.0. Turing has no bf16, so ComfyUI falls back to fp32, which is slow. I added fp16 to ComfyUI's `QwenImage21.supported_inference_dtypes` and moved to torch 2.9.1+cu130. The same int8 40-step job went from 159 s to 42 s. Then I switched to the 6-step turbo checkpoint, which gives the 7.5 s per 1024x1024 image above.
---
# FastH3 on an RTX 5090: a 5-second talking clip in under a minute, 2.9x faster than MiniMax-H3
URL: https://ai-muninn.com/en/blog/fasth3-rtx-5090-comfyui
Date: 2026-10-08
import YouTubeEmbed from "@/components/YouTubeEmbed";
FastH3, an 8-step distilled MiniMax-H3, made a 5-second 1344×768 talking clip in 57.4 and 59.8 s on my RTX 5090 in stock ComfyUI. Original H3 at its default 20 steps took 166.3 and 168.2 s: about 2.9x. Mechanism: 20 steps cut to 8 by distillation, plus sparse attention (VSA) that keeps 10% of the attention blocks. Mandarin survived; Whisper only missed the made-up name. Caveat: VSA needs an RTX 30 or newer card. On a 2080 Ti it falls back silently.
---
## Why I tried it: my everyday talking-clip model is slow
MiniMax-H3 is what I use for short talking clips. You give it an image and a line of dialogue, and it returns video plus audio with the lips matching the line. It's also slow. On my RTX 5090, an 864×480, 5-second clip at 10 steps takes 72 to 82 s warm. That's why I run 10 steps, even though the official ComfyUI H3 text-to-video template defaults to 20.
So when FastH3 came out, I had two questions. Is it really that fast inside the ComfyUI install I already use? And does Mandarin dialogue survive the step cut? I also tried it on my modded 22 GB RTX 2080 Ti.
The short answers: yes, about 2.9x faster than the default; yes, Mandarin holds up; and the 2080 Ti runs it, but without the sparse-attention speedup.
## FastH3 is MiniMax-H3 distilled to 8 steps, plus sparse attention
[FastH3](https://haoailab.com/blogs/fasth3-rtx/) comes from UCSD's Hao AI Lab. It's MiniMax-H3 distilled with DMD2 from 20 steps to 8. Distillation here means training a version of the model to reach a similar result in far fewer denoising steps.
The second speedup is VSA (Video Sparse Attention). Instead of computing attention across every video token, it computes it only over the most relevant fraction. The ComfyUI template keeps 10%.
It comes in two versions:
- **V2** keeps all 50 transformer blocks. The ComfyUI NVFP4 file is 13.6 GB: [FastVideo/FastVideo-FastH3-8-Step-V2-NVFP4-Comfy](https://huggingface.co/FastVideo/FastVideo-FastH3-8-Step-V2-NVFP4-Comfy).
- **Trim** drops the 8 least important blocks, leaving 42. NVFP4 file 11.9 GB: [FastVideo/FastVideo-FastH3-Trim-Comfy](https://huggingface.co/FastVideo/FastVideo-FastH3-Trim-Comfy). The authors say Trim loses some detail in busy scenes and recommend V2 when quality matters.
It supports text-to-video and first/last-frame image-to-video. The V2 and Trim checkpoints tested here don't include a distilled Ref2VA (a reference image that keeps a character's identity); FastVideo has a separate distilled Ref2VA model, which I didn't test. The license is the MiniMax H3 Community License, which has regional restrictions.
The official numbers on an RTX 5090, 5 s with audio: at 832×480, V2 takes 14.8 s and Trim 13.4 s; at 1344×768, V2 takes 38.6 s and Trim 35.4 s. Those are warm, end-to-end (text encode, 8 denoising steps, video and audio decode, MP4 out), the median of two runs on each of two prompts. They were measured on the team's own engine, [FastVideo](https://github.com/hao-ai-lab/FastVideo) (Apache-2.0), which officially supports Linux and WSL. I ran ComfyUI instead.
## Running it in ComfyUI takes two templates and one new model file
No custom nodes. ComfyUI ships two official templates: `video_fastvideo_fasth3_t2v.json` and `video_fastvideo_fasth3_i2v.json`.
My setup: RTX 5090 (32 GB), Windows, ComfyUI 0.37.0. It's the same install I already run H3 in. The templates need the `BlockSparseAttention` and `MiniMaxH3SigmaShift` nodes. 0.37.0 has both; my other machine, on 0.31, lacks `BlockSparseAttention`.
Files:
1. The FastH3 file (V2 or Trim) goes into `models/diffusion_models/`.
2. The text encoder and VAEs are shared with the original H3. If you already run H3, you have them: `qwen3vl_32b_minimax_h3_nvfp4_awq`, `minimax_h3_video_vae_fp16`, `minimax_h3_audio_vae_fp32`.
I left the template settings as they were:
```text
steps: 8
sampler: res_multistep
scheduler: simple
MiniMaxH3SigmaShift: video 10, audio 3
BlockSparseAttention: vsa, keep 10%
attention backend: comfy kitchen
```
The dialogue goes in the scene description. By H3 convention, Chinese lines are written in Simplified characters:
```text
... says in clear standard Mandarin Chinese, "欢迎来到 AI Muninn,今天带你看最新的 AI 消息。"
```
The line means "Welcome to AI Muninn, today I'll show you the latest AI news."
## At 1344×768, FastH3 took 58.6 s on average and the original H3 took 167.3 s
This is the main test. Same first frame at 1344×768, same Mandarin line, 5 s (124 frames), warm, two seeds each. Times run from submit to saved file, including text encoding and decoding.
| Model | Steps | Seed A | Seed B |
|---|---|---|---|
| FastH3 V2 | 8 | 59.8 s | 57.4 s |
| Original H3 (template default) | 20 | 166.3 s | 168.2 s |
| Original H3 (my usual) | 10 | 90.1 s | 83.6 s |
The average ratio against the 20-step default is 2.85x, so about 2.9x. Against the 10 steps I normally run, FastH3 is about 1.5x faster. I list that row for reference only, since 10 steps isn't the official default.
That 2.9x combines both changes: 20 steps down to 8, plus VSA. The original H3 has no VSA to turn on, so there's no way to split the two inside this comparison. The original H3 file was `minimax_h3_fl2va_pruned_nvfp4`.
I judged quality by watching the clips, not with a metric. Both look usable to me.
## At 480p it's under 20 s per clip, and Trim saves about 2 s
Text-to-video at two resolutions, 124 frames, two runs each. Read the V2 and Trim columns side by side:
| Resolution | V2 | Trim |
|---|---|---|
| 832×480 | 18.7 / 18.7 s | 16.8 / 16.8 s |
| 1344×768 | 52.8 / 50.8 s | 45.6 / 45.5 s |
Trim saves about 2 s at 480p and 5 to 7 s at 768p. For shorts I lean toward V2: 2 s is a small price for all 50 blocks.
The very first clip after starting ComfyUI (480p, V2) took 28.0 s. Every other number here is warm.
Against the official figures, ComfyUI is 3 to 4 s slower at 480p and 10 to 14 s slower at 768p. That's a different engine (FastVideo vs ComfyUI), not a misconfiguration. I didn't install FastVideo this time.
## Mandarin survived the step cut; only the made-up name slipped
To check the dialogue, I transcribed the audio with Whisper (OpenAI's open-source speech-to-text model). Muninn is the blog's made-up name, so no model has a reason to know it.
| Run | Whisper transcript |
|---|---|
| Written line | 欢迎来到 AI Muninn,今天带你看最新的 AI 消息。 |
| V2, 480p text-to-video | 欢迎来到AI Money,今天带你看最新的AI消息 |
| Trim, 480p text-to-video | 欢迎来到AI Money,今天带你看最新的AI消息 |
| V2, mascot image-to-video | 欢迎来到AI Mooning… (rest of the line correct) |
## Image-to-video keeps an illustrated style
I also used the blog's mascot as a first frame: a 480×832 portrait illustration. The illustration style stays intact while she blinks and talks. V2 took 24.0 s and Trim 19.0 s. Both numbers include swapping the model in.
## A modded 2080 Ti runs it in 149.9 s, but VSA doesn't kick in
My RTX 2080 Ti is a modded 22 GB card on ComfyUI 0.31. I ran the Trim int8 file (18.9 GB) at 832×480, 124 frames: 189.4 s cold, 149.9 s warm. The Mandarin was occasionally off by a character or two.
One catch: VSA does not work on a 2080 Ti. Its kernel requires sm_80 or newer, meaning Ampere (RTX 30 series) and later; the 2080 Ti is sm_75. On ComfyUI 0.37, the `BlockSparseAttention` node doesn't raise an error. It silently falls back to normal (dense) attention, and the video still renders. So on an older card, don't assume the speedup is on just because the node is in the graph.
## Deep dive: how I measured, and what happened on the 2080 Ti
You can skip this section without missing anything you need to run FastH3. It's the full record for anyone reproducing the numbers, or for an AI reading this page on someone's behalf.
### How each run was timed
I built an API-format workflow from the official template and sent it with a Python script. The timer starts at `POST /prompt`, and the script polls `/history` until the job is done. That window includes text encoding, the 8 steps, video and audio decode, and saving the MP4. It excludes downloading the file. Each run's elapsed time and arguments went into a JSON file.
### The node graph (V2, image-to-video)
```text
UNETLoader fastvideo_fasth3_8step_v2_pruned_nvfp4.safetensors
MiniMaxH3SigmaShift shift_video 10.0, shift_audio 3.0
ModelAttentionBackend comfy kitchen attention
BlockSparseAttention selection vsa, keep_percent 10.0, start_percent 0.2, end_percent 1.0
CLIPLoader qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors (type minimax)
MiniMaxH3ImageToVideo 1344x768, length 124, first_frame = LoadImage
KSamplerSelect res_multistep
BasicScheduler simple, steps 8
SamplerCustomAdvanced -> VAEDecode + VAEDecodeAudio -> CreateVideo (24 fps) -> SaveVideo
```
### What changed for the baseline
For the original H3 runs, I swapped the model to `minimax_h3_fl2va_pruned_nvfp4.safetensors`, removed the SigmaShift, attention backend and BlockSparseAttention nodes, and set steps to 20 (or 10). With no SigmaShift node, the original H3 uses its default values. Everything else in the graph stayed the same.
### The full 768p table, with seeds
| Model | Steps | Seed | Time |
|---|---|---|---|
| FastH3 V2 | 8 | 51 | 59.8 s |
| FastH3 V2 | 8 | 52 | 57.4 s |
| Original H3 | 20 | 61 | 166.3 s |
| Original H3 | 20 | 62 | 168.2 s |
| Original H3 | 10 | 51 | 90.1 s |
| Original H3 | 10 | 52 | 83.6 s |
### The attention backend barely matters on the 5090
I tried the backend options on V2, 480p text-to-video:
| Backend | Time |
|---|---|
| comfy kitchen (template default) | 19.7 / 18.8 s |
| SageAttention | 18.7 / 18.8 s |
| PyTorch | 20.9 s |
All three land within 2 s, so I kept the default. My unmeasured guess at why: VSA takes over after the first 20% of denoising (`start_percent 0.2`), so the dense backend only runs the early part.
### Turning VSA off on the 5090 costs little at 480p
On Trim, 480p, I removed `BlockSparseAttention` and ran it again:
| VSA | Time |
|---|---|
| On | 17.7 / 17.6 s |
| Off | 19.3 / 17.9 s |
The difference is small at 480p. It's probably larger at higher resolution, but that's a guess; I didn't measure 768p with VSA off.
### Proving the 2080 Ti silently falls back to dense attention
To test VSA on the 2080 Ti, I set up a separate ComfyUI 0.37.0 on that machine. The `BlockSparseAttention` node exists and runs with no error. The only log line is:
```text
VSA: extra_tokens ignored
```
That line only shows the node was applied to the model. It doesn't show the sparse kernel ran. So I checked the conditions directly in Python:
```python
torch.cuda.get_device_capability(0) # (7, 5)
comfy_kitchen.sol_attn_is_available("cuda:0") # False
```
The underlying requirement text is `sol_attn: requires sm_80+ (cp.async, INT8 MMA)`. In `nodes_sparse_attention.py`, when `sol_attn_is_available()` returns False, the node falls back to dense attention. It runs with `verbose=False`, so no warning is printed.
The final check: the same seed with and without VSA. The MD5 of every decoded frame was identical (`240f06206ad0da4a33981c5051351705`).
### ComfyUI 0.37 made the 2080 Ti about 4x slower, so it stays on 0.31
ComfyUI 0.37 ran much slower on the 2080 Ti. With torch 2.6.0, comfy-kitchen 0.2.35 failed with:
```text
ValueError: infer_schema(func): Parameter stride has unsupported type list[int]
```
I switched to torch 2.7.1+cu126 with triton 3.3.1. That fixed the import, but SageAttention 1.0.6 then failed to compile on triton 3.3.1 / sm_75, and ComfyUI printed:
```text
Error running sage attention: PassManager::run failed, using pytorch attention instead.
```
So the clip ran on PyTorch attention: 595.0 and 570.0 s at 480p, against 149.9 s on 0.31 with SageAttention. That's about 4x slower, with no VSA gain to offset it, since the card can't use VSA anyway.
On 0.31, clips with SageAttention on and off both looked fine to my eye. Without SageAttention, the same 480p clip took 212.3 and 194.9 s.
---
# Kandinsky 6.0 Pro on an RTX 5090: lip-synced English dialogue works, Chinese isn't quite there yet
URL: https://ai-muninn.com/en/blog/kandinsky-6-pro-lip-sync-rtx-5090
Date: 2026-10-08
import YouTubeEmbed from "@/components/YouTubeEmbed";
Kandinsky 6.0 Pro (29B, MIT) makes a 5-second clip with 44 kHz audio and lip-synced speech in one pass. On an RTX 5090, English dialogue came out word-for-word correct and the mouth timing looked natural. Chinese was understandable, with an accent and a few wrong words. Clip time: 277 s in bf16, 206.7 s with SageAttention, 141.5 s median with an NVFP4 copy I made along the way (60.3 GB down to 20.1 GB, on Hugging Face). Lite (3B) handled English but garbled Chinese.
---
## Why I tried it: a video model that moves the mouth to match the words
Kandinsky 6.0 was open-sourced on 2026-10-06. I saw the release news and ran a quick test on my RTX 5090. The part I cared about was lip-sync: you write a line of dialogue, and the model generates the video and the voice together, with the mouth moving in time.
The short answer: English is great, Chinese isn't quite there, but it isn't bad either.
Along the way I quantized the Pro model to NVFP4 so it runs faster on a 32 GB card. I uploaded it so the next person doesn't have to redo it.
## Kandinsky 6.0 makes video and audio in one pass, and the dialogue goes in the prompt
[Kandinsky 6.0](https://github.com/kandinskylab/kandinsky-6) comes in two sizes: Lite (3B) and Pro (29B), both MIT-licensed. Each pass produces a 5-second clip plus 44 kHz audio, lip-sync included. It does text to video+audio and image+text to video+audio. A separate super-resolution model can upscale to 1920×1080.
The design has two streams: one for video and a newly trained one for audio, and they attend to each other (bidirectional cross-attention, meaning each stream looks at the other at every layer). That's why the mouth timing lines up with the sound. Text goes in through Qwen2.5-VL 7B plus CLIP-L. Video uses the HunyuanVideo VAE (the part that compresses frames into a small latent space and back). Audio uses the MMAudio VAE and a BigVGAN vocoder.
The [paper (arXiv 2610.05608)](https://arxiv.org/abs/2610.05608) has a human evaluation against Kling 2.6, Veo 3.1 Fast, MiniMax H3, Seedance 2.0, LTX 2.5 and Kandinsky 5.0 Pro, and claims speech quality is especially competitive. I didn't check the win rates in the PDF, so I'm not quoting numbers.
A prompt has two parts. The video caption describes the scene, and the spoken line goes inside it, wrapped in `` and ``. A separate audio caption describes the voice and the ambience. This is the one I used:
```text
Medium close-up of a beautiful young Chinese woman in traditional Hanfu, pale blue silk with embroidered sleeves, hair in an elegant bun with a jade hairpin, standing in a quiet classical garden courtyard with a wooden pavilion behind her. The camera is static. She looks straight into the camera, smiles gently and says: Welcome to AI Muninn. Here's today's AI news. Soft afternoon light, photorealistic, shallow depth of field.
```
```text
A clear, warm young female voice speaking English at a calm pace, quiet garden ambience with soft birdsong.
```
For the Chinese run I changed only two things: the line inside `…` became 「歡迎來到 AI Muninn,今天帶你看最新的 AI 消息。」 ("Welcome to AI Muninn, today I'll show you the latest AI news"), and "English" in the audio caption became "Mandarin Chinese".
The official ComfyUI workflow expands short prompts with Qwen3.5 by default (a "beautifier" step). I wrote full English captions myself and turned it off.
## English came out word-for-word; Chinese is understandable, with an accent
I ran each clip through Whisper large-v3-turbo to check the spoken words. Whisper only tells you what was said, not whether the mouth matches. The lip-sync judgment is mine, from watching the clips: in the English ones, the timing looks natural.
**English.** Both bf16 and NVFP4 were word-for-word correct. The only miss was the made-up word "Muninn", heard as "Munnin" or "Manin". Unmute the clip; it starts muted.
**Chinese.** The paper says the training captions were written in Russian and English, and RL prompts were picked in either language with equal probability. Chinese isn't mentioned anywhere. Even so, it's understandable. It sounds like a foreign speaker, with a few wrong words. Here is what Whisper heard:
| Run | Whisper transcript | What it says |
|---|---|---|
| Written line | 歡迎來到 AI Muninn,今天帶你看最新的 AI 消息 | Welcome to AI Muninn, today I'll show you the latest AI news |
| Pro bf16 | 欢迎来到AI慕您,请演带您看最起的AI消息 | "Welcome to AI" right; the middle is off; "latest" became a different word |
| Pro NVFP4 | 欢迎来到AI母您,今天带你看最起的AI消息 | "Welcome to AI" right; "today I'll show you" right; "latest" still wrong |
"Welcome to AI" is correct in both. The word for "latest" (最新) came out as 最起 in both. NVFP4 got "today I'll show you" right, but that's one run each, so I can't claim quantization improved the Chinese. The simplified characters are Whisper's default output, not something the model chose.
## What you need to run it on an RTX 5090
My machine: RTX 5090 (32 GB), 61.6 GB of system RAM, Windows.
1. **ComfyUI 0.38.0 or newer.** The official nodes require it. My main ComfyUI is 0.37 with a full MiniMax-H3 node set I didn't want to break, so I made a separate 0.38.2 git worktree with its own venv on port 8189. The old one keeps 8188. Commands are in the deep dive.
2. **The official `kandinsky6` nodes.** Search for them in ComfyUI Manager, or copy the repo's `comfyui/` folder into `custom_nodes/kandinsky6/`.
3. **The models.** The workflow has a "Download models" button, or follow the manual table in the node README. You need the Pro distilled transformer (60.3 GB), Qwen2.5-VL 7B plus CLIP-L, the HunyuanVideo VAE, the MMAudio audio VAE (`v1-44.pth`) and the BigVGAN vocoder.
4. **SageAttention.** A faster attention kernel; ComfyUI picks it up automatically once installed. Skip it and the same clip takes 277 s instead of 206.7 s.
Sampling settings: Pro distilled uses 10 steps, CFG 1.0, audio VAE scaling 0.417. "Distilled" means a version trained to get there in far fewer steps. The non-distilled model needs 50 steps at CFG 5.0 and is much slower.
I ran my own API version of the workflow, with the same nodes and settings: 864×480, 121 frames (24 fps, about 5 s), seed 42.
## bf16 takes 206.7 s per clip, NVFP4 takes 141.5 s
Every number here is wall-clock, from submit to saved file, with model loading included. All at 864×480, 121 frames. I only compare the model against itself: same Pro distilled checkpoint, bf16 versus my NVFP4 copy. With the same English line, seed 42 and SageAttention on, bf16 took 206.7 s and NVFP4 took 141.5 s. The 277 s row is bf16 before I installed SageAttention, kept for reference.
| Setup | Time per clip |
|---|---|
| Pro distilled bf16, no SageAttention | 277.2 / 277.0 s |
| Pro distilled bf16 + SageAttention | 206.7 s |
| Pro distilled NVFP4 + SageAttention | 131.4 / 141.5 / 151.5 s |
The three NVFP4 runs used different lines and seeds: English seed 42 (141.5 s), Chinese seed 42 (131.4 s) and English seed 7 (151.5 s).
Why bf16 is slow: the 60.3 GB model doesn't fit in 32 GB. ComfyUI 0.38 stages weights in and out as it runs (the log shows `57486MB Staged`). Moving those weights is where the extra time goes.
## My NVFP4 build looks nearly identical to bf16
NVFP4 is a 4-bit number format that newer NVIDIA GPUs compute natively. bf16 had to stream 60 GB through the card on every run, so I converted the model first and kept testing on that. The conversion took 59 s.
Same seed, same English line: composition, costume, background and the timing of the mouth opening are nearly identical. Some small face details differ, but there's no added noise. That surprised me a little, because my earlier NVFP4 conversion of Qwen-Image 2.1 came out muddy.
The weights: [coolthor/Kandinsky-6.0-Pro-distill-5s-NVFP4](https://huggingface.co/coolthor/Kandinsky-6.0-Pro-distill-5s-NVFP4).
To use it: it loads natively in ComfyUI 0.38.2 with no node changes. Drop the file into `models/diffusion_models/`, pick it in Load Diffusion Model, and leave everything else as is.
kabachuha had already released an int8 version on Hugging Face, which needs ComfyUI PR #16825. When I checked on 10-08, I didn't see an NVFP4, fp8 or GGUF version.
## Lite gets English right and garbles Chinese
Lite is the 3B model. The official nodes block Lite distilled, so only the regular 50-step mode runs (no SageAttention): 488.7 to 498.7 s per clip. English came out correct. Chinese didn't. Whisper heard 微信来就爱一门呢 今天大家试试AAI什么系. That is unrecognizable.
For lip-sync, I'd use Pro distilled.
## Deep dive: install commands and the NVFP4 conversion
You can skip this section without missing anything you need to use the model. It's the full record for anyone reproducing the setup, or for an AI reading this page on someone's behalf.
### A separate ComfyUI 0.38.2 worktree, so the main install stays untouched
The official Kandinsky nodes need 0.38.0 or newer. Instead of upgrading my 0.37 install in place and risking the H3 nodes, I made a git worktree at v0.38.2 with its own venv (PowerShell):
```powershell
git -C C:\Users\coolt\ComfyUI fetch --tags origin
git -C C:\Users\coolt\ComfyUI worktree add --detach C:\Users\coolt\ComfyUI-k6 v0.38.2
python -m venv C:\Users\coolt\venv-k6
C:\Users\coolt\venv-k6\Scripts\python.exe -m pip install torch==2.13.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
git clone --depth 1 https://github.com/kandinskylab/kandinsky-6 C:\Users\coolt\k6-src
Copy-Item -Recurse C:\Users\coolt\k6-src\comfyui C:\Users\coolt\ComfyUI-k6\custom_nodes\kandinsky6
```
It runs on port 8189; the old install keeps 8188. To undo: `git worktree remove` and delete the venv.
### The official nodes block the Lite distilled checkpoint
Loading the Lite distilled checkpoint fails in the official node's `register.py` with:
```
Distilled K6 Lite checkpoints are not supported.
```
So Lite runs in regular mode only: 50 steps, CFG 5.0, audio scaling 0.5302. This is a node limitation, not a broken model.
### pip stalled on big wheels; uv and an offline wheel fixed it
On Windows, pip stalled twice at 0 bytes while downloading large wheels from PyPI. curl fetched the same files without trouble. I switched to uv and installed SageAttention from an offline wheel:
```powershell
uv pip install --python C:\Users\coolt\venv-k6\Scripts\python.exe sageattention-2.2.0+cu130torch2.10.0andhigher.post6-cp310-abi3-win_amd64.whl triton-windows==3.7.1.post27
```
Smoke test:
```python
import torch, sageattention
q = torch.randn(1, 8, 256, 128, dtype=torch.float16, device="cuda")
print(sageattention.sageattn(q, q, q).shape)
```
### SageAttention took the first bf16 run from 277 s to 206.7 s
The first bf16 runs took 277.2 and 277.0 s. Installing SageAttention was the only change, and the next run took 206.7 s. One NVFP4 smoke run came in at 211.9 s, but I didn't record whether SageAttention was active for it, so I left it out of the chart.
### The NVFP4 conversion: comfy-quants, kand6 branch
The tool is Comfy-Org/comfy-quants. I used kabachuha's [`kand6` branch](https://github.com/kabachuha/comfy-quants/tree/kand6), commit `4b96626`. Config:
```yaml
model:
family: kandinsky6
dtype: bf16
components:
transformer: quantize
text_encoder: keep_bf16
vae: keep_bf16
audio_vae: keep_bf16
quant:
algorithm: nvfp4
target_dtype: nvfp4
scale:
granularity: block
axis: in_features
method: amax
rounding: nearest_even
modules:
include:
- "visual_transformer_blocks.*"
- "video_text_transformer_blocks.*"
- "audio_text_transformer_blocks.*"
exclude:
- "visual_transformer_blocks.0.*"
- "visual_transformer_blocks.1.*"
- "visual_transformer_blocks.58.*"
- "visual_transformer_blocks.59.*"
fallback:
on_error: keep_bf16
```
This quantized 1,840 Linear layers: 1,792 in the visual blocks, 24 in the video-text blocks, 24 in the audio-text blocks. Visual blocks 0, 1, 58 and 59 stay bf16, following LTX-2's official NVFP4 release; the first and last layers are more sensitive to precision. Norms and biases are copied as-is.
| | Source (bf16) | Output (NVFP4) |
|---|---|---|
| Size | 60,344,993,576 bytes | 20,094,169,424 bytes (18.71 GiB) |
| Tensors | 4,471 | 9,991 |
The tensor count goes up because each quantized Linear gets a `weight_scale` and a `weight_scale_2`. The conversion took 59.26 s, and the converter process peaked at 49.33 GiB (Windows working set).
That peak fits on a 61.6 GB machine because the exporter reads tensor by tensor from disk (`safe_open(..., device="cpu")`) and never loads all 60 GB at once.
### The first conversion failed at save_file
The first `save_file` failed because NumPy was missing from the venv, so nothing was written. Installing it with uv fixed the retry.
### Checking the output
The output key names match what the official ComfyUI node expects, so no renaming was needed. ffprobe on the smoke video shows 121 frames and 44,100 Hz audio, and the ComfyUI log shows native `nvfp4` mixed-precision ops.
---
# Testing EmbeddingGemma 2 on Our Knowledge Base: Recall@5 from 50% to 58.3%
URL: https://ai-muninn.com/en/blog/embeddinggemma-2-knowledge-base-test
Date: 2026-10-07
Series: AI Workflow (Part 24)
import YouTubeEmbed from "@/components/YouTubeEmbed";
I tested EmbeddingGemma 2 against v1 as the search model for my AI assistant's notes, same code and precision on an M1 Max. Note search: recall@5 went from 50.0% to 58.3%, MRR from 0.4406 to 0.4855, and no query dropped out of the top 5. Code search: correct file ranked first 4/10 vs 1/10. Cost: indexing 1.7x slower, peak memory 1.03 GiB to 2.75 GiB, query latency unchanged. Image search on scene pictures mostly worked; music search missed. The test ran separately; the production knowledge base still runs v1 and can't switch yet, because llama.cpp can't load v2.
---
## Why I tested v2
My AI assistant searches its own notes before it starts any task. The search tool is [qmd](https://github.com/tobi/qmd), a local search engine, and its "search by meaning" side runs Google's EmbeddingGemma v1 (`embeddinggemma-300M-Q8_0`, a GGUF file) through llama.cpp. It gets called dozens of times a day.
An embedding model turns text into a list of numbers, so text with similar meaning ends up with similar numbers. EmbeddingGemma's list has 768 numbers (768 dimensions). Search ranks notes by how close their numbers are to the query's.
Google shipped EmbeddingGemma 2. I wanted two answers: if I swap v1 for v2, does the assistant find the right note more often, and what does it cost in memory and time?
## What v2 adds: images and audio in the same 768-dim space, and a big code score jump
Most of the table is context. The two rows that matter for a text knowledge base are the code score and the size, which tells you where the extra memory goes.
| | v1 ([embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m)) | v2 ([embeddinggemma-2](https://huggingface.co/google/embeddinggemma-2)) |
|---|---|---|
| Inputs | Text | Text, images, video, audio, one shared 768-dim space |
| Size | 300M (per the name) | 740M = text 270M + image 170M + audio 300M |
| MTEB multilingual text | 61.15 | 61.36 |
| MTEB code | 68.76 | 78.68 |
v2 is Apache 2.0 (v1 ships under the Gemma license) and covers 100+ languages. With both the image and audio parts turned off, v2 loads only its 270M text part; my code below turns off audio only, so it loads text plus image. The official numbers say text quality barely moved and code moved a lot. Google's [announcement post](https://blog.google/innovation-and-ai/technology/developers-tools/embeddinggemma-2) has the rest.
## How I tested: take one line from my log and see if it finds its note
In short: I use 60 lines from my LOG as test questions, each with a known answer (the note it originally linked to), and I count how often each model ranks that answer in the top 5. If you don't plan to run the code, this paragraph and the figure below are enough.
Every time my assistant finishes a task, it appends one line to a LOG file. The line ends with `→ [[note-name]]`, pointing at the note where the details live. That gives me free test data: strip the link, use the rest of the sentence as the search query, rank all 813 notes, and check where the linked note lands.

I sampled 60 of the 1,547 eligible lines with a fixed seed. Three numbers come out:
- **recall@1**: the correct note is ranked first.
- **recall@5**: the correct note is somewhere in the top 5. This is closest to real use, since the assistant reads several notes per lookup.
- **MRR** (mean reciprocal rank): the average of 1/rank. First place scores 1, second 0.5, and so on.
### Running it yourself: the core code
Both generations ran through the same code, in float32, on the Mac's GPU (MPS):
```python
import torch
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"google/embeddinggemma-2", # v1: google/embeddinggemma-300m
device="mps",
model_kwargs={"torch_dtype": torch.float32},
config_kwargs={"audio_config": None}, # skip the audio encoder for text/image-only search
)
docs = model.encode(
[f"title: {name} | text: {body[:1500]}" for name, body in notes],
batch_size=16,
)
query = model.encode("task: search result | query: " + log_line)
```
Each note goes in as its first 1,500 characters, formatted `title: | text: `. Each query gets the prefix `task: search result | query: `. The prefix string is identical for both generations; I checked.
For the second test (code search), the setup is the same, with source files as the documents and the prefix `task: code retrieval | query: `.
## Before you run it: no float16, v1 is gated, and watch Mac memory
- **Don't use float16.** The model card says it produces NaN. I ran float32 for both.
- **v1 on Hugging Face is gated.** You have to accept the license first. An anonymous download returns 401.
- **On a Mac, if memory blows up,** lower `batch_size` or run each test in its own process. I hit this one; details are in the deep dive.
## Note search: recall@5 went from 50% to 58.3%, and nothing fell out of the top 5
Look at the recall@5 row. That's the one that maps to how the assistant actually uses search.
| 60 queries, 813 notes | v1 | v2 |
|---|---|---|
| recall@1 | 38.3% (23) | 41.7% (25) |
| recall@5 | 50.0% (30) | 58.3% (35) |
| MRR | 0.4406 | 0.4855 |
The 5 extra top-5 hits are all new entries; no query that v1 had in the top 5 fell out with v2. At top-1, v2 fixed 2 queries that v1 missed and lost none. Per query, 25 ranks improved, 25 stayed the same and 10 got worse, but none of those 10 fell out of the top 5 or lost first place. In both of v2's wins, two notes covered the same event. v1 picked the related note; v2 picked the one the LOG line actually pointed to. For a query about reassigning a stalled job, v1 found the note about the stall, and v2 found the reassignment decision.
The other thing the table says: even with v2, about 40% of log lines don't find their note in the top 5. A log line is a one-line conclusion; the note it points to opens with background. The wording differs a lot.
## Code search: top-1 went from 1/10 to 4/10
For code I used the open-source inference engine [TensorFold](https://github.com/ashhart/TensorFold) 0.6.6: 424 `.py` and `.cu` files, and 10 questions written in Chinese, like "how does the recurrent state round at each step."
The correct file ranked first for 1 of 10 questions with v1 and 4 of 10 with v2. Recall@3 was also 0.10 vs 0.40. That's the same direction as the official MTEB code score.
v2's three extra wins were questions about recurrent state rounding (`cuda/kernels/gdn.cu`), the DFlash2 CPU best-first search (`drafters/dflash_tree.py`), and walking the draft tree to find the accepted path (`kernels/qwen/dense/v1/lane_tree.py`). Both models failed badly on "prune orphan nodes": the question uses a metaphor, and the word "orphan" never appears in the code. v1 ranked the right file 91st, v2 ranked it 308th. Ten questions is a small sample, so read this as direction only.
## Cost: indexing 1.7x slower, peak memory from 1.03 GiB to 2.75 GiB
The memory row is the one to watch if you run this on a laptop next to other things.
| M1 Max, float32 | v1 | v2 |
|---|---|---|
| Index 813 notes | 81.8 s | 138.8 s |
| Median query latency (70 queries) | 50.3 ms | 48.3 ms |
| Peak RSS | 1.03 GiB | 2.75 GiB |
| Load time | 7.7 s | 7.6 s |
v2 here had its text and image parts loaded, not audio. RSS doesn't fully count what MPS allocates on the GPU side, so real usage is only higher. Query latency was essentially unchanged.
## Image search mostly worked; music search missed
v2 puts images and audio in the same space as text, so I tried both. These ran on v2 only.
**Images.** I took 300 random anime-style scene images from my explainer-video keyframes (2,553 total) and indexed them in 105.1 s. All three real queries returned a reasonable first result, though one was only a rough match. The control query, "a dog at the beach," had no matching image in the library, and its top-1 got the lowest score of the four.

Searching screenshots worked less well. On 200 images from this blog's `public/` folder, 2 of 3 queries were right, but all scores sat between 0.66 and 0.70 and the gap between first and second place was under 0.01.
**Audio.** 40 clips, first 20 seconds each: 22 narration, 12 music, 6 sound effects. "A person talking" returned narration for all top 3. "Upbeat music" returned two speech clips and then a mix with narration over it; the pure-music intro didn't make the top 3. My library has only one genuinely distinct music track, so the test set is weak, but the result is a miss.
Encoding images and audio uses the same `model.encode`, with dicts instead of strings:
```python
model.encode([{"image": PIL.Image.open(path).convert("RGB")}])
model.encode([{"audio": path}]) # needs librosa; don't pass audio_config=None
```
## Did I switch? Not yet: llama.cpp can't load v2
qmd runs GGUF models through llama.cpp. I pointed Homebrew's llama.cpp v9750 at the v2 GGUF (`ggml-org/embeddinggemma-2-GGUF`, Q8_0) and got this:
```
unknown model architecture: 'gemma-embedding2'
```
Even once it loads, switching means re-indexing everything: v1 and v2 vectors don't live in the same space, so you can't mix them. The plan is to build a second index next to qmd's current one when llama.cpp adds support, run both side by side for a few days, then decide. The whole test ran outside qmd; it never touched qmd's config or production index.
## Deep dive: per-question results, screenshot search, and the problems I hit
You can skip this section; the results above stand on their own. This is the full detail for anyone reproducing the test, or for an AI reading this page on someone's behalf.
### Environment
- Apple M1 Max, 32 GB, macOS 27.0.1
- sentence-transformers 6.1.0, transformers 5.19.0, torch 2.14.1
- float32, device `mps`, both generations
- v1: `google/embeddinggemma-300m`; v2: `google/embeddinggemma-2`
### How test A was built
- Source: my LOG files, one line per finished task, each ending in `→ [[note-name]]`.
- 1,547 lines were eligible. I sampled 60 with `seed=7`.
- Corpus: 813 notes. Excluded: the LOG files themselves, `MEMORY.md`, and `KB_MAP.md`.
- Documents: first 1,500 characters, formatted `title: | text: `.
- Query prefix: `task: search result | query: `. v1's sentence-transformers prompt list doesn't include a prompt named `SearchQuery`, so I spliced the prefix in by hand for both generations, so the string is byte-identical.
### The two queries v2 fixed
Both are cases where one event produced two notes.
1. A query about reassigning a job to another coding agent after the first one stalled twice. The correct note was `feedback_dispatch_fallback_chain_2026-09-21.md`. v1 ranked `discovery_agy_print_mode_kills_background_jobs_2026-09-21.md` first, the note about why the first agent died.
2. A query about promoting cc-dash-kit with social posts only, with drafts in blog-staging. The correct note was `reference_buffer_social_post_method.md`. v1 ranked `project_goal_only_harness_rollout_2026-09-23.md` first.
### Test B per question
Rank of the correct file, 1 = first place.
| Question (written in Chinese) | Correct file | v1 | v2 |
|---|---|---|---|
| Sampling RNG from seed + position | `engine/exact_sampling.py` | 1 | 1 |
| Prune orphan nodes | `engine/lane_engine.py` | 91 | 308 |
| Find a repeated span in prior text as a draft | `engine/lane_engine.py` | 12 | 32 |
| Which draft source this round | `engine/lane_family.py` | 144 | 15 |
| Boot-time bitwise check, how many rows | `families/glm5_next/runtime.py` | 228 | 117 |
| 4-bit matmul per row | `cuda/kernels/qmm.py` | 22 | 6 |
| Recurrent state rounding each step | `cuda/kernels/gdn.cu` | 8 | 1 |
| DFlash2 CPU best-first | `drafters/dflash_tree.py` | 20 | 1 |
| GPU minimum version check | `cuda/build.py` | 29 | 7 |
| Walk the draft tree for the accepted path | `kernels/qwen/dense/v1/lane_tree.py` | 4 | 1 |
Two got worse (orphan nodes, repeated span). Three improved a lot without reaching first place (draft source, 4-bit matmul, GPU version check).
### v2 ran out of MPS memory on test B
When I ran test B right after test A in the same process, v2's MPS "other allocations" grew to 35–38 GB and it went out of memory at batch size 16, then 4, then 2. v1 was fine in the same setup.
What fixed it:
- Run each test in its own process.
- Call `torch.mps.empty_cache()` periodically.
- Set `max_seq_length=2048`. That matches v1's native 2,048-token limit, so both models read the same length of each file.
Because of that extra load, v2's test B index time (167.5 s vs v1's 102.5 s) isn't a fair comparison. Use the test A numbers for cost.
### A literal `<|image|>` string in the code breaks v2
TensorFold's `vision/glm_processing.py` contains the literal string `<|image|>`. v2's multimodal processor treats that as an image placeholder, finds no image attached, and errors out. I changed it to `<| image |>` in both generations' corpus, in that one file only. Metrics were unchanged on a rerun.
If you index code or chat templates with v2, grep the corpus for special tokens first.
### Screenshot search (test C, v2 only)
200 random images from this blog's `public/` folder (`seed=7`). Indexing took 80.4 s, peak RSS 3.59 GiB.
| Query | Top-1 | Score | Right? |
|---|---|---|---|
| Screenshot with a bar chart | A phone chat screenshot | 0.6974 | No |
| Terminal screen | A terminal dashboard screenshot | 0.6812 | Yes |
| Mobile web page | A mobile layout screenshot | 0.6877 | Yes |
All scores fell between 0.66 and 0.70, and top-1 beat top-2 by less than 0.01 every time.
### Scene images and audio, in detail
Scene images: 300 sampled from 2,553 keyframes with `random.seed(11)`, indexed in 105.1 s.
- "A person working at a computer": a laptop screen close-up with a person's hand, 0.6623. Roughly right; "robot typing at a desk," a better fit, ranked 2nd.
- "Street at night": a night alley with a robot, 0.6974. Right.
- "Bed for sleeping": a night bedroom bedside, 0.6542. Right.
- "A dog at the beach" (control; no dog or beach in the library): a black-and-white diff image, 0.6264, the lowest top-1 of the four.
Some images exist in two folders, so the same image shows up twice in a row in the results.
Audio: 40 clips, first 20 seconds each, 16 kHz mono WAV (22 narration, 12 music, 6 sound effects). Indexing took 7.5 s.
- "A person talking": top 3 all narration, scores 0.754, 0.751, 0.750.
- "Upbeat music": two narration clips (0.6991, 0.6952), then a music mix with narration (0.6936). The pure-music intro jingle wasn't in the top 3.
The only genuinely distinct music track in my library is that intro jingle; the rest are copies of it or mixes with narration. Audio needs `librosa` installed, and you must not pass `audio_config=None` since that skips the audio encoder.
### llama.cpp support
qmd uses GGUF through llama.cpp, so production depends on llama.cpp support, not sentence-transformers. The v2 GGUF from `ggml-org/embeddinggemma-2-GGUF` comes as two files: the Q8_0 text model (310 MB) and a Q8_0 mmproj for images (555 MB). Homebrew llama.cpp v9750 rejects it at load with `unknown model architecture: 'gemma-embedding2'`.
When support lands, I'll build a v2 index alongside qmd's current v1 index (v1 and v2 vectors aren't compatible, so it has to be a full re-index), compare the two side by side for a few days, and then decide whether to switch.
The short is also on YouTube: [EmbeddingGemma 2 in one minute](https://youtube.com/shorts/N3uu9U5naa4).
Previous in this series: [From Markdown Search to a Knowledge Graph: How My AI's Memory Grew a Second Layer](/en/blog/from-markdown-search-to-knowledge-graph).
---
# Qwen3.8-Flash-Next 177B on One RTX 2080 Ti: Strata Runs Code at 70 tok/s
URL: https://ai-muninn.com/en/blog/strata-flashnext-one-2080ti
Date: 2026-10-06
Series: 改裝 2080 Ti 22G (Part 23)
import YouTubeEmbed from "@/components/YouTubeEmbed";
One modded RTX 2080 Ti 22GB plus 128 GB of RAM runs the 177B Qwen3.8-Flash-Next (IQ3_S) under Strata at **70.3 tok/s on code**, 52.9 on Chinese, 51.5 on English. Two cards do 91.4 on code; one card is 23% slower. On the GPU, Strata uses 21.6 GB of the card's 22 GB of VRAM for attention, the router, shared experts, the KV cache, and the most-used experts. System RAM holds a copy of every expert, and the CPU runs the experts that aren't on the GPU directly from system RAM; available RAM drops by 37–48 GB once Strata is up. It runs next to my 27B with a 1.3% slowdown and swaps with ComfyUI in about 5 minutes. Caveat: Strata defaults to xhigh thinking effort; send low.
> **Update, Oct 14 2026:** after upgrading Strata to `61b3fb5d`, the same card runs code at 85.6 tok/s instead of 70.3, and Shio's production setup runs at 89.2. See "Update: Strata 61b3fb5d hits 89.2 tok/s on code" below. The walkthrough still documents the original `6f32ec07` build.
## Why I tried this: the 27B is maxed out, and the 177B used to need the whole machine
My ai-lab box is an EPYC with 128 GB of RAM and three modded RTX 2080 Ti 22GB. Cards 0 and 1 run Qwen3.8-27B under FastLLM ([part 22](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant)). Card 2 belongs to ComfyUI for image and video work, which comes in bursts and sits idle for days at a time.
The 27B is about as fast as I can make it, but it's still a 27B. I wanted the 177B Qwen3.8-Flash-Next. [Part 17](/en/blog/qwen4exp-177b-three-2080ti) ran the same 177B with llama.cpp across all three cards: 23.14 tok/s at 128K context (26.16 at 32K). That took the whole machine. The 27B and ComfyUI had to stop.
This part puts the 177B on the idle third card alone, using [Strata](https://github.com/Niko1221/Strata), and leaves the 27B running.
## One card runs code at 70.3 tok/s, 23% slower than two
Same prompts on one card (GPU2) and on two (GPU0+1). Method: streaming, thinking off, 650 max tokens, 3 runs each, median; decode speed comes from Strata's `/metrics`.
| | one card | two cards | change |
|---|---:|---:|---:|
| code / Chinese / English tok/s | **70.3** / 52.9 / 51.5 | 91.4 / 60.0 / 60.0 | −23% / −12% / −14% |
| 16K prompt: time to first token | 12.2 s | 10.6 s | |
| 16K prompt: prefill | 1,325 tok/s | 1,525 tok/s | |
| 16K prompt: decode | 49.8 tok/s | 66.1 tok/s | |
VRAM in use on the single card: 21.6 GB.
Code generation takes the biggest hit without the second card. My guess is that code hits a concentrated set of experts, so the second card's extra cache catches more of them. I didn't measure expert usage to confirm that.
Part 17's 77.56 tok/s doesn't belong in this comparison. That was n-gram speculative decoding on a file-edit task where the output is mostly copied from the input.
## Update: Strata 61b3fb5d hits 89.2 tok/s on code
Five days after this post went up, I built upstream commit `61b3fb5d` in a separate directory and ran it against the old build on the same card (GPU2), same config (32K context, `STRATA_BF16_TC=1`), same prompts:
| GPU2, one card | old `6f32ec07` | new `61b3fb5d` | change |
|---|---:|---:|---:|
| Code (tok/s) | 70.3 | **85.6** | +22% |
| Chinese (tok/s) | 52.9 | 57.0 | +8% |
Each number is the median of three runs. Shio switched to the new build. Its production config differs from the table above:
- It has always run 131K context with `--kv-resident 32768`; that didn't change.
- After the upgrade, I switched the n-gram table from `--ple-io ram` back to the default `direct`, which reads from SSD. An A/B on the two-card setup showed differences of about 1.3% at most. Available RAM didn't visibly go up in that run, possibly because the table was still in the page cache; I didn't dig further.
Re-measured on Shio afterwards: code runs at 82.9, 89.2 and 89.7, median **89.2**; Chinese 57.8. That config differs from the table above (context size, where the n-gram table lives), so I'm not attributing the jump from 85.6 to 89.2 to any single change.
The new two-card numbers, and what happens when several people use it at once, are in the next post: [Qwen3.8-Flash-Next on two 2080 Tis](/en/blog/strata-flashnext-dual-2080ti).
## How Strata fits 177B on one card: the GPU holds what every token uses, RAM holds the experts
Flash-Next is a mixture-of-experts model: 48 layers, 512 experts each. Each token runs through 10 routed experts plus 1 shared expert per layer, so most of the weights sit unused on any given token. Strata splits the model along that line.
To watch the weights move from disk into RAM and then into VRAM step by step, open the [interactive version](https://model.ai-muninn.com/en/launchers/strata/). It shows VRAM, RAM and the SSD as separate regions, uses moving dots to show data flow, and labels each connection with its bandwidth.
- **On the GPU:** the attention and DeltaNet mixers, the router, the shared experts, the output head, the MTP draft layer and the KV cache (with 128K context, only the most-read 32K stays here). Whatever VRAM is left becomes a cache of the most-used experts. The cache adapts as you chat.
- **In RAM:** all 24,576 routed experts (48 × 512), pinned. When a token needs an expert that isn't cached, the CPU computes it in place, in parallel with the GPU, instead of copying it over.
- **The n-gram table:** 28.8 GB. By default Strata reads it directly from SSD (`--ple-io direct`). I set `--ple-io ram`; I measured no speed difference.
- **MTP:** the model ships with its own multi-token prediction layer. It drafts a few tokens ahead and the main model checks them in one pass, so the output is identical to running without it.
## What you need: a 22 GB card, 64 GB of RAM at minimum, about 90 GB of disk
- **GPU:** I used a modded 2080 Ti 22GB, and Strata used 21.6 GB of it. Strata compiled cleanly for sm_75 (Turing).
- **RAM:** Strata's setup lists IQ3_S at 62 GB and says it "needs a 64 GB PC with little else running". On my box, available memory dropped by 47.6, 37.0 and 39.5 GiB across three loads, with the n-gram table in RAM. That's the whole machine's available memory, not Strata's own footprint.
- **Disk:** the two GGUF shards are 54.8 GB + 28.8 GB = 83.6 GB. Add the MTP weights setup fetches (6.5 GiB) and the pack (1.5 GiB), and `du` puts the whole directory at about 86 GiB. Leave 90 GB.
- **Toolchain:** Python 3.10+, g++ and nvcc. No sudo needed if those are already there. I built against CUDA 12.4.
The model is [ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF](https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF), quant IQ3_S.
## Install: one setup.py run builds the CUDA kernels and fetches the weights
Clone the repo and pin the commit I used:
```bash
git clone https://github.com/Niko1221/Strata
cd Strata
git checkout 6f32ec07
```
Then create a venv in the repo and run setup. I kept every cache on the NVMe drive:
```bash
python3 -m venv .venv
export XDG_CONFIG_HOME=/mnt/nvme1t/strata/config
export PIP_CACHE_DIR=/mnt/nvme1t/strata/pip-cache
export TMPDIR=/mnt/nvme1t/strata/tmp
export HF_HOME=/mnt/nvme1t/strata/data/hf
.venv/bin/python setup.py --family qwen --model IQ3_S --gpu 0 --cuda 12 --build \
--context 32768 --kv int8 --vision no \
--data-dir /mnt/nvme1t/strata/data \
--port 8096 --host 127.0.0.1 --no-browser --no-start \
--low-ram off --yes
```
A few notes:
- `--build --cuda 12` compiles from source. `cuobjdump` on the result shows 58 sm_75 ELF sections, so the 2080 Ti gets native kernels.
- `--low-ram off` was needed because the 27B and ComfyUI were running during install, so setup saw too little free RAM.
- Setup fetches the MTP weights from Qwen's official repo and checks each tensor's SHA-256.
- I pre-downloaded the two shards with `curl -C -` (resumable) and checked their SHA-256 against Hugging Face.
- It's done when setup prints `All set.`
## Config, launch, first request: an OpenAI-compatible server on port 8096
My config file, `strata-iq3_s-gpu2.json`, sets these flags:
| flag | value | what it does |
|---|---|---|
| `--expert-cache` / `--prefill` | `auto` | expert cache size and prefill mode chosen by Strata |
| `--spec` / `--spec-min-p` | `4` / `0.5` | speculative drafting settings for the MTP layer |
| `--max-context` / `--kv` | `131072` / `int8` | 128K context, int8 KV cache |
| `--kv-resident` | `32768` | keeps the most-read 32K of KV on the GPU; the rest streams from RAM |
| `--ple-io` | `ram` | n-gram table in RAM instead of SSD reads |
It also sets `--mtp` to the MTP weights directory, `"parallel": 1` and the alias `shio`. Keep `parallel` at 1; the deep dive explains why.
To pin Strata to the third card, select it by UUID. Strata still sees it as GPU 0:
```bash
export CUDA_VISIBLE_DEVICES=
export STRATA_BF16_TC=1
.venv/bin/python serve/server.py --engine strata \
--config strata-iq3_s-gpu2.json \
--host 0.0.0.0 --port 8096 --gpu 0
```
Loading takes a few minutes. It's ready when `/v1/models` returns 200. Then:
```bash
curl -s http://localhost:8096/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "shio",
"messages": [{"role": "user", "content": "Write a Python function that merges two sorted lists."}],
"reasoning_effort": "low",
"stream": false
}'
```
Keep `"reasoning_effort": "low"`. Strata turns thinking on at effort xhigh by default, which on a 140-question set took 3.4× as long for a lower score. Details are in the deep dive.
## Running next to the 27B costs Strata 1.3% and the 27B 7.7%
The two models are on different GPUs, so the only shared resources are the CPU and memory bandwidth. I sent the same code prompt to both at once, 3 rounds.
| | alone | both at once | change |
|---|---:|---:|---:|
| Strata (one card) | 70.3 tok/s | 69.4 | −1.3% |
| 27B (two cards) | 243.1 tok/s | 224.4 | −7.7% |
I'm assuming the contention is CPU or memory bandwidth; I didn't isolate it. Also, the overlap is short: the 27B finishes in about 3 s and Strata takes 10–12 s, so they only compete during Strata's first ~3 s.
The 27B never restarted. A health check every 5 s returned 106/106 HTTP 200.
The 243.1 uses this article's method (streaming, thinking off, 650 tokens). Part 22's 151.7 used a different method; don't compare them.
## Sharing the card with ComfyUI: 5 minutes to switch to Shio, 12 seconds back
I call the Strata service on the third GPU Shio, after 汐 (tide). GPU2 runs Shio normally and switches to ComfyUI when I do video work.
I set `Conflicts=` between the two systemd user services, so starting one stops the other. A small script drives them:
```bash
~/bin/gpu2-mode shio # switch to Strata
~/bin/gpu2-mode comfy # switch to ComfyUI
~/bin/gpu2-mode status
```
The script has three guards:
- It refuses to switch to Shio while ComfyUI's queue has jobs.
- It waits for Shio to go idle before switching to ComfyUI.
- If the target side isn't ready within 10 minutes, it rolls back to the previous side.
Measured over 3 rounds:
| direction | ready | first result |
|---|---:|---:|
| ComfyUI → Shio | 281–334 s | first request 2.6–3.4 s after ready |
| Shio → ComfyUI | 12.4 s | first 512px image 30.5–31 s (cold model load); second 18.3–18.4 s |
From the command to the first ComfyUI image is about 43 s. Rounds 2 and 3 were faster than round 1, possibly from the OS page cache; I didn't isolate that. ComfyUI is still the boot default; Shio isn't enabled at boot.
---
## Deep dive: parallel, thinking effort, 16K numbers, dead ends and versions
You can skip this section; everything you need to run the setup is above. This is the data behind the settings.
### `parallel: 2` slows even a single request
Strata's batch path doesn't use MTP drafting, but its docs say a request running alone still takes the MTP path. I measured a slowdown anyway, even with one request, and haven't tracked down why. Setting `parallel` back to 1 fixes it.
| setting | requests | per request | total |
|---|---:|---:|---:|
| `parallel: 2` | 1 | 60.32 tok/s | 54.49 (over full batch wall time) |
| `parallel: 2` | 2 | 30.39 / 32.26 | 60.23 |
| `parallel: 1` | 1 | 67.2, 70.1 | |
Two concurrent requests together get less throughput than one request with `parallel: 1`. The ComfyUI switching test happened to run with `parallel: 2` and saw 44.4, 60.3 and 44.8 tok/s. Back on `parallel: 1`, two checks gave 67.2 and 70.1.
### Thinking defaults to xhigh; low scored higher in under a third of the time
Strata enables thinking at effort xhigh by default. I don't have a capability run on Shio itself, but I have the same 140-question set on the same model, Qwen3.8-Flash-Next, on a different machine and engine (GX10, vLLM, NVFP4):
| effort | score | time |
|---|---:|---:|
| low | 126 | 1,736 s |
| xhigh | 117 | 5,902 s |
Only the relative gap carries over.
Two ways to fix it:
1. Send `"reasoning_effort": "low"` on every request.
2. What I did: 3 lines in `serve/server.py`'s OpenAI entry point. If a request carries no effort at all, fill in `low`.
Strata's `/settings` page has a shared default, but it only applies when the request has no thinking parameters at all. Clients that send only an "enable thinking" flag skip it. My client, Pi, does exactly that, so the server patch was the only thing that worked for it.
### The 16K numbers were measured at 32K max context, one shot each
The 16K-prompt rows (TTFT, prefill, decode) ran with `--max-context 32768`, one shot per setting. Production uses 128K with `--kv-resident 32768`. I re-measured code on the production config: 70.1 tok/s, in line with the 70.3 from the main table.
### Dual-card speed tricks that didn't help
I tried several things on the two-card setup; [the two-card post](/en/blog/strata-flashnext-dual-2080ti) covers them in detail.
- `--ple-io ram` vs `direct`: no difference. Shio started on `ram` and went back to `direct` with the upgrade (see the update above).
- `--peer-device` (use NVLink between the cards): about 10% slower.
- Turning GPU1 from a layer-split stage into an expert helper (`--expert-cache-device1 auto`): code went from 91.4 to 48 tok/s (−47%).
The one flag that did help was `STRATA_BF16_TC=1`. On two cards it cut 16K TTFT from 12.6 s to 10.6 s. Single-card Shio uses that and nothing else from this list.
### Versions
- Strata engine 0.1.39, commit `6f32ec07`, built with `--build --cuda 12`
- CUDA 12.4, sm_75; `cuobjdump` shows 58 sm_75 ELF sections
- Model: ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF, IQ3_S, two shards (54.8 GB + 28.8 GB)
- MTP weights from Qwen's official repo, per-tensor SHA-256 checked
- Draft vocab: Strata's built-in CJK subset, 106,299 ids
- Env: `STRATA_BF16_TC=1`
### What I didn't measure
- The 140-question set on Shio itself.
---
**Also in this series:**
- [#22 NVFP4 Without FP4 Hardware: Qwen3.8-27B on Two RTX 2080 Tis at 151.7 tok/s](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant)
- [#21 Dual RTX 2080 Ti FastLLM: 16% Faster Decoding and No More Head-of-Line Blocking](/en/blog/fastllm-dual-2080ti-concurrency-scheduler)
- [#17 A 177B MoE on Three Modded 2080 Tis: 23 tok/s at 128K, 77 on a File Edit](/en/blog/qwen4exp-177b-three-2080ti)
---
# [Claude Code] Build a Resource Dashboard Inside Claude Code With Six Prompts
URL: https://ai-muninn.com/en/blog/claude-code-mods-resource-dashboard
Date: 2026-10-04
Series: AI Workflow (Part 23)
import YouTubeEmbed from "@/components/YouTubeEmbed";
Claude Code mods (v2.1.287+) let you customize the terminal or desktop app you already work in, so you can see what's going on at a glance. I used them to build a pane that shows which machines have capacity and which subscriptions still have quota. Is it hard? No. Ask Claude Code for a simple version built around whatever you check most often, then nitpick it like a demanding boss until you're happy. With the prompts in this post, the first pane took 2 min 51 s. Caveat: mods run with Claude Code's permissions and no sandbox.
> **Update (2026-10-06):** I packaged this approach as an open-source repo, [cc-dash-kit](https://github.com/coolthor/cc-dash-kit). If you'd rather not paste six prompts, paste this into Claude Code and it installs the dashboard: `Install this Claude Code dashboard for me: https://github.com/coolthor/cc-dash-kit`. Then ask Claude to customize it for your setup.
## Claude kept dispatching work to machines that couldn't take it
A sign at the parking garage entrance says level 1 is full and level 2 has 3 spots. You skip level 1 and head straight down.
My setup had no sign like that. I run models on a few machines and pay for a few AI subscriptions. When I asked Claude to dispatch a job, it would sometimes write up the whole task, send it, and only then find out the quota was used up, the machine was busy, or the machine was down. Then it had to dispatch all over again. That's the software version of circling every level.
Claude Code mods, supported since v2.1.287 ([announcement](https://claude.com/blog/claude-code-mods)), fix this. A mod can show the numbers in a pane for me, and Claude can fetch the same numbers with a tool call. I started by asking Claude Code which things I kept checking over and over, and let it suggest what to build. I split the result into six prompts here so each step is easy to follow. Paste them in order, nitpick the looks a bit, and you end up with a pane like this:

I'm not going to ask you to copy my code. It's wired to my machines and would be useless on yours. The prompts in this post get Claude to build the same kind of pane for your own machine. I ran each one in a fresh session (`claude -p`) to make sure every prompt stands on its own; you can just as well paste all six into one session.
## What a mod is, and why it has no sandbox
Think of a mod as an add-on for Claude Code: once it's loaded, your own panes and buttons show up right in the session. Claude writes all the code, so you don't need to know TypeScript. A mod can:
- open a pane with text, progress bars, and buttons
- give Claude a new tool it can call to look things up, the same way it runs commands
- look at each action Claude is about to take, and block it if needed
- add slash commands, such as `/my-dash`
Per the official docs, mods can also rewrite the prompts you send, intercept or retry tool calls, switch models per request, and change how Claude Code renders its own messages.
One caveat: a mod runs with the same permissions as Claude Code. There is no sandbox. It can read your environment variables and the entire conversation. It can also approve tools for you, burn through your subscription quota or run up charges on your API account, and start processes outside the Bash sandbox. Before installing someone else's mod, run `claude plugin validate` to see which events it hooks, which capabilities it calls, and which env vars it reads or writes. Then read the code: the official docs recommend installing mods only from authors and marketplaces you trust. The [docs](https://code.claude.com/docs/en/plugins/mods/overview) cover the full API.
## Before you start: version 2.1.287 or later and an empty folder
Check your version:
```bash
claude --version
```
Mine printed 2.1.289. Any version from 2.1.287 on works. If yours is older:
```bash
claude update
```
Then make an empty folder and start Claude Code in it:
```bash
mkdir ~/my-dash-work && cd ~/my-dash-work
claude
```
One note on the prompts: I wrote them in Chinese first. The English versions below are the ones I ran for this post. They're more detailed than they need to be, so that each step reproduces what I got. When you build your own, you don't have to copy them word for word. Say what you want and let Claude fill in the details; over-specifying tends to cause more mistakes, not fewer.
## Prompt 1: a GPU and disk pane in 2 min 51 s
```text
Build a Claude Code mod that opens a pane showing two things:
1. GPU memory usage. If the machine has an NVIDIA GPU, read it with nvidia-smi. Otherwise show "No NVIDIA GPU".
2. Free space on the disk that holds my home directory.
Draw a usage bar for each. Refresh every 10 seconds. Put the mod in ./my-dash/.
Run `claude plugin validate` and keep fixing until it passes.
When you're done, tell me how to load it.
```
Claude took 2 min 51 s and produced this:
```text
my-dash/
├── .claude-plugin/
│ └── plugin.json
├── hooks/
│ ├── hooks.json
│ └── register.tsx # the pane, the /my-dash command, 10 s refresh
├── types/
│ └── index.d.ts
└── tests/
└── dash.test.tsx
```
I didn't ask for tests. Claude wrote them anyway and tested them in both the terminal and the Desktop app. Claude Code's built-in mod-authoring instructions tell it to. When you change the mod later, run `claude plugin test`. It runs the mod's test files, which can fire real hooks and mount the pane on both surfaces; `validate` only checks statically. Neither verifies the visual layout, so open a live session for that.
Load the mod:
```bash
claude --plugin-dir ~/my-dash-work/my-dash
```
My MacBook has no NVIDIA GPU, so the pane showed "No NVIDIA GPU", plus about 235 GiB free of 926 GiB on the disk. If the pane doesn't open on its own, type `/my-dash`. Claude's summary says the pane auto-opens at launch only when the terminal is at least 144 columns wide.
## Prompt 2: a Claude quota card in 134 s
```text
Add a "Claude quota" card to the my-dash mod. Show 5-hour and weekly usage as percentages, plus the time until each resets. The mod can read the session's usage info.
Make every card title collapse or expand its card when clicked.
Run `claude plugin validate` until it passes.
```
The quota numbers come from the same usage data the status line uses. They show up only after you send your first message on a subscription account. Until then the card says "No quota reading yet", and on an API-key account it stays that way.
## Prompt 3: a local model card in 154 s
This one just asks Claude to connect to your local model server and refresh every 10 seconds.
```text
Add a "Local models" card to the my-dash mod. Every 10 seconds, poll http://localhost:8080/v1/models (an OpenAI-compatible API) and list the models it returns. If the server can't be reached, show "not running".
Put the URL in a constant at the top of the file.
Run `claude plugin validate` until it passes.
```
llama.cpp, vLLM, LM Studio, and Ollama all expose an OpenAI-compatible `/v1/models` endpoint, each on a different default port. Change the constant to match yours.
Claude only tested the card against a fake server. I had a model server on another machine forwarded to localhost:8080, and the mod picked up `qwen38-27b-ud` from it once loaded. It also handled cases I hadn't spelled out: a server that doesn't answer within 5 s counts as "not running", an error status shows up in red (for example "HTTP 500") so a broken server doesn't look like a stopped one, and an empty model list says "No models loaded".
## Prompt 4: a tool Claude can call in 131 s
The pane looks great now, and you can see every resource at a glance. Claude Code still can't. So the next prompt has Claude build a small tool it can call to see what's free before dispatching.
```text
Register a tool in the my-dash mod that Claude can call, named my_resources. It should return a very short summary of what's usable right now:
- Is the Claude quota OK?
- How much GPU and disk is left?
- Is the local model server up?
Run `claude plugin validate` until it passes.
Then tell me the tool's full name and how to make Claude check it before dispatching work.
```
Claude reports the tool's full name when it's done: `mcp__my-dash__my_resources`. That's the internal name Claude Code uses for the tool, always in the form `mcp____`, and it's the name you use when writing instructions for Claude. Here is a real call from a fresh session:
```text
Claude quota: OK (5-hour 52%, Weekly 7%)
GPU: none (no NVIDIA GPU on this machine)
Disk: 232.0 GiB free of 926.4 GiB
Local model server: UP (qwen38-27b-ud)
```
To make Claude use it, put one line in your project's `CLAUDE.md`, the instructions file Claude Code reads at the start of every session:
```text
Before dispatching work, call mcp__my-dash__my_resources; don't dispatch to anything it reports as unavailable.
```

The tool only has to answer one question: can I dispatch here? No quota, don't dispatch. Machine busy, don't dispatch. Anything more detailed just burns tokens. My own tool started out stuffing every detail into Claude's context; I later cut it down to three short yes/no sections: quotas, local models, and the ComfyUI image server I also run.
## Prompt 5: a Pause dispatch button in 139 s
Why buttons at all? Mine do two jobs:
1. **Subscriptions**: show which model Claude dispatches to by default, and let me switch it by hand.
2. **Local services** (model servers, ComfyUI): when I'm using a machine to test a new model or tune settings, I need a flag that tells Claude to leave it alone.
This prompt builds the second one, plus a Refresh button:
```text
On the local-models card of the my-dash mod, add a "Pause dispatch" button. Clicking it creates a `paused` flag file under my-dash/ and shows "Paused" next to the card title; clicking again deletes the flag and goes back to normal. When the flag exists, the my_resources tool must report the local models as "paused, do not dispatch".
At the bottom of the pane, add a "Refresh now" button that re-reads all the data immediately.
Run `claude plugin validate` until it passes.
```
With the flag set, I asked Claude in a fresh session to call the tool, and the local-models line came back as paused, do not dispatch. A button runs an action on your machine, so instead of writing a flag it could just as well open a page or run a script.
## Prompt 6: SVG bars for the Desktop app in 172 s
The same mod renders in the Desktop app's Claude Code tab mostly unchanged. The one thing that breaks is text-based progress bars. In the terminal, every `█` takes exactly one cell. The Desktop app uses a proportional font, so the same row of characters comes out wider and covers the numbers next to it. I wrote this prompt after watching my own pane break that way.
```text
Make the my-dash mod look right in the Claude Desktop app. Desktop uses a proportional font, so text-character bars overflow and cover the numbers.
On Desktop, draw the bars as SVG. Leave the terminal version unchanged.
Run `claude plugin validate` until it passes.
```
Claude hit a snag here and fixed it on its own. It first checked whether the element table included `Svg`. In the test environment the terminal's table has one too, so the terminal tests broke. Claude switched to checking whether the surface is `terminal` instead. The official element table lists `Svg` as Desktop-only.
## Bonus prompt: make it look good in 224 s
After six prompts everything works, but every card is the same gray. This prompt is optional. Paste it if you want the pane from the top of this post:
```text
Make the my-dash pane look polished. Give each card a rounded border and its own title color: blue for quota, green for GPU, yellow for disk, purple for local models.
Color each usage bar by how full it is: green under 70%, yellow from 70 to 90%, red above 90%. Let the bars stretch with the pane width, and right-align the percentages.
Dim the last-updated line at the bottom.
Apply this in both the terminal and the Desktop app.
Run `claude plugin validate` until it passes.
```
The run took 224 s. `claude plugin validate` passed, and so did all 34 tests Claude wrote. In a 150-column terminal the bars stretched to fill each card with the percentages lined up on the right, as in the screenshot at the top of this post. I didn't check the Desktop version this time.
One change it made on its own: since Prompt 2 you collapse a card by clicking its title, but buttons can't have colored text. So Claude split the header: the collapse arrow became its own small button, with the colored title as plain text beside it. You now collapse a card by clicking the arrow.
If something looks off when you open it, describe what you see in plain words and paste that as the next prompt, for example: "The usage bars are too long and the last few cells wrap onto the next line. Keep each bar and its percentage on one line at any window width." When I ran the same test with Chinese prompts, the bars did wrap, and a follow-up like that fixed it in 81 s.
## Keep it loaded: one env var in settings.json
The easiest way is to tell Claude Code "make my-dash load automatically every time I start Claude Code" and let it edit the config for you. If you'd rather see what changes, or do it by hand, this is what goes into `~/.claude/settings.json`:
```json
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "/Users/you/my-dash-work/my-dash"
}
}
```
Separate several mods with colons. The Desktop app can't take `--plugin-dir`, so it relies on this env var too.
After a code change, an open terminal session picks it up as soon as you save. Desktop sessions don't watch the folder: open a new one, or add `"CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"` to the same `env` block.
## Deep dive: what my own dashboard reads, and what broke while building it
You can skip this section; the guide above is complete without it. It covers the bugs I hit along the way.
### Seven things that broke
1. **CJK text misaligned.** I padded columns with `padEnd`, but a CJK character takes two cells. Fix: a fixed-width `Box` per column.
2. **`viewport.columns` is the width of the whole window, not the pane.** Fix: drop the explicit width and let flex fit the content. The pane then follows whatever width you drag it to. If you need the exact width, the docs recommend `e.props.bodyColumns`, the width of the pane's content area.
3. **`claude plugin validate` rejected three things.** Two unfiltered hooks on the same event (merge them into one). Functions that use `$` must be top-level. Atom state must be declared in the types file, or validate reports it as "is not declared".
4. **A shadowed `h` killed the whole pane.** In the machines card, `hosts.map(h => …)` shadowed the JSX `h`. Whenever a machine snapshot was present, the entire pane threw and rendered nothing. The tests passed because they never fed in a snapshot. I only found it in a real terminal.
5. **Character bars overflowed on Desktop.** Fix: choose by `e.surface`, and switch to SVG when the surface is not `terminal`.
6. **Three sessions edited one file.** One session made all card borders gray, a second kept editing on top of that, and the third switched them back to color. There is one `register.tsx` and the last save wins. Edit a mod from one session, and commit.
7. **Claude Code updated itself mid-build.** The mods API is marked early access, so an update can change it under you. Setting `autoUpdates: false` in `~/.claude.json` didn't stop an update from 2.1.288 to 2.1.289. Adding this to `settings.json` did:
```json
{
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}
```
With that set, I update manually with `claude update`.
---
# Dual RTX 2080 Ti FastLLM: 16% Faster Decoding and No More Head-of-Line Blocking
URL: https://ai-muninn.com/en/blog/fastllm-dual-2080ti-concurrency-scheduler
Date: 2026-09-28
Series: 改裝 2080 Ti 22G (Part 21)
Same two modded 2080 Ti 22G, same Qwen3.8-27B FP8 + DFlash2 in FastLLM. Code goes from 100.3 to **116.1 tok/s**, math 118.6 → 135.5, prose 64.8 → 74.2. Two requests now run at once, 175.8 tok/s combined. A short request sent while a 54K-token prompt prefills gets its first token in **1.13 s** instead of 39.5 s (p95). How: latest upstream minus one commit that hurts draft acceptance, an NVFP4 draft, no `--tokens`, and a patch (PR #756) that yields between prefill chunks. Cost: per-request context drops from 262,144 to 222,080, and the patches aren't merged upstream yet, so you build it yourself.
## Same two cards: 16% faster, two requests at once, and no more 39-second waits
You're in a grocery store with one open checkout lane, holding a carton of milk, and the person ahead of you has a cart piled to the top. The cashier could ring you up in ten seconds between their items. They don't. You wait for the whole cart.
That was my model server. [Part 20](/en/blog/fastllm-dflash2-dual-2080ti) got Qwen3.8-27B FP8 running on two modded RTX 2080 Ti 22G with FastLLM and the DFlash2 draft model, tensor parallel 2, one request at a time. It was fast, but a single 54K-token prompt took about 40 seconds to prefill, and every other request sat behind it.
This part keeps the same cards and the same weights, and changes three things: a newer FastLLM with one commit reverted and a quantized draft (faster), one launch flag removed (two concurrent requests), and a scheduler patch (short requests get served during a long prefill). The first half is the recipe. The deep dive after the divider is the debugging record.
## What changed: code at 116.1 tok/s, 2 requests at once, 1.13 s instead of 39.5 s
Same machine, same benchmark script, measured before and after. The third row is the one that changes how the server feels in daily use.
| | previous build | this build |
|---|---:|---:|
| code / math / prose tok/s | 100.3 / 118.6 / 64.8 | 116.1 / 135.5 / 74.2 |
| concurrent requests | 1 | 2 (175.8 tok/s combined) |
| short request during a 54K-token prefill, first token (p95) | 39.5 s | 1.13 s |
| next request after cancelling a long one, first token (max) | 9.8 s | 0.54 s |
| per-request context limit | 262,144 | 222,080 |
On my 140-question capability set, the score went from 128 to 132 without thinking and from 125 to 127 with thinking at effort low. That comes with the caveats in the capability section below.
Method: real chat requests, temperature 0, 512 tokens per request, three prompts (code, math, prose), three runs each, median, timed on the client. The code prompt here asks for heavy comments and explanation, so its throughput comes out lower than on a pure-code prompt. With Part 20's three prompts, this build does 175.3 on code, 154.1 on math and 64.7 on prose. The latency rows come from a 33-minute stress test: 8 cycles, 112 requests, fixed seed.
## Change 1: newest FastLLM, one commit reverted, NVFP4 draft: code 100.3 → 116.6
The previous build was FastLLM at `14f849af` (2026-09-21). Upstream `a2bf07fd` (2026-09-25) is 87 commits newer. Dropped in as-is, it made math and prose faster and code about 15% slower.
Bisecting those 87 commits pointed at one: `d4b04876`, "修复小批量 RMSNorm 归约舍入差异" (fix rounding differences in the small-batch RMSNorm reduction). It changes the RMSNorm kernel for width 5120 and batch sizes 1 to 8. Both the main model and the DFlash2 draft have a hidden size of 5120. With that commit in, the draft's acceptance rate at position 3 drops from 60.9% to 43.5%. Fewer accepted guesses per step means fewer tokens per pass over the weights.
Reverting it restores code speed. The second step is quantizing the draft to NVFP4 with `FASTLLM_DRAFT_QUANT=nvfp4`, which upstream `7e0d6705` turned on by default. The draft is 5 layers and 3.6 GB, and it runs on every step, so smaller draft weights make the guessing phase shorter. The main model's weights aren't touched, and the main model still verifies every token, so answers don't change.
| build | code | math | prose |
|---|---:|---:|---:|
| previous (`14f849af`) | 100.3 | 118.6 | 64.8 |
| upstream `a2bf07fd`, draft unquantized | 84.8 | 126.9 | 68.1 |
| + revert `d4b04876` | 102.6 | 122.1 | 70.9 |
| + draft in NVFP4 | 116.6 | 135.8 | 74.7 |
`d4b04876` is upstream's consistency fix, and I don't think it computes anything wrong. I compared both kernels against an FP32 reference and they have the same error. I revert it only because, on this hardware with DFlash2, it lowers acceptance. On another GPU it may make no difference.
## Change 2: dropping --tokens makes --max_batch 2 real: 186 tok/s combined
Setting `--max_batch 2` alone still serves one request at a time. The only sign is one log line:
```
explicit-token safety max_batch limited 2 -> 1
```
Qwen3.8 is a hybrid model. Most of its layers use GDN, a linear-attention variant, and each request carries a sizable recurrent state on top of its KV cache. When you pass `--tokens` explicitly, FastLLM caps the budget for that state at 25% of the KV space. On these cards that fits one request, so FastLLM silently drops concurrency to 1. The 25% is hard-coded; there's no flag for it.
Remove `--tokens` and FastLLM sizes the KV pages itself. Concurrency works. Compare the "two at once" column:
| flags | actual concurrency | single request (code) | two at once | context per request |
|---|---:|---:|---:|---:|
| `--max_batch 2 --tokens 262144` | 1 (clamped) | 116.9 | ~117 (taking turns) | 262,144 |
| `--max_batch 2`, no `--tokens` | 2 | 116.7 | 186 combined | 222,080 |
Single-stream speed doesn't change, and combined throughput goes up about 60%. The cost is context: two requests share one KV pool, so each one gets 222,080 tokens instead of 262,144.
## Change 3: yielding between prefill chunks: a short request waits 1.18 s instead of 37.4 s
Two concurrent slots don't help if one of them is prefilling a long prompt. A 54K-token prompt takes about 40 s to prefill, and a short request sent during that time waited about 39 s.
With Qwen3.8 plus DFlash, FastLLM uses a dedicated scheduler loop. Once it picks the long request, it runs every prefill chunk in one inner loop and never looks at the queue. `--chunked_prefill_size` only sets how big each chunk is. I tried three chunk sizes and three related environment variables, and the short request always waited 37 to 41 s.
The fix: after each chunk, release the model's forward lock for a moment so a helper scheduler thread can serve queued short requests, then continue the prefill. It's behind a switch, `FASTLLM_COOPERATIVE_LONG_PREFILL=1`. With the variable unset, behavior is identical to upstream.
I fixed cancellation along the way. Upstream, cancelling a long request only marks it aborted. The prefill loop never checks the flag, so the GPU finishes the whole prompt and the next request waits 9.8 s. The loop now checks between chunks, and the next request is served in 0.5 s. Chunks that were already prefilled stay in the prefix cache, so resending the same prompt hits them.
All numbers below were measured while a 54K-token prompt was prefilling:
| | before | after |
|---|---:|---:|
| one short request inserted: first token / done (single run) | 37.4 s / 37.8 s | 1.18 s / 3.8 s |
| two short requests at once: first token | 38.1 / 38.6 s | 1.3 / 2.7 s |
| one short request, stress-test p95 first token | 39.5 s | 1.13 s |
| cancel, then next request's first token (stress max) | 9.8 s | 0.54 s |
| the long request's own prefill (stress p95) | 42.2 s | 42.7 s (+1%) |
A single short request finishes in 3.8 s. Two at once both start within 3 s, but they share the GPU with the prefill and generate slowly, 1 to 2 tokens/s, until the long prompt finishes. A third request waits for one of them, because the limit is 2.
The patches are two upstream PRs: [#755](https://github.com/ztxz16/fastllm/pull/755) aborts prefill on cancel (small, and useful to anyone running FastLLM), and [#756](https://github.com/ztxz16/fastllm/pull/756) is the scheduler change, stacked on #755. Neither is merged yet, so you have to build FastLLM yourself.
## Building it: a2bf07fd, one revert, two PR merges
The environment is the same as Part 20: two modded 2080 Ti 22G, an NCCL build with sm_75 (my self-built 2.31.2), CUDA 12.4 (`nvcc`), GCC 13 and a Python 3.14 venv. The model is [orcarouter/Qwen3.8-27B-Uncensored-FP8](https://huggingface.co/orcarouter/Qwen3.8-27B-Uncensored-FP8) and the draft is [z-lab/Qwen3.8-27B-DFlash2](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2).
Get the source. I checked that these merges apply cleanly on `a2bf07fd` and that the result compiles.
```bash
git clone https://github.com/ztxz16/fastllm && cd fastllm
git checkout -b dual-2080ti a2bf07fd
git revert --no-edit d4b04876 # the commit that lowers DFlash2 acceptance
git fetch origin pull/749/head:pr749 pull/756/head:pr756
git merge --no-edit pr749 # custom AllReduce registration cache grows without bound
git merge --no-edit pr756 # already contains #755
```
[#749](https://github.com/ztxz16/fastllm/pull/749) is a fix I sent upstream in September. DFlash2 on two GPUs allocates a pointer table on every step and never frees it, so long conversations eventually fill GPU0.
Build and install:
```bash
mkdir build-fastllm && cd build-fastllm
cmake .. -DUSE_CUDA=ON -DUSE_NUMAS=OFF -DCUDA_ARCH=75 -DCMAKE_CUDA_ARCHITECTURES=75 \
-DCMAKE_CUDA_COMPILER=/usr/bin/nvcc \
-DCMAKE_CUDA_FLAGS="-D_AMXTILEINTRIN_H_INCLUDED -D_AMXINT8INTRIN_H_INCLUDED -D_AMXBF16INTRIN_H_INCLUDED -D_AMXCOMPLEXINTRIN_H_INCLUDED"
make -j24 fastllm_tools
cd tools && ~/venvs/ftllm-dual/bin/pip install --no-deps --force-reinstall .
```
The `-D_AMX...` flags work around a CUDA 12.4 + GCC 13 problem; without them the AMX headers fail to compile. The result is the same `ftllm` package with the same `ftllm server` command.
## Launching it: --tokens removed, two env vars added, 222,080 tokens per session
```bash
export LD_PRELOAD=/home//nccl-install/lib/libnccl.so.2 # NCCL with sm_75
export CUDA_VISIBLE_DEVICES=0,1
export FASTLLM_CUDA_GRAPH=0 # still required for DFlash2 on sm_75
export FASTLLM_DRAFT_QUANT=nvfp4 # default already; explicit for clarity
export FASTLLM_COOPERATIVE_LONG_PREFILL=1 # the PR #756 switch
~/venvs/ftllm-dual/bin/ftllm server \
-p /mnt/nvme1t/models/qwen38-27b-uncensored-fp8 --model_name qwen38-27b-ud \
--tp 2 --max_batch 2 --chunked_prefill_size 4096 \
--gpu_mem_ratio 0.95 --kv_cache_dtype fp4 \
--speculative_algorithm dflash \
--speculative_draft_model_path /mnt/nvme1t/models/dflash2-qwen38-zlab \
--speculative_num_draft_tokens 8 \
--prefix_cache true \
--chat_template /mnt/nvme1t/models/qwen-fastllm-low/chat_template.jinja \
--host 0.0.0.0 --port 8082
```
Compared with Part 20: `--tokens 262144` is gone, `--max_batch` is 2, `--chunked_prefill_size 4096` is new, and there are two new environment variables. The chat template is the one from Part 20, with reasoning effort defaulting to low.
After it starts, check the log. There should be no `max_batch limited` line, and there should be this one:
```
Model context window: 222080 tokens per session
```
## Four gotchas that silently cost speed or concurrency
1. **`--max_batch 2` with `--tokens` clamps to 1**, with only a log line to tell you. Drop `--tokens`.
2. **Upstream latest drops code from 102 to 85 tok/s on this hardware.** Revert `d4b04876`.
3. **CUDA Graph stays off.** Once the draft is NVFP4, the new version no longer crashes on the first request with the graph on, but it runs 11% slower. Keep `FASTLLM_CUDA_GRAPH=0`.
4. **`--chunked_prefill_size` does not let short requests in.** You need the #756 build and `FASTLLM_COOPERATIVE_LONG_PREFILL=1`.
## Capability: 132 of 140 without thinking, 127 with it
Same 140 questions as Part 20: GSM8K 50, MATH-500 30, MuSR 20, HumanEval+ 40. Focus on the total column.
| | GSM8K | MATH-500 | MuSR | HumanEval+ | total |
|---|---:|---:|---:|---:|---:|
| previous, no thinking | 49 | 29 | 15 | 35 | 128 |
| this build, no thinking | 50 | 30 | 16 | 36 | 132 |
| previous, thinking + effort low | 50 | 30 | 9 | 36 | 125 |
| this build, thinking + effort low | 49 | 30 | 12 | 36 | 127 |
The main model's weights didn't change, so I read this as "no worse"; the gains are within noise. These runs used the build before the scheduler patch went in. After adding it, a 20-question smoke test came back 20/20.
## So, can it go faster?
So far I've only touched code and scheduling. The main model's weights are still FP8, and generating each token still reads 29 GB. The 2080 Ti has no FP4 hardware, so does squeezing the main model down to 4 bits help at all? [Next part](/en/blog/fastllm-dual-2080ti-nvfp4-self-quant).
---
## Deep dive: bisecting 87 commits, why chunking never yields, and two regressions the stress test caught
You can skip this section without losing anything you need to run the setup. It's the full record: the bisect, the source reading behind the scheduler patch, and the stress-test failures that shaped the final version.
### Bisecting the code-speed regression down to d4b04876
At each bisect step I built an unmodified upstream revision, started it on a separate port, and ran the code prompt 3 times for a median. At or above 96 tok/s counted as good, at or below 89 as bad. Each step took about 10 minutes.
The endpoints matched my patched builds (100.3 and 84.8), so the regression had nothing to do with my patches.
| commit | note | code tok/s | verdict |
|---|---|---:|---|
| `14f849af` | previous base | 100.2 | good |
| `809d34b6` | SM75 decode tuning | 101.9 | good |
| `00276210` | DFlash draft buffers, CUDA Graph | 101.9 | good |
| `b2283cc7` | | 102.2 | good |
| `2dd79d9d` | | 102.2 | good |
| `90fc11e4` | removed DFlash experiment switches | 102.2 | good |
| `d4b04876` | RMSNorm reduction | 84.7 | bad |
| `6023b070` | | 84.7 | bad |
| `a2bf07fd` | current upstream | 84.7 | bad |
### Acceptance drops, but the kernel isn't wrong
Draft acceptance for the first three positions, before and after `d4b04876`: 87.2 / 74.4 / 60.9% became 83.9 / 61.2 / 43.5%. Reverting only that commit on `a2bf07fd` gives code 102.3, math 121.4, prose 70.3.
To check whether the new kernel is less accurate, I fed both kernels synthetic 8×5120 FP16 inputs at magnitudes 0.01, 0.5, 1, 10 and 100 and compared them against an FP32 reference. Both have a max absolute error of about 0.00195. At most 2 of 40,960 values differ between them, by at most 0.000488. I can't call that a bug, and I can't yet explain why it moves acceptance this much.
### The logprobs patch has zero effect on speed
My own build also carries [#752](https://github.com/ztxz16/fastllm/pull/752), which adds OpenAI-style logprobs to the API. I measured with and without it: 100.3 / 100.3 on the old base, 84.8 / 84.7 on the new one. When requests don't ask for logprobs, it costs nothing.
### CUDA Graph: the "deadlock" message is a symptom
With `FASTLLM_CUDA_GRAPH=1`, the new version crashed on the first request with `Resource deadlock avoided`. That reads like a lock problem. The real error comes earlier in the log: the first decode during graph replay reports `cudaErrorIllegalAddress (700)`. On the way out, the MTP thread calls `pthread_join` on itself, which is what produces the deadlock message. The thing to look for is the first CUDA error, not the lock.
With the draft in NVFP4, graph mode no longer crashes, but it measured code 105.9, math 120.2, prose 61.1, about 11% slower.
### Draft tokens and the SM75 switches: defaults win
4 and 6 draft tokens were both slower than 8. Anything above 8 is rejected by this draft checkpoint, whose block size is 8.
The README lists three switches relevant to SM75: `FASTLLM_DFLASH_ATTENTION`, `FASTLLM_TP_NATIVE_GREEDY` and the SM75 decode tuning. Turning each one off changed speed by less than 2%, so I kept the defaults.
### Concurrency took three tries
| config | single (code) | two at once | short request during long prefill |
|---|---:|---|---|
| `--max_batch 2 --tokens 262144` | 116.9 | ~58 each, taking turns | waits; log shows the clamp line |
| `--max_batch 2`, no `--tokens` | 116.7 | 93 each, 186 combined | still waits |
| + `--chunked_prefill_size 4096` | 116.2 | 186.6 combined | still waits (38.6 s) |
### Where it blocks in the source
For the Qwen3.5 model family with DFlash, FastLLM uses `Qwen35MTPLoop`. Once it picks the long request, it runs all the chunks inside the inner loop around lines 24327–24489 of `src/models/qwen3_5.cpp`, and releases the forward lock only near line 24715 (line numbers are at `a2bf07fd`). The short requests have already arrived and are registered as pending. The scheduler just never looks at them until the whole prefill is done.
### What I tried before patching: chunk sizes and env vars
Before patching, I tried every knob that looked related. Short-request first token and long-request prefill time:
| setting | short request first token | long prefill |
|---|---:|---:|
| baseline, chunk 4096 | 37.4 s | 40.2 s |
| `FASTLLM_ACTIVE_PREFILL_TOKEN_LIMIT=1024` | 37.7 s | 40.5 s |
| `FASTLLM_IDLE_PREFILL_BATCH_WAIT_US` / `QUIET_US` tweaks | 37.8–39.6 s | 40.7–42.4 s |
| chunk 1024 | 40.7 s | 43.6 s |
| chunk 2048 | 38.0 s | 40.9 s |
| chunk 8192 | 38.2 s | 41.1 s |
The source explains why none of them helped: `ACTIVE_PREFILL_TOKEN_LIMIT` only applies in the generic scheduler loop, and the `IDLE_PREFILL_*` variables are only read in a branch that isn't enabled in this configuration.
### Regression 1: faster short requests broke concurrent throughput
The first prototype got the short request's first token down to 1.26 s. Then a 75-minute A/B stress test (same seed, 18 cycles, 252 requests per arm) showed two concurrent generations dropping from 175.5 tok/s combined to 73.3, with one stream stuck around 41 tok/s in every cycle.
The cause was the test order. In the sequence, "two concurrent generations" runs right after "cancel a long request", and cancel didn't abort the prefill. In the original build, the short request after the cancel waited 9.8 s, by which point the cancelled prefill had finished on its own. The prototype served that request in 0.5 s while the main thread was still prefilling the cancelled request. So when the two concurrent generations started, one of them fought the zombie prefill for the GPU and the other waited.
That's where the cancel fix (#755) came from. Same test, three builds:
| metric | original | prototype | fixed |
|---|---:|---:|---:|
| short-insert first token, p95 | 39.7 s | 1.19 s | 1.18 s |
| next request after cancel, median | 9.8 s | 0.54 s | 0.54 s |
| two concurrent generations, combined | 175.5 | 73.3 | 175.7 |
| long prefill, p95 | 42.4 s | 43.1 s | 42.9 s |
| errors / wrong answers | 0 / 0 | 0 / 0 | 0 / 0 |
### Regression 2: only one short request got in
The fixed version let in only one short request, not two. The helper thread counted the paused long request as one of its own slots (same file, around lines 23570–23579), so `--max_batch 2` left it one slot. Skipping the paused request in that count moved two short requests' first tokens from 1.3 / 36.7 s to 1.3 / 2.7 s. The log now prints `Decode alive = 2` between every prefill chunk. Across three restarts, the second request came in at 2.58–2.66 s.
### Final 18-cycle regression run
Short-insert p95 1.20 s, post-cancel 0.65 s, two concurrent generations 170.5 tok/s combined, long prefill p95 +2.0%, 0 errors.
Peak VRAM was about 200 MiB higher than the fixed version. I ran the same binary with the switch off for 9 cycles, and it climbed at the same slope. So the increase comes from the newer upstream base, not the scheduler.
### Three rounds of code review before submitting
I ran the patch through Codex code review three times before opening the PRs.
Round 1 found a hang. The idle helper waited indefinitely, while the main thread signalled stop without holding the lock. The signal could land between "checked the flag" and "started waiting", and then `join()` waits forever. The same round found three more issues: after cancel deletes a context, the token-fetch functions re-lock but keep using the old pointer; the helper used the wrong long/short threshold (4096 instead of 2048); and nothing cleaned up if thread creation failed.
Round 2 caught problems in those fixes: the change made the main loop's idle wait wake every 10 ms too, and a thread-creation failure made the scheduler exit. Round 3 passed.
Targeted tests after the fixes: the helper stopped cleanly 50 of 50 times; cancelling while another request streams ran 30 rounds, 90 requests, without a problem; and requests of 2,049–4,096 tokens inserted during a long prefill are not taken over by the helper for their own prefill.
### Version pin
- Upstream base `a2bf07fd` (2026-09-25), with `d4b04876` reverted
- Merged: [#749](https://github.com/ztxz16/fastllm/pull/749), [#755](https://github.com/ztxz16/fastllm/pull/755), [#756](https://github.com/ztxz16/fastllm/pull/756)
- My own build also has [#751](https://github.com/ztxz16/fastllm/pull/751) (a multimodal prefix-cache fix) and [#752](https://github.com/ztxz16/fastllm/pull/752) (logprobs). #751 conflicts with `basellm.cpp` on `a2bf07fd` and has to be resolved by hand. It only matters when an image comes at the end of a long conversation.
- CUDA 12.4, GCC 13.4, sm_75, NCCL 2.31.2 self-built
### Limitations and next steps
- #755 and #756 aren't merged and may need rebasing.
- Every number here is from two 2080 Tis, TP=2, with DFlash2. The effect of `d4b04876` and the gain from the NVFP4 draft may be different on other GPUs.
- Two short requests inserted at once still generate slowly (1–2 tok/s) until the long prompt finishes. Fixing that would mean batching short-request decode with long-prompt prefill in the same step, which is a different change.
---
**Also in this series:**
- [#20 Two modded RTX 2080 Tis hit 153.8 tok/s on Qwen3.8-27B with FastLLM + DFlash2](/en/blog/fastllm-dflash2-dual-2080ti)
- [#19 Ternary Bonsai 2 27B on one 2080 Ti, where DFlash2 barely helps](/en/blog/ternary-bonsai-2-27b-one-2080ti)
- [#16 Fixing NCCL's stub-library error on two 2080 Tis](/en/blog/nccl-2080ti-stub-library-fix)
- [#14 Two modded 2080 Tis running Qwen3.8-27B with llama.cpp tensor parallel](/en/blog/qwen38-dual-2080ti-tensor-parallel)
---
# NVFP4 Without FP4 Hardware: Qwen3.8-27B on Two RTX 2080 Tis at 151.7 tok/s
URL: https://ai-muninn.com/en/blog/fastllm-dual-2080ti-nvfp4-self-quant
Date: 2026-09-28
Series: 改裝 2080 Ti 22G (Part 22)
I converted Qwen3.8-27B from BF16 to NVFP4 myself and serve it on two modded 2080 Ti 22G with FastLLM + DFlash2. Code went from **116.1 to 151.7 tok/s**, math 135.5 → 178.8, prose 74.2 → 101.9, and the server now takes 4 requests at once (297 tok/s combined). The 2080 Ti has no FP4 hardware. It still wins because generation is bound by reading weights, and NVFP4 cuts that read from 29 GB to 20 GB per token. orcarouter's official NVFP4 is slower than FP8 here. Cost: a 54K-token prompt prefills 25% slower. 140-question score: 131/128 vs 132/127.
## Same books, smaller editions: the model got faster by getting lighter
Movers bill by the trip, not by how many books you own. Put the same books in paperback and each box holds more pages, so the move takes fewer trips.
Text generation works the same way. Every token the model produces reads the whole set of weights out of VRAM once. With FP8 weights, Qwen3.8-27B reads 29 GB per token. With NVFP4 it reads 20 GB.
[Part 21](/en/blog/fastllm-dual-2080ti-concurrency-scheduler) left this machine running a self-built FastLLM with an FP8 model, two concurrent requests, and a scheduler that lets short requests cut in. The 2080 Ti is Turing and has no FP4 hardware, so I expected NVFP4 to be pointless on it. This part switches the main model to an NVFP4 checkpoint I converted myself from BF16, moves the KV cache to fp8, and raises concurrency to 4. Code went from 116.1 to 151.7 tok/s.
## Self-made NVFP4 on two 2080 Tis: code 116.1 → 151.7 tok/s, 4 requests at once
Same two cards (TP=2), the same self-built FastLLM as part 21, the same benchmark script. Method: real chat requests, temperature 0, 512 output tokens, code / math / prose prompts, 3 runs each, median. Read the first row for speed and the last for whether anything broke.
| | FP8 (part 21) | self-made NVFP4 |
|---|---:|---:|
| code / math / prose tok/s | 116.1 / 135.5 / 74.2 | **151.7 / 178.8 / 101.9** |
| concurrent requests | 2 | 4 (297 tok/s combined) |
| main model size | 29 GB | 20 GB |
| 54K-token prompt prefill | 40.5 s | 50.6 s |
| 140 questions (no thinking / thinking+low) | 132 / 127 | 131 / 128 |
With two requests at once, each stream went from about 88 to 107.8 tok/s. The per-request context limit went up from 222,080 to 257,920 tokens. When a short request arrives during a long prompt's prefill, its first token now takes 0.52 s instead of 1.18 s, and it finishes in 5.5 s (was 3.8 s). The 140 questions ran on the same NVFP4 model before the KV and concurrency changes.
Three changes produced this:
1. **Main model → NVFP4**, converted myself from BF16, following a format that had already proven fast on this card.
2. **KV cache fp4 → fp8.** The smaller weights freed enough VRAM, and fp8 KV is faster under concurrency.
3. **`--max_batch` 2 → 4.**
## Why NVFP4 helps without FP4 hardware: 29 GB → 20 GB read per token
Turing tensor cores do FP16, INT8 and INT4. They don't do FP4. FastLLM stores NVFP4 weights as they are, 4-bit in VRAM, and unpacks them to FP16 inside the kernel before the tensor cores touch them. The upstream README lists NVFP4 decode kernels tuned for SM75 (the 2080 Ti) for several matrices of width 5120, which is Qwen3.8-27B's hidden size.
So NVFP4 saves bytes read, not compute. That's the right thing to save here: generation is bottlenecked on reading weights, and the compute units sit mostly idle. Without speculative decoding, code went from 32.9 tok/s (FP8, 29 GB) to 45.1 tok/s (NVFP4, 20 GB), +37%.
DFlash2, the draft model from part 20, guesses several tokens ahead and lets the main model verify 8 positions per read of its weights. That multiplies whatever the base read speed is, so the gain carries over at a similar ratio: 116.1 → 151.7 on code.
## Three NVFP4 checkpoints, more than 2× apart: 65.3, 136.0 and 149.9 tok/s on code
"NVFP4" on a model card doesn't tell you which layers are NVFP4. I tried three checkpoints under the same FastLLM and the same launch flags (KV fp4, `--max_batch 2`). Look at the code column and the last column together.
| checkpoint | what's NVFP4 | code / math / prose | no-spec code | 140 q |
|---|---|---:|---:|---:|
| FP8 (part 21) | none; linear layers FP8 | 116.6 / 135.8 / 74.6 | 32.9 | 132 / 127 |
| [orcarouter official NVFP4](https://huggingface.co/orcarouter/Qwen3.8-27B-Uncensored-NVFP4) | some MLP, rest FP8 | 65.3 / 77.9 / 43.6 | 32.4 | not tested |
| [lyf Heretic-ARA NVFP4](https://huggingface.co/lyf/Qwen3.8-27B-Heretic-ARA-NVFP4-MTP-VL) | all linear layers | 136.0 / 185.5 / 102.1 | 45.3 | 124 / 129 |
| self-made orcarouter NVFP4 | all linear layers | 149.9 / 178.0 / 104.3 | 45.1 | 131 / 128 |
**orcarouter's official NVFP4** comes from the same publisher as the uncensored FP8 I was already running, but it's mixed precision: the config lists 168 NVFP4 targets (MLP) and 232 FP8 targets. Without speculation it runs 32.4, about the same as FP8. With DFlash2 it drops to 65.3 on code, slower than the FP8 checkpoint. The draft isn't the problem: its acceptance is actually higher than with FP8. My guess, not separately verified: the per-channel FP8 weights take a slower path when the main model verifies 9 tokens at once.
**lyf's checkpoint** was converted with NVIDIA ModelOpt, every linear layer in NVFP4, and it's fast. But it's built on a different uncensored base (Heretic ARA), and its 140-question score without thinking drops to 124, mostly on MuSR and HumanEval+.
**The self-made one** takes orcarouter's BF16 original and converts it into lyf's format. It uses the same base model as my FP8 build, nearly matches lyf on speed, and scores about the same as FP8.
It's also a bit faster than lyf on code. Draft acceptance at positions 1–3 is 88.8 / 73.4 / 55.0%, against lyf's 82.8 / 64.3 / 52.4%. My guess: orcarouter's uncensoring is lighter, so the output stays closer to stock Qwen3.8, which is what the DFlash2 draft was trained on.
## Convert BF16 to NVFP4 yourself: one numpy script, no GPU, no calibration
The converted weights are on Hugging Face: [coolthor/Qwen3.8-27B-Uncensored-NVFP4-FastLLM](https://huggingface.co/coolthor/Qwen3.8-27B-Uncensored-NVFP4-FastLLM). To convert them yourself, you need three things:
- The BF16 original, [orcarouter/Qwen3.8-27B-Uncensored](https://huggingface.co/orcarouter/Qwen3.8-27B-Uncensored), about 56 GB. It's gated: accept the terms on Hugging Face first.
- The json and yaml files from lyf's repo, without the weights. The converter copies its tensor naming, shard layout and `quantization_config`.
- The converter, [/tools/qwen38-nvfp4-convert.py](/tools/qwen38-nvfp4-convert.py). It only needs numpy.
```bash
hf download orcarouter/Qwen3.8-27B-Uncensored --local-dir /mnt/nvme1t/models/orcarouter-qwen38-uncensored-bf16
hf download lyf/Qwen3.8-27B-Heretic-ARA-NVFP4-MTP-VL --include "*.json" "recipe.yaml" --local-dir ./nvfp4-ref
curl -O https://ai-muninn.com/tools/qwen38-nvfp4-convert.py
python3 qwen38-nvfp4-convert.py \
/mnt/nvme1t/models/orcarouter-qwen38-uncensored-bf16 \
/mnt/nvme1t/models/orcarouter-qwen38-uncensored-nvfp4-self \
--reference ./nvfp4-ref
```
The output is 20 GB in three shards. What the script does:
- **Every linear layer → NVFP4.** Values are packed as 4-bit E2M1, with one FP8 E4M3 scale per 16 values and one FP32 global scale per tensor.
- **Three groups share one global scale:** attention q/k/v, the four GDN input projections (`in_proj_qkv` / `z` / `a` / `b`), and MLP gate/up. I only found this by comparing against lyf's weights. Computing each tensor's scale separately gives the right format with mismatched values.
- **Kept in BF16:** `lm_head`, `embed_tokens`, the vision tower, conv1d, and MTP.
- **No calibration.** ModelOpt also calibrates activation scales (`input_global_scale`) for W4A4. FastLLM on a 2080 Ti uses FP16 activations and never reads that field, so the script writes 1.0.
To check it, I decoded lyf's NVFP4 back to BF16 and re-quantized it with the script. For one attention layer, one GDN layer and one MLP layer, the packed weights, block scales and global scales were all bit-identical to lyf's. All 2,687 tensors in the output match lyf's in name, dtype, shape and shard.
## Launch with KV fp8 and `--max_batch 4`, same FastLLM build
No rebuild. This is the production launch:
```bash
export LD_PRELOAD=/home//nccl-install/lib/libnccl.so.2
export CUDA_VISIBLE_DEVICES=0,1
export FASTLLM_CUDA_GRAPH=0
export FASTLLM_DRAFT_QUANT=nvfp4
export FASTLLM_COOPERATIVE_LONG_PREFILL=1
~/venvs/ftllm-dual/bin/ftllm server \
-p /mnt/nvme1t/models/orcarouter-qwen38-uncensored-nvfp4-self --model_name qwen38-27b-ud \
--tp 2 --max_batch 4 --chunked_prefill_size 4096 \
--gpu_mem_ratio 0.95 --kv_cache_dtype fp8_e4m3 \
--speculative_algorithm dflash \
--speculative_draft_model_path /mnt/nvme1t/models/dflash2-qwen38-zlab \
--speculative_num_draft_tokens 8 \
--prefix_cache true \
--chat_template /mnt/nvme1t/models/qwen-fastllm-low/chat_template.jinja \
--host 0.0.0.0 --port 8082
```
Leave out `--tokens`; with it, FastLLM clamps concurrency to 1 (part 21 explains why).
## KV fp8 and 4 streams: 293 tok/s combined, single stream still ~150
The weights got 9 GB smaller, which frees about 3 GB per card for the KV cache. I compared fp4 and fp8 KV at `--max_batch 2`, then raised concurrency with fp8. The single-stream column barely moves; watch the total.
| KV / streams | single code / math / prose | per stream | total | KV pool (tokens) |
|---|---:|---:|---:|---:|
| fp4 / 2 | 149.8 / 178.3 / 104.0 | 99.9 | 199.8 | 564,480 |
| fp8 / 2 | 151.0 / 178.3 / 101.5 | 108.3 | 216.6 | 321,152 |
| fp8 / 3 | 150.5 / 178.2 / 101.4 | 81.0 | 243.1 | 302,976 |
| fp8 / 4 | 150.6 / 178.3 / 101.5 | 73.4 | 293.4 | 257,920 |
fp8 KV is faster than fp4 once there's concurrency: two streams went from 99.9 to 108.3 each. My read is that fp4 KV has to be unpacked on every read, and that shows up when there's more KV to read.
The KV pool shrank from 564K to 258K tokens. The per-request limit, 257,920, is still above the FP8 build's 222,080.
After switching production over, I re-measured on the live service: single stream 151.7 / 178.8 / 101.9, two at once 107.8 each, four at once 74.3 each.
## The cost: a 54K-token prompt prefills in 50.6 s instead of 40.5 s
Long prompts prefill 25% slower. Prefill processes thousands of tokens at once, so it's bound by compute rather than weight reads, and unpacking NVFP4 before the math is pure extra work when compute is the limit. Repeated prefixes still hit the prefix cache: sending the same 8K prefix a second time takes 1.8 s.
So this build suits mostly-short prompts with several concurrent users, like agents messaging each other. If you mostly feed it new documents of tens of thousands of tokens, the FP8 build is faster.
## Capability: 131 / 128 on 140 questions, against 132 / 127 for FP8
Same 140 questions as before: GSM8K 50, MATH-500 30, MuSR 20, HumanEval+ 40. Compare the FP8 and self-made rows.
| | GSM8K | MATH-500 | MuSR | HumanEval+ | total |
|---|---:|---:|---:|---:|---:|
| FP8, no thinking | 50 | 30 | 16 | 36 | 132 |
| self NVFP4, no thinking | 50 | 29 | 17 | 35 | 131 |
| FP8, thinking + low | 49 | 30 | 12 | 36 | 127 |
| self NVFP4, thinking + low | 50 | 30 | 12 | 36 | 128 |
On the same base model, going from FP8 to NVFP4 moved the score by one question in each mode, which is within noise. lyf's checkpoint scored 124 without thinking and 129 with thinking at low effort (full rows in the deep dive). Its −8 without thinking can't be split between quantization and the change of base model.
---
## Deep dive: the shared global scale, bit-exact checks, the DFlash re-sweep and two 4-bit dead ends
You can skip this section without losing anything you need to run the setup. It holds the full data behind each claim above.
### The shared global scale: 128 groups, and `in_proj_a` is the one that bites
The first version of the converter computed a global scale per tensor. The format and shapes were right, but the values didn't match lyf's. ModelOpt shares one global scale across a group of tensors, taken from the group's max absolute value:
- attention q/k/v: 16 layers → 16 groups
- GDN `in_proj_qkv` / `z` / `a` / `b`: 48 layers → 48 groups
- MLP gate/up: 64 layers → 64 groups
That's 128 groups. `in_proj_a` is the easiest to miss. Its own max is small, so computing its scale alone misses the larger values in the other three projections. Switching to per-group scales made the output bit-exact.
### Bit-exact check against lyf's ModelOpt output
Method: decode lyf's NVFP4 weights to BF16, keeping FP4 negative zero, then re-quantize with the script and compare byte for byte.
| layer | packed weights | block scales | global scale |
|---|---:|---:|---:|
| Attention, layer 11 `self_attn.q_proj` | 31,457,280 / 31,457,280 bytes | 3,932,160 / 3,932,160 | 4 / 4 |
| GDN, layer 0 `linear_attn.out_proj` | 15,728,640 / 15,728,640 | 1,966,080 / 1,966,080 | 4 / 4 |
| MLP, layer 0 `mlp.gate_proj` | 44,564,480 / 44,564,480 | 5,570,560 / 5,570,560 | 4 / 4 |
For `in_proj_qkv`, re-estimating the global scale from the decoded BF16 can be off by 1 ULP, while the packed weights and block scales stay bit-identical. The decoded values can't fully recover the original BF16 extremes, so this is expected. I also re-quantized from the original BF16 for `in_proj_a`, `q_proj` and `gate_proj` in the final output: all three tensor kinds were bit-identical.
### DFlash re-sweep on lyf's checkpoint: 8 draft tokens with NVFP4 draft quantization is still best
A faster main model could shift the best draft settings, so I re-swept on lyf's checkpoint.
| draft tokens / draft quant | code / math / prose | acceptance, positions 1–3 |
|---|---:|---:|
| 8 / nvfp4 | 136.0 / 185.6 / 102.5 | 80.8 / 59.1 / 44.7% |
| 8 / nvfp4_head | 118.6 / 174.4 / 94.8 | 84.5 / 63.2 / 46.8% |
| 8 / off | 123.8 / 162.6 / 92.5 | 83.6 / 65.6 / 50.4% |
| 6 / nvfp4 | 129.6 / 156.4 / 97.2 | 82.7 / 64.8 / 48.5% |
| 4 / nvfp4 | 113.2 / 124.7 / 97.3 | 85.4 / 68.1 / 51.2% |
Quantizing less of the draft raises acceptance but slows the draft down more than that gains. `nvfp4_head` (only the draft's output head quantized) is slower than no quantization at all; I didn't investigate why. Fewer draft tokens raise per-position acceptance but produce fewer tokens per step, and math takes the biggest hit. The checkpoint rejects values above 8.
### KV and concurrency detail: acceptance, prefill and short-request latency per setting
| KV / streams | acceptance, positions 1–3 | 54K prompt prefill | short-request first token |
|---|---:|---:|---:|
| fp4 / 2 | 81.9 / 63.1 / 47.8% | 49.9 s | 0.53 s |
| fp8 / 2 | 79.3 / 61.4 / 50.1% | 50.5 s | 0.47 s |
| fp8 / 3 | 80.3 / 62.8 / 51.7% | 50.6 s | 0.51 s |
| fp8 / 4 | 80.3 / 62.9 / 52.5% | 50.6 s | 0.53 s |
All four settings answered the 54K request correctly. The per-request limit stays at 262,144 for fp8/2 and fp8/3 and drops to 257,920 at fp8/4.
### orcarouter's official NVFP4: loads fine, runs NVFP4 kernels, and is still slow
`config.json` has two quantization groups: 168 NVFP4 W4A4 targets (the MLP of the first 56 layers) and 232 FP8 W8A8 targets (attention q/k/v/o, GDN `in_proj_qkv` / `in_proj_z` / `out_proj`, and the last 8 layers' MLP); `lm_head` stays BF16. It loads without errors, the log shows NVFP4 prefill and decode kernels, it answers 17*23 = 391, and an image test comes back correct. It's just slow.
| checkpoint | code / math / prose | no-spec code | EN acceptance, positions 1–3 | KV pool (tokens) |
|---|---:|---:|---:|---:|
| FP8 | 116.6 / 135.8 / 74.6 | 32.9 | 82.7 / 67.3 / 52.1% | 222,080 |
| official NVFP4 | 65.3 / 77.9 / 43.6 | 32.4 | 86.3 / 68.3 / 55.5% | 447,104 |
| self NVFP4 | 149.9 / 178.0 / 104.3 | 45.1 | 88.8 / 73.4 / 55.0% | 564,480 |
Acceptance is higher than FP8 and no-spec speed matches FP8. It only falls behind when verifying several tokens at once.
### Two 4-bit dead ends with FastLLM's own INT4
I also tried FastLLM's native INT4 format (`int4g`, groups of 128).
**TP=2 has no INT4 matmul kernel.** The model loads fine, 12 GB per card. On the first request, GPU utilization sits at 0% while CPU runs at 110%, and 16 tokens hadn't finished after 120 s. `FastllmCudaMatMulFloatInt4Group` exists only in the single-GPU `cudadevice.cpp`, not in `multicudadevice.cpp`, so tensor parallel silently falls back to CPU. The hung process ignores SIGTERM and needs `kill -9`.
**Single-card INT4 is slow.** Without speculation it runs 20.2 tok/s, which, at roughly 15 GB of weights on one card, works out to about 300 GB/s, half the 2080 Ti's bandwidth, so the unpacking is too expensive. Single card plus DFlash2 crashes with `Resource deadlock avoided`.
### `--dtype fp8_e4m3` doesn't convert a BF16 checkpoint
Passing `--dtype fp8_e4m3` with a BF16 checkpoint doesn't produce FP8. FastLLM silently loads FP16 instead. For FP8 or NVFP4, convert offline first.
### Pinned versions
- FastLLM: upstream `a2bf07fd` + revert of `d4b04876` + PR #749 + PR #756 (same as part 21)
- Main model: orcarouter/Qwen3.8-27B-Uncensored BF16 → self-made NVFP4, `total_size` 20,558,935,392 bytes
- Draft: z-lab/Qwen3.8-27B-DFlash2, quantized to NVFP4 at runtime (`FASTLLM_DRAFT_QUANT=nvfp4`)
- CUDA 12.4, sm_75, self-built NCCL 2.31.2
### Limitations and next steps
- KV fp8 and 4 streams were set after the 140-question runs. I haven't re-run capability with them.
- The converter is only verified on Qwen3.8-27B's architecture.
- The 25% slower long-prompt prefill has no fix. It would take work on FastLLM's NVFP4 prefill kernel.
---
**Also in this series:**
- [#21 FastLLM on two 2080 Tis: two concurrent requests and a scheduler that lets short requests in](/en/blog/fastllm-dual-2080ti-concurrency-scheduler)
- [#20 Two modded RTX 2080 Tis hit 153.8 tok/s on Qwen3.8-27B with FastLLM + DFlash2](/en/blog/fastllm-dflash2-dual-2080ti)
- [#16 Fixing NCCL's stub-library error on two 2080 Tis](/en/blog/nccl-2080ti-stub-library-fix)
---
# [DGX Spark] Qwen3.8-Flash-Next on two DGX Sparks: 51.9 to 72.0 tok/s, and a draft vocabulary built from my own text
URL: https://ai-muninn.com/en/blog/qwen38-flash-next-two-sparks-checkpoint
Date: 2026-09-28
Series: DGX Spark (Part 49)
Qwen3.8-Flash-Next NVFP4 on two DGX Sparks (TP=2) went from **51.9 to 72.0 tok/s** on the 40 prompts from Part 46; the harness score rose from 0.843 to 0.876. The biggest gain came from adding my own frequently used Chinese to the MTP draft vocabulary. The stock list was built from English and code, so 82% of the Chinese tokens I sampled could never be proposed. After adding 5,606 tokens from my own text, a prompt on a topic I work on daily got 60% faster (acceptance 0.11 → 0.98 tokens per step) and everyday topics outside that corpus got 23–27% faster, from a one-line mount change. Turn-two TTFT on a 9.5k prefix fell from 3.30 s to 0.23 s. Caveat: the KV pool is 69% smaller, from a memory setting lowered after an OOM.
## Preface
If you weigh yourself, you use the same scale every time, first thing in the morning, before coffee. A new scale at a different hour tells you nothing about whether you changed.
This is Part 49 of the DGX Spark series and a checkpoint against [Part 46](/en/blog/qwen38-flash-next-tp2-two-dgx-sparks), published 2026-09-12. Sixteen days later I re-ran the same harness and the same probe on the same two machines. The first half of this post is what changed and how to reproduce it. The second half is debugging notes.
## 51.9 → 72.0 tok/s on the same 40 prompts, score up from 0.843 to 0.876
The setup: Qwen3.8-Flash-Next NVFP4 on two NVIDIA DGX Spark (GB10) boxes, vLLM with tensor parallel TP=2 plus expert parallel, using the MiaAI dual-Spark derivative vLLM image. Every number is a median of 3 runs.
The first row is the headline; the probe rows break the gain down by content type.
| Metric | Part 46 (Sep 12) | Now (Sep 28) | Change |
|---|---|---|---|
| 40-prompt harness, median decode | 51.9 tok/s | 72.0 tok/s | +38.7% |
| Harness auto-score | 0.843 | 0.876 | +0.033 |
| Probe: code | 61.79 tok/s | 86.82 tok/s | +40.5% |
| Probe: English prose | 37.87 tok/s | 44.99 tok/s | +18.8% |
| Probe: Traditional Chinese prose | 33.16 tok/s | 45.89 tok/s | +38.4% |
The individual harness runs were 56.6 / 51.7 / 51.9 in Part 46 and 77.9 / 71.2 / 72.0 now. Both sets varied by about 9% run to run. All 8 harness categories got faster: coding went from 58.1 to 82.9, and prose, the slowest category, from 38.0 to 48.6.
The auto-score comes from a grader that executes the generated Python for coding prompts. The prose category score moved from 0.4 to 0.6 and the rest stayed mostly flat (per-run: 0.855 / 0.880 / 0.876). This is not a full quality evaluation. It does show that nothing got worse.
## Five changes in 16 days, and one of them made Chinese slower
Five changes landed between the two measurements:
1. **Sep 22: switched to the MiaAI dual-Spark vLLM build.** The old stack had zero prefix-cache hits across requests.
2. **Sep 22: adaptive MTP with 4 draft slots and a 47,149-token draft vocabulary.** MiaAI had measured a speedup with it, and code did benefit.
3. **Sep 24: `gpu-memory-utilization` from 0.835 to 0.68.** An earlyoom cascade took the service down for 17 minutes. At 0.78 the head node's available memory still dropped to 1.8 GiB.
4. **Sep 28: prefix-cache alignment fix, plus GDN weights read as FP8.**
5. **Sep 28: Chinese tokens added to the draft vocabulary.**
The intermediate rounds used a different probe at different times, so they only show a trend. For Chinese the trend was down: the Chinese probe fell from 33.16 tok/s at Part 46 to 27.6 on the evening of Sep 27, and nobody noticed. The cause was change 2, the Sep 22 draft vocabulary.
## Chinese was slow because 82% of its tokens were not on the draft list
MTP (multi-token prediction: a small head built into the model guesses the next few tokens each step) works like this. The draft head proposes up to 4 tokens. The target model reads its weights once, verifies every proposed position in that single pass, and keeps the guesses that match. Machines that are bound by memory bandwidth gain the most, because a weight read costs the same whether it verifies one position or five.
The MiaAI recipe makes each draft step cheaper by shrinking the draft head's proposal set. The tokenizer has 248,077 ids; the recipe limits proposals to a 47,149-token list in `draft_vocab_en_code_47k.txt`. As the name says, that list was built from English and code.
I measured accepted draft tokens per step by language:
| Content | Accepted tokens per step | First-slot hit rate |
|---|---|---|
| Code | 3.154 | 97.4% |
| English | 1.226 | 59.4% |
| Chinese | 0.114 | 11.4% |
On four Chinese paragraphs (Traditional and Simplified: a technical explanation, operating steps, a product reply, a tutorial), 82.26% of the tokens were not on the list. The draft head cannot propose a token it is not allowed to see, so for Chinese the target model was back to emitting about one token per step, while still paying for the draft.
## Build the draft vocabulary from your own text: two commands and one bind mount
The fix uses a tool that already ships in the MiaAI repo: [`files/build_draft_vocab.py`](https://github.com/MiaAI-Lab/Qwen3.8-Flash-Next-Dual-DGX-Sparks/blob/main/files/build_draft_vocab.py). It reads a corpus, counts tokens, and writes an id list. I built a Chinese list and took the union with the existing one, so no English or code token is lost.
The corpus is the point: use text you actually work with. Mine was Chinese documentation already on the machine, three model-written Chinese passages on topics I routinely ask about, and Simplified Chinese versions of all of it: 174,490 tokens. If your server keeps logs, real prompts and responses will match your workload even better. Run the script inside the serving container so it uses the same tokenizer the server does.
```bash
docker cp zh_corpus_both.txt vllm_qwen38fn_miaai:/tmp/
docker cp build_draft_vocab.py vllm_qwen38fn_miaai:/tmp/
docker exec vllm_qwen38fn_miaai python3 /tmp/build_draft_vocab.py /tmp/zh_corpus_both.txt --out /tmp/zh_candidates_both.txt --size 65536
```
Then merge the new candidates into the existing list:
```bash
docker exec vllm_qwen38fn_miaai python3 -c "a={int(x) for x in open('/etc/vllm-draft-vocab.txt')}; b={int(x) for x in open('/tmp/zh_candidates_both.txt')}; open('/tmp/draft_vocab_en_code_zh_both.txt','w').writelines(f'{x}\n' for x in sorted(a|b)); print(len(a), len(b), len(b-a), len(a|b))"
```
Output:
```
47149 9749 5606 52755
```
The old list had 47,149 ids and the Chinese candidates had 9,749, of which 5,606 were new. The merged list has 52,755 ids.
The launcher change is one bind-mount line. The two environment variables were already there:
```bash
-v /home//qwen38fn-tuning/hunt-20260927/zhvocab-compile/draft_vocab_en_code_zh_both.txt:/etc/vllm-draft-vocab.txt:ro
-e VLLM_MTP_DRAFT_VOCAB=/etc/vllm-draft-vocab.txt
-e VLLM_MTP_DRAFT_VOCAB_BALANCE=1
```
`VLLM_MTP_DRAFT_VOCAB_BALANCE=1` splits the list evenly across the two TP ranks. It comes from MiaAI's unmerged [PR #45](https://github.com/MiaAI-Lab/Qwen3.8-Flash-Next-Dual-DGX-Sparks/pull/45), which is the overlay I run. The main branch does not have it, so drop that line if you are on main. An odd total is fine: both hosts log `balanced=True`.
Output doesn't change. Per the tool's own docs, a token missing from the list just gets rejected as a draft; it never becomes a wrong token. I checked three prompts at temperature 0 and the output was byte-identical before and after.
## Chinese decode: +60% on a prompt from my usual topics, +23–27% on everyday ones
This was the biggest gain of the round, from one bind-mount line, with byte-identical output on three test prompts. How much faster depends on how close the prompt is to the corpus. All at temperature 0, 400 tokens, median of 3, old list versus new list:
| Prompt | Old list | New list | Change |
|---|---|---|---|
| Chinese probe (bandwidth and tensor parallelism) | 27.64 tok/s | 44.31 tok/s | +60% |
| Traditional Chinese: home-style chicken recipe | 30.0 tok/s | 36.9 tok/s | +23% |
| Traditional Chinese: planning a mountain sunrise trip | 29.8 tok/s | 37.3 tok/s | +25% |
| Simplified Chinese: choosing a phone for an elderly parent | 31.7 tok/s | 40.3 tok/s | +27% |
On the probe, acceptance went from 0.114 to 0.978 tokens per step. On the three new prompts it went from 0.13–0.22 to 0.36–0.64.
The probe asks about bandwidth and tensor parallelism, which is what I work on every day and the same kind of text the list was built from. The other three are everyday topics that are not in the corpus; I wrote them after building the list, and they still rose 23–27% with acceptance up 2.6–3x. Across these four prompts, the closer the list is to what you actually run, the bigger the gain.
English and code held steady. English acceptance went from 1.226 to 1.103 per step, but English speed was flat (44.74 to 44.98 tok/s). Code went from 83.27 to 82.32, within run-to-run spread.
## Turn two of a conversation: TTFT from 3.30 s to 0.23 s
Coding agents resend the whole conversation on every turn, so turn two should be almost free if the prefix cache works. On this build it was not. I measured turn two as the same prefix plus one follow-up:
| Prefix length | Before: turn-2 TTFT / tokens hit | After: turn-2 TTFT / tokens hit |
|---|---|---|
| 9.5k tokens | 3.30 s / 0 | 0.23 s / 9,464 |
| 30k tokens | 4.73 s / 16,960 | 0.25 s / 29,992 |
Before the fix, turn two of the 9.5k conversation was as slow as turn one.
The cause is the hybrid architecture. Some of the layers are GDN, a Mamba-style recurrent layer. A recurrent layer can only resume from a position where its state was saved. The cache block is 848 tokens, and the state is saved only when a prefill chunk stops exactly on a block boundary. The scheduler aligned chunk stops to a configured value of 8, so the last segment of the prompt never ended on a reusable boundary, and turn two recomputed it.
The fix has two parts:
1. Align chunk stops to 848.
2. Borrow the wider tail-lookup margin from upstream [vLLM PR #57180](https://github.com/vllm-project/vllm/pull/57180) (unmerged at the time of writing), and subtract the 3 tokens that MTP re-fills when the tail is registered. The subtraction is my own finding; it is not in the PR.
The change touches the scheduler and two cache-manager files, mounted into the container as overlays. There is no config flag for it.
## The costs: a 69% smaller KV pool and FP8 GDN weights
**KV pool.** It went from 2,128,927 to 665,924 tokens (−69%). The speedups did not cause this. The Sep 24 change of `gpu-memory-utilization` from 0.835 to 0.68 did. On a DGX Spark the CPU and GPU share memory, so that headroom is shared with the host. At 262K tokens per request the pool holds 2.54 requests. The request queue stayed at zero.
**FP8 GDN weights.** The GDN weights are converted to FP8 (E4M3) at runtime. They are read on every step, so halving the bytes read made code, Chinese and English each 5–7% faster. This does change the target model's numerics. Code output was byte-identical. Chinese and English responses were worded differently, with the same meaning. Chinese style, tool calling and a 28k-token needle retrieval all passed, and the harness score held. If you need byte-stable output, this change can be removed on its own without touching the others.
## Deep dive: debugging notes
You can skip this section; everything above works without it. It is here for people reproducing the setup and for AI assistants reading the page on their behalf.
### Decode runs at 80–87% of memory bandwidth
Conclusion: decode is close to the bandwidth wall, so reducing bytes read is the lever.
How I measured: PyTorch profiler on an isolated code prompt. One MTP step takes 51 ms. The GPU is busy 95–96% of the time: dense GEMM 60–62%, MoE GEMM 22%, NCCL 8–10%.
Effective bandwidth is weight bytes divided by kernel time, using per-GPU weight sizes at TP=2. The GB10 spec is 273 GB/s.
| Kernel | Shape (BF16) | Bytes | Time | Effective bandwidth |
|---|---|---|---|---|
| GDN QKVZ | 8192×2560 | 41.9 MB | 191 μs | 219 GB/s (80%) |
| lm_head | 124160×2560 | 635.7 MB | 2,677 μs | 237 GB/s (87%) |
That is why GDN went to FP8: it reads half the bytes. An E4M3 FP8 microbenchmark at M=5, including input quantization, went from 179 to 97 μs.
### +15% GPU clock, no change in decode
The worker had been capped at 2,200 MHz because of a GB10 defect that hard-powers-off the box under sustained load ([Part 48](/en/blog/gx10-thermal-hard-poweroff)). I removed the cap for this test. Clock under load went from 2,177 to 2,502 MHz (+15%). Code decode over 5 runs: 81.3 versus 82.0 tok/s.
Takeaway: the workload is bandwidth-bound, not compute-bound; the cap costs nothing on decode.
### Custom skinny GEMMs saved less than 1% of a step
MTP verification multiplies only 1–5 rows at a time, so I tried custom kernels for that shape:
| GEMM | Stock | Custom |
|---|---|---|
| GDN | 176.4 μs | 165.8 μs (−6.0%) |
| HC | 28.3 μs | 27.8 μs |
| Output | 71.5 μs | 65.0 μs |
Takeaway: combined, these are under 1% of a 51 ms step. None shipped.
### Prefill: host-side gaps dominate, and NCCL uses 29% of the link
Conclusion: prefill is limited by host-side code and all-reduce latency, not by link bandwidth.
How I measured: a 12.5k-token prefill. The head node's forward pass takes 5.578 s; GPU kernels account for 3.278 s of it. Gaps longer than 10 ms:
- QSA indexer host code: about 0.99 s
- `aten::mul`: 0.48 s
- MoE shared path: 0.37 s
- one `cudaMalloc`: 172 ms
NCCL in the same trace: 71 BF16 all-reduces of shape (12520, 2560) at 64.1 MB each, plus one 32 MB int8 all-reduce, about 4.58 GB total. The head node spent 683.6 ms in them, which is 6.70 GB/s, or 53.6 Gb/s: 29% of the 185 Gb/s link I measured in Part 46.
A standalone 64.1 MB all-reduce between the two machines takes 6.18 ms, about 83 Gb/s. So the link is not saturated; the time goes to latency and scheduling. `NCCL_PROTO=Simple` was slower at both 64 MB and 25.6 KB, so I rejected it.
### Rejected changes
Conclusion: none of these helped at this configuration.
| Change | Result |
|---|---|
| `max_num_batched_tokens` 32,768 | Server does not start: at GMU 0.68 the KV pool cannot hold a 262K request |
| `max_num_batched_tokens` 24,576 | 12.5k cold TTFT 23% slower |
| MiaAI #66 `disable_eagle_block_drop` | No-op on the Qwen path (no eagle group); cache hits unchanged |
| `mamba_cache_mode=all` | No change; the non-aligned path falls back to block-size hash granularity |
| torch.compile mode 3 | Not run: MiaAI PR #45 records a 103-minute compile on two GB10s that never finished (RPC timeout) |
| IRQs pinned to big cores, chunk 8192, GDN FlashInfer prefill | Rejected Sep 24; FlashInfer prefill made a four-request run 8.8% slower |
### Measurement noise nearly blocked the vocab change
Conclusion: a fixed 3% gate misfires when the metric's own noise exceeds 3%.
The first A/B of the new vocabulary tripped my rule "no other metric regresses by more than 3%": 12.5k cold TTFT was 3.67% slower. I went back to the old configuration and ran the same measurement again: 6.35 / 4.14 / 6.10 s. Cold TTFT swings about 50% on its own. The draft vocabulary only affects which tokens MTP proposes during decode; prefill never touches it.
The gate was meant to ask "did this make anything worse". Written as "nothing else moves more than 3%", it fires every time on a metric noisier than 3%. After checking which code path the change touches and accounting for the noise, I shipped the vocabulary.
### A reboot would have brought back the old stack (fixed Sep 28)
The worker had the old stack's `qwen38fn-tp2-worker.service` enabled, while the one actually in use, `qwen38fn-miaai-worker.service`, was disabled. The two units declare `Conflicts=` on each other, so enabling the wrong one swaps the whole stack on boot. On publish day I ran `systemctl enable qwen38fn-miaai-worker` and `systemctl disable qwen38fn-tp2-worker`; a cold reboot of both hosts has not been tested yet.
If you copy this setup, enable the service you actually run and disable the old one.
### Methodology
Harness (same 40 prompts as Part 46, thinking off, concurrency 1, run on the GX10 because coding prompts execute code):
```bash
cd ~/src/tonyd2wild-nvfp4/single-spark-vllm-tp1 && python3 tools/bench_categories.py http://127.0.0.1:8000 qwen38-flash-next --thinking off --concurrency 1 --tag runN
```
Probe (temperature 0):
```bash
python3 ~/patches/decode_probe3.py qwen38-flash-next 0
```
Rules:
- Each run started only when `vllm:num_requests_running` was 0.
- Accepted tokens per step = the change in `spec_decode_num_drafts_total` and `spec_decode_num_accepted_tokens_total` across a run, kept only if `request_success_total` rose by exactly 1.
- Turn-two hits = the increment of `prefix_cache_hits_total`.
- 3 runs per configuration, median reported.
---
Also in this series: [Part 46: Qwen3.8-Flash-Next TP=2 on two DGX Sparks, 51.9 tok/s](/en/blog/qwen38-flash-next-tp2-two-dgx-sparks) · [Part 45: single-node NVFP4 recipe, 41.7 tok/s](/en/blog/qwen38-flash-next-nvfp4-dgx-spark-vllm-recipe)
---
# Two Modded RTX 2080 Tis Hit 153.8 tok/s on Qwen3.8-27B With FastLLM + DFlash2
URL: https://ai-muninn.com/en/blog/fastllm-dflash2-dual-2080ti
Date: 2026-09-21
Series: 改裝 2080 Ti 22G (Part 20)
FastLLM plus the DFlash2 draft model runs Qwen3.8-27B FP8 on two modded 2080 Ti 22G at **153.8 tok/s** on code and 134.9 on math. My previous llama.cpp setup ran at about 66. FastLLM alone does 33.7; the whole gain is the draft. It works because decode here is memory-bound: one read of the weights checks all 7 drafted tokens. 262K context fits with an fp4 KV cache. The cost: prose drops to 53.1, and my 140-question eval scores 128 against 131.
## Preface
A delivery van costs about the same to run whether it carries one parcel or twenty. The driver and the fuel are paid per trip, so the cheapest parcel is the one that rides in a full van.
Generating text with a 27B model has the same economics. Every token the model produces requires reading all of its weights out of VRAM. Speculative decoding fills the trip: a small draft model guesses several tokens ahead, the big model checks all of those positions in one pass over its weights, and every correct guess is kept.
Someone on Bilibili, the Chinese video site, used this to push two modded 2080 Ti 22G cards past 150 tok/s. [Part 14](/en/blog/qwen38-dual-2080ti-tensor-parallel) put the same model on the same two cards with llama.cpp, and after later tuning it ran at 66 tok/s as this machine's main model server. This part rebuilds the Bilibili recipe, FastLLM plus the DFlash2 draft model, and gets 153.8 tok/s on code. It has replaced the llama.cpp setup as the main model server.
## FastLLM and DFlash2: a C++ server and a 3.6 GB draft that guesses 7 tokens per step
[FastLLM](https://github.com/ztxz16/fastllm) is a C++ inference framework. It installs from pip as `ftllm`, and `ftllm server` exposes an OpenAI-compatible API. The 2080 Ti is Turing (sm_75) and has no FP8 hardware. FastLLM stores FP8 weights as FP8 and converts them to FP16 inside the kernel for the math, Marlin-style W8A16. On this card, FP8 saves bytes read, not compute.
[DFlash2](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2) is a draft model from z-lab built for Qwen3.8-27B: 5 layers, 3.6 GB. It's a block-diffusion drafter. Instead of guessing one token at a time, it predicts a whole block of tokens in one pass, and a selector picks one coherent path through that block for the main model to verify. With `--speculative_num_draft_tokens 8` it drafts 7 tokens per step.
## FastLLM alone runs 33.7 tok/s; DFlash2 takes it to 152.3
Measured separately:
- FastLLM with no speculation: **33.7 tok/s**. That's half of the 66 from llama.cpp Q8_0 + MTP (MTP is Qwen3.8's built-in draft head).
- FastLLM plus DFlash2: **152.3 tok/s**, on the official FP8 weights with a code prompt.
The 4.5× comes entirely from the draft.
## 156 tok/s on code, 134.9 on math, 53.1 on prose
Method: real chat requests, temperature 0, up to 512 output tokens, three prompt types (code, math, prose), 3 runs each, median, timed by wall clock on the client. Both cards run with tensor parallel 2 (TP=2). The last row is the config that went into production.
| config (two 2080 Ti, TP=2) | code | math | prose |
|---|---:|---:|---:|
| no speculation (official FP8) | 33.7 | 33.3 | 33.2 |
| built-in MTP 8 (uncensored FP8) | 62.1 | 53.3 | 24.0 |
| DFlash2, 262K (uncensored FP8) | 156.0 | 134.9 | 53.1 |
That last row runs a 262K context with an fp4 KV cache. The official and uncensored weights run at about the same speed; the full comparison is in the deep dive. Before going live I also dropped `--cuda_embedding` (trap 3 explains why) and re-measured code: 153.8 tok/s, against 154.1 with the flag on. That's noise. The 153.8 in the TL;DR is the go-live measurement.
The old llama.cpp setup (Q8_0 + MTP, two cards) ran at 66 tok/s. That 66 is the median decode speed from a 140-question capability eval, with temperature 1.0 and thinking on. It's a different harness from the three prompts above, so treat it as a reference point. A Bilibili commenter with the same hardware ran one identical API test on both (a snake-game prompt, 256 tokens): llama.cpp 58, FastLLM + DFlash about 100–110., pointing the same way.
So "past 100 tok/s" only holds for code and math. Prose got slower than the old setup.
## Why speculation pays here: decode already uses 79% of 1,232 GB/s
Each generated token reads every weight once, so decode tok/s × weight size gives the bytes read from VRAM per second. Two 2080 Tis have 1,232 GB/s of combined theoretical bandwidth.
| config | weights | decode | bytes/s | % of peak |
|---|---:|---:|---:|---:|
| FastLLM FP8, no speculation | 29 GB | 33.7 | 977 GB/s | 79% |
| FastLLM FP8 + DFlash2 | 29 GB | 152.3 | 4,417 GB/s | 358% |
Without speculation, the model already uses 79% of the bandwidth. Decode is memory-bound, and the compute units sit mostly idle. The 358% in the second row isn't overclocking. It shows the weights are no longer read once per token: one read verifies several positions, so the real traffic is under a third of the naive number. Speculation spends idle compute to avoid repeated weight reads.
That only works when the main model is memory-bound. [Part 19](/en/blog/ternary-bonsai-2-27b-one-2080ti) is the counter-example. Ternary Bonsai 2's ternary weights are only 7.2 GB and use 46% of the card's bandwidth, and the limit there is the arithmetic of unpacking them. A DFlash2-family draft on that model beats built-in MTP by only 3–8%, and gets slower the more it drafts.
## What you need: two 22 GB 2080 Tis, ftllm 0.1.8.2, a 29 GB model and a 3.6 GB draft
- **Two modded 2080 Ti 22G.** Mine are connected with NVLink (NV2). The Bilibili reproductions all had NVLink too. FastLLM's own 5090 benchmark ran over PCIe, so NVLink isn't strictly required, but I haven't tested 2080 Tis without it.
- **A Python 3.14 venv with `ftllm` 0.1.8.2.**
- **Main model: [orcarouter/Qwen3.8-27B-Uncensored-FP8](https://huggingface.co/orcarouter/Qwen3.8-27B-Uncensored-FP8)**, about 29 GB on disk, uncensored. The official `Qwen/Qwen3.8-27B-FP8` also works at about the same speed.
- **Draft: [z-lab/Qwen3.8-27B-DFlash2](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2)**, 3.6 GB.
- **An NCCL build that includes sm_75.** I used the 2.31.2 I compiled in [part 16](/en/blog/nccl-2080ti-stub-library-fix).
## How to install and launch FastLLM with DFlash2 on two 2080 Tis
Create the venv and download both models:
```bash
python3.14 -m venv ~/venvs/ftllm
~/venvs/ftllm/bin/pip install ftllm==0.1.8.2
hf download orcarouter/Qwen3.8-27B-Uncensored-FP8 --local-dir /mnt/nvme1t/models/qwen38-27b-uncensored-fp8
hf download z-lab/Qwen3.8-27B-DFlash2 --local-dir /mnt/nvme1t/models/dflash2-qwen38-zlab
```
The chat template is the community-fixed one from [part 13](/en/blog/chat-template-kv-mtp-free-speedup), [froggeric/Qwen-Fixed-Chat-Templates](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates). I used v22.3 (the URL below is pinned to that commit; `main` is now v22.5, where this `sed` pattern doesn't match) with one change: the default reasoning effort goes from `medium` to `low`. The deep dive explains why.
```bash
mkdir -p /mnt/nvme1t/models/qwen-fastllm-low
wget -O /mnt/nvme1t/models/qwen-fastllm-low/chat_template.jinja \
https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates/resolve/492315ea6d7343bcfb32598d6a898c34e0d69ed8/chat_template.jinja
sed -i "s/is not none else 'medium' %}/is not none else 'low' %}/" \
/mnt/nvme1t/models/qwen-fastllm-low/chat_template.jinja
```
This is the exact launch line running in production:
```bash
export LD_PRELOAD=/home//nccl-install/lib/libnccl.so.2 # NCCL with sm_75
export CUDA_VISIBLE_DEVICES=0,1
export FASTLLM_CUDA_GRAPH=0 # must be 0 with DFlash2
~/venvs/ftllm/bin/ftllm server \
-p /mnt/nvme1t/models/qwen38-27b-uncensored-fp8 --model_name qwen38-27b-ud \
--tp 2 --max_batch 1 --tokens 262144 --gpu_mem_ratio 0.95 --kv_cache_dtype fp4 \
--speculative_algorithm dflash \
--speculative_draft_model_path /mnt/nvme1t/models/dflash2-qwen38-zlab \
--speculative_num_draft_tokens 8 \
--prefix_cache true \
--chat_template /mnt/nvme1t/models/qwen-fastllm-low/chat_template.jinja \
--host 0.0.0.0 --port 8082
```
`--model_name` reuses the model name the old service exposed, so no client had to change a line.
## Four things that break when you copy the Bilibili recipe onto 2080 Tis
The deep dive has the full error output for each.
1. **NCCL without sm_75.** Speculative decoding on two cards fails with `ncclAllReduce failed: unhandled cuda error`; I hit it with MTP. FastLLM actually loads Ubuntu's NCCL 2.22.3, and the one pip pulls in lacks sm_75 too. The `LD_PRELOAD` line in the launch block fixes it.
2. **DFlash2 with CUDA Graph always crashes**, with `cudaErrorIllegalAddress`. It needs `FASTLLM_CUDA_GRAPH=0`. FastLLM's docs say the opposite, that on sm_75 you turn it on with 1. That advice only applies without speculation.
3. **262K needs three settings together.** `--kv_cache_dtype fp4`, because with fp8 KV the draft weights don't fit. No `--cuda_embedding`: upstream recommends it, but it parks 2.4 GB on GPU0. And `--gpu_mem_ratio 0.95`: 0.97 crashes on long prompts, and 0.90 is worse.
4. **Requests that turn thinking on get the reasoning inside `content`.** Because the launch passes `--chat_template`, FastLLM disables Qwen's reasoning split. With `enable_thinking: true`, the whole reasoning plus a stray `` lands in `content`, and `reasoning_content` is empty. Clients that send `enable_thinking: false` get a clean answer. Clients that want thinking have to strip everything before `` themselves.
## Prefix cache: an 8,747-token shared prefix drops from 8.2 s to about 1 s
Agent and RAG requests often open with the same long block (a system prompt, tool docs, the same document) and differ only at the end. I tested an 8,747-token shared prefix over 6 rounds, each with a different ending. The middle column shows the cache at work.
| | first round | median after | cached per round |
|---|---:|---:|---:|
| `--prefix_cache true` | 8.2 s | 1.0–1.2 s | 8,192 tokens |
The go-live acceptance check used a 14K prefix: 14.2 s cold, 2.0 s warm, 14,336 tokens cached. The prefix cache keeps working with DFlash2 on.
## 262K context really fits: a needle at 199,787 tokens came back correct
I buried one sentence, "The secret access code for building 7 is MAPLE-4416.", in the middle of a long document and asked for the code. Four of the six lengths are in the table. Prefill slows as the prompt grows.
| actual prompt tokens | prefill | time | needle |
|---:|---:|---:|---|
| 22,647 | 1,109 tok/s | 20 s | found |
| 91,478 | 855 tok/s | 107 s | found |
| 140,022 | 734 tok/s | 191 s | found |
| 199,787 | 652 tok/s | 306 s | found |
All six lengths passed with zero restarts. Prefill slows steadily as the prompt grows, with no cliff.
Don't mix up two numbers here. 262,144 is the total KV pool. The limit for a single prompt comes from this log line, `AddPrefill Pages limit: 1638 pages (80% of 2048)`, which works out to about 209K tokens.
Vision still works. This FP8 checkpoint includes the vision tower, so there's no separate mmproj file. I sent a 448×448 image with three shapes, and the reply was "red circle top left / blue square top right / green triangle bottom center". Shapes, colors and positions were all correct.
## The catch: prose about 20% slower, and 3 fewer questions right out of 140
Prose runs at 53.1 tok/s against 66 for the old llama.cpp setup.
Both setups got the same 140 questions: GSM8K 50, MATH-500 30, MuSR 20, HumanEval+ 40. Look at the total, then MuSR:
| | GSM8K | MATH-500 | MuSR | HumanEval+ | total |
|---|---:|---:|---:|---:|---:|
| FastLLM, thinking off | 49 | 29 | 15 | 35 | 128 |
| FastLLM, thinking on + effort low | 50 | 30 | 9 | 36 | 125 |
| llama.cpp Q8_0, thinking on | 50 | 30 | 13 | 38 | 131 |
128 is the production config with requests that carry no extra parameters, so the model doesn't think. The llama.cpp setup had thinking on. On FastLLM, thinking on and off differ almost entirely in MuSR, 15 against 9; every other benchmark differs by one question. In the thinking-off run, no question hit the 8,192-token limit. In the thinking-on run, one did. My own services already send `enable_thinking: false`, so 128 is what they actually get.
My own requests to this box aren't that hard. Three questions for more than 2× code speed was an easy trade. The old llama.cpp setup is still installed intact, and two `systemctl` commands switch back.
---
## Deep dive: the Bilibili sources, the four traps, reasoning effort, and every config measured
You can skip this section. Everything above is enough to run the setup; what follows is the full data, the verbatim errors and the source reading behind each claim.
### Where the recipe came from: two Bilibili videos, two different frameworks
Two videos pointed me here, and they use different frameworks.
- [BV13vbK6yEhp](https://www.bilibili.com/video/BV13vbK6yEhp/) (uploader _黄歪歪, 2026-09-07) is the FastLLM route: `pip install ftllm`, FP8 weights, DFlash2. Its title says 150+ TPS, and a commenter relays the video's claim of an FP8 average above 100 tok/s.
- [BV1Ader61ETR](https://www.bilibili.com/video/BV1Ader61ETR/) (uploader SPOTLITE, 2026-09-18) has a pinned comment pointing to [weicj/vLLM-2080Ti-Definitive](https://github.com/weicj/vLLM-2080Ti-Definitive), an sm_75 fork of vLLM. It has nothing to do with FastLLM, and it needs CUDA 13, PyTorch 2.13 and Python 3.12. I didn't take that route.
Bilibili has no subtitles on these videos, so I couldn't verify what's on screen. Everything here comes from the video descriptions, the comments and the official repos.
A commenter under the first video, 听我贤扯, reproduced it on the same dual-22G + NVLink setup: 33.0 tok/s for FP8 without speculation, and 191.8 for FP8 + DFlash B8 on a fixed synthetic output stream. My 33.7 without speculation matches that 33.0, so the environments are comparable. The gap between 191.8 and my 152.3 is methodology: a fixed synthetic stream against real chat requests.
### Trap 1: ncclAllReduce failed because the NCCL that FastLLM loads has no sm_75
The first run with built-in MTP failed with:
```
Error: ncclAllReduce failed on device 0: unhandled cuda error
Error: ncclAllReduce failed on device 1: unhandled cuda error
```
Decode came in at 19.9 tok/s, slower than no speculation, and then the server died. TP=2 without speculation had run fine, which puts the problem in an AllReduce that only the speculative path reaches.
The machine had three copies of libnccl:
- Ubuntu's package, 2.22.3
- `nvidia-nccl-cu12` 2.31.2, pulled in by pip along with ftllm
- the 2.31.2 I compiled myself in [part 16](/en/blog/nccl-2080ti-stub-library-fix)
`ldd` on FastLLM's `libfastllm_tools.so` shows it loads the system 2.22.3. To see which GPU architectures each build contains:
```bash
cuobjdump --list-elf | grep -oE 'sm_[0-9]+' | sort -u
```
Only the self-built one has sm_75. Pointing `LD_PRELOAD` at it fixes the error, with no FastLLM rebuild.
The error never mentions architecture, which is what makes this one hard to trace. On a 2080 Ti I treat any third-party NCCL build as broken until that command says otherwise.
### Trap 2: DFlash2 crashes with cudaErrorIllegalAddress unless CUDA Graph is off
With `FASTLLM_CUDA_GRAPH=1` and DFlash2, the first request after loading crashes with `cudaErrorIllegalAddress`. It crashed that way more than a dozen times in a row, and the server died each time.
What didn't help: other ways of writing `--tp 2`, `--dtype float16`, `--atype float16`. BF16 isn't the cause either. The log shows the BF16 weights are already converted to FP16:
```
[Qwen3.5 DFlash2] converted 18 BF16 linear weights to FP16 for the pre-Ampere mixed GEMM path
```
`FASTLLM_CUDA_GRAPH=0` worked on the first try, and decode went from 33.7 to 152.3 tok/s.
FastLLM's docs say sm_75 and older default to CUDA Graph off, and that you turn it on with `FASTLLM_CUDA_GRAPH=1`. My no-speculation run used 1 and got 33.7. With DFlash2, following that advice breaks the server. Built-in MTP runs either way: 61.5 tok/s on code with the graph on, 62.1 with it off, which is noise.
### Trap 3: fitting 262K with fp4 KV, no --cuda_embedding and gpu_mem_ratio 0.95
My first attempt used an fp8 KV cache. At 262K it ran out of memory while loading the draft weights:
| KV type | 262,144 | 196,608 |
|---|---|---|
| fp8_e4m3 + DFlash2 | OOM (loading `dflash.layers.4.mlp.gateup_proj`) | loads |
| fp8_e4m3 + built-in MTP | loads | |
The KV pool itself allocates fine (`KV Cache Token limit: 262144 tokens, totalPages=2048`). It's the draft that doesn't fit.
Switching the KV cache to fp4 gets out of that bind. Qwen3.8-27B has only 16 full-attention layers out of 64, and the log's `tokenGrowingLayers=16` agrees. KV per token is 16 layers × 2 × 4 heads × 256 dims = 32,768 elements. At 262K that's 8 GiB in fp8 (4 per card) or 4 GiB in fp4 (2 per card), so fp4 saves 2 GiB on each card. Speed barely changes:
| config | code | math | prose | peak VRAM (GPU0 / GPU1) |
|---|---:|---:|---:|---:|
| 192K + fp8 KV | 161.3 | 134.7 | 55.4 | 21,956 / 21,272 MiB |
| 262K + fp4 KV | 156.0 | 134.9 | 53.1 | 21,652 / 20,540 MiB |
At that point, though, 262K was only on paper. FastLLM's AutoWarmup log:
```
GPU 0: availForKV=1.41 GB
GPU 1: availForKV=2.49 GB
KV Cache Token limit: 262144 (totalPages=2048, pageLen=128), localKVPerPage=1.18 MB
```
The pool needs 2,048 pages × 1.18 MB = 2.36 GB per card. GPU0 can only give 1.41 GB, so it's overcommitted by about 1 GB. Pages are allocated lazily, so short prompts work fine. Actually filling the pool would crash GPU0; the real capacity was about 156K. GPU0 is the tighter card because the DFlash2 draft runs only on the first card, a known FastLLM limitation.
**Dropping `--cuda_embedding` fixes it.** With the flag on, the embedding table (vocab 248,320 × hidden 5,120) sits on GPU0 in FP16, about 2.4 GB.
| | `--cuda_embedding` on | off |
|---|---:|---:|
| GPU0 availForKV | 1.41 GB | 3.96 GB |
| GPU1 availForKV | 2.49 GB | 5.04 GB |
Both cards now have at least 1.6 GB of headroom over the 2.36 GB the pool needs. Code runs at 153.8 against 154.1. FastLLM's report recommends `--cuda_embedding` with DFlash2; on these two cards, that doesn't hold.
**`--gpu_mem_ratio` is 0.95.** At 0.97, long prompts crash:
```
CUDA error when allocating 12 MB on device 0! gpuFree: 2 MB / 22000 MB
cublas error in ChunkGatedDeltaRule batched matmul
```
That's 2 MB left on the card. At 0.95 the same 8,747-token test passes 6 of 6.
Going lower for more headroom is the obvious next move. 0.90 is worse. It raises the reserve for transient allocations from 1.15 GB to 2.31 GB, and `availForKV` drops to 0.26 GB. The ratio sets the model's share of the card, not the transient reserve.
### Trap 4: MuSR runs into the token limit, and a flag that did nothing
My first run used the model's built-in template. By question 93, all 13 MuSR questions it had reached ended with `finish_reason=length`: empty content, up to 36,628 characters of reasoning. On one of those questions, the llama.cpp setup answers correctly in 1,259 tokens. Same model, so the problem is on the serving side. The fix came in two layers.
**Layer 1, the template.** The model's built-in `chat_template.jinja` (9 KB) does have reasoning-effort control, but it defaults to xhigh, so a request that doesn't set effort gets the longest thinking. I switched to froggeric's v22.3 (26 KB), which defaults to medium. GSM8K went from 49 to 50. MuSR was still 1/20, with 19 of 20 hitting the limit.
**Layer 2, froggeric's `medium` injects nothing.** Only xhigh and low add instruction text; the medium branch is empty. With no brevity constraint, the model wrote until it hit 8,192 tokens without emitting ``. The reasoning shows it had already found the answer. The end was a loop of "Need final. Ensure final includes boxed. Let's compose final answer:".
Same question, sent with `chat_template_kwargs: {"enable_thinking": true, "reasoning_effort": "low"}`, against medium:
| effort | output tokens | finish | has `` | result |
|---|---:|---|---|---|
| medium | 8,192 | length | no | no answer |
| low | 1,929 | stop | yes | correct |
Over all 140 questions, limit hits went from 23 to 1, MuSR from 1/20 to 9/20, and the score from 110/133 (the medium run only completed 133 questions) to 125/140.
I also tried adding my own line to the medium branch: "Keep your thinking under about 2000 words". MuSR rose to 12/20, but MATH-500 and HumanEval+ each dropped a little, and limit hits went from 1 to 5. The total was still 125. Effort is a global knob, and a gain on one benchmark didn't add to the total. I dropped it.
**`--think` changed nothing.** I once believed `--think true` kept the model from closing its reasoning. After I switched it to false, a spot check had MuSR jump from 9/20 to 16/20, and I wrote "use `--think false`" into my notes as a setting. Reading the source showed the attribution was wrong:
- `--think` defaults to `"false"` (`ftllm/util.py`). Writing `--think false` is the same as leaving it out, so I removed it from the unit file.
- All it does is prepend `\n` to the text returned to the client (`openai_server/fastllm_completion.py`: `result = "" if emit_reasoning_content else ("\n" if think else "")`). It never goes back into the model's input, so it can't change what the model answers.
- The 16/20 spot check sent no `chat_template_kwargs`, so the model answered in non-thinking mode. The 9/20 group had thinking on with effort low. The request changed, not the flag. I later ran all 140 questions the same way, with no parameters: 128/140, MuSR 15/20.
**The ` ` in `content` comes from `--chat_template`.** Passing a custom template sets `force_chat_template` to true (`llm.py`), and Qwen reasoning splitting is disabled when the template is forced (`_is_qwen3_5_reasoning_response`). So thinking-on requests get the reasoning plus a ` ` inside `content`, while thinking-off requests come back clean. My own two services, a multi-model aggregator and a RAG server, send `enable_thinking: false` and get clean answers. The Pi agent runs with thinking on, and that's where the stray `` shows up.
### Draft tokens: 8 is the sweet spot, 12 won't start
Same method as the main table.
| `--speculative_num_draft_tokens` | actual drafts per step | code | math | prose |
|---:|---:|---:|---:|---:|
| 4 | 3 | 90.2 | 85.0 | 52.3 |
| 8 | 7 | 156.0 | 134.9 | 53.1 |
| 12 | — | server won't start | | |
The value includes the anchor token, so N drafts N−1. 8 matches the block size of 8 on the DFlash2 model card, which is 7 draft tokens per verification.
### Every config, measured the same way
Temperature 0, 512 tokens, median of 3, in tok/s.
| config | code | math | prose |
|---|---:|---:|---:|
| official FP8, no speculation | 33.7 | 33.3 | 33.2 |
| uncensored FP8, no speculation | 32.9 | 32.6 | 32.4 |
| official FP8 + MTP 8 | 59.0 | 51.3 | 23.2 |
| uncensored FP8 + MTP 8 (graph=1) | 61.5 | 51.2 | 23.2 |
| uncensored FP8 + MTP 8 (graph=0) | 62.1 | 53.3 | 24.0 |
| official FP8 + DFlash2 | 152.3 | 136.8 | 57.6 |
| uncensored FP8 + DFlash2, 192K fp8 KV | 161.3 | 134.7 | 55.4 |
| uncensored FP8 + DFlash2, 262K fp4 KV | 156.0 | 134.9 | 53.1 |
The uncensored weights aren't slower. Built-in MTP on prose runs at 24, slower than no speculation, and DFlash2 on prose reaches only about 55.
### Version pinning: a verify.sh that checks 10 fingerprints before every start
This setup works because of version-specific behavior: `--chat_template` disabling the reasoning split, DFlash2 needing CUDA Graph off, NCCL loaded through `LD_PRELOAD`, and 262K needing `--cuda_embedding` off. Any `pip install -U` could break it without an error.
What I pinned:
- `requirements.lock` (76 packages) and 76 wheels, including `ftllm-0.1.8.2` itself
- a tarball of the whole venv
- the unit file, the chat template and the self-built NCCL
- a `verify.sh` hooked in as the systemd `ExecStartPre`. Before every start it checks 10 fingerprints: ftllm version, Python, the `libfastllm_tools.so` hash, the unit file, the template, NCCL, and the configs and weight sizes of the model and the draft. If anything changed, it refuses to start and names what changed.
I checked the restore path too. The `.so` hash inside the tarball matches the running one, and rebuilding with `pip install --no-index` from the local wheels produces a byte-identical `.so`. Even if PyPI pulls 0.1.8.2, the same build can be recreated.
### Still unmeasured
- DFlash2 acceptance rate. FastLLM's usage fields don't report draft stats.
- The NVFP4 route. The Bilibili commenter measured NVFP4 + DFlash B8 at 246.9 tok/s on a fixed output stream. I didn't download those weights.
- The GPU0/GPU1 asymmetry, with DFlash2 running only on GPU0. It isn't a bottleneck now. I'll come back to it if I push context further.
---
**Also in this series:**
- [#19 Ternary Bonsai 2 27B on one 2080 Ti, where DFlash2 barely helps](/en/blog/ternary-bonsai-2-27b-one-2080ti)
- [#16 Fixing NCCL's stub-library error on two 2080 Tis](/en/blog/nccl-2080ti-stub-library-fix)
- [#14 Two modded 2080 Tis running Qwen3.8-27B with llama.cpp tensor parallel](/en/blog/qwen38-dual-2080ti-tensor-parallel)
- [#13 A broken chat template and a starving MTP head on the 2080 Ti](/en/blog/chat-template-kv-mtp-free-speedup)
---
# Ternary Bonsai 2 on One RTX 2080 Ti: Qwen3.8-27B in 7.2 GB Scores 130 of 140
URL: https://ai-muninn.com/en/blog/ternary-bonsai-2-27b-one-2080ti
Date: 2026-09-21
Series: 改裝 2080 Ti 22G (Part 19)
Ternary Bonsai 2 27B is PrismML's version of Qwen3.8-27B with nearly every weight set to −1, 0 or +1. On one modded 22 GB 2080 Ti, through PrismML's llama.cpp fork, it scored **130/140** on my eval set. Qwen3.8-27B Q8_0 + MTP on two cards scored **131**. The price is speed: 36.85 tok/s on one card against 66.04 on two. Set `--reasoning-effort medium`; the default, xhigh, scores 116. The smallest file decodes slowest, because decode here is limited by unpacking weights and Hadamard math, not by memory bandwidth. Caveat: I scored the 7.2 GB PQ2_0 file, not the 5.9 GB PTQ1_0 in the headline.
## Preface
A vacuum storage bag shrinks a duvet to a quarter of its size. You pay for it later: every time you want the duvet, you open the bag and wait for it to puff back up.
[Part 14](/en/blog/qwen38-dual-2080ti-tensor-parallel) ran Qwen3.8-27B as Q8_0 across two modded 2080 Tis, with its built-in MTP draft head. After tuning it decoded at 66 tok/s and became this machine's main serving setup. This part takes the same model compressed to ternary weights, fits it on one card, and asks how much of the model survives. On my 140-question set, one question separates them: 130 vs 131.
## What Ternary Bonsai 2 is: Qwen3.8-27B with nearly every weight at −1, 0 or +1
Ternary Bonsai 2 27B is a model from PrismML, derived from Qwen3.8-27B. Nearly every weight is −1, 0 or +1, and each group of 128 weights shares one FP16 scale. Three possible values carry log2(3) ≈ 1.58 bits of information per weight. Averaged over the whole model, it comes to 1.72 bits per weight. The linear-attention state path and the norm weights, about 0.1% of the language model, stay at higher precision; the 1.72 already counts them.
The weights are stored in a rotated basis. The rotation is a Hadamard transform: a fixed orthogonal matrix made of +1s and −1s, applied here in blocks of 1024. Because the weights were rotated, the runtime has to apply the matching transform to each layer's input activations before the multiply. Stock llama.cpp has no such step, so it rejects the two Bonsai formats, PQ2_0 and PTQ1_0, as unknown types. The model card also warns that stock llama.cpp loads Q2_0 files without complaint and outputs garbage. The rotation matters again in the speed section.
The same ternary weights ship in two packings. The 5.9 GB in PrismML's headline is PTQ1_0.
| packing | how each trit is stored | bits/weight | file |
|---|---|---:|---:|
| PTQ1_0 | packed densely | 1.75 | 5.95 GB |
| PQ2_0 | one per 2-bit slot | 2.13 | 7.21 GB |
A trit is one ternary digit. PQ2_0 wastes part of each 2-bit slot, and in exchange its trits are cheaper to unpack.
## PrismML's claim: 98.2% of FP16 in 5.9 GB, where IQ2_XXS keeps 84.1%
These numbers come from the [model card](https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf), not from my runs: H100, EvalScope with vLLM, thinking mode, averaged over 14 benchmarks. Compare the last column for IQ2_XXS and Bonsai 2, which sit in the same ~2-bit class.
| variant | size | 14-benchmark average | vs FP16 |
|---|---:|---:|---:|
| Qwen3.8-27B FP16 | 54 GB | 86.32 | 100% |
| UD-Q4_K_XL | 17.6 GB | 85.18 | 98.7% |
| IQ2_XXS | 9.4 GB | 72.59 | 84.1% |
| Bonsai 2 27B | 5.9 GB | 84.78 | 98.2% |
At about 2 bits, the conventional quant keeps 84.1%. Bonsai 2 keeps 98.2%, half a percentage point below the 17.6 GB UD-Q4_K_XL.
## 130 vs 131 out of 140: one card against the two-card Q8_0 setup
My eval set is 140 questions: 50 from GSM8K, 30 from MATH-500, 20 from MuSR and 40 from HumanEval+, drawn with a fixed seed. Both setups got the same questions and the same scoring. Thinking was on. Sampling followed Qwen's recommendation: temperature 1.0, top_p 0.95, top_k 20. Each question got an 8,192-token output cap, and requests ran one at a time.
Compare the scores against the card counts:
| setup | cards | weights | score /140 | median decode |
|---|---:|---:|---:|---:|
| Bonsai 2 PQ2_0, reasoning effort medium | 1 | 7.2 GB | 130 | 36.85 tok/s |
| Bonsai 2 PQ2_0, effort xhigh (fork default) | 1 | 7.2 GB | 116 | 35.38 tok/s |
| Qwen3.8-27B Q8_0 (abliterated) + MTP, llama.cpp | 2 | 29 GB | 131 | 66.04 tok/s |
Per benchmark, medium-effort Bonsai vs the Q8_0 setup: MATH-500 30/30 on both, MuSR 15/20 against 13/20 with Bonsai ahead, HumanEval+ 36/40 against 38/40, GSM8K 49/50 against 50/50.
130/131 is 99.2% of the Q8_0 setup. That is a different yardstick from PrismML's 98.2%. Theirs compares against FP16 on 14 benchmarks on an H100. Mine compares against Q8_0 on 4 benchmarks and 140 questions.
Two caveats:
- I ran the 140 questions on the 7.2 GB PQ2_0, not the 5.9 GB PTQ1_0 in the headline. The ternary weights are the same, so capability should match, but on PTQ1_0 I only measured speed.
- This compares two setups, not two quantizations. The Q8_0 side also runs MTP across two cards, so the gap isn't purely quantization.
The speed column needs the same warning: the two numbers come from different hardware. I picked Q8_0 as the baseline because it's close to lossless, which makes it the right yardstick for how much an extreme quant gives up. At 29 GB it doesn't fit on one 22 GB card, so it runs across two. Bonsai's 36.85 tok/s is one card; Q8_0's 66.04 tok/s is two.
## Why the smallest file decodes slowest: Bonsai uses 46% of the card's bandwidth, Q4_K uses 78%
These are llama-bench runs on the same fork and one 2080 Ti. tg128 is decode speed over 128 generated tokens; that's the column to watch.
| weights | file | pp512 | tg128 | total VRAM |
|---|---:|---:|---:|---:|
| PTQ1_0 | 5.95 GB | 435 tok/s | 32.71 tok/s | 6,670 MiB |
| PQ2_0 | 7.21 GB | 691 tok/s | 39.12 tok/s | 7,818 MiB |
| Q4_K (same base model) | 15.66 GiB | 634 tok/s | 28.68 tok/s | 16,330 MiB |
The VRAM readings include 346 MiB that ComfyUI was holding on that card.
The smallest packing is the slowest. PQ2_0 is 1.2 GB bigger than PTQ1_0 and decodes 19.6% faster. Against Q4_K, PQ2_0 decodes 36% faster in less than half the VRAM.
To see why, compute how much of the card's memory bandwidth decode actually uses. Each generated token reads every weight once, so decode tok/s × weight file size is the number of bytes read from VRAM per second. Divide that by the 2080 Ti's theoretical 616 GB/s (352-bit bus × 14 Gbps):
- Q4_K: 16.8 GB (15.66 GiB) × 28.68 = 482 GB/s, 78% of peak
- PQ2_0: 7.21 GB × 39.12 = 282 GB/s, 46%
- PTQ1_0: 5.95 GB × 32.71 = 195 GB/s, 32%
Q4_K runs close to the memory limit, so a smaller file means faster decode. Bonsai isn't limited by memory. Every token requires unpacking the trits and applying the Hadamard transform to the inputs, and that is arithmetic, not data movement. PTQ1_0 moves 17% less data than PQ2_0, but its denser packing costs more to unpack.
The model card says the same thing. PTQ1_0 is faster on Ada-generation cards and the L4, where decode is short on memory bandwidth. It loses to PQ2_0 on H100, A100 and Blackwell, where batch-1 decode is limited by instruction throughput and launch overhead. The 2080 Ti lands in the second group. [Part 12](/en/blog/why-4bit-isnt-faster-on-2080ti) found that on this card, low-bit quantization saves VRAM but not necessarily time.
## What you need: one 2080 Ti, PrismML's llama.cpp fork, and a 7.21 GB file
- **One modded 2080 Ti 22G.** The short-context peak is under 8 GB. By that math a stock 11 GB 2080 Ti should fit, but I didn't test one.
- **PrismML's llama.cpp fork**, [PrismML-Eng/llama.cpp](https://github.com/PrismML-Eng/llama.cpp), branch `prism`. I used commit `01041db` with CUDA 12.4. The build flag that matters is `CMAKE_CUDA_ARCHITECTURES=75`: the PQ2_0 and PTQ1_0 kernels compile for sm_75, the 2080 Ti's compute capability.
- **The weights:** `Ternary-Bonsai-2-27B-PQ2_0.gguf`, 7.21 GB, from [prism-ml/Ternary-Bonsai-2-27B-gguf](https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf). On this card, pick PQ2_0 over PTQ1_0 for the bandwidth reasons above.
## How to build and run it: clone, compile for sm_75, download, serve
Clone the fork and build the server and llama-bench for Turing:
```bash
git clone --branch prism https://github.com/PrismML-Eng/llama.cpp prismml-llama.cpp
cd prismml-llama.cpp
cmake -B build-cuda75 -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_BUILD_TYPE=Release
cmake --build build-cuda75 -j 20 --target llama-server llama-bench
./build-cuda75/bin/llama-server --version # the fork's llama-bench has no --version; check the server instead
```
Download the PQ2_0 weights:
```bash
hf download prism-ml/Ternary-Bonsai-2-27B-gguf Ternary-Bonsai-2-27B-PQ2_0.gguf --local-dir ~/models/bonsai2
```
Start the server:
```bash
./build-cuda75/bin/llama-server \
-m ~/models/bonsai2/Ternary-Bonsai-2-27B-PQ2_0.gguf \
-ngl 99 -c 16384 -np 1 -fa on --jinja \
--reasoning-effort medium \
--host 0.0.0.0 --port 8080
```
This is the exact line that produced 130/140. I sent sampling parameters with each request: temperature 1.0, top_p 0.95, top_k 20, min_p 0. The model card says the GGUF metadata carries the same defaults.
## Two blockers: stock llama.cpp, and an xhigh default that scores 116
**Stock llama.cpp won't load PQ2_0 or PTQ1_0.** It has no Hadamard runtime. Use the fork.
**Reasoning effort defaults to xhigh.** At that setting, 21 of 140 questions spent all 8192 tokens without answering, and the score was 116. With `--reasoning-effort medium`, one question hit the limit and the score was 130. The model card says `low` isn't supported and behaves close to xhigh, so use medium.
Not a blocker, but a time sink: a second card doesn't help. Tensor parallel (`-sm tensor`) hits an assertion at load, and layer split (`-sm layer`) adds only 6–7%. The deep dive explains why.
## MTP adds 15% on code and 43% on math, with a community graft and a 15-line patch
MTP is Qwen3.8's built-in draft head. It guesses a few tokens ahead, the main model verifies them in one pass, and every correct guess comes free.
The official Bonsai 2 has no MTP head. Its GGUF lacks the original model's `nextn` tensors, and PrismML's download script says there is no draft model. A community build grafts MTP back: [BoldingBuilds' abliterated (uncensored) PQ2_0-MTP](https://huggingface.co/BoldingBuilds/Ternary-Bonsai-2-27B-Abliterated-PQ2_0-MTP-GGUF).
Same card, temperature 0, median of 3 runs per workload:
| config | code (tok/s) | math (tok/s) | prose (tok/s) |
|---|---:|---:|---:|
| no speculation | 38.9 | 38.2 | 37.8 |
| MTP n=2 | 44.8 | 54.6 | 47.3 |
| MTP n=3 | 40.3 | 53.1 | 41.8 |
n=2 is the fastest: +15% on code, +43% on math, +25% on prose. Drafting more tokens slows it down. The flags are `--spec-type draft-mtp --spec-draft-n-max 2`. The fork needs a 15-line patch before it will run the MTP graph; the patch is in the deep dive.
This build scores 128/140 at medium effort, two below the original and within noise (MATH-500 −3, MuSR +1). It's an uncensored (abliterated) build.
## 262K context on one 22 GB card: q8_0 KV cache, 17,312 MiB at load
Qwen3.8-27B has 64 layers. Of those, 48 use linear attention, which keeps a fixed-size state instead of a growing KV cache. Only the 16 full-attention layers store KV. That is what lets 262K tokens fit on one card:
```bash
./build-cuda75/bin/llama-server -m -ngl 99 \
-c 262144 -ctk q8_0 -ctv q8_0 -np 1 -fa on --jinja \
--spec-type draft-mtp --spec-draft-n-max 2
```
Load peak is 17,312 MiB. Below is a real 150K-token prompt on the abliterated PQ2_0-MTP.
| | prefill | decode | peak VRAM |
|---|---:|---:|---:|
| no speculation | 315.5 tok/s | 13.1 tok/s | 17,336 MiB |
| MTP n=2 | 297.3 tok/s | 21.1 tok/s | 19,432 MiB |
Reading 150K tokens takes about 8 minutes. An fp16 KV cache would need roughly 24 GB by my estimate, so q8_0 KV is mandatory here. Long context is where MTP pays off most: decode goes up 61%.
---
## Deep dive: reasoning effort, the bandwidth math, DFlash2, and why -sm tensor asserts
You can skip this section. Everything above is enough to run the model; what follows is the full data, the verbatim errors and the commands behind each claim.
### 116 → 122 → 130: the fix was reasoning effort, not a bigger token budget
The first full run used the fork's default effort, xhigh, and scored 116/140. Of 24 failures, 21 ended with `finish_reason=length`: 15 on MuSR, 4 on HumanEval+, 2 on MATH-500. All 15 MuSR failures were still thinking when they hit the limit.
A bigger budget is the obvious fix, and it's what I tried first. I reran those 21 questions at 16384 tokens:
| bench | rerun | rescued | still truncated at 16K | wrong |
|---|---:|---:|---:|---:|
| MATH-500 | 2 | 2 | 0 | 0 |
| HumanEval+ | 4 | 2 | 2 | 0 |
| MuSR | 15 | 2 | 9 | 4 |
That brings the composite to 122/140. Doubling the budget rescued 6 of 21. The truncated reasoning wasn't looping: the last 5,000 characters had no repeated fragments. It was overthinking. On a two-choice murder-mystery question, it was checking the first letters of paragraphs for a hidden acrostic.
The model card recommends medium effort. A full 140-question rerun at medium scored 130/140, and truncations dropped from 21 to 1:
| bench | N | xhigh/8192 | medium/8192 | Q8_0 setup |
|---|---:|---:|---:|---:|
| GSM8K | 50 | 49 | 49 | 50 |
| MATH-500 | 30 | 28 | 30 | 30 |
| MuSR | 20 | 5 | 15 | 13 |
| HumanEval+ | 40 | 34 | 36 | 38 |
| total | 140 | 116 | 130 | 131 |
| group | truncated | median output tokens | p90 output tokens | median decode (tok/s) |
|---|---:|---:|---:|---:|
| xhigh/8192 | 21 | 447 | 8192 | 35.38 |
| medium/8192 | 1 | 512 | 2326 | 36.85 |
| Q8_0 setup | 0 | 522 | 2437 | 66.04 |
The medians are nearly equal. The p90 is what separates them: at xhigh, 10% of answers run into the wall.
**How I checked the flag actually applied.** The server log has no line for `--reasoning-effort`, and `/props` has no field for it. The fingerprint I used is the prompt token count. On the same question, gsm8k/895, xhigh gave `prompt_n=135` and medium gave `prompt_n=93`. The flag feeds the chat template, and nothing else in the run changes how the prompt is rendered, so the missing 42 tokens can only come from it. Reasoning length on that question came out at 286, 209 and 270 characters across three groups. At temperature 1.0 that is sampling noise, not evidence.
**Head-to-head, medium vs the Q8_0 setup:**
- both right: 126
- only Bonsai right: 4 (musr/34, musr/212, musr/0, HumanEval/76)
- only Q8_0 right: 5 (gsm8k/1059, musr/20, HumanEval/145, HumanEval/97, HumanEval/151)
- both wrong: 5
**Scoring.** GSM8K takes the number after the last `Answer:`. MATH-500 takes the last complete `\boxed{}` and judges it with math_verify 0.9.0. MuSR takes the last option letter. HumanEval+ runs evalplus 0.3.1; both the base and plus tests must pass, with a 20 s outer timeout per problem. The sampling seed is `random.Random(20260920)`. `finish_reason=length` counts as wrong, with no reruns.
### Bandwidth usage: how I computed it, and a prefill number I got wrong
The method: each generated token reads all weights once, so decode tok/s × weight file size is the bytes read from VRAM per second. Divide by 616 GB/s (352-bit × 14 Gbps).
| weights | file | tg128 (tok/s) | bytes read | of 616 GB/s |
|---|---:|---:|---:|---:|
| Q4_K | 16.8 GB (15.66 GiB) | 28.68 | 482 GB/s | 78% |
| PQ2_0 | 7.21 GB | 39.12 | 282 GB/s | 46% |
| PTQ1_0 | 5.95 GB | 32.71 | 195 GB/s | 32% |
Two more independent signals point the same way.
**Speculation gets slower as it drafts more.** DFlash2 (a separate draft model, covered in the next section) on Bonsai at n=3, 5 and 8 gave 46.3, 42.5 and 34.7 tok/s on code. In August I ran Qwen3.8-27B's own DFlash2 draft on a regular Q4 with the same sweep, and it climbed from 53.77 at n=2 to 59.73 at n=5 before leveling off. Speculation pays by verifying several tokens per read of the weights. When weight reads aren't the bottleneck, verifying n tokens just costs about n times the arithmetic.
**A regular 4-bit quant on this card is still memory-bound.** In August, same base model, same machine, pure decode: Q4 at 37.79 tok/s against Q8 at 27.80, +36%. There, smaller is faster.
**A measurement mistake I made.** I first tried prefill speed ÷ decode speed as a diagnostic and measured Bonsai's prefill at 21.2 tok/s, slower than its decode. I nearly wrote that up as proof. The probe sent the same 4,060-token prompt three times and took the median. Runs 2 and 3 hit the prompt cache and had only a few tokens left to process, so fixed overhead dragged their tok/s down, and the median landed on a cached run.
The counter-evidence was already there. Server startup plus all three requests finished within 20 s; a true 21.2 tok/s would need 191 s for one request. llama-bench measured pp512 at 691. The 150K-token prompt prefilled at 315.
If you measure prefill, use a different prompt on every run, or turn the cache off. And the ratio can't diagnose decode anyway. Prefill processes a large batch at once and is compute-heavy by nature. Bonsai's correct pp512 ÷ tg128 is 17.7×, which that diagnostic would read as memory-bound, the opposite of the other three signals.
### DFlash2 on Bonsai 2 runs, but beats built-in MTP by only 3–8%
ProCreations published a DFlash2 draft model made for Bonsai 2, [ProCreations/Ternary-Bonsai-2-27B-DFlash2](https://huggingface.co/ProCreations/Ternary-Bonsai-2-27B-DFlash2), a 2.06 GB Q8_0 GGUF. The PrismML fork can't load it:
```
done_getting_tensors: wrong number of tensors; expected 81, got 58
```
The draft is the newer generation of DFlash2, with conv and selector modules. The fork's architecture table has no entries for DFLASH_ATTN_CONV_BASE/PROJ, DFLASH_FFN_CONV_BASE/PROJ or DFLASH_SELECTOR_HIDDEN/NEXT/PREV. I had also built the two upstream llama.cpp DFlash2 PRs; they fail earlier, on the target model, because upstream has no PQ2_0 support.
What works is the runtime source shipped in the ProCreations repo, `runtime/prism-dflash2-source.tar.gz`, already patched. Build it with:
```bash
cmake -S /llama -B /llama/build -G "Unix Makefiles" \
-DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_BUILD_TYPE=Release \
-DLLAMA_CURL=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF
cmake --build /llama/build -j 12 --target llama-server llama-quantize
```
The repo lists CUDA 13.3, but `find_package(CUDAToolkit)` doesn't pin a version, and 12.4 builds fine. Without ninja installed, use the Unix Makefiles generator.
Same binary, same card, temperature 0, `-c 16384`, median of 3 per workload, on the abliterated version. All five rows ran on this binary, so its MTP n=2 row is a separate measurement from the MTP table in the first half.
| config | code (tok/s) | math (tok/s) | prose (tok/s) | acceptance | peak VRAM |
|---|---:|---:|---:|---:|---:|
| MTP n=2 | 42.8 | 50.4 | 45.4 | 60.9% | 9.3 GB |
| DFlash2 n=3 | 46.3 | 52.4 | 46.8 | 63.3% | 11.5 GB |
| DFlash2 n=5 | 42.5 | 50.2 | 44.1 | 50.3% | 11.8 GB |
| DFlash2 n=8 | 34.7 | 46.9 | 36.8 | 39.9% | 12.3 GB |
| original (not abliterated), DFlash2 n=5 | 47.3 | 49.0 | 40.9 | 50.7% | 11.8 GB |
The best DFlash2 setting, n=3, is only 3–8% ahead of built-in MTP. It costs 2.2 GB more VRAM and an extra draft file. Abliteration barely moves acceptance: 50.3% against 50.7% at n=5. Not worth it.
The same family of draft on the 29 GB FP8 model across two cards is a different story, because there the weights really are memory-bound. That is [part 20](/en/blog/fastllm-dflash2-dual-2080ti).
### Why -sm tensor asserts on two cards: 2560 ÷ 1024 = 2.5
With two cards and `-sm tensor`, the first error is:
```
llama_params_fit is not implemented for SPLIT_MODE_TENSOR
```
With `--fit off`, the real one appears:
```
ggml-backend-meta.cpp:1086: GGML_ASSERT(split_state.ne[j] % div == 0) failed
```
I first suspected the hybrid attention. But part 14's Q8_0 has the identical architecture to Bonsai 2's MTP version (both `qwen35`, 866 tensors, identical SSM parameters), and it splits fine. The only difference is Bonsai's extra GGUF metadata:
```
prism.hadamard.block_size = 1024
prism.hadamard.transform = normalized-sylvester-walsh-hadamard
prism.hadamard.axis = input-last-dimension
prism.hadamard.weight_names = 401 weights
```
The Hadamard transform acts on the input's last dimension in blocks of 1024. The hidden width is 5120. Split across two cards, that's 2560 per card, and 2560 ÷ 1024 = 2.5, so one block gets cut in half. `split_state` is tensor parallel's own bookkeeping, and it requires each card's slice to be divisible by the block size. This blocks MTP and DFlash2 alike; it doesn't depend on the speculation method.
`-sm layer` runs. It's a pipeline: one card computes the first half of the layers, the other computes the second half, and only one card works at a time. DFlash2 n=3 gave 49.0 / 55.4 / 50.1 tok/s and MTP n=2 gave 46.0 / 53.7 / 48.6 (code / math / prose), 6–7% over one card. The second card adds capacity, not compute.
### The 15-line MTP patch for commit 01041db
At commit 01041db, the fork's main graph un-rotates the embeddings right after the lookup. The MTP graph has its own embedding lookup and skips that step, so `llama_verify_hadamard_graph` rejects the context. The patch goes in `src/models/qwen35.cpp`:
```cpp
#include "llama-impl.h" // llama_mul_mat_hadamard
// in graph_mtp, right after tok_embd = ggml_get_rows(...):
// a Hadamard-latent embedding table stores rotated rows; restore the
// primal basis right after the lookup: h = s * (H z). The main graph does
// this in llm_graph_context::build_inp_embd(); this graph has its own lookup
// and must do the same or llama_verify_hadamard_graph rejects the context.
if (hadamard_inverses) {
const auto it = hadamard_inverses->find(tok_embd_w);
if (it != hadamard_inverses->end()) {
tok_embd = llama_mul_mat_hadamard(ctx0, tok_embd, it->second.rot);
if (it->second.signs) {
tok_embd = ggml_mul(ctx0, tok_embd, it->second.signs);
}
}
}
```
After patching, `--version` still reports commit 01041db99. Keep your own record of which binary is patched.
### Bonsai v1's dspark draft: 1.57× on arithmetic, 0.90× on Chinese
Bonsai 2 has no draft model. The previous Ternary-Bonsai-27B (v1) has one: a dspark drafter from the DFlash family, merged into upstream llama.cpp on 2026-07-28. It ships as bf16 at 7.29 GB. I dropped the shared tensors and quantized it to Q4_0, which brought it to 632 MB. Same server, same card, temperature 0, median of 3:
| prompt | no spec (tok/s) | dspark (tok/s) | speedup | acceptance |
|---|---:|---:|---:|---:|
| EN quicksort | 41.8 | 53.3 | 1.28× | 0.57 |
| zh-TW 300-character explanation | 41.2 | 36.9 | 0.90× | 0.31 |
| EN car-chase arithmetic | 40.7 | 63.9 | 1.57× | 0.74 |
The official claim is "lossless 1.34×". My three-prompt average is 1.25×, and the Chinese prompt got slower (0.90×).
At temperature 0, the reasoning with and without speculation diverged around token 600, because batch verification's numerics flip an argmax. In llama.cpp's implementation, "lossless" does not mean byte-identical.
The draft-free `ngram-simple` made zero proposals on all three real prompts, for 1.00×. Reasoning prose has no repeated spans for it to grab.
### Not tested yet
- A 140-question eval on the 5.95 GB PTQ1_0. It should match PQ2_0; I haven't measured it.
- A stock 11 GB 2080 Ti.
- Vision (mmproj).
- In an early smoke test, a zh-TW answer leaked one simplified-Chinese character, and the reasoning was entirely in simplified Chinese. I can't pin that on quantization without running the same prompt on unquantized Qwen3.8-27B, which I haven't done.
---
**Also in this series:**
- [#14 Two modded 2080 Tis running Qwen3.8-27B with llama.cpp tensor parallel](/en/blog/qwen38-dual-2080ti-tensor-parallel)
- [#12 Why isn't your 4-bit quant faster on a 2080 Ti?](/en/blog/why-4bit-isnt-faster-on-2080ti)
- [#20 FastLLM + DFlash2 on two 2080 Tis](/en/blog/fastllm-dflash2-dual-2080ti)
---
# [LLM Deep Dive] A quantization lab: what quantization is, how it works, where the error comes from
URL: https://ai-muninn.com/en/blog/quantization-lab
Date: 2026-09-20
Series: LLM Deep Dive (Part 6)
[A quantization lab](https://model.ai-muninn.com/en/quantization/): pick INT8, FP8, INT4 or FP4, pick one of four weights, and watch it go through scale, encode, store, reconstruct. Two findings. With `-15.875` in the group, one INT4 step spans 2.2679, so `0.375` and `-0.875` both round to **0** — two of four weights gone. And the weight that sets the scale comes back as **-15.874999523162842**: `15.875 / 7` is not representable in FP32, so the ruler is quantized too. How real quantizers fight outliers is Part 1's subject, not this one.
## Introduction
Quantization fits on one line, and the [ONNX QuantizeLinear spec](https://onnx.ai/onnx/operators/onnx__QuantizeLinear.html) writes it out: divide the value by a scale, round to the nearest representable level, clamp. Dequantization multiplies back. The spec carries a `zero_point` offset as well; everything here is symmetric, so that term is 0 and never shows up. Nothing in there is hard to read.
Naming *where* the error enters is harder. Rounding is the obvious answer, and it is incomplete. The part that gets skipped is the scale — where it comes from, and what it costs.
So I built something clickable: [model.ai-muninn.com/en/quantization/](https://model.ai-muninn.com/en/quantization/). Pick a format, follow one weight through four steps, read the error at the end. What follows is what the lab shows: what quantization is, how it runs, and the three places the error comes from — two of which I had not understood before building it.
## What quantization is: fewer bits holding the same numbers
Model weights are floating point. In BF16 each one takes 16 bits. Quantization stores the same numbers in fewer bits — 4 bits each at INT4.
The lab does that accounting in groups of 64 weights:
| | Storage |
| --- | ---: |
| 64 BF16 weights | 128 bytes |
| 64 INT4 weights | 32 bytes |
| + 1 shared scale (FP32) | 4 bytes |
| **Total** | **36 bytes** |
A 71.9% saving. The lab's cube is the same arithmetic in 3D: change format and its 64 blocks re-encode into a smaller volume.
The cost sits in the bit count. Four bits give you 16 combinations, and the symmetric range used here spans -7 to 7 — 15 levels, trading -8 away for symmetry around zero. A weight that used to be any float now has to land on one of those 15. **Anything that does not land on one gets moved to the nearest.**
## How to use it: pick a format, follow one weight, see where it breaks
The page opens on BF16 and nothing happens. That is deliberate. BF16 is the format the weights are already in, so there is no scale to compute and nothing to encode.
Click INT8, FP8, INT4 or FP4 and a four-step lesson appears:
1. **Compute the group's scale.** The group's maximum absolute value divided by what the format can hold.
2. **Convert the weight into something the format can hold.** An integer code, or the nearest level the format's bit layout allows.
3. **Show what is actually stored.** Not the number you typed — the code, plus the one scale the group shares.
4. **Reconstruct and compare.** Multiply the stored code back by the scale, put the result next to the original, and read the difference.
**Error source one is that rounding**: a weight that does not land on a level gets moved to the nearest one. Everyone knows that one. The next two sections are the other two, and I had not thought about either before building this.
Four number buttons — `0.375`, `-0.875`, `4.25`, `-15.875` — switch which weight is traced. All 64 teaching weights share one scale, which is what makes the buttons worth pressing: you are not changing the setup between clicks, only which weight you follow through it.
First run: INT4, trace `0.375`.
## Error source two: how coarse a step is, decided by the group's largest value
The teaching group holds four values: `-15.875`, `-0.875`, `0.375` and `4.25`. The first is an order of magnitude above the rest.
INT4 has seven steps each way, so the scale is the group's maximum absolute value over that limit:
```
scale = 15.875 / 7 = 2.2679
```
One step spans 2.2679. Run `0.375` through it:
```
0.375 / 2.2679 = 0.165 -> rounds to 0
```
`-0.875` does the same. Two of the four values are gone.

Take `-15.875` out of the group and nothing about `0.375` changes. The group max becomes 4.25, the scale becomes 0.6071, and `0.375` reconstructs as 0.6071 — still wrong, but no longer zero. What changed was not the weight. It was which group it shares.
Outliers are the subject of Part 1. [What quantization algorithms actually do](/en/blog/llm-deep-dive-quantization-algorithms) covers why they are the enemy, and how K-quant super-blocks and TurboQuant's rotation each handle them. I am not re-deriving that here. What the lab adds is that you can click it and watch the weight go.
## Error source three: the scale is an approximation too
A weight sitting exactly on a tick should reconstruct perfectly. And the group's maximum should be the safest value in the set: it defines the scale, and its code is exactly the format limit.
Pick INT4 and trace `-15.875`. It reconstructs as `-15.874999523162842`, off by `4.77e-7`.
The rounding step is not where that came from. `-15.875 / 2.267857... = -7`, exactly, with nothing to round. The error is in the ruler. `15.875 / 7` cannot be represented in FP32, so the scale that actually gets stored is `2.267857074737549`. Multiply the code `-7` by that number and you cannot land on `-15.875`, because the number you are multiplying by is not `15.875 / 7`.
The same weight shows the same `4.77e-7` under FP8 and FP4.
The magnitude is too small to matter for anything. What it corrects is the mental model: rounding is not the only source of error. The ruler used to reconstruct has itself been quantized.
## What "reconstruct" actually means at inference
Step 4 is called reconstruction, which invites a fair question. If every use of the model restores the weights to BF16, don't the savings come straight back?
No.
With weight-only quantization the weights do get converted back to floating point for the multiply. What does not happen is a full BF16 copy of the model being built first. Dequantization is fused into the matmul kernel and runs tile by tile, so the complete BF16 weight tensor never exists in memory at once. The capacity and bandwidth savings hold at inference time.
This path shows up in the performance posts on this site without being explained as a concept. The line `NVFP4 weights → Marlin dequant → BF16 → BF16 GEMM` in [the NVFP4 Triton patch post](/en/blog/dgx-spark-nvfp4-fp8-triton-patch) is exactly it: dequant is a stop inside the kernel, not a pass that unpacks the whole model.
So step 4 in the lab is an instrument. You need the original and the restored value side by side or there is no error to measure at all. It is not a cost paid per token.
(The page quantizes weights only. Activations stay floating point, and quantizing those too is a separate topic for another time.)
## What you can cite, and what is only illustrative
Citable, because they are computed:
- the scale
- the reconstructed values
- the error
- the bytes
The byte math is in the table at the top, and the shared scale is already counted in it.
Illustrative only, not to be quoted as measurement:
- box sizes do not track tensor dimensions
- cache cell counts are not measured
- animation speed is unrelated to real speed
- the colored routing lines come from a fixed seed
Where a number is not verified the lab prints "not verified" rather than 0, because a 0 reads like a measurement someone took.
## Deep dive: why these numbers can be trusted
Skip this section if you only want to use the lab.
`node verify.cjs` runs 53 checks, and they test data consistency rather than looks:
- every finite FP4 E2M1 encoding must match
- FP8 E4M3FN subnormal and NaN encodings must match
- ties-to-even must hold on both sides of zero
- the scale must use its stored FP32 value, not the theoretical one, when picking integer codes
That last check is where the `4.77e-7` above comes from. Let the tests accept the theoretical scale and the error disappears from the page — and what disappeared would be something real.
One coincidence in the teaching group is worth knowing before you read the INT8 tab. INT8 shows exactly zero error on all four values, because 15.875 / 127 = 0.125 exactly and all four values are multiples of 0.125. The lab labels this as deliberately chosen teaching data. It must not be read as INT8 being lossless.
## Where to click first
Open [the lab](https://model.ai-muninn.com/en/quantization/), pick INT4, and trace `0.375`. Watch it become 0 at Step 2.
Then trace `-15.875`, the weight that sets the scale for all 64. Its integer code is -7, the INT4 limit, and it still comes back as -15.874999523162842.
---
# [LLM Deep Dive] What actually happens inside one transformer layer — four real models, four data flows
URL: https://ai-muninn.com/en/blog/model-anatomy-explorer
Date: 2026-09-16
Series: LLM Deep Dive (Part 5)
[model.ai-muninn.com](https://model.ai-muninn.com/en/) draws four open models as a cube you pull apart: pick a model, expand it into its decoder layers, click a layer, click a region. Two things it makes hard to ignore. Qwen3-30B-A3B carries **48 x 128 = 6,144 expert FFNs**, all resident inside its 61.06 GB BF16 total, with 8 used per token. DeepSeek-V4.1-Flash has 40 layers and only **4 of them** — 3, 9, 15, 21 — produce the shared compressed KV that 34 layers read. Caveat: parameter and layer counts come from pinned configs, but box sizes, cache cells and routing lines are drawn for teaching, not measured.
## Introduction
I can recognise a bicycle from across the street. Ask me to draw one from memory and the chain ends up somewhere no chain can go. Transformer layers are like that. Everyone has seen the block diagram. Very few people can draw where the residual actually reconnects.
So I built a site that draws it: [model.ai-muninn.com](https://model.ai-muninn.com/en/). Four open models, no login, bilingual. This article is about what it shows and how to read a model with it.
## How to use it: pick a model, expand the layers, click a region
The model picker sits top left. Four models, each with its layer count on the card:
| Model | Layers | Type |
|---|---:|---|
| Qwen3-30B-A3B | 48 | MoE |
| Qwen3-8B | 36 | Dense |
| Qwen3.8-Flash-Next | 48 | hybrid attention |
| DeepSeek-V4.1-Flash | 40 | 20 causal encoder + 20 decoder |
Then three clicks:
1. **Click the cube.** It pulls apart into a stack of slices. The slice count is the decoder layer count, so Qwen3-8B gives you 36 slices and DeepSeek-V4.1-Flash gives you 40.
2. **Click again to enter one layer.** Inside, the layer is broken into its functional regions rather than one box labelled "decoder layer".
3. **Click any region.** The right panel streams an explanation of what that region does, its parameter count, and the BF16 equivalent in GB.
A layer stepper sits next to the model, so you can hold one region in view and walk forward through the stack watching it change.
Start with Qwen3-30B-A3B and walk one layer end to end. It is the model where the count that surprises people is largest.
## One layer is six steps, not three
Most diagrams show three things: Attention, FFN, an arrow. The tool draws six, because six is what executes:
```
Input -> Norm 1 -> Attention -> +① -> Norm 2 -> MoE/FFN -> +② -> next layer
```

The two nodes usually left out are `+①` and `+②`, and they are not the same operation run twice. `+①` adds Attention's output back onto the copy of the data saved *before* Norm 1. `+②` adds the MoE output back onto the copy saved *before* Norm 2. Those two saved copies hold different data, because Attention and `+①` both ran between them.
The figure makes the offset visible: the two faint bypass lines leave the main path at different points. Click either `+` node on the site and the panel names which copy that node adds back.
## Two Norms per layer, 97 weight sets in a 48-layer model
Norm 1 and Norm 2 are two separate clickable boxes, and each reports its own parameter count: 2,048 each in Qwen3-30B-A3B, 4,096 each in the dense Qwen3-8B. They are two independent sets of RMSNorm weights, and they receive different data because Attention and the first residual add sit between them.
Both are instantiated per layer. Across 48 layers that is 96 sets of RMSNorm weights, not one normalization recipe reused. The Final Norm outside the layer stack is a third role with its own count, which brings the model to 97 weight sets.
## 48 x 128 = 6,144 expert FFNs, 8 of them per token
Open Qwen3-30B-A3B, step into a layer, click the Experts region. That layer holds 128 experts and routes top-8 per token. Across 48 layers: 48 x 128 = 6,144 expert FFNs, all resident in the file. The model totals 30,532,122,624 parameters, 61.06 GB in BF16, and on any given token most of that 61 GB is experts the Router did not select.
Two things about that region before you cite it. The large grid in the UI does not map one cell to one expert, and the 8 colored markers on it are a routing sample for that layer rather than a trace. The parameter accounting is real: the number printed on the Experts region is the weight total for that layer's 128 experts, derived from [the published config](https://huggingface.co/Qwen/Qwen3-30B-A3B/blob/main/config.json).
Experts are not pre-assigned by subject. There is no math expert and no translation expert. Each one is trained, and the Router scores them against the intermediate data arriving on this pass.
## Weighted merge, then +②: two nodes, 0 trainable parameters
The tool keeps these apart, in this order. The weighted merge multiplies each of the 8 expert outputs by the proportion the Router assigned it and sums them into one new intermediate representation. `+②` then adds that onto the copy saved before Norm 2.
Collapse them into one node and the question "where do the proportions come from" has nowhere left to live. They are this pass's data from the Router, not weights owned by the merge node. Both nodes report 0 trainable parameters, and 0 parameters is not free: the multiply runs, the add runs, and the intermediate has to be stored.
## DeepSeek-V4.1-Flash: 4 of 40 layers produce the shared KV
The backbone is 40 layers, 20 causal encoder plus 20 decoder. Step through them with the Attention region open and the same region keeps changing shape, because those 40 layers split four ways by where their KV and their index come from.
Read this part carefully, because the name invites the wrong reading: **every backbone layer still builds its own local-window KV. That is not shared.** The four layer types differ in how they handle the *shared compressed KV*.
| Kind | Layers | Shared compressed KV | Index |
|---|---:|---|---|
| SWA | 2 | none, local window only | none |
| Full | 4 | produces it | builds its own |
| Reindex | 4 | takes another layer's | recomputes its own |
| Reuse | 30 | takes another layer's | takes another layer's |
Only 4 of 40 layers produce the shared compressed KV, at one-based positions 3, 9, 15 and 21. Thirty-four layers read it — 30 take the index along with it, 4 recompute their own — and the 2 SWA layers never touch it.
The Reindex layers sit at 25, 29, 33 and 37. They take the shared compressed KV and recompute their own index, which means KV and index have separate lifetimes in this model. Step to one of those layers and the KV-building part drops out of the diagram, leaving only the index recompute.
You cannot tell which behavior a layer uses from the config field names alone. It comes out of `Attention.__init__`, `_compress_kv`, `_compress_topk_idxs` and `Indexer` in `inference/model.py` at the pinned revision. `_compress_topk_idxs` is the function that decides recompute versus reuse.
## Qwen3.8-Flash-Next: 36 Gated DeltaNet layers and 12 QSA
48 layers, and not one attention type repeated 48 times. The pattern is 3 Gated DeltaNet layers then 1 QSA layer, repeated 12 times: layers 1, 2, 3 are GDN, layer 4 is QSA, layers 5, 6, 7 are GDN, layer 8 is QSA, and so on to 36 GDN plus 12 QSA.
Step forward a few layers with the Attention region open and the diagram swaps. GDN runs old state, update, new state, readout, and the new state carries forward to the next token. QSA uses an indexer to pick a small subset of historical KV and reads only those.
## What you can cite, and what is only illustrative
Citable, because it is derived from pinned official configs:
- parameter counts
- layer counts
- expert counts and top-k
- the BF16 equivalent size
The two original Qwen3 models are the strongest case here: their published totals reconstruct exactly from per-layer parameters times layer count, plus Embedding, plus Final Norm, plus Output.
Illustrative only, and not to be quoted as measurement:
- box sizes do not track tensor dimensions or parameter ratios
- cache cell counts are not measured
- animation speed is unrelated to real speed
- the routing lines are a fixed-seed teaching illustration
One item deserves its own line. Which 8 of 128 experts the Router actually picked can never be drawn accurately. A config gives you how many exist and how many are chosen; which ones depends on live intermediate data, and only an inference trace tells you that.
Where a number is not verified the site prints "not verified" instead of 0, because a 0 reads like a measurement someone took.
## Deep dive: why these numbers can be trusted
Skip this section if you only want to use the site.
Every model is read at a pinned revision, not at `main`:
- Qwen3.8-Flash-Next config: `de4b8e4d43b917e7706784d8bb445c9af86a3540`
- DeepSeek-V4.1-Flash config: `dba1be0a40aa45a94ad051997016db3960a90277`
Each lives in its own HuggingFace repo. The Flash-Next implementation is pinned to Transformers commit `bd15bc95a89e728bbc1224084eb3b5829428c353` — that is a commit, not the `v4.51.3` tag, and the two are different objects. The two original Qwen3 models use their official configs plus [the `qwen3_moe` implementation at the `v4.51.3` tag](https://github.com/huggingface/transformers/blob/v4.51.3/src/transformers/models/qwen3_moe/modeling_qwen3_moe.py).
The reason for pinning is mundane. Configs change upstream. Reading `main` would silently redraw the diagram with nobody noticing.
`node verify.cjs` runs 35 checks, and they test data consistency rather than looks:
- the two original models' parameter totals must reconstruct exactly
- every visible region must have an explanation in every locale
- layer navigation must advance exactly one layer, and only the last layer may reach Output
- the merge and residual nodes must never be counted into any weight subtotal — their parameter field is 0, and the test stops that 0 being added into any subtotal
What is not done: the newer two models' full parameter counts are unknown or partial. Lookup, vision and MTP branch tensors are not individually verified, so the UI shows the official approximate figure or "not verified" rather than passing a known subtotal off as an exact total. And the BF16 equivalent is parameter count times 2 bytes in decimal GB — not a quantized download size, and not runtime memory, since it excludes KV cache, activations and workspace.
The site itself was written by Codex (`gpt-6-astra`), 27 commits in one day, v1 through v16.
## Where to click first
Open [model.ai-muninn.com](https://model.ai-muninn.com/en/), pick Qwen3-30B-A3B, and walk one layer end to end — Norm 1, Attention, `+①`, Norm 2, Experts, weighted merge, `+②` — watching that `+①` and `+②` add back two different copies.
Then switch to DeepSeek-V4.1-Flash and step to layers 3, 9, 15 and 21. Those are the only four of the 40 that produce the shared compressed KV.
---
# [DGX Spark] Two hard power-offs, reproduced on purpose — the fix, and why we turned it off again
URL: https://ai-muninn.com/en/blog/gx10-thermal-hard-poweroff
Date: 2026-09-14
Series: DGX Spark (Part 48)
My GX10 — an ASUS Ascent box on the same GB10 part as a DGX Spark — cut power twice in one day, both times on the second back-to-back native MiniMax-H3 run at 1344x768. Not just a crash: thermal protection pulled the plug before the OS got a word out. I reproduced it on purpose with the thermometer outside the machine: uncapped, run two died at **156 s**; capped with `nvidia-smi -lgc 300,2200`, the same run finished at **251.302 s**. Time at or above 95 °C went from **12% of the run to 0%**, peak power from **93.2 W to 74.0 W**. Capping is a workaround, not a fix — the defect stays. Caveat: `nvidia-smi` reads 8-15 °C low and will tell you the machine is fine.
## Preface
The previous article has one cell I could not fill: a second consecutive native run, uncapped. Every time I tried, the machine turned itself off.
Not a hang. Not a kernel panic. Off. Someone walks over to the desk and presses the button.
That happened twice in one day, so I stopped benchmarking and went after it instead. What follows is not a new bug. It is a known defect that other people had already reported, that had a community fix sitting on GitHub, and that my own second machine had been quietly mitigating for two months. So I reproduced it deliberately, with the instrument outside the machine, and what follows is the capped-versus-uncapped comparison that came out of it.
## The machine died twice, both times on the second back-to-back native run
The job was video-generation benchmarking on an ASUS Ascent GX10 — GB10 chip, 121 GiB of unified memory. MiniMax-H3 generating natively at 1344x768, about 200 s a run, GPU pinned at full load from the first second to the last. This was the control arm for the two-stage pipeline in the previous article.
The second failure has the cleanest timeline, because both runs happened inside one ComfyUI process:
```text
15:41:31 run 1 starts
15:45:20 run 1 finishes, 201.852 s — machine alive
201 seconds of unbroken full load
15:45:20 run 2 starts immediately, no gap
15:46:50 power gone — 90 seconds in
```
Run one survives. Run two, starting from a board that never got to cool down, does not.
## Five places that should have held evidence were empty, and that is the answer
I went looking for a cause the normal way, and came back with nothing five times:
1. `journalctl -b -1` stops **mid-line** on an ordinary entry. The last record is a routine tailscaled session close.
2. `/sys/fs/pstore/` is empty.
3. The SBSA hardware watchdog (`RuntimeWatchdogSec=10s`) never fired. There was no auto-reboot between the two boots.
4. The peer machine, on a direct ConnectX-7 link, saw both mlx5 ports go `Link down` **in the same second**. Zero AER, zero driver reset.
5. RJ45 shows `Link detected: yes`, and roughly 740 Wake-on-LAN magic packets did nothing.
Five dead ends, all consistent with one explanation: the power went before anything could be written down. journald stops mid-line. pstore never gets written. The watchdog cannot reboot a board with no power in it. The NIC drops carrier in the same instant.
Be careful with the word *because* here. These observations are consistent with that story rather than proof of it. A watchdog can also stay quiet because systemd is still feeding it, and a NIC losing link does not necessarily raise a PCIe AER event at all — I can say I saw no AER, not that there was no time to raise one. What actually points at power is having to walk over and press the button.
**It is not a crash. There is no power.** Once you accept that, the missing evidence stops being frustrating and starts being the diagnosis.
## Reproducing it needed the thermometer to sit outside the machine
The lethal combination was already obvious from two identical failures: native 1344x768, two runs back to back with no gap. Run one survives, run two dies around 90 s in.
The real problem was different: **neither failure left a curve.** A hard power-off eats whatever has not been flushed to the machine's own disk, and the unflushed part is exactly the part worth looking at. Anything I logged locally would die with the machine.
So the instrument went outside. Sampling every 2 seconds, streamed live over ssh to a MacBook:
```text
/sys/class/thermal/thermal_zone*/temp — package temperature
nvidia-smi --query-gpu=clocks.current.sm,power.draw,utilization.gpu — clock, watts, load
```
When the box dies, the samples are already off it.
## On this box nvidia-smi read 8 to 15 degrees low, and it would have told me the machine was fine
This one deserves to stand on its own, because it nearly cost me the whole investigation.
**On this machine the `nvidia-smi` temperature read 8 to 15 degrees below the ACPI zone I was sampling.** When `nvidia-smi` said 75-84 °C, that zone was already sitting at 92-98 °C. Thread 379195 records a comparable gap, 84 °C against 93.1 °C, so it is not unique to my box — but I have not established it as a rule for the part, and `thermal_zone*` is a set of sensors rather than one package temperature, so check which zone you are reading.
I had planned to watch `nvidia-smi`. It would have shown me the eighties on a machine that was about to cut its own power, and I would have written down "it is not hot" and gone looking somewhere else entirely. Read `/sys/class/thermal/thermal_zone*/temp`. Not the GPU tool.
## Capped at 2200 MHz, the run that died at 156 s finished at 251 s
Four runs, one machine, one workflow, one day. Two uncapped, two with the GPU locked to 2200 MHz.
| | uncapped | capped at 2200 MHz |
|---|---|---|
| measured clock under load | 2450, self-throttling to 1475 | 2164-2184 throughout |
| run 1 (cold), peak acpitz | 95.5 °C | 88.7 °C |
| run 2 (warm), peak acpitz | 96.0 °C | 91.1 °C |
| run 2, share of time at or above 95 °C | 12% | 0% |
| peak power draw | 93.2 W | 74.0 W, down 21% |
| run 1 | survived, 226 s | survived, 246.627 s |
| **run 2 — the killer** | **DIED at 156 s** | **survived, 251.302 s** |
The last sample that made it off the machine before it died:
```text
10:34:54 acpitz=92.2 GPU=84 util=96% 77.5W clk=2385
```
And then nothing. No shutdown line, no final flush, no next sample two seconds later.
Note the two temperature columns on that last row: `acpitz=92.2` while `nvidia-smi` reports 84. That is the 8-to-15-degree gap, caught in the act, on the sample immediately before the power went.
## Two flags get you through the run. They do not fix the machine
```bash
sudo nvidia-smi -pm 1 && sudo nvidia-smi -lgc 300,2200
```
Default boost on this part is about 2418. Capped at 2200, the same back-to-back pair that killed the machine completes.
The temperature tells it best. Peak goes from 96.0 °C to 91.1 °C, and **the share of the run spent at or above 95 °C goes from 12% to zero**. The run that killed the machine at 156 s now finishes at 251.302 s. Peak power drops from 93.2 W to 74.0 W at the same time.
**This is a way around the defect, not a repair.** It is still in the machine. One NVIDIA forum thread title says, in so many words, that it persists after a full platform firmware update; another ends in a fieldiag FAIL and an approved RMA. Firmware is not a settled answer either way — a third thread reports its power-offs stopping after an EC and SoC update. Capping just slows the heat down enough that it never reaches whatever the controller is watching. What you buy is a run that finishes, not a machine that is fixed.
(It costs around 9%: within one session the uncapped first run was 226 s against 246.6 s capped. Measure that on your own workload rather than borrowing mine — there is a section below on why.)
**The trap: do not read Applications Clocks or Max Clocks to see whether the cap took.** They still report 2418 and 3003. Neither moves when you lock, because neither is the ceiling you just set — one is the application-clock setting, the other the design maximum. What you want is the current clock under load, which `nvidia-smi -q -d CLOCK` does report, or `--query-gpu=clocks.current.sm`. I looked at those two unchanged numbers and nearly concluded the lock had silently failed.
## We turned the cap off again, because the cost depends on the shape of the workload
Twenty percent is not a constant. It is what you pay when your workload never lets go of the clock ceiling.
| workload | uncapped | capped 2200 | cost |
|---|---|---|---|
| native H3 1344x768, 4 steps | 226 s | 246.6 s | 9% |
| two-stage pipeline (warm) | 66.1 s | 70.4 s | 6% |
Native runs 200 seconds unbroken with every one of them pressed against the ceiling. The two-stage pipeline breaks for VAE decode, a handoff and a re-encode, so a smaller share of it is capped in the first place.
That same difference explains which runs killed the machine. **The two-stage pipeline ran four times on this box without a single failure, at a memory peak of 104 GiB — higher than the 74 GiB in use during the crashes.** Uncapped, one warm two-stage run takes 66.1 s and peaks at 74 °C, nowhere near the 95-plus of the failures. It never sits at the top long enough.
So the cap is off on this machine now, because it will not be running large native video jobs again. The unit file stays where it is in `/etc/systemd/system/`, and one line brings it back:
```bash
sudo systemctl enable --now gb10-clock-cap.service
```
## Cap it if your workload holds full load for minutes; skip it if your pipeline breathes
If you run jobs that stay at full load for two or three hundred seconds without a break — native video generation, long training steps, a power stress test — cap the clock. The 9% is cheap next to walking over to press a button, and cheaper still than the run you lose.
If your pipeline has natural interruptions in it, you may never hit this at all, and you do not need to pay for insurance against it. Measure your own longest unbroken stretch of full load before you decide.
---
## Deep dive: not memory, not the chip failing to protect itself, and not missing firmware
Everything above is what you need to run the machine. This part is the three explanations I ruled out, the two wrong turns I took, and where the fix had already been sitting.
### 104 GiB survived and 74 GiB died, so memory is not the variable
The obvious first guess on a 121 GiB unified-memory box is that something ran out of room.
| what ran | longest unbroken full load | memory peak | outcome |
|---|---|---|---|
| two-stage, cold | ~110 s | — | survived |
| two-stage, warm | ~67 s | 104 / 121 GiB | survived |
| native, single run | 201.8 s | 74 / 121 GiB | survived, barely |
| native, second consecutive | no gap | 74 / 121 GiB | died |
**The 104 GiB run survived. The 74 GiB runs are the ones that died.** Whatever decides the outcome, it is not how much memory was in use — the heaviest memory load on the machine is also the one that never failed. What separates the rows is the length of the unbroken stretch at full load.
### The chip was already throttling below our cap, and it died anyway
The second guess is that the chip failed to protect itself and a cap does the protecting. The samples say otherwise: uncapped, it was already throttling, and further down than we ever locked it.
| | uncapped run 1 | uncapped run 2 | capped (both runs) |
|---|---|---|---|
| clock min / median | 1735 / 2340 | 1475 / 2288 | 2164 / 2171 |
| share of samples below 2200 | 13% | 26% | — |
It went down to 1475, well below our 2200 cap, and cut power anyway. And it throttled *harder* on run two than run one — 26% of samples below 2200 against 13% — which is the chip reacting to a board that was already hot.
The difference is timing, not depth. Dynamic throttling reacts after things are hot; by the time the clock comes down, the heat is already in the board. A static cap never makes that heat in the first place.
**Be careful how far you push that.** The only claim the data supports is: hot enough for long enough and it cuts power. It does not support a threshold. Death came at 92.2 °C, the machine sat on a plateau between 89 and 96 °C for minutes, and run one touched 95.5 °C and lived. Anyone quoting you a magic number, me included, is reading more out of this curve than is in it.
One more thing worth reading off the capped runs: **there is no throttling at all.** Cold and warm capped runs have identical clock distributions across all four statistics — min, p5, median and max. Thermal throttling would put the hotter run lower; it does not. Sitting at 2164-2184 just under a 2200 cap is clock binning, not the chip pulling back.
### Two wrong turns I took
**One: I blamed the kernel first.** I checked `6.17.0-1032-nvidia` and driver `580.173.02`, found both current and known-good, and noted that my second machine on the same kernel was fine. Clean reasoning with a hole in it: the second machine was idle. An idle machine on the same kernel proves nothing about that kernel under load. I was comparing a machine that was working hard against one that was doing nothing and calling it a controlled comparison.
**Two: I nearly used the wrong thermometer.** The `nvidia-smi` gap above. Planning to watch the tool that read 8 to 15 degrees low here, on a problem that is entirely about temperature.
### Firmware is current, and a forum thread title is itself the negative result
```text
SBIOS GX10DGX.0105.2026.0505.1153 (ASUS ships 0105 after 0104)
EC fwupdmgr reports current
Model ASUSTeK GX10 (ASUS Ascent GX10), not an NVIDIA FE, so warranty goes through ASUS
```
My SBIOS is the version ASUS ships after 0104, and `fwupdmgr` says the EC is current, so updating firmware was not going to be the answer on this box.
The wider evidence on firmware is split, and I had only read half of it. One thread puts its negative result in the title: ["hard power off under sustained GPU load at 90W — persists after full platform firmware update"](https://forums.developer.nvidia.com/t/hard-power-off-under-sustained-gpu-load-at-90w-persists-after-full-platform-firmware-update/378315). But 377365 reports the opposite outcome — after an EC and SoC firmware update its hard power-offs stopped, and PowerStress ran to completion, failing on thermals instead. So "firmware does not fix it" is not settled. It did not fix mine.
### The fix already existed, and it was in my own house
This is not a new problem. The community reports predate mine:
- [Hard freezes under sustained inference](https://forums.developer.nvidia.com/t/dgx-spark-hard-freezes-under-sustained-few-minutes-inference-powerstress-thermal-failure-support-portal-unavailable/379195) — same driver 580.173.02, also running MiniMax-H3 inference; temperatures climbed to the levels they record within about two minutes and the machine then hard-froze. A freeze, not a power cut — a different failure from mine.
- [partnerdiag powerstress reproducibly hard-powers off the box](https://forums.developer.nvidia.com/t/dgx-spark-gb10-partnerdiag-powerstress-reproducibly-hard-powers-off-the-box-acpitz-88-97-8-c-in-5s-all-other-field-tests-pass/377365) — acpitz climbing from 88 to 97.8 °C in five seconds.
- [fieldiag powerstress FAIL, RMA approved](https://forums.developer.nvidia.com/t/dgx-spark-fieldiag-powerstress-fail-mods-020000600139-rma-approved-requesting-advance-replacement/372145).
And a fix already existed on GitHub: [tonyd2wild/dgx-spark-hard-poweroff-fix](https://github.com/tonyd2wild/dgx-spark-hard-poweroff-fix).
Here is the uncomfortable part. That author is also the source of the TP=2 serving recipe I have been running for weeks. His repo had been sitting at `~/src/tonyd2wild-nvfp4/` on our machines for two months.
It gets worse. The systemd unit on our **second** machine has carried this description since the day it was written:
```text
Description=GB10 GPU clock cap (2200 MHz)
— mitigates the EC hard power-off under sustained load
```
That second machine has never failed. I read that line for the first time after the first machine had already died twice.
So let me be honest about what this article actually contributes. Not "we found a new problem". We independently reproduced a known defect and ran a capped-versus-uncapped comparison on one machine, one workflow, one day.
I had wanted to claim more than that — that I supplied the curve every other report was missing. Checking before publishing, thread 377365 already describes an external 1 Hz thermal sampler and publishes timestamped readings from before its power-off. So that claim is gone. The comparison is what is left, and it is enough.
### Environment
```text
Machine ASUS Ascent GX10 (GB10), 121 GiB unified memory
OS DGX OS, kernel 6.17.0-1032-nvidia, driver 580.173.02
SBIOS GX10DGX.0105.2026.0505.1153
Sampling every 2 s: thermal_zone + clocks.current.sm + power.draw, streamed off-box over ssh
Raw data RUN-native-CRASHED (527 samples), RUN-capped2200-SURVIVED
```
---
*The benchmark that kept killing this machine: [MiniMax H3 Super Acceleration on a DGX Spark](/en/blog/h3-ltx-two-stage-dgx-spark) · The other way a Spark loses power, and how to tell them apart: [30 W safety mode, 100 W cap and the 5 W driver bug](/en/blog/dgx-spark-30w-power-safety-mode)*
---
# [Video] MiniMax H3 Super Acceleration on a DGX Spark: 2x native cold, 3.14x warm
URL: https://ai-muninn.com/en/blog/h3-ltx-two-stage-dgx-spark
Date: 2026-09-14
Series: DGX Spark (Part 47)
On a DGX Spark, MiniMax-H3 drafting at 672x384 and LTX-2.5 refining to 1344x768 takes **118.8 s** cold, against **237.7 s** for native H3 at full size: 2.00x. Run both again with the models still loaded and the gap opens to **73.3 s against 230.1 s**, or 3.14x. The Spark's 121 GiB of unified memory holds both stages' 53.6 GiB of weights at once, so nothing gets evicted between runs. A 31.84 GiB RTX 5090 cannot hold stage 1's 33.5 GiB alone and reloads every time. Caveat: in absolute terms the Spark is 2.4-5.5x slower than a 5090 here, 118.8 s against 40.3 s. This pipeline needs **ComfyUI 0.34.0 or newer** — below that the refine quietly produces garbage frames.
## Preface
A small kitchen makes you put the mixing bowls away before the roasting pans come out. A big counter lets both sit there all afternoon. The recipe does not change. What changes is how much of the afternoon you spend fetching and putting away.
[Part 8 of the RTX 5090 series](/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090) established the method: let MiniMax-H3 draft at 672x384, then let LTX-2.5 spend three steps refining the take you keep up to 1344x768. On a 5090 that beats running H3 natively at full size by 1.28x cold.
I ran the same workflow on a DGX Spark. Same graph, same weights, one quantization swap. The gap widens to 2.00x cold, and to 3.14x once both paths have their models loaded.
A naming note first, because these four terms are easy to run together. NVIDIA calls the method **MiniMax H3 Super Acceleration** and publishes it under Sol Engine, full name Sol Video Inference Engine. The port to a DGX Spark they call **Sol-H3-Spark**, and that is the line this article is on. The terms sit at different levels:
| Name | What it actually is |
|---|---|
| **MiniMax H3 Super Acceleration** | the method — H3 drafts small, LTX-2.5 refines |
| **Sol Engine** | NVIDIA's acceleration framework, which the method ships under |
| **Sol-H3-Spark** | NVIDIA's own build of that method for a DGX Spark, the one here |
| **Sol-Attn** | an attention kernel you can use inside the refine stage |
From here on it is just "two-stage", since what matters is the pipeline rather than which build you came in through.
One thing worth stating because it cuts against the obvious guess: **the 672x384 draft is [NVIDIA's own setting on the Spark](https://nvlabs.github.io/Sana/Sol-Engine/Sol-H3-Spark/), not something I picked.** 896x512 is the draft size on [their GB200 line](https://nvlabs.github.io/Sana/Sol-Engine/H3-Super-Acceleration/); the two lines draft at different sizes. And 672x384 is not an arbitrary number: both lines output 1344x768, and the Spark line runs `LTXVLatentUpsampler` against the `x2` upscaler — 672x384 doubled lands exactly on 1344x768. Going up from 896x512 is 1.5x, which is a different part. So the sigma 0.78 from the last article lines up with this one — if you follow the GB200 build at 896x512 instead, that value needs re-checking.
For a coordinate: NVIDIA report 6.852 s for a 5-second 1344x768 clip on a single GB200. ⚠️ That figure sums separately measured stages and excludes model loading and warmup, so it is not the same quantity as the submission-to-finish times in this article's table. Do not put them side by side.
The Spark is the slower machine at every step of this job. That is the interesting part.
## 118.8 s against 237.7 s, and 3.14x once the models stay loaded
Both paths produce the same thing: 1344x768, 124 frames, 24 fps, with audio. Four draft steps and three refine steps on the two-stage path, four steps at full resolution on the native path.
"Cold" and "warm" appear throughout and have nothing to do with temperature. Cold means the models were freed beforehand and this run reads them off disk. Warm means the previous run just finished and the models are still in memory.
**Every number in the table is the whole workflow, submission to finish** — draft sampling, the handoff, the upscale, refine sampling, VAE decode and writing the file. It is not the time the models alone spent computing. So the 45.5 s a warm run saves is not compute getting faster: the draft and the refine are both recomputed on the second run. What it saves is moving the models in and out of memory. I audit that node by node in the [deep dive](#deep-dive-what-the-18-cached-nodes-were-and-three-departures-from-the-5090-build), because it is the claim in this article most worth doubting.
| | DGX Spark | RTX 5090 |
|---|---:|---:|
| Native H3 at 1344x768 (cold) | **237.7 s** | 51.5 s |
| Native (warm) | **230.1 s** | 41.5 s |
| Two-stage, H3 draft + LTX refine (cold) | **118.8 s** | 40.3 s |
| Two-stage (2nd run, models still resident) | **73.3 s** | 30.6 s |
**Every ratio below compares two paths on the same machine**, two-stage against native. None of them compares one machine to the other.
- Spark: 237.7 against 118.8 cold is **2.00x**; 230.1 against 73.3 warm is **3.14x**
- 5090: 40.3 against 51.5 cold is 1.28x; 30.6 against 41.5 warm is 1.36x
**All four Spark cells were taken with the GPU capped at 2200 MHz.** That is not a choice: uncapped, a second consecutive native run takes the machine down, so the cell cannot be filled at all. The cap costs roughly 20% per run, but all four cells sit under the same restriction, so dividing them is clean. The next article covers the power loss.
One thing to be clear about first. **Every Spark cell is 2.4-5.5x worse than the 5090 cell beside it.** Two-stage costs 118.8 s on the Spark and 40.3 s on the 5090. The pipeline gets a bigger speedup on the Spark. The Spark itself is still the slower machine.
## NVIDIA reports 56.17 s on the same machine. I measure 73.3 s.
The [Sol-H3-Spark page](https://nvlabs.github.io/Sana/Sol-Engine/Sol-H3-Spark/) quotes **56.17 s on a single DGX Spark**, and it is explicit about what that covers: "from prompt arrival, including fresh Qwen encoding, to a completed MP4 with audio", warm. **That is the same quantity as the numbers in my table** — submission to file on disk, Qwen encoding and audio mux included. Their configuration matches too: a 672x384 draft at 124 frames in four steps, three refine steps, 1344x768 and 121 frames out.
So these are directly comparable. **Theirs is 56.17 s, mine is 73.3 s, and I am 1.30x slower.** I chased both reasons. One I could fix, one I cannot.
**One: I did not have Sol-Attn installed, and adding it bought back 4%.** The workflow asks for `auto_sol_attn_conservative_exp`, but there was no `ComfyUI-SolAttn_triton` on this box, so it quietly dropped to dense — the code path is literally called `dense_fallback_sol_attn_not_loaded` and raises nothing. Installed at the same commit the 5090 runs and measured again: **warm goes 73.294 → 70.386 s**, same seed, and the frames look the same side by side.
Four percent, not the 3.1x that page quotes — because the 3.1x is the kernel against FA4, and not many calls in a run qualify. The log is explicit about it:
```text
[sol_attn] sparse (1, 16128, 32, 128) tau=1.0 bf16 pointer
[sol_attn] dense (1, 16128, 32, 128): cross-attention (kept dense)
[sol_attn] dense (1, 126, 32, 64): head_dim 64 != 128
```
Only head_dim-128 self-attention reaches the sparse path. Cross-attention stays dense by design, and the head_dim-64 calls do not qualify at all.
**Two: the clock cap costs this pipeline 6%.** Cap off, one warm run: **66.134 s**, against 70.386 s capped.
(That 6% has to be measured on the two-stage pipeline itself. Native, within one session, goes 226 s to 246.6 s — 9%. The two workloads spend different amounts of time against the clock ceiling, so neither number scales to the other.)
| | Warm |
|---|---|
| Capped at 2200 MHz, no Sol-Attn | 73.294 s |
| Capped at 2200 MHz, with Sol-Attn | 70.386 s |
| Uncapped, with Sol-Attn | **66.134 s** |
| NVIDIA, single Spark | 56.17 s |
So **66.1 s against 56.17 s, still 1.18x, and I did not track it down.** The two factors I could name account for part of the gap. The rest I do not know, and that is where I am leaving it.
⚠️ The four cells in the table below were measured **without** Sol-Attn, because that is the state you are in after following this article. If you want the 4%, install it yourself:
```bash
git clone https://github.com/kijai/ComfyUI-SolAttn_triton \
ComfyUI/custom_nodes/ComfyUI-SolAttn_triton
git -C ComfyUI/custom_nodes/ComfyUI-SolAttn_triton checkout 26d816e
```
The T8 pack identifies a Sol-Attn implementation by **AST-hashing its source**, so a same-named package from a different source is not guaranteed to be accepted — which is why the commit is pinned above.
## Nine weight files, two node packs, and a graph that has to be the -nogemma one
There is no new code here. [T8mars's node pack](https://github.com/T8mars/comfyui-minimax-h3-audio-T8) implements the whole path inside ComfyUI, and the weights are two downloads.
**Both repos are gated** — you have to accept the terms in a browser before your account can download anything. Skip it and the `hf download` below returns a 401. Open [coolthor/MiniMax-H3-pruned-NVFP4](https://huggingface.co/coolthor/MiniMax-H3-pruned-NVFP4) and [Lightricks/LTX-2.5](https://huggingface.co/Lightricks/LTX-2.5) in a browser, accept the terms on each, then:
```bash
hf auth login
```
⚠️ The gate on the H3 repo is deliberate. MiniMax-H3's community licence excludes the EU, the UK, South Korea and the United States, and that restriction travels with the weights.
Everything on the H3 side is in [one repo](https://huggingface.co/coolthor/MiniMax-H3-pruned-NVFP4) — both transformers, the text encoder, both VAEs, the turbo LoRA, the conditioning cache, the custom node and the workflow — and it is laid out as ComfyUI's `models/` tree, so the download lands each file where it belongs instead of leaving you to match folders by hand. LTX-2.5 is the one thing fetched separately; its licence differs from H3's, so it is linked rather than mirrored.
```bash
hf download coolthor/MiniMax-H3-pruned-NVFP4 --local-dir ComfyUI/models \
--include "diffusion_models/minimax_h3_fl2va*" "text_encoders/*" "vae/*" \
"loras/minimax_h3_fl2v*" "conditioning_cache/*" "custom_nodes/*"
```
[LTX-2.5](https://huggingface.co/Lightricks/LTX-2.5) is a separate download under a different license:
```bash
hf download Lightricks/LTX-2.5 --local-dir ComfyUI/models \
--include "diffusion_models/ltx-2.5-22b-distilled-transformer-nvfp4.safetensors" \
"vae/ltx-2.5-*" "latent_upscale_models/*"
```
The first download lands a `custom_nodes` directory inside `models/`, which is the wrong place. Move it once:
```bash
mv ComfyUI/models/custom_nodes/ComfyUI-CondCache ComfyUI/custom_nodes/
```
Then the node packs. **There are two, and the graph will not load if either is missing:**
```bash
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8 \
ComfyUI/custom_nodes/comfyui-minimax-h3-audio-T8
git clone https://github.com/xmarre/ComfyUI-Spectrum-MiniMax-H3 \
ComfyUI/custom_nodes/ComfyUI-Spectrum-MiniMax-H3
git -C ComfyUI/custom_nodes/ComfyUI-Spectrum-MiniMax-H3 checkout 4783a22
```
⚠️ **Pin Spectrum at `4783a22`.** An older checkout throws `native MiniMax H3 module is missing required helpers: time_shift_slope` on ComfyUI 0.34.0 and stops the graph at the draft node. At least that one says something, unlike the failure in the next section.
The T8 pack carries the handoff with two nodes. `MiniMaxH3SolEngineDraftToLTXT8Advanced` trims frames and crops the aspect ratio before the draft is passed on, and `MiniMaxH3SolEngineLTXIdentityRefinerSetupT8Advanced` configures how the refine runs.
The second pack supplies `SpectrumApplyMiniMaxH3`, which node 7 of the graph needs. **Miss it and the whole graph refuses to load**, without telling you which node is missing.
`LTXVLatentUpsampler` needs no pack at all — the x2 latent upscaler ships with ComfyUI core.
You do not have to wire it yourself. **This is the exact graph that produced every number in this article** — 32 nodes, renumbered, no local paths in it:
**[⬇︎ minimax-h3-ltx-hybrid-refine-nogemma.json](/workflows/minimax-h3-ltx-hybrid-refine-nogemma.json)**
Drag it into ComfyUI. The same file also sits under `workflows/` in the [Hugging Face repo](https://huggingface.co/coolthor/MiniMax-H3-pruned-NVFP4), which is easier if you are pulling the weights anyway; the direct link above is for reading the graph before you request access.
⚠️ **On a DGX Spark you have to use the `-nogemma` graph.** The Gemma variant errors out on this machine. Details in the deep dive.
### Two things to check yourself
**One: confirm both custom nodes actually registered.** `LoadConditioningT` is a custom node that is in no registry, so if the node pack did not load, the failure reads "node does not exist" rather than "file missing", and you will go looking for a weight file that is already there. Ask the server what it knows:
```bash
curl -s http://:8188/object_info \
| grep -o -E 'LoadConditioningT|MiniMaxH3SolEngineDraftToLTXT8Advanced|SpectrumApplyMiniMaxH3' \
| sort -u
```
All three names have to come back. If any one is missing, the graph loads in the UI and then fails at queue time.
**Two: confirm the refine schedule starts at 0.78.** Not the official 0.909375, written 0.909 from here on. The full schedule is `0.78, 0.643, 0.546, 0`. At 0.909 the refine stage stops sharpening the draft and redraws the face into a different person. That defeats the point of drafting first.
## Get the versions wrong and the refine quietly hands you garbage
This section sits here because it is likelier to cost you a day than anything above it.
**Single-stage H3 is fine on ComfyUI 0.30.x. The two-stage refine is not, and it will not tell you.**
On 0.30.0 the refine returned `status: success`, exit code 0, a log with no errors, and a correctly shaped 1344x768 h264+aac file with 121 frames. Every frame was garbage — five seconds of pure black on the first day, colored noise when I reran the same graph the next morning.
Everything feeding it checked out. The H3 draft decodes to a clean picture. So does the upsampled latent one node *before* the refiner. The latent coming out of the refine has zero NaNs and a standard deviation of 0.80, which is exactly what a healthy latent looks like. So where is the damage? It correlates 0.235 with its own input — and that same input with noise added still correlates 0.74.
Same weights, same graph, same seed, run on an RTX 5090 that happened to already be on 0.34.0: correct clip. Matching the Spark to it fixed the Spark, and **torch was never touched.**
| | correct output | silent garbage |
|---|---|---|
| ComfyUI | 0.34.0 | 0.30.0 |
| comfy-kitchen | 0.2.31 | 0.2.26 |
| ComfyUI-Spectrum-MiniMax-H3 | `4783a22` (2026-08-18) | `fcf2332` (2026-08-05) |
| torch | 2.13.0+cu130 | 2.13.0+cu130 |
**Take that column as one unit.** The three are not independently selectable: ComfyUI 0.34.0 will not finish importing against comfy-kitchen 0.2.26, raising `module 'comfy_kitchen' has no attribute 'int8_attention_is_available'`. There is no configuration that isolates one package, so there is nothing to pin the blame on and no point looking.
⚠️ **Do not reach for `pip install -r requirements.txt --upgrade` to get there.** ComfyUI leaves `torch` unpinned in that file, so `--upgrade` can take your PyTorch and CUDA runtime packages with it. Install the pinned entries instead:
```bash
pip install comfy-kitchen==0.2.31 comfy-aimdo==0.4.15 \
comfyui-frontend-package==1.49.6 \
comfyui-workflow-templates==0.11.48 \
comfyui-embedded-docs==0.5.10
```
**Decode a frame before you trust a number.** Every mechanical check passed on the broken runs — exit code, stream layout, resolution, frame count, duration — and once the failure shifted from black to noise, a black-frame detector passed too. If you are benchmarking this pipeline, look at a frame, or you are benchmarking a pipeline that produces nothing.
## 53.6 GiB of weights fit in 121 GiB, and that is the whole gap
Two stages means two complete model stacks. Nothing is shared between them.
```text
Stage 1 — MiniMax-H3
transformer 11.67 GiB
text encoder 14.61 GiB
video VAE 4.85 GiB
audio VAE 0.56 GiB
turbo LoRA 1.82 GiB
----------
33.5 GiB
Stage 2 — LTX-2.5
transformer 17.44 GiB
video VAE 1.35 GiB
audio VAE 0.34 GiB
latent upscaler 0.93 GiB
----------
20.1 GiB
```
About 53.6 GiB of weights across both stages. Measured peak including working space is 104 GiB out of the 121 GiB available.
An RTX 5090 has 31.84 GiB. (Both 31.84 and 121 are what my two machines report as usable, not the 32 GB and 128 GB on the spec sheets.) That is not enough for stage 1 on its own. So on a 5090 every single run is: load H3, draft, evict H3, load LTX, refine, evict. There is no state to carry into the next run, because there is no room to carry it in.
A DGX Spark's 121 GiB of unified memory holds both stacks with room left over. Load them once and they stay. The difference between the cold run and the second run is 45.5 s (118.815 minus 73.294), and most of that is the loading.
That is the mechanism behind the wider ratio. The Spark is slower at the compute, and the compute is most of what is left once you stop paying for loading.
## Residency is worth 38.3% to two-stage and 3.2% to native
**Two-stage's second run saves 45.5 s. Native's saves 7.6 s.** That is the whole finding: residency helps the two-stage pipeline, not the machine.
| | Cold | Warm | Change | Nodes reused |
|---|---|---|---|---|
| **Native** | 237.7 s | 230.1 s | **-3.2%** | 10 |
| Two-stage | 118.8 s | 73.3 s | **-38.3%** | 18 |
Both paths reuse nodes, so "native has nothing to keep" is too simple an answer. What separates them by a factor of twelve is **how much there is to load** and **what share of the run loading accounts for**. Two-stage has to keep 53.6 GiB resident against native's 33.5 GiB, and native's 230-odd seconds go almost entirely into four sampling steps at 1344x768 — the 7.6 s of loading it saves is 3% of that. Two-stage's sampling is cheap by comparison, a 672x384 draft plus three refine steps, so loading is the larger share.
The 121 GiB buys native almost nothing, then, not because it has nothing to keep but because it has less to keep and its time was never going into loading in the first place.
ComfyUI reports which nodes it skipped: **18 of 32 on two-stage's second run.** All 18 are loaders and configuration — nine model loaders, plus guiders, schedulers, setup nodes and the prompt.
What is *not* among them matters more. Both `SamplerCustomAdvanced` nodes re-ran, so the H3 draft sampling and the LTX refine sampling were recomputed from scratch. So were `VAEEncode`, both `VAEDecode` nodes, `VAEDecodeAudio`, the `DraftToLTX` handoff, the latent upsampler, and `RandomNoise` because the seed changed. **The draft was redrawn.** Every second of generation was paid for again, which rules out saved compute as the explanation for the 45.5 s.
**The speedup is not the hardware being generous. It is that two-stage leaves far more worth keeping in memory, and spends proportionally less of its run computing.**
## The machine lost power twice, both on the second consecutive native run
Not a hang. Power loss. The kind where someone has to walk over and press the button.
It happened twice in one day, and both times it was the second back-to-back native 1344x768 run. The first native run completed fine at 202 s under full load. The second started with no gap and died about 90 s in.
Two-stage ran four times on the same machine with zero crashes, at a memory peak of **104 GiB** — higher than the **74 GiB** that was in use during both crashes. So memory pressure is not the variable.
Sustained-load duration is the candidate that fits. Native is 200 s of unbroken generation. Two-stage's longest continuous segment is 110 s, with lighter VAE and handoff stages in between.
This is not something the pipeline causes, and it has a fix: capping the GPU at 2200 MHz gets the same back-to-back pair to finish, at a cost of about 20% per run. [A report on the NVIDIA developer forum](https://forums.developer.nvidia.com/t/dgx-spark-hard-freezes-under-sustained-few-minutes-inference-powerstress-thermal-failure-support-portal-unavailable/379195) describes hard lockups under sustained inference with the same driver version and the same model. **How I tracked it down, and why a clock cap is what works, is the next article.**
That said, with the clock capped native finishes too. Two-stage's stability edge is real, but a clock cap is the simpler fix — the reason to reach for two-stage is still the 2.00x.
---
## Deep dive: what the 18 cached nodes were, and three departures from the 5090 build
### Every number here was measured a second time
This article first went up on 2026-09-14 quoting 110.6 / 208.5 / 66.8 s and 1.89x. Those two-stage runs were on ComfyUI 0.30.0, and **their output was broken** — the silent garbage described above. The timings themselves were taken correctly, but comparing a pipeline that produces no picture against one that does is not a comparison, so the article came down and was redone.
Every cell in the table above now comes from a run on 0.34.0, and a frame from each of those runs was decoded and looked at. The four old figures are void; do not cite them.
You can run everything above without reading this. Nothing here changes the method or the commands. It is how the numbers were taken, the node-by-node audit behind the 18, and where this build differs from the one in the 5090 article.
### The warm run is only a warm run if you change the seed
Every timing in this post is ComfyUI's `/history` endpoint: `execution_success` minus `execution_start`, divided by 1000.
Cold runs were preceded by:
```bash
curl -X POST http://:8188/free \
-H 'Content-Type: application/json' \
-d '{"unload_models":true,"free_memory":true}'
```
Warm runs have a trap in them. My first attempt reused the seed and came back at **0.006 s** with `cached=31`. Thirty-one of 32 nodes skipped: ComfyUI had recognised the identical graph and returned the previous output. That is a cache hit on the result, not a warm run of the pipeline.
Change the seed and the cached count drops to 18, which is the number the rest of this post uses.
### The 18-node audit
Cached on the two-stage second run:
| Count | Node |
|---:|---|
| 4 | `VAELoader` |
| 2 | `UNETLoader` |
| 1 | `CLIPLoader` |
| 1 | `LoraLoaderModelOnly` |
| 1 | `LatentUpscaleModelLoader` |
| 2 | `BasicGuider` |
| 1 | `KSamplerSelect` |
| 1 | `BasicScheduler` |
| 1 | `SpectrumApplyMiniMaxH3` |
| 1 | `IdentityRefinerSetup` |
| 1 | `LTXVConditioning` |
| 1 | `LoadConditioningT` |
| 1 | prompt node |
Nine of those are loaders. The other nine are configuration that depends only on the loaders.
The 14 that re-ran include both `SamplerCustomAdvanced` nodes, `VAEEncode`, `VAEDecode` x2, `VAEDecodeAudio`, the `DraftToLTX` handoff, `LatentUpsampler`, and `RandomNoise`. Everything that touches pixels or latents was recomputed.
Since the draft was redrawn, the 45.5 s cannot be saved compute. **I attribute it to model loading, but that is an inference rather than a direct measurement** — `execution_cached` reports that a node's output was reused, which is not the same as timing disk I/O or GPU residency. Pinning it down would need the setup and read phases timed separately.
### Three differences from the RTX 5090 build
**LTX-2.5 runs the nvfp4 checkpoint here, int8-convrot in the previous article.** I checked whether that costs speed before swapping: n=3 warm runs on the 5090 gave a median of 30.574 s for nvfp4 against 30.819 s for int8, a difference of 0.245 s while the within-arm spread was 6.0 s. Indistinguishable on speed. I chose nvfp4 because it is 2.6 GiB smaller, and for no other reason.
**Two-stage runs the no-Gemma variant, and on this machine that is mandatory rather than an optimisation.** The stage-2 prompt is a single fixed string, so it is computed once and cached to a file, and the 14.32 GiB text encoder never loads. On the Spark the Gemma graph fails outright:
```text
ValueError: not enough values to unpack (expected 4, got 1)
sd1_clip.py:266
```
Line 266 sits in `forward`, which unpacks what `process_tokens` (line 172 of the same file) returns into four values, and on this machine gets one. A version mismatch between my ComfyUI and that code path is the obvious read, but I did not verify it. **I did not find evidence that every Spark hits this — I can only say mine does.** Swapping to the cached-conditioning graph steps around that call entirely, and the substitution is semantically equivalent rather than an approximation: I diffed the prompt that generated the cache and it is character-identical.
**All four cells in the main table were taken at a 2200 MHz clock cap.** That is not a preference. Uncapped, a second consecutive native run takes the machine down — both attempts are the power losses described above — so the cell cannot be filled at all. The cap costs roughly 20% per run, but it applies to all four cells equally, so the ratios between them are clean.
Two-stage's cold cell was measured twice, at 118.316 s and 118.815 s. The table uses the second.
### Environment
```text
Machine ASUS Ascent GX10 (GB10), 121 GiB unified memory
OS DGX OS, kernel 6.17.0-1032-nvidia
Driver 580.173.02
GPU clock capped at 2200 MHz (nvidia-smi -lgc 300,2200)
ComfyUI 0.34.0, 1157 nodes registered
Packages comfy-kitchen 0.2.31, comfy-aimdo 0.4.15, torch 2.13.0+cu130
Node pack ComfyUI-Spectrum-MiniMax-H3 @ 4783a22
Output 1344x768, 124 frames, 24 fps, with audio
Steps 4 draft / 3 refine
```
---
*Previous in the method: [MiniMax-H3 + LTX-2.5 two-stage on an RTX 5090](/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090)*
---
# [Benchmark] Two-stage MiniMax-H3 + LTX-2.5 on a 2080 Ti: 1344x768 with audio in 165s
URL: https://ai-muninn.com/en/blog/solh3-two-stage-on-2080ti
Date: 2026-09-14
Series: 改裝 2080 Ti 22G (Part 18)
A modified RTX 2080 Ti 22G — a 2018 card — runs the two-stage MiniMax-H3 + LTX-2.5 pipeline at **1344x768**, 121 frames, 5.04 s, with audio, in **165 s** warm and **178 s** cold. The two stages are **53.97 GiB** of weights; the card never holds more than a slice of that, and does not need to. The exact workflow is on HuggingFace, ready to download. Five things have to change from the published Blackwell workflow, two of which fail without printing anything — including one that returns `status: success` with a valid mp4 in which every pixel is exactly RGB(0,0,0).
*Rendered on one modified RTX 2080 Ti 22G: 1344x768, 121 frames, with audio. MiniMax-H3 drafts at 672x384 and LTX-2.5 spends three steps refining it up to twice that — the whiskers, the backlit guard hairs and the dust in the light all come from those three steps. The cat is saying, in Mandarin, "this card is older than I am, but it still runs."*
## Preface
A freight elevator with a 500 kg limit will still get three tonnes to the tenth floor. It just goes up and down more times. The thing that decides whether the job is possible is not the size of the elevator; it is whether the loading dock is big enough to stage what is waiting.
NVIDIA calls this pipeline **[MiniMax H3 Super Acceleration](https://nvlabs.github.io/Sana/Sol-Engine/H3-Super-Acceleration/)**: MiniMax-H3 produces a draft in four steps, then LTX-2.5 spends three refining it up to the target resolution. Four names are easy to mix up here: **H3 Super Acceleration** is the method; **Sol Engine** is the framework it was published under; **[Sol-H3](https://nvlabs.github.io/Sana/Sol-Engine/Sol-H3-Spark/)** is NVIDIA's own version of that method on a DGX Spark; and **Sol-Attn** is the sparse-attention kernel stage 2 uses.
NVIDIA runs this configuration on one DGX Spark in **56 s**. Don't compare that against the 6.852 s on the GB200 page: that figure sums two separately measured stages, and the page says model loading and warmup are excluded, so it is not a wall clock from prompt to finished file.
[Part 11](/en/blog/minimax-h3-on-modded-2080ti-22gb) proved this card can run MiniMax-H3 at all — single-stage, 864x480. [Part 8 of the RTX 5090 series](/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090) took the method apart, and that is where the refine sigma moved from NVIDIA's `0.909375, 0.725, 0.421875, 0` down to `0.78, 0.643, 0.546, 0`.
⚠️ Worth settling up front, because the two NVIDIA pages disagree: **the pipeline parameters here match NVIDIA's Spark line** — a 672x384 draft, 124 frames, four draft steps, three refine steps, output at 1344x768, 5 seconds at 24 fps. The GB200 page lists a 896x512 draft, but that belongs to the GB200 line, not this one.
**The weights are a different story.** NVIDIA runs an NVFP4 text encoder and an FP8 DiT on the Spark, and Turing has neither format. That is why this article ends up on int8-convrot, w4a4 and GGUF Q4_K_M instead: same pipeline, different things loaded into it. The sigma schedule below was calibrated at 672x384 and the knee moves if you change the draft size.
This card has 22 GB and the elevator goes up and down a lot. The pipeline still finishes 1344x768 with audio in 165 seconds.
## 178 s cold, 165 s warm, and 53.97 GiB that never fits
One modified RTX 2080 Ti 22 GB, compute capability 7.5, a Turing part from 2018. Output is 1344x768, 121 frames at 24 fps, 5.04 seconds, with audio.
Cold — the models were freed beforehand and this run reads them off disk — is **178 s**. Warm, with the models still resident and only the seed changed, is **165 s**, the median of three runs with a 1.08 s spread between them. Model loading is 13 s of that — the cold/warm difference. The warm 165 s is all compute.
One number is higher than both, and it is the first one you will see after setting this up: **190 s**, twice, to the tenth of a second. Restarting ComfyUI throws away Triton's kernel cache, which forces SageAttention's six kernels to recompile — about 12 s. You pay it once per ComfyUI process: free the models inside that same process and the next run is 178 s again.
Which gives one practical rule for the whole rest of this article: while you are iterating on parameters, do not free the models between runs. That 13 s is free.
The two stages together are 53.97 GiB of weights. A 22 GB card cannot hold that and is never asked to — ComfyUI loads models sequentially, and the H3 transformer reports as much on a run that produces a correct video:

```text
loaded partially ... 2861 MB offloaded
```
So the constraint that actually decides whether this machine can do the job is not VRAM. It is fast storage plus enough system RAM to absorb the offload. This box has 128 GB.
> 📦 **The workflow that produced these numbers is on HuggingFace, ready to download.**
> Not a sketch, not a simplified version — the exact 31-node graph this machine runs:
>
> ```bash
> hf download coolthor/H3-Super-Acceleration-Turing --local-dir . \
> workflows/minimax-h3-ltx-two-stage-turing-sm75.json TURING.md
> ```
>
> The same repo carries the startup adapter, the conversion script, and the 13.2 GiB heretic
> text encoder. Full inventory and step-by-step in [`TURING.md`](https://huggingface.co/coolthor/H3-Super-Acceleration-Turing/blob/main/TURING.md).
## Start from TURING.md: five departures from the Blackwell workflow, and two of them are silent
The executable version of everything below lives in `TURING.md` in the [Hugging Face repo](https://huggingface.co/coolthor/H3-Super-Acceleration-Turing), along with the workflow, the startup adapter and the conversion script. Read that for the steps:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir . TURING.md && cat TURING.md
```
This section is the part `TURING.md` cannot be: **why each departure is mandatory**. It matters because three of the six fail with no error at all. Copy the published Blackwell graph onto this card and you do not get a stack trace — you get broken output, or you get correct output at half the speed you should be getting, and nothing in the log tells you which.
### 1. Both repos are gated, and a 401 is easy to misread
`coolthor/H3-Super-Acceleration-Turing` and `Lightricks/LTX-2.5` are both gated. `hf download` returns a 401 and the message is actually explicit (`Access to model ... is restricted. You must have access to it and be authenticated`), but it is easy to read as a network problem if you are running someone else's script. Accept the terms in a browser on each repo, then `hf auth login`.
The H3 gate is deliberate. MiniMax-H3's community licence excludes the EU, the UK, South Korea and the United States, and that restriction travels with the weights.
### 2. Weights: H3 from one repo, the LTX refiner as GGUF from another
Six files from `coolthor/H3-Super-Acceleration-Turing`, all in one call:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir ComfyUI/models \
diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors \
text_encoders/qwen3vl_32b_heretic_convrot_w4a4.safetensors \
loras/minimax_h3_fl2v_turbo_4step_v0.1_768p_sla_comfyui_bf16.safetensors \
vae/minimax_h3_video_vae_fp16.safetensors \
vae/minimax_h3_audio_vae_fp32.safetensors \
conditioning_cache/ltx_generic_refine.cond
```
The LTX refiner is the GGUF build, and that is not a size optimisation — see the black-video section below. The VAEs and the x2 upscaler come from `Lightricks/LTX-2.5` as bf16 and get converted locally, which is departure 4.
```bash
hf download agosh/LTX-2.5-Comfy-GGUF --local-dir ComfyUI/models/diffusion_models \
ltx-2.5-22b-distilled-transformer-bf16-Q4_K_M.gguf
hf download Lightricks/LTX-2.5 --local-dir ComfyUI/models \
vae/ltx-2.5-video-vae-conv-bf16.safetensors \
vae/ltx-2.5-audio-vae-bf16.safetensors \
latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors
```
Where you put these files is worth ten minutes. Storage speed shows up directly in that 13 s of loading. Measured on this machine: ext4 on NVMe at 2.3 GB/s, and an ntfs3 volume on the same box at 1.2 GB/s. The 13.2 GiB text encoder started life on the slow one. Moving it saved 5.6 s per cold run.
### 3. Two node packs, plus a startup adapter
```bash
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8
git clone https://github.com/city96/ComfyUI-GGUF
```
The second one is needed only on this card: it provides `UnetLoaderGGUF`, which node 15 of the workflow uses instead of `UNETLoader`.
⚠️ **Updated 2026-09-16: a third pack, `ComfyUI-Spectrum-MiniMax-H3`, used to be here and has been removed.** See [the node that never fires](#bonus-spectrum) for why.
A fourth does not come from git. Node 32's `LoadConditioningT` lives in `ComfyUI-CondCache`, which ships alongside the workflow — pull the one file into `custom_nodes/`:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir ComfyUI \
custom_nodes/ComfyUI-CondCache/__init__.py
```
Miss it and the whole graph refuses to load, with an error that says the node does not exist rather than that a file is missing — so you go hunting for a weight that is already on disk.
On top of those, a startup adapter ships in the HF repo at `custom_nodes/ComfyUI-LTXV-Turing-FP16/`. It only acts when `torch.cuda.get_device_capability() == (7, 5)`, so it is inert on any other GPU:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir ComfyUI \
custom_nodes/ComfyUI-LTXV-Turing-FP16/__init__.py
```
What it fixes, and why the obvious flag does not fix it, is the second silent failure in the deep dive.
### 4. Convert the LTX bf16 files to fp16, or pay for them twice
Turing has no bf16 hardware. ComfyUI upcasts bf16 to fp32, and the tensor then takes exactly twice its on-disk size in VRAM. Measured: `ltx-2.5-video-vae-conv-bf16.safetensors` is 1.35 GiB on disk and loads as **2769.87 MB**. The x2 upscaler is 0.93 GiB on disk and loads as **1899.22 MB**.
Convert all three — video VAE, audio VAE, x2 upscaler — with the script in the repo. It saves about 2.7 GB:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir . scripts/bf16_to_fp16.py
```
I checked tensor by tensor: **zero tensors exceeded the fp16 range**. That claim is narrower than it sounds. It covers the numeric range of the weights themselves — not the activations flowing through at inference, not underflow, and not output quality. fp16 stores 10 fraction bits against bf16's 7, but converting hands no precision back: whatever bf16 dropped during training is gone. All you buy is that ComfyUI stops upcasting.
⚠️ The script preserves the safetensors header metadata, and it has to. `save_file()` drops metadata by default, and ComfyUI's `VAELoader` reads the `config` key out of that header to pick the VAE architecture. My first version dropped it. The symptom is a shape mismatch that looks like you downloaded the wrong file:
```text
size mismatch for encoder.down_blocks.7.conv.conv.weight: copying a param with
shape [128, 1024, 3, 3, 3] ... current model is [256, 1024, 3, 3, 3]
```
### 5. SageAttention 1.0.6, and one integer inside it
Launch flags:
```bash
python main.py --use-sage-attention --reserve-vram 2 --disable-pinned-memory
```
The version has to be **1.0.6**. Everything from 2.x on needs sm_80 or newer; [SageAttention issue #137](https://github.com/thu-ml/SageAttention/issues/137) is another 2080 Ti owner hitting `Unsupported CUDA architecture: sm75`.
Installing 1.0.6 is not enough on its own. At stock settings its Triton kernels request **67584 bytes** of shared memory and Turing's hard limit is **65536**. Triton refuses, and ComfyUI quietly falls back to PyTorch attention — which is the third silent failure, and it costs you the whole point of installing it. In all six `attn_qk_int8_*.py` files under `site-packages/sageattention/`:
```python
num_stages=3 if head_dim == 64 else 1)
```
⚠️ Do **not** touch `BLOCK_M` while you are in there. It looks like a sibling scheduling knob and it is not one. `quant_per_block.py`'s `per_block_int8(BLKQ=128)` produces one quantization scale per `BLKQ` rows, and the kernel indexes that array with its own `BLOCK_M`. Change one without the other and you read invalid scales, or index past the end of the array, with no error either way. `num_stages` only changes pipeline depth; it leaves the algorithm itself alone.
### 6. Two values inside the workflow
The graph is 31 nodes:
```bash
hf download coolthor/H3-Super-Acceleration-Turing --local-dir . \
workflows/minimax-h3-ltx-two-stage-turing-sm75.json
```
Two things in it differ from the Blackwell version, and this table is the one to check node by node after you drag the JSON in:
| Node | Value | Why |
|---|---|---|
| 15 | `UnetLoaderGGUF`, not `UNETLoader` | The big one. See the next section. |
| 16 | `attention_backend` = `dense_reference` | Sol-Attn's kernel is bf16-only, so this card never reaches it |
Node 16 is the one where the honest setting and the useful setting are the same. Setting `auto_sol_attn` on this card does not enable anything; it just makes every call fall back to dense, silently. Writing `dense_reference` describes what the card does anyway.
## The 284 s run that reported success and wrote a completely black mp4

The first full-pipeline run took 284 s and finished with `status: success`. The output was a valid mp4: 1344x768, 121 frames, 5.04 s, h264 and aac both present, `cached=0`. There was no error anywhere in the log.
I extracted three frames. All three JPEGs were **exactly 6250 bytes**, which is the fingerprint of a solid colour, and every pixel in them was exactly `RGB(0,0,0)`.
That byte count is what turned a mystery into a diagnosis. An all-zero latent decoded through a VAE does not come out black — bias terms push it to a non-uniform grey. That is not a diagnosis on its own — black output can come from cropping, decoding or postprocessing — but it was enough to make me go and measure the latent itself. `SaveLatent` on both sides of the refine step confirmed it:
| | shape | NaN | min | max | std |
|---|---|---|---|---|---|
| before refine | `(1,128,16,24,42)` fp32 | 0 | -6.1942 | 5.4041 | 0.9560 |
| after refine | same | 2,064,384 / 2,064,384 | — | — | — |
The draft latent was healthy. The refine pass destroyed it. Swap in the GGUF Q4_K_M build of the same model and it is correct on the same card, and smaller — 11.38 GiB against 20.03. That is why node 15 is `UnetLoaderGGUF`.
⚠️ Be careful how far you carry that. What the comparison establishes is that **this checkpoint fails and the GGUF one works on this stack** — ComfyUI 0.31.0, comfy-kitchen 0.2.28, torch 2.6. It does not isolate whether the fault is in the weights, the dequantization, or the kernel, because swapping the file changes all three at once. I could not test the version axis: comfy-kitchen 0.2.31 will not import under torch 2.6 (`infer_schema` rejects the `list[int]` annotation in `backends/eager/na.py`), and torch 2.6 is what sageattention 1.0.6 and triton 3.2.0 are pinned against. That version set is what this card can run, so it is the set the finding is scoped to.
⚠️ The trap in this is that H3's own int8-convrot build is fine on this card. Same quantization family, same machine, one works and one does not. ComfyUI prints a line at load that reads like a green light:
```text
Native ops: int8_tensorwise, asym_w4a8_int8, convrot_w4a4
```
That line means "not emulated". It does not mean "correct". Verify per model.
## The node that never fires
**Added 2026-09-16.** After this went out, a reader pointed out that `SpectrumApplyMiniMaxH3` is pure wrapper overhead at a 4-step draft and cannot change the output. They were right, and the proof is in the node's own logging.
It is configured with `warmup_steps = 5`, and the draft runs **4 steps**. It never finishes warming up. Turn its `debug` on and it says so itself:
```text
actual_steps=4 forecast_steps=0 phase_counts=model:a4/f0
actual_transformer_calls=4 forecast_calls=0 bypassed_steps=0
```
`forecast_calls=0` — it never forecast once. All four steps were computed in full, which is the same number of transformer calls you get with the node absent.
So how much does removing it save? **Neither card shows a measurable difference.**
| | with Spectrum | without |
|---|---:|---:|
| 2080 Ti, warm (n=3 each) | 165.0 | 165.0 |
| RTX 5090, warm (interleaved, n=6 pairs) | 22.96 | 22.37 |
The 5090 medians differ by 0.59 s, or 2.6%, against a standard deviation of 2.88 s within each arm — a fifth of the noise. My first pass, without interleaving and without discarding warm-up runs, said +7.1%. That number was an artifact.
**It is dead weight, not a bottleneck.** I took it out anyway, for a reason that has nothing to do with speed: it forces anyone following this guide to install **an extra node pack** and to assume that pack is load-bearing. That is why the pack list above went from three to two and the graph from 32 nodes to 31.
⚠️ One departure went with it. This article used to list a sixth — writing `bootstrap_first_forecast: false` explicitly on node 7 — and **that departure existed only because Spectrum did**. One fewer node, one fewer trap.
---
## Dropping the draft to 544x320 saves 30% of the clock and no detail I can see
`LTXVLatentUpsampler` is a fixed x2, so the draft is always exactly half the output. Lowering the draft lowers the finished video with it — this is not a quality knob with a free lunch attached, it is a resolution knob.
Three points, same workflow, only the draft size and the handoff target changed. Read the last two columns against each other:
| draft | output | cold | warm | draft pixel ratio | warm time ratio |
|---|---|---:|---:|---:|---:|
| 672x384 | 1344x768 | 179.8 | 167.0 | 1.000 | 1.000 |
| 544x320 | 1088x640 | 129.5 | 117.3 | 0.675 | 0.702 |
| 432x240 | 864x480 | 84.5 | 76.9 | 0.402 | 0.460 |
Time tracks pixels almost exactly. The fit is `warm seconds ≈ 16.4 + 150.6 × (draft pixels / 258,048)`, which predicts 118.0 s for the middle row against 117.3 measured, 0.6% off.

I expected superlinear scaling and was wrong, and the reason matters: attention cost grows with the square of token count, so I assumed attention would dominate. It does not. In this workload it is not the dominant term.
**Stop at 544x320 → 1088x640.** 117 s, 30% saved, and hair strands, earring detail and skin shading all look essentially intact. The next rung down is 77 s and visibly soft.
*Same cat, same seed, draft dropped to 544x320 for a 1088x640 output. Put it beside the clip at the top — what changes is mostly size, not detail.*
⚠️ Those three rows are three separate generations, not three quality levels of one clip. Changing the resolution changes the latent shape, so the same seed follows a different sampling trajectory and you get a different take. Compare detail density between them, not content.
The other lever, and the one that costs no spatial detail at all, is frame count. Cutting it scales close to linearly.
---
## Deep dive: four hypotheses the measurements killed, and three ways this stack fails quietly
Reading this is optional — everything you need to run the pipeline is above. This is how the black video got diagnosed, and the three places on this card where something switches itself off and says nothing.
### Four hypotheses ruled out before the right one
**Out of memory.** The log had a line that looked like a smoking gun: the final LTX VideoVAE reported `loaded partially; 0.00 MB usable, 0.00 MB loaded, 2769.87 MB offloaded` while `nvidia-smi` showed 4,260 MiB still free on the card. I swapped in `VAEDecodeTiled`; the memory behaviour changed completely and the output was still black. Later, runs that produced correct video printed the same line. Symptom, not cause.
**Compute dtype falling to fp32.** Side by side, the two stages disagreed:
```text
Stage 1 (H3) model weight dtype torch.float16, manual cast: torch.float16
Stage 2 (LTX) model weight dtype torch.bfloat16, manual cast: torch.float32
```
The convrot kernels only take FP16 or BF16, so this was a real problem. Fixing it cut the run from 266 s to 179 s, a 33% saving. The picture was still black. Necessary, not sufficient — and worth separating out, because 33% less wall-clock time is exactly the kind of result that makes you think you have found the bug.
**Schedule or conditioning strength.** I pushed sigma down to `0.05, 0.03, 0.01, 0`, where the refine stage should barely perturb its input at all. Still black.
**fp16 range overflow.** I concluded this one and was wrong. The evidence looked strong: the blackness was too clean, the latent was all NaN, and it matched an overflow this same card produced with H3 back in August 2026. What killed it is that the fp32 runs were also black. A pure range problem should have made fp32 slow, not broken. Both dtypes black rules out the top-level compute dtype as the explanation. Strictly it does not rule out an overflow inside a kernel that still works in fp16 internally — establishing that would need instrumentation I did not do.
The comparison that settled it changes one thing — the refiner file — holding model, version, sigma, VAE and machine constant:
| LTX refiner file | dequant path | seconds | result |
|---|---|---:|---|
| `...comfy-int8-convrot` 20.03 GiB | comfy-kitchen convrot kernel | 179.1 | all NaN |
| `...bf16-Q4_K_M.gguf` 11.38 GiB | ComfyUI-GGUF (dequant→fp16→ordinary GEMM) | 185.0 | correct |
| `sulphur-distil-ltx23av-Q4_K_M.gguf` (LTX **2.3**) | same | 198.2 | correct but changes the face |
The third row is worth a note if you are tempted to substitute an older refiner. LTX-2.3 refines perfectly well, but the face comes back as a different person. sigma 0.78 is the knee calibrated for **2.5** in the six-arm sweep from the 5090 article; a different model generation slides off it. That is a calibration problem, not a GGUF problem.
### Silent failure 1: Sol-Attn never tells you it did not run
`ComfyUI-SolAttn_triton`'s kernel is bf16-only. The eligibility check is at `__init__.py:176-177`:
```python
if q.dtype != torch.bfloat16:
return f"dtype {q.dtype} (kernel is bf16-only)"
```
Turing has no bf16, so that condition held on every call in this workflow. The rejection path is `return None` falling back to dense, not an exception. And the registry entry point `attention_sol` hardcodes `verbose=False`, so a path entered through `attention_backend` prints nothing whatsoever.
There is a way to check. Sol-Attn keeps its own counters: `sol_attn_stats()` returns a dict with `sparse` and `dense_fallback`, and `sparse > 0` is what proves the kernel actually ran. That is more reliable than reading the log, because `_log_once` deduplicates on `(shape, reason)` — "no message in the log" cannot distinguish "never engaged" from "deduplicated away". The counter can.
The other two ComfyUI ports exclude Turing too, and say so in their own docs: [Saganaki22/ComfyUI-sol-attn](https://github.com/Saganaki22/ComfyUI-sol-attn) states SM89 through SM121, and [quzopl/ComfyUI-SolAttn-H3](https://github.com/quzopl/ComfyUI-SolAttn-H3) states SM89, 90, 100 and 120. Neither of the two ports I checked covers sm_75 either.
### Silent failure 2: --fp16-unet does nothing for a quantized model
This is why the startup adapter exists at all.
`LTXV.supported_inference_dtypes` is `[bfloat16, float32]`. No bf16 on Turing means the compute dtype lands on fp32, which is the 33% tax from the hypothesis section above. The obvious fix is `--fp16-unet`. It does not work, and `comfy/sd.py` says why:
```python
if model_config.quant_config is not None:
manual_cast_dtype = unet_manual_cast(None, load_device, model_config.supported_inference_dtypes)
else:
manual_cast_dtype = unet_manual_cast(unet_dtype, load_device, model_config.supported_inference_dtypes)
```
A quantized model takes the first branch, where `weight_dtype` is deliberately `None`. That is a defensible choice on its own terms: the weights are int8, and their dtype says nothing about what the compute should be. But every branch inside `unet_manual_cast` that inspects `weight_dtype` then falls through, leaving only the `for dt in supported_dtypes` loop — and the flag's `unet_dtype` is never passed in on that path. The symptom is the half-applied line from earlier:
```text
model weight dtype torch.float16, manual cast: torch.float32
```
The flag reached the storage dtype and never touched the compute dtype. Three ways to fix that:
| approach | works | scope | survives ComfyUI upgrade | visible |
|---|---|---|---|---|
| edit `comfy/supported_models.py` | yes | LTXV only | no, gets overwritten | no |
| `--fp16-unet` flag | no for quantized models | whole service | yes | yes |
| **startup adapter in `custom_nodes/`** | yes | LTXV only | yes | yes, in the startup log |
The third wins on the two columns that matter for a machine you come back to in three months: it survives an upgrade, and it announces itself in the startup log so future-you can see it is there. This box already had a `kitchen_turing_int8_enable.py` doing the same kind of thing, so the pattern was local precedent rather than invention. To revert, delete that one file.
### Silent failure 3: SageAttention falls back, and the margin is 2048 bytes
Dozens of these in the log:
```text
Error running sage attention: out of resource: shared memory,
Required: 67584, Hardware limit: 65536. using pytorch attention instead.
```
67584 − 65536 = 2048. Here is where the shared memory goes at `BLOCK_M=128 / BLOCK_N=64 / HEAD_DIM=128`:
| num_stages | Q | K | V | total |
|---:|---:|---:|---:|---:|
| 4 | 16384 | 32768 | 65536 | 114688 |
| 2 | 16384 | 16384 | 32768 | 65536 |
| 1 | 16384 | 8192 | 16384 | 40960 |
`num_stages=2` lands exactly on the limit. The extra 2048 bytes that push it over are unaccounted for in my estimate — I did not chase where they come from. Dropping to 1 leaves headroom either way.
The generalisable part of this is the rule about `BLOCK_M` from departure 5. That constant also determines the **shape** of `q_scale`, as `(qo_len + BLKQ - 1) // BLKQ`. **If a constant determines the shape of a tensor, it is not a scheduling parameter.** That is a test you can apply to any kernel you are tempted to tune, without knowing anything about the kernel.
### What SageAttention is actually worth here: not speed, feasibility
Same workflow, n=3, warm median:
| config | cold | warm |
|---|---:|---:|
| SageAttention 1.0.6 | 178 | 165 |
| disabled, plain pytorch SDPA | 213 | out of memory |
With it disabled the cold run completes 35 s slower. The second run does not complete at all — it dies about four seconds in:
```text
Got an OOM, unloading all loaded models
```
PyTorch's memory-efficient SDPA needs more VRAM than SageAttention's INT8 kernels, and on a warm run the models are still sitting on the card. So on this hardware SageAttention is not a 20% optimisation you can skip. It is the difference between a warm run and no warm run.
⚠️ One research note, because it nearly went into this article as a fact. While looking into this, two web searches fed back "SageAttention is 16.8% faster than PyTorch SDPA on a 2080 Ti" as though it were external corroboration. That number came from this site's own August article. **When you are researching a topic you have written about, check that the hit is not you.** It was also measured on 864x480 single-stage H3. Same card, different workload shape — and a number measured on one shape does not carry to another.
### Environment
```text
GPU RTX 2080 Ti 22G (modified) - compute capability 7.5 (Turing)
OS Linux - torch 2.6.0+cu124 - triton 3.2.0 - Python 3.12
ComfyUI 0.31.0 - comfy-kitchen 0.2.28 - sageattention 1.0.6
Launch flags --use-sage-attention --reserve-vram 2 --disable-pinned-memory
Storage ext4 NVMe measured at 2.3 GB/s - 128 GB system RAM
Weights 53.97 GiB total
Output 1344x768 - 121 frames - 24 fps - with audio
Steps 4 draft / 3 refine
```
---
The workflow JSON, the startup adapter, the conversion script and the 13.2 GiB heretic text encoder — ConvRot W4A4, the first build of it published anywhere as far as I know — are all documented in `TURING.md` at [coolthor/H3-Super-Acceleration-Turing](https://huggingface.co/coolthor/H3-Super-Acceleration-Turing).
*The method on a card with room to spare: [MiniMax-H3 + LTX-2.5 two-stage on an RTX 5090](/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090)*
---
# [Benchmark] Roll cheap, then enhance the keeper: NVIDIA's two-stage MiniMax-H3 + LTX-2.5 pipeline explained
URL: https://ai-muninn.com/en/blog/minimax-h3-ltx-hybrid-refine-rtx5090
Date: 2026-09-13
Series: MiniMax-H3 on RTX 5090 (Part 8)
MiniMax-H3 drafts the clip at 672×384, a quarter of the pixels, and LTX-2.5 spends 3 steps refining it to 1344×768. Cold, single shot: **40.3 s against 51.5 s** for H3 running native at full size. The bigger gain is that every finishing option reuses one draft, so the face stays the same person — native re-rolls the latent at each resolution and hands you someone else. Audio comes out of H3's draft pass and never enters stage 2. One thing to change: NVIDIA's stage-2 sigma of 0.909375 repaints faces on the ComfyUI path. Use 0.78.
A photographer shoots a contact sheet, looks at it, and prints one frame. Nobody prints all thirty-six, and nobody shoots the whole roll at print quality either.
[Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) of this series replaced Real-ESRGAN (109 s) with RTX VSR (11.2 s) and got the upscale down to something you stop noticing. [Part 7](/en/blog/ltx25-vs-minimax-h3-rtx5090) put LTX-2.5 and MiniMax-H3 head to head on the same card. On 2026-09-11 NVIDIA Research's Efficient AI team published [Sol-H3-Spark](https://nvlabs.github.io/Sana/Sol-Engine/Sol-H3-Spark/), whose claim is one sentence long: don't run the generator at its most expensive resolution. The ComfyUI implementation that makes it reachable without writing code is [T8mars's node pack](https://github.com/T8mars/comfyui-minimax-h3-audio-T8).
This is what that costs and buys on one RTX 5090, with the one setting you have to change from the official recipe.
---
## H3 never runs at 1344×768 — LTX-2.5 does
Both paths end in the same place: 1344×768, 5 seconds, with audio. The native path is one model at one resolution — MiniMax-H3 runs 4 steps at 1344×768, decodes, done. The hybrid path splits the job: H3 runs its 4 steps at 672×384, then [LTX-2.5](https://huggingface.co/Lightricks/LTX-2.5) runs 3 refinement steps at full resolution.
The handoff is the whole trick. H3's latent (the compressed tensor the sampler actually works on, before anything becomes pixels) comes out at 672×384, gets decoded to RGB, gets re-encoded with LTX's own VAE, goes through LTX's ×2 latent upsampler to land at 1344×768, takes 3 refine steps, and is decoded by the LTX VAE.
Three things about that diagram are not obvious.
**Resolution only changes after the handoff.** H3 never touches 1344×768 in the hybrid path — the upscale happens in LTX's latent space, on LTX's terms.
**Audio never enters stage 2.** H3 generates video and audio in one forward pass, so the track is done at draft stage and is muxed into the MP4 at the end. Simplified Chinese dialogue quality is H3's, and refinement cannot help or hurt it.
**The two stages are two independent model stacks.** Nothing is shared — not the transformer, not the VAE, not the text encoder. That matters for VRAM, and the memory numbers are in the deep dive.
## Three nodes carry the handoff, and nine files sit behind them
The path adds three nodes to a working H3 workflow. `MiniMaxH3SolEngineDraftToLTXT8Advanced` trims H3's decoded frames to LTX's 8n+1 frame grid and centre-crops them to half the requested output size. `MiniMaxH3SolEngineLTXIdentityRefinerSetupT8Advanced` returns the model, sampler and sigmas for stage 2. `LTXVLatentUpsampler` is the official ×2 latent upsampler, unmodified.
The weights, by side:
```text
H3 side
minimax_h3_fl2va_pruned_nvfp4 11.67 GiB
qwen3vl_32b_heretic_minimax_h3_nvfp4 14.61 GiB
minimax_h3_video_vae_fp16 4.85 GiB
minimax_h3_audio_vae_fp32 0.56 GiB
minimax_h3_fl2v_turbo_4step_v0.1_768p_sla 1.82 GiB
LTX side
ltx-2.5-22b-distilled-transformer-int8 20.03 GiB
ltx-2.5-video-vae-conv-bf16 1.35 GiB
ltx-2.5-audio-vae-bf16 0.34 GiB
ltx-2.5-latent-spatial-upscaler-x2-bf16 0.93 GiB
```
The 4-step turbo LoRA on the H3 side is [lightx2v](https://huggingface.co/lightx2v)'s, not the FastVideo one NVIDIA used. That substitution and two others are in the deep dive.
### Download the whole workflow
You don't have to wire any of this by hand. Here is the exact graph every number in this post came from — 33 nodes, renumbered, no internal paths in it:
**[⬇︎ minimax-h3-ltx-hybrid-refine.json](/workflows/minimax-h3-ltx-hybrid-refine.json)**
Drag it into ComfyUI and it expands. The prompt baked in is the one from the clip above; swap it for yours. ComfyUI flags any missing weight in red — look the filename up in the list above.
⚠️ This is the **basic build**: zero code, and without the text-encoder removal from the deep dive.
📌 **The same pipeline on a DGX Spark goes from 1.28x to 1.89x over native**, because its 121 GiB of unified memory holds both stages and stops the per-run reload: [Two-stage on a DGX Spark](/en/blog/h3-ltx-two-stage-dgx-spark).
The H3 half of the weights is packaged in one repo — both transformers, the text encoder, both VAEs and the 4-step turbo LoRAs, laid out as ComfyUI's `models/` tree so one download gets you running: **[coolthor/MiniMax-H3-pruned-NVFP4](https://huggingface.co/coolthor/MiniMax-H3-pruned-NVFP4)**. Both graphs live there too, under `workflows/` — this one and the no-text-encoder variant from the deep dive. LTX-2.5 is not mirrored there; different license, so you fetch it from Lightricks.
## 1344×768 is forced: both latent grids have to come out 42×24
Two constraints pin the size. Output width and height must both be divisible by 32, which is a hard requirement of the LTX latent, and the draft must be exactly half the output in each dimension.
Work it through at 1344×768: 1344/32 = 42 and 768/32 = 24 on the LTX side, while the H3 side divides by 16, giving 672/16 = 42 and 384/16 = 24. Both latent grids are 42×24, which is what the handoff needs.
One consequence worth stating out loud: 1344×768 is 7:4, not 16:9. True 16:9 at height 768 would be 1365.33 px wide, which is not an integer and certainly not a multiple of 32.
## The one number you have to change from NVIDIA's config is the stage-2 sigma
The sigma schedule tells the sampler how much noise it should assume is still in the latent. A high first sigma means "treat this as mostly noise", which gives the refiner licence to repaint rather than sharpen. NVIDIA's `configs/default.json` hardcodes the stage-2 schedule at `[0.909375, 0.725, 0.421875, 0]`, and on the ComfyUI decode-then-re-encode path that breaks.
To measure it I picked a window in the background — pure background, nothing in the scene moves it, so any shift is an artifact — and counted the frames where that region scaled by 1 px or more, out of 120 frame transitions. Read the right-hand column as "how often the geometry twitched":
| First sigma | Frames the background moved |
|---|---:|
| no refine | 0 |
| 0.5 (official identity preset) | 1 |
| **0.78** | **2** |
| 0.85 | 6 |
| 0.909 | 11 |
0.65 also came in at 1, so the usable range is wider than the table suggests. What the table shows is that degradation is not linear — it is a cliff between 0.78 and 0.85.
The frame count is the machine-readable symptom; the visible one is worse. At 0.909 the refiner swaps the face outright, repainting the features into a different person and dropping the necklace entirely. At 0.85 it starts leaking: the necklace changes from a square pendant to a heart. 0.78 kills both problems, and it was the fastest of the six settings I ran.
T8mars's identity refiner node has a `manual_exp` mode. Enter:
```text
0.78, 0.643, 0.546, 0
```
## The upscaler can't invent detail, so it belongs last
Here is the same 672×384 draft with two different finishes. This is the draft, as it comes out of H3 in 25.5 s:
Send it through VSR and the canvas reaches 1344×768. The face goes from 175×161 to 350×323 effective pixels, which sounds like the job is done. It isn't: not one eyelash is new. Interpolation spreads the pixels that already exist over a larger grid, and that is all it can do.
LTX's 3 refinement steps run the generator again at full resolution, with the draft as the starting point rather than noise. Hair strands, tooth edges, skin texture — none of that is in the draft, and after the refine it is there. The difference isn't learned versus not learned. It's whether a generator gets a second pass.
And that is the placement argument, not an argument against VSR. It is a cheap, driver-level upscaler that cannot add information; run it where there is information to spread, which is after the refine, not instead of it.
## One draft, many finishes: the saving is in the takes you throw away
The single-shot comparison is the least interesting number here. Cold — models unloaded before each run — the hybrid path takes 40.3 s and native 4-step H3 at 1344×768 takes 51.5 s. An 11 s gap on one clip is not a reason to rewire a workflow.
The reason is that nobody ships the first take. The draft on its own costs 25.5 s, which means you can roll ten of them and only pay full price on the one you keep:
```text
hybrid: 10 × 25.5 (roll drafts) + 50.2 (refine the keeper) ≈ 305 s
native: 10 × 51.1 ≈ 511 s
```
That is arithmetic, not a measurement. I measured the three components separately and added them; I did not sit through a ten-take session on either arm.
The part that is not arithmetic is identity. Every finishing option in the hybrid path reads the same draft file, so they are necessarily the same person — that is why panels 1, 2 and 3 of Figure 3 match. Native has no such guarantee: changing the resolution changes the latent shape, which changes the noise, which gives you a different face for the same seed. The person you approved at 672p is not the person you get at 1344p.
So the hybrid path splits "which person" and "how detailed" into two decisions you make separately. Native welds them into one dice roll, and you re-roll both every time you change your mind about either.
## Bonus: VSR after the refine buys 2688×1536 for 9.4 s
This is not part of the core path — the method above is complete without it. But since VSR is sitting right there, and it now has real detail to work with:
49.7 s for 2688×1536, which is 9.4 s over the 40.3 s hybrid for 4× the pixels.
---
## Deep dive: most of the hybrid's cost is loading, not sampling
You can run the workflow without reading this section; everything above stands on its own. What follows is where the seconds go, what I cut, and the three places I deliberately diverged from NVIDIA's recipe.
### Gemma is 15.37 GiB of one constant string, and removing it saves 7.85 s
Stage 2 takes conditioning from a text encoder, which on a normal LTX workflow is reasonable. On this one it is not, because the stage-2 conditioning is a single constant string:
```text
4K, refined, high quality, cinematic detail, clean textures, natural motion.
```
Positive and negative are both wired to the same node output. Nothing varies per scene, per prompt or per seed — and loading `gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot` to produce it costs 15.37 GiB of residency on every single run.
NVIDIA never had this problem. Their config carries `"online_text_encoder": false`, because their pipeline precomputes the stage-2 conditioning once. The ComfyUI implementation has no such layer, so I added the cheap version of one: a small save/load-conditioning node pair that writes the tensor to disk once and reads it back thereafter.
| | Cold run |
|---|---:|
| with Gemma | 48.114 s |
| without Gemma | **40.260 s** |
| saved | 7.854 s (16.3%) |
Generating the cache costs 55.185 s, once, ever.
The output is not merely similar. Frame by frame, 121 of 121 frames are identical. The comparison was sanity-checked both ways. Baseline against itself returned "identical", so it can report a match; a different seed against the baseline returned "all 121 frames differ", so it catches one when there is one.
### 4× the pixels costs 2× the time, not 4×
Pure H3 generation, no upscale, 4 steps, three resolutions:
| Resolution | Pixels | 4 steps |
|---|---:|---:|
| 672×384 | 258k | 25.5 s |
| 960×544 | 522k | 28.9 s |
| 1344×768 | 1032k | 51.1 s |
Attention is quadratic in sequence length, so the naive expectation is that 4× the pixels costs a lot more than 4× the time. It costs 2×. In this size range the fixed costs — model loading, VAE, encode — are still large enough relative to sampling to flatten the curve.
That cuts against the hybrid path as much as for it. Drafting at a quarter of the pixels saves half the time, not three quarters, which is exactly why the single-shot gap is 11 s rather than the 30 s you would guess from the pixel counts.
### Two stacks need 56.2 GiB and the card has 31.84 GiB
Add up what has to be resident and the hybrid path wants 71.5 GiB with Gemma, 56.2 GiB without. A 32 GB RTX 5090 offers 31.84 GiB usable. That is 2.25× over with Gemma and 1.76× over without.
Stage 1 alone is 33.5 GiB, which does not fit either — so ComfyUI is already swapping the text encoder out within the H3 stage before stage 2 is even in the picture. Adding a second stack does not introduce swapping; it adds another round of it.
The cost shows up when you compare cold runs (models freed beforehand) against warm ones (nothing freed, only the seed changed):
| | Cold | Warm | Loading |
|---|---:|---:|---:|
| hybrid, with Gemma | 48.1 s | 32.2 s | 15.9 s |
| native, 4 steps | 51.5 s | 41.5 s | 10.0 s |
The hybrid path loses 5.9 s more to loading than native does, because it loads two stacks instead of one. Take loading out of both and hybrid is 27% faster than native, against the 6.6% it manages cold.
⚠️ The warm numbers are optimistic and the two arms are not strictly comparable: the warm runs reported `execution_cached` node counts of 18 and 10, so they skipped different amounts of work. Only the relative comparison — hybrid pays more for loading — survives that. Treat the absolute warm figures as a ceiling on what a persistent-model setup would give you, not as a measurement of one.
### Three deliberate departures from NVIDIA's recipe
**Stage 2 runs the distilled int8 checkpoint, not the official dev BF16.** 22B in BF16 is roughly 44 GB and does not fit on this card. `ltx-2.5-22b-distilled-transformer-int8-convrot` is equivalent to dev with the distill LoRA merged in, which means it is effectively strength 1.0 where the official recipe uses 0.8.
**The draft LoRA is lightx2v's `minimax_h3_fl2v_turbo_4step_v0.1_768p_sla`, not the official FastVideo VSA DataFree one.** The FastVideo LoRA is meant to pair with VSA sparse attention, and there is no VSA path on a 5090.
**There is no H3→LTX latent adapter in my chain.** NVIDIA has a learned one, [H3-to-LTX-Latent-Adapter](https://huggingface.co/Efficient-Large-Model/H3-to-LTX-Latent-Adapter), 389 MB, which maps H3 latents straight into LTX space and skips both a decode and an encode. I wrapped it as a ComfyUI node and ran it: every tensor shape lined up and the conversion itself takes 0.177 s. Total time on the 5090 did not improve, because the VAE round trip it removes is offset by the H3 latent upsampler it adds. It is a real win for memory — one fewer VAE encoder resident — just not on a card that swaps models every run anyway.
### Every second came from ComfyUI /history, and I ignore gaps under 4 s
All timings are `execution_success` minus `execution_start` from the ComfyUI `/history` endpoint, divided by 1000. Every run was checked for `execution_cached.nodes` being empty (cold) or had its length recorded (warm). Cold runs were preceded by:
```bash
curl -X POST http://:8188/free \
-H 'Content-Type: application/json' \
-d '{"unload_models":true,"free_memory":true}'
```
Run-to-run jitter in the same batch measured at about 4 s. The clearest evidence is a pair that should have gone the other way: the 672p native run took 25.5 s while the same run with VSR added took 21.9 s, and VSR can only add time. So I don't draw conclusions from gaps under 4 s. That is also why I read the 51.5 s native figure in the single-shot comparison and the 51.1 s in the resolution table as the same measurement.
---
*Also in this series: [Part 2 — Real-ESRGAN 109 s to RTX VSR 11.2 s](/en/blog/minimax-h3-rtx5090-speedup-vsr) · [Part 7 — LTX-2.5 vs MiniMax-H3 on one card](/en/blog/ltx25-vs-minimax-h3-rtx5090)*
---
# [vLLM] Qwen3.8-Flash-Next TP=2 on Two DGX Sparks: 51.9 tok/s
URL: https://ai-muninn.com/en/blog/qwen38-flash-next-tp2-two-dgx-sparks
Date: 2026-09-12
Series: DGX Spark (Part 46)
A second DGX Spark takes Qwen3.8-Flash-Next NVFP4 from 41.7 to 51.9 tok/s median decode, +24.5%, and the KV pool from 1,027,392 to 2,128,927 tokens, 2.07x. TTFT drops from 0.26 s to 0.17 s. Both machines need a full 124 GiB copy of the model: vLLM shards tensors after load, not files on disk. The interconnect is not the bottleneck — during decode it runs at 0.3% of the 185 Gb/s I measured, because only activations cross machines. Caveats: 51.9 is the median of three runs (56.6 / 51.7 / 51.9), and this deployment does not survive a reboot.
## Preface
Two movers carrying a couch each take half the weight, but they still walk the whole staircase and still have to match steps at every turn. That is roughly what a second DGX Spark does for decode: the weight reads split, the per-step overhead does not, and the result is +24.5% rather than +100%.
This is Part 46 of the DGX Spark series. The direct prerequisite is [Part 45](/en/blog/qwen38-flash-next-nvfp4-dgx-spark-vllm-recipe), which covers the single-node NVFP4 recipe — the checkpoint, the nine bind-mounted overlays, PLE modes, MTP, and where the 41.7 tok/s baseline comes from. I am not repeating any of it here.
This article covers what changes when you add the second machine, and the short version is two things: **bigger models fit** (242 GiB across the pair against 121 on one) **and it is faster**. Below: what it costs in disk and memory, how to cable two ConnectX-7 NICs without losing a day to a cable that turns out to be fine, and where the gain actually comes from.
## What you get: 242 GiB between them, 51.9 tok/s, a 2.07x KV pool
Look at the first row for speed and the second for capacity. The second row is the one that decides whether a model you could not load before will load now.
| measurement | one Spark (TP=1) | two Sparks (TP=2) |
|---|---|---|
| 40-prompt harness median decode | 41.7 tok/s | **51.9 tok/s (+24.5%)** |
⚠️ The two medians are not the same kind: **41.7 is the 40-prompt median of a single TP=1 run, while 51.9 is the median of three TP=2 runs, each itself a 40-prompt median.** The three were 56.6, 51.7 and 51.9, a 9.5% spread.
| TTFT, short prompt | 0.26 s | 0.17 s |
| KV cache pool | 1,027,392 tokens | 2,128,927 tokens (2.07x) |
Same checkpoint, same harness, thinking off, concurrency 1.
> I ran the TP=2 harness three times: 56.6, 51.7, 51.9. Median 51.9, spread 9.5%. My first pass computed the speedup off 56.6 and reported +35.7%, which is selective reporting — picking the best of three runs and comparing it to a single baseline. The headline is the median.
A per-prompt probe, same prompt text on both configurations and warmed up, shows where the gain lands. The third row is the one that needs a warning label.
| prompt type | one Spark | two Sparks |
|---|---|---|
| code | 45.25 tok/s | 61.79 tok/s |
| English prose | 28.16 tok/s | 37.87 tok/s |
| Traditional Chinese prose | 15.24 tok/s | 33.16 tok/s |
The throughput gain on Chinese prose is the largest in the table, and it is **not** a TP=2 result. The two configurations also differ in PLE mode, and the MTP draft head reads the PLE table: the single node ran `PLE_MODE=staged` (table on disk, fetched row by row), the two-node configuration uses `PLE_MODE=none`. The single-variable test — one node with `PLE_MODE=none` — has not been run. Until it is, that row is an observation after a configuration change, not a tensor-parallel gain.
## Both machines need a full copy: disk x2, memory x2
This is where most people get it wrong, so it goes first. vLLM cross-node tensor parallel does not put half the weights on each node. Sharding happens after load, at the tensor level, which means **every node needs a full copy of the model directory**.
The second row is the one that surprises people who sized their disks for "half the model each".
| requirement | value for this recipe |
|---|---|
| memory budget | 121 GiB `MemTotal` per node x 2 = 242 GiB, not pooled (OS and CPU share it — measure available separately) |
| disk | 124 GiB (132.7 GB) per node = **265 GB total** |
| container image | 22.2 GB, on both machines |
| driver / kernel | identical on both; mine are 580.173.02 and 6.17.0-1032-nvidia |
| launcher script | byte-identical on both; verify with `sha256sum` |
Two of those rows have failure modes worth naming. If the worker is missing the container image, it stalls in `docker pull` for ten-plus minutes and from the head you see nothing except a rank that never joins. And the launcher script has to actually match: I edited only the head, `scp` silently failed to land the file on the worker, `bash -n` passed against the stale copy, and the worker exited with `LANE must be A or B`. A syntax check does not catch a file that never arrived.
Copying the weights over the ConnectX-7 link took 2 min 43 s at 812 MB/s. The bottleneck there is ssh's AES, not the cable — the link was 4% used.
```bash
rsync -a --info=progress2 -e "ssh -c aes128-gcm@openssh.com" \
/home//models/qwen38-fn-nvfp4-nvidia/ \
sleipnir-2:/home//models/qwen38-fn-nvfp4-nvidia/
# then, on both nodes:
sha256sum ~/patches/*.sh
```
## Cabling: one port is two interfaces, and RoCEv2 needs the IPv4 GID entry
The official procedure is NVIDIA's [connect-two-sparks playbook](https://github.com/NVIDIA/dgx-spark-playbooks/tree/main/nvidia/connect-two-sparks), and it works. Three things in it are easy to get wrong, and each one produces a symptom that looks like broken hardware.
First, use the interface pair that `ibdev2netdev` reports as `(Up)`. On port 0 that is `enp1s0f0np0` and `enP2p1s0f0np0`.
Second, those two names are not a typo. **One physical port exposes two logical interfaces across two PCIe domains, and both need an IP address to get full bandwidth.** That is why the official measurement procedure runs two streams and adds them. Configure one and you get half, then start blaming the cable.
```yaml
# /etc/netplan/40-cx7.yaml (chmod 600; the other machine uses .13)
network:
version: 2
renderer: NetworkManager
ethernets:
enp1s0f0np0:
addresses: [192.168.200.12/24]
enP2p1s0f0np0:
addresses: [192.168.201.12/24]
```
Third, the RoCEv2 GID index only exists once IPv4 is configured. On my machine the table then looks like this:
```
0 link-local RoCEv1
1 link-local RoCEv2
2 IPv4 RoCEv1
3 IPv4 RoCEv2 <- RoCEv2 needs this one
```
⚠️ Index 3 is **not** universal — the table is built from whichever addresses are actually configured, so add IPv6 and you get more entries. Read your own table and match on address family and type.
Until an IPv4 address is assigned, only entries 0 and 1 exist, and RoCEv2 then fails with `Failed to modify QP to RTR` and `Unable to Connect the HCA's through the link`. That message reads like a dead NIC or a dead cable. On my pair it meant IP was not configured yet.
MTU does not need changing. NVIDIA's own example output shows `Mtu : 1024[B]` (netdev 1500) reaching 92 Gb/s. I had assumed 9000 was the last untouched knob, and it was the wrong direction entirely.
Verify with two streams and add them:
```bash
# NVIDIA's procedure is four terminals on two port pairs, running at the same time.
# On the far node, one server per interface:
ib_write_bw -d rocep1s0f0 -p 12000 -D 12 --report_gbits
ib_write_bw -d roceP2p1s0f0 -p 12001 -D 12 --report_gbits
# On this node, both clients concurrently:
ib_write_bw -d rocep1s0f0 -p 12000 -D 12 --report_gbits
ib_write_bw -d roceP2p1s0f0 -p 12001 -D 12 --report_gbits
```
🔴 **The two streams have to overlap.** Run them one after another and each will approach its own single-link ceiling, so the sum means nothing.
Mine: **92.57 Gb/s each, 185.14 Gb/s aggregate.** That 92.57 is the same number as NVIDIA's documented example output for NIC1, so it is the expected result rather than a good one.
That number has a PCIe explanation, and it is the same two-domain story as above: `lspci -vv` shows the CX7 at `Speed 32GT/s, Width x4` **per link**, and dmesg prints `126.028 Gb/s available PCIe bandwidth` for one of them. No single stream gets past about 126 Gb/s, which is exactly why the aggregate has to come from two. NVIDIA's own documented example is asymmetric for the same reason: 92.57 + 97.28 = 189.85 Gb/s.
## Start the worker first, then the head
I used the recipe author's SPEED profile (Kai / Tech2Wild) and changed four environment values: the CX7 addresses, `NCCL_IB_ADDR_RANGE` (pointed at the CX7 subnet, the `192.168.200.x` side here), `--served-model-name` so the server accepts requests under two model IDs, and `MODEL_HOST`.
```bash
# SPEED profile, unchanged from the recipe
PLE_MODE=none GRAPHS=nocompile MTP=3 SEQS=6 CHUNK=4096 \
KV=fp8_e4m3 GMU=0.70 MAXLEN=262144
# the paths I changed
MODEL_HOST=/home//models/qwen38-fn-nvfp4-nvidia
```
Order matters. **Start the worker first** — it runs `--headless` and exposes no API — **then the head.** Reversed, the head cannot find the second rank.
🔴 Do not set `GRAPHS=compile`. Inductor's autotune duplicates the n-gram table, which costs roughly **24 GiB per rank at TP=2**; the author's script comment records this starving and rebooting two Sparks on 2026-09-05. With `nocompile`, `mem_avail` settles at 25-27 GB.
## Verify with a completion, not /health
`/health` answering proves the head's web server is up and nothing else. Send a real request instead:
```bash
curl -s http://:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"qwen38-flash-next",
"messages":[{"role":"user","content":"Say hello in one sentence."}],
"temperature":0, "max_tokens":64}'
```
**TP=2 cannot serve with one rank missing, so the head answering at all proves both machines are alive.** That is a stronger signal than pinging both boxes: my Tailscale path intermittently degrades to 200 ms RTT, and ping keeps succeeding through that.
One log line looks alarming and is not. `distributed_init_method=tcp://:29533` is the rendezvous bootstrap channel, not the data path. Seeing `tcp` there does not mean NCCL fell back to sockets.
## Deep dive: debugging notes
You can stop here if you just want TP=2 running — everything above is the working recipe. What follows is where the time went, which measurements settled which question, and two conclusions I published and had to withdraw.
## Why was a working cable only doing 13 Gb/s?
Three signals said the hardware layer was fine. Both ends negotiated 200 Gb/s. `ibdev2netdev` showed both interfaces `(Up)`. `ib_write_lat` reported t_typical of **1.99 µs**, completely normal. And `ib_write_bw` gave 13.2-13.9 Gb/s, 6.7% of line rate.
**What I expected, and why you might expect the same:** I read those three green signals as "the physical layer is healthy, so this is a configuration problem", and spent the afternoon on QP count, message size, memlock and MTU. The hole in that reading is that `ethtool`'s 200000 Mb/s is a *negotiated link speed* and `ib_write_lat`'s 1.99 µs is a *single-operation latency*. Neither one measures throughput. None of the three green signals was looking at the thing I cared about.
The cable was the obvious suspect. `ethtool -m` reports it as an OEM `Q112P-400G-0.5M` — I could not find a manufacturer page for that part number, so treat it as what the module claims about itself — and it is not on NVIDIA's approved list (approved are Amphenol NJAAKK0006 and Luxshare LMTQF022-SD-R). An unapproved copper DAC barely holding 200G on FEC is a very plausible story, so I checked the FEC counters over 5 seconds of traffic.
| counter | delta over 5 s |
|---|---|
| `rx_corrected_bits_phy` | +10,214 |
| `rx_err_lane_0` | +2,209 |
| `rx_err_lane_1` | +8,005 |
| `rx_pcs_symbol_err_phy` | **0** |
That last row acquits the cable: every error was corrected by RS-FEC and nothing reached the packet layer. ⚠️ I originally divided by application throughput to get a pre-FEC BER of about 1.5e-7. That denominator is wrong — the counter wants physical bits, and the same deltas against a 200 Gb/s line rate land nearer 1.0e-8. **Naming a BER needs the matching physical-bit delta, which I did not capture.** What I can say is that every error was corrected and the cable was fine.
It was also insensitive to every knob: 1QP/64KB 13.49, 8QP/64KB 13.25, 1QP/1MB 13.30, 4QP/256KB 13.24, memlock unlimited 13.46. TCP was equally slow (iperf3, 8 streams: 15.9 Gb/s, zero retransmits), so this was not RDMA-specific. Loopback on a single machine ran **11.43 Gb/s** — slow with the cable entirely out of the path.
The decisive measurement was the PHY byte counters. Over a 10-second transfer the sender's `tx_bytes_phy` rose by only 17.86 GB, which is 14.3 Gb/s. The receiver's `rx_bytes_phy` rose by exactly the same amount, and `tx_discards_phy`, `rx_discards_phy`, `rx_pause_ctrl_phy` and `rx_out_of_buffer` were all 0. Nothing was being dropped. The NIC simply never sent more.
That pair of counters separates two causes that look identical from outside, because both present as low bandwidth:
- small `tx_bytes_phy` delta, zero discards → the host is not sending
- large `tx_bytes_phy` delta, nonzero discards → it is sending and the path is dropping
Root cause, from NVIDIA developer forum threads 363461, 370035 and 373538: **after plugging or re-seating a QSFP cable, the system can stay in a degraded state until it is rebooted.** One case went from 13.39/13.76 to 98.01/98.01 after a reboot (thread 363461, post 10). ⚠️ The successful report in thread 373538 explicitly describes a **full power drain**, not just a reboot — do not collapse the two. And the comment that the dmesg line `Detected insufficient power on the PCIe slot (27W)` is cosmetic came from forum user `mashie`, whose profile carries no NVIDIA staff flag, so read it as one participant's view rather than an official position.
After my reboot: 92.57 x 2 = 185.14 Gb/s. Re-verified after a later driver upgrade: 92.56 x 2 = 185.12.
## Why did netplan generate fail on a file I never wrote?
The official cabling procedure has you write a netplan file. `netplan generate` then failed outright on both machines:
```
Invalid YAML: control characters are not allowed
```
The culprit was not my file. It was `/etc/netplan/90-NM-2edf06d6-....yaml`: **715 bytes of all-NUL**, same filename, same size and the same 2025-09-29 factory date on both machines. That UUID is not in either machine's NetworkManager connection list, so it is an orphan. Moving it out of `/etc/netplan/` unblocks everything.
There is a related red herring: `netplan get renderer` crashes with a `UnicodeDecodeError`, which looks like netplan itself is broken. It is the CLI failing to decode while printing the parse error above.
## The interconnect sits at 0.3% during inference
I measured this with PHY byte counters rather than inferring it from the absence of NCCL warnings. `NCCL_DEBUG=WARN` only prints when something is wrong, so silence is not evidence.
Over 99 seconds of inference the ConnectX-7 moved **6.87 GB, about 0.555 Gb/s** — 0.3% of the 185 Gb/s link. Discards stayed at 0 throughout, and the worker's tx matched the head's rx exactly.
The mechanism: single-stream decode exchanges **activations** across machines, not weights. Weight reads are local, each node reading its own half; the cross-machine traffic is one hidden-dimension tensor per step. Three orders of magnitude apart.
This also explains a knob that did nothing. `NCCL_CHANNELS=8` is pinned to 8 in TJ Klug's two-Spark recipe, and here it made no measurable difference: a link running at 0.3% has nothing for eight channels to carry.
## Effective weight bandwidth lands at 1.41x, and the link is not the limit
If decode were purely weight reads and the weights split exactly in half, the speedup should approach 2. It does not. Measured effective weight bandwidth, using MTP-disabled runs as a proxy, came out at **1.41x**, and the ratio held to within 0.2% across three prompt types.
The link's throughput is not the explanation: the 0.3% figure above rules that out. It does **not** rule out collective latency or synchronisation cost — that needs latency profiling I have not done.
Where it might be, in order of how much I would bet on each:
1. fixed per-step overhead — kernel launch, scheduling, the fixed cost of all-reduce
2. the difference in PLE mode and `gpu-memory-utilization` between the two configurations
**To tell those apart I need one more test: one node, `PLE_MODE=none`, MTP off.** I have not run it. So for now the missing 0.59x can only be described as "not the network".
> **Retracted.** I previously wrote up a step-time decomposition — 34 ms weight read plus 20 ms other — as established. It assumed all-reduce was approximately zero, and cross-checking it against 9.27 GiB/token produced an implied per-rank bandwidth that did not hold. Two measurement points cannot solve three unknowns.
## Five config variants, all inside my own run-to-run spread
The recipe author's results directory holds 84 JSON files, 69 of them complete 40-prompt harness runs, which means the remaining knobs can be looked up instead of re-measured. TP=2 medians from that corpus, against mine:
| configuration | TP=2 median |
|---|---|
| `speed_mtp4_ixs` (MTP=4 + index share) | 55.2 |
| `ram_mirror` | 53.7 |
| `speed_dv64k` (reduced-vocabulary drafting) | 53.2 |
| `speed_async` (`ASYNC_SCHED=1`) | 52.4 |
| `speed_nccl8` (`NCCL_CHANNELS=8`) | 51.9 |
| my SPEED config | 51.9 (single best 56.6) |
My own three runs spanned 51.7 to 56.6, a 9.5% spread, so every gap in that table is smaller than my run-to-run variation — and my single best 56.6 is my own local number rather than part of that corpus, whose highest TP=2 concurrency-1 median is 55.2. Nothing in those 69 runs is cleanly faster than what I am already running.
You can trade speed for a much larger KV cache. The CONTEXT profile (`PLE_MODE=mmap GRAPHS=piecewise MTP=4 SEQS=8 GMU=0.80`) pushes the KV pool to **5.87M tokens** at the cost of dropping to 35.8 tok/s.
## The 0.046 quality drop is not a TP=2 cost
My harness auto_score went from 0.889 on the single node to 0.843 at TP=2, a 5.2% drop. All three TP=2 reruns returned exactly 0.843, spread 0.000, and I declared the quality cost real on that basis.
That was wrong. Reproducibility only proves the number is deterministic for that configuration. It says nothing about whether the gap *between* configurations means anything.
Those 69 runs settle it:
| set | auto_score range |
|---|---|
| TP=1 configurations | 0.815 - 0.919 (span 0.104) |
| TP=2 configurations | 0.821 - 0.906 |
The ranges almost entirely overlap. One TP=1 run at 0.815 sits below my TP=2 result, and three TP=2 runs at 0.906 sit above my TP=1 result. A 0.046 gap is smaller than the normal variation between configurations on either side.
## Remote operation with no BMC: the rollback path does not exist
These two machines sit in an office. There is no BMC. That makes one thing worth checking before any kernel or driver work, and it failed for me:
```bash
modinfo -k -F version nvidia
# ERROR: Module nvidia not found
```
After the kernel upgrade `/boot` still holds the old `vmlinuz`, so GRUB offers the old kernel — but the module package was removed, so booting it gets you a machine that cannot see its GPU. The rollback path looks like it exists and does not. The only real safety net is touching one machine at a time.
Tailscale degrades rather than disconnecting, which is its own trap. Ping keeps succeeding while RTT goes from 3 ms to 120-200 ms and the SSH handshake times out. That is the signature of falling back to a DERP relay, not a machine fault. To tell them apart, ssh a node at a different location first. To work around it, drive the worker from the head over the ConnectX-7 link.
Last one, still open: TP=2 does not survive a reboot. Both nodes run a manual `docker run --restart no`, and the systemd unit for the single-node deployment is still enabled, so rebooting the head silently reverts to one machine. Not fixed yet.
## Takeaways
Two things here transfer outside this hardware.
When you see low bandwidth, first separate **"not sending"** from **"sending but dropping"**. PHY byte counters plus discard counters cut cleanly between them, and that split applies to any network bottleneck, not just RDMA. It is what ended the cable investigation, and it would have ended it hours earlier.
A liveness probe should key on a signal that *must* visibly break. The head answering a completion proves both ranks are present, because TP=2 cannot serve without both; pinging each machine gets fooled by the Tailscale degradation described above.
And the bottom line on the second machine: 121 GiB becomes 242, the KV pool goes 2.07x, decode goes +24.5%, and the link still has 99.7% spare. **Both things hold at once: a model that would not fit now fits, and it runs faster.** If you expected decode to double, it does not. Capacity, bandwidth and headroom all do.
---
# [Benchmark] LTX-2.5 vs MiniMax-H3 on one RTX 5090: 29s vs 81s for the same Chinese dialogue clip
URL: https://ai-muninn.com/en/blog/ltx25-vs-minimax-h3-rtx5090
Date: 2026-09-11
Series: MiniMax-H3 on RTX 5090 (Part 7)
Same RTX 5090, same Simplified Chinese line, same ComfyUI: **LTX-2.5 finishes in 28.67 s, MiniMax-H3 in 81.22 s**, and both come back at ASR character error rate 0%. The gap is per-pass cost, not step count, since LTX runs 11 forward passes and H3 runs 9. LTX also lands at −10.4 LUFS where H3 sits at −30 to −34, so H3 needs a gain stage before anything ships. On two speakers LTX dropped two characters (CER 9.52%) while H3 stayed word for word. Neither leaves headroom: peaks of 31,736 and 31,811 MiB on a 32,607 MiB card. One script, one scene, n=1.
*First half is MiniMax-H3, second half is LTX-2.5, same two-speaker script, both loudness-matched to −16 LUFS before concatenation.*
## Preface
Two kitchens, one bowl of soup. The fast one puts it in front of you in four minutes and gets a word of the order wrong. The slow one takes twelve and reads your order back to you exactly as you said it.
Part 1 of this series got MiniMax-H3 onto a single RTX 5090. Part 6 put two characters into one shot with Ref2VA. Lightricks then shipped LTX-2.5 with synchronised audio, which makes it the first local model that competes with H3 on the thing H3 was interesting for: dialogue that comes out of the same forward pass as the picture.
So I ran both on the same card, with the same Chinese script, and measured what each one gives up.
---
## 28.67 s vs 81.22 s for the same line
One RTX 5090, 32,607 MiB total. ComfyUI. Both models local, no API in the path.
The test line is single-speaker, Simplified Chinese, 25 characters, about 5.17 s of speech. Identical text into both models:
```text
今天的汤头特别浓,先喝一口暖暖身子,再慢慢告诉我你的故事。
```
The row that matters below is `Whole flow`, which is sampling plus load, decode and save:
| | MiniMax-H3 | LTX-2.5 |
|---|---|---|
| Resolution, frames | 1344×768, 124 | 1280×704, 121 |
| Steps | 14 + Spectrum | 8 + 3, two-stage |
| Sampling | 66.40 s | 14.31 s |
| Whole flow | **81.22 s** | **28.67 s** |
| ASR character error rate | 0% | 0% |
Both models transcribe back cleanly, so on this line the machine gate does not separate them. The wall clock does.
One thing that keeps this from being a clean subtraction: the two models want different shapes, and I let each one run at its own native size. LTX's pixel-times-frame load comes to about 85% of H3's. That is not enough to explain a 3x gap, but it does mean you cannot read the difference as a pure engine comparison.

Same line, same card. H3 on top, LTX-2.5 below. The two scenes are separately generated, not two renders of one frame.
## 11 forward passes vs 9, so the gap is per-pass cost
The obvious first guess is that H3 is simply doing more work per clip. It is not, and the step counts say so.
LTX-2.5 runs two stages, 8 steps then 3, so 11 forward passes through the transformer.
H3 runs 14 steps, but Spectrum is on. Spectrum is H3's step-skipping scheduler: it keeps a short history of previous steps and forecasts some of them instead of actually running them. On this configuration it forecast 5, which leaves 9 real passes.
Eleven vs nine is close enough to call a tie. The 3x wall-clock gap therefore has to live in what one pass costs, not in how many there are. That number turns out to be around 5 s per actual pass for H3, which I take apart in the deep dive.
## H3 comes out 15-20 dB under normal loudness, LTX does not
LUFS is the loudness unit broadcast normalisation uses. Zero is the ceiling and more negative is quieter, so a number like −30 means the file is very quiet in a way a peak meter will not warn you about.
On this run, H3's clip measured −25.1 LUFS integrated and LTX's measured −10.4. Across the runs I have done, H3's native output sits between −30 and −34 LUFS, which is 15 to 20 dB below normal content. Anything you publish needs a gain stage in front of it.
LTX at −10.4 is close enough to normal that the step disappears. That is one fewer node in the graph and one fewer thing to forget before you upload.
## 1344×768 is arithmetic, not preference
Every H3 recipe you will find uses 1344×768, and it looks like a community convention. It is not. It is what you get when you satisfy two constraints at once:
```text
short edge 768 (MiniMax model card default)
16:9 would want 768 × 16/9 = 1365.333… (not even an integer)
ComfyUI path both dimensions divisible by 32
1365.333 / 32 = 42.666… -> round down to 42
42 × 32 = 1344
```
Worth being precise about what that leaves you with: 1344 / 768 = 1.75, which is **7:4, not 16:9**. The 16:9 width at this short edge is not reachable, so 1344 is the nearest legal value below it.
Two independent sources land on the same shape, which is a decent sign the derivation is not just mine: NVIDIA's Sol-Engine benchmark runs H3 at 1344×768 by 124 frames, and FastVideo's H3 distillation was trained at 768×1344 by 124 frames.
## Frame counts do not port between the two models
If you try to hold frame count constant across the comparison you will hit an error, because the two models count frames on different grids.
LTX-2.5 requires `frames % 8 == 1`. So 121 works, since 121 is 15×8+1. 124 is rejected outright.
H3 uses a 17k+5 grid, where 124 is 17×7+5.
The grids do intersect — 73, 209 and 345 satisfy both rules, and 209 is 26×8+1 as well as 12×17+5 — but none of those sit near either model's native working point. I ran each at a legal value close to 5 seconds and noted the gap instead.
## Five files from Lightricks/LTX-2.5, and three ways to download the wrong ones
Everything for LTX-2.5 comes from one repository, [Lightricks/LTX-2.5](https://huggingface.co/Lightricks/LTX-2.5). On-disk sizes:
| File | Size |
|---|---|
| `diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors` | 20.03 GiB |
| `text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors` | 14.32 GiB |
| `vae/ltx-2.5-video-vae-conv-bf16.safetensors` | 1.35 GiB |
| `vae/ltx-2.5-audio-vae-bf16.safetensors` | 0.34 GiB |
| `latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors` | 0.93 GiB |
Three places to get this wrong:
- **Take `distilled`, not `dev`.** The dev transformer produced melted-looking output at both quantizations I tried. It is not a quality-versus-speed trade in this graph, it is a broken picture.
- **Take the `conv` video VAE.** A third-party measurement on a 5090 puts it 22.5% faster overall, with decode falling from 8.91 s to 4.68 s and peak VRAM essentially flat (31,692 MB to 31,728 MB, up 36 MB). Free.
- **The latent upscaler is not optional.** The official blueprint samples in two stages with `LTXVLatentUpsampler` at ×2 sitting between them. Skip the file and you have no second stage to run.
## The official sampler settings, and the wiring mistake that raises `split_with_sizes`
These come straight out of the ComfyUI blueprint in [Comfy-Org/workflow_templates](https://github.com/Comfy-Org/workflow_templates), and I did not tune any of them:
```text
sampler euler_ancestral
guider LTXVDualCFGGuider [1, 1]
stage-1 sigmas 1.0, 0.99375, 0.9875, 0.98125, 0.975, 0.909375, 0.725, 0.421875, 0.0 (8 steps)
stage-2 sigmas 0.85, 0.7250, 0.4219, 0.0 (3 steps)
conditioning LTXVConditioning [24]
decode VAEDecodeTiled [512, 64, 64, 16] + LTXVAudioVAEDecode
AV latent LTXVSeparateAVLatent / LTXVConcatAVLatent
```
The last line is the one that bites. Audio and video travel as a single combined latent and have to be split before decode and concatenated after. If you wire that chain wrong, the error you get is `split_with_sizes`, which reads like a tensor-shape problem and is actually a graph-topology problem.
## LTX names the speaker in the sentence, H3 tags them and keeps identity elsewhere
The two models take dialogue in shapes that do not convert into each other.
LTX-2.5 has a template that puts the line in quotes and names the language. One caveat first, because I got this wrong on the way in: that template lives in the **Dub-It (speech replacement)** section of the docs, and that section opens with "Unlike text-to-video generation". I read it as the general dialogue syntax. It isn't. For text-to-video there is no equally specific official template.
The template:
```text
[Speaker] is speaking [Language/Accent], saying: "[Dialogue]"
```
The model card lists nine languages including Chinese. Cantonese is not one of them.
H3 uses positional tags, `(S1)` and `(S2)`, and this is where people lose an afternoon: the tag carries no identity at all. It is a pointer. Who S1 is gets established in the subject description, like ` (S1), a young woman with shoulder-length black hair…`, and if you never say who S1 is then the model invents someone. `(S1,S2)` means both speaking at once.
## Two speakers: LTX 29.21 s at CER 9.52%, H3 94.82 s at CER 0%
Same scene, two lines, two voices:
```text
S1 young woman 这碗汤是你煮的吗,闻起来好香。
S2 middle-aged man 是我煮的,趁热喝吧。
```
Look at the bottom two rows, because that is where the models finally separate:
| | MiniMax-H3 | LTX-2.5 |
|---|---|---|
| Sampling | 67.94 s | 14.34 s |
| Whole flow | 94.82 s | 29.21 s |
| Peak VRAM | 31,811 MiB | 31,729 MiB |
| S1 / S2 character error rate | 0% / 0% | 15.38% / 0% |
| Total character error rate | **0%** | **9.52%** |
LTX stays about 3x faster with a second voice in the scene. It also stops being free.
## Four signals say both models really alternate, and none of them rules out overlap
I had read the single-speaker guidance as a model-wide limit, so the first question was whether the second voice was real or whether one voice was doing an impression while both mouths flapped. I checked four things that fail in different ways:
- **ASR timestamps do not overlap.** H3 puts S1 at 0.00-2.40 s and S2 at 3.02-4.88 s. LTX puts S1 at 0.00-1.54 s and S2 at 2.56-4.84 s.
- **Frame-by-frame mouth attribution is correct.** On the LTX clip, from 0 to 1.4 s the woman's mouth is moving and the man's is mostly closed; from 2 to 4.8 s the man is speaking and the woman is closed.
- **The handover goes quiet.** A 20 ms RMS envelope at the switch reads 0.000296 for H3 and 0.000646 for LTX, each about 1.1 to 1.2% of the preceding line's mean level.
- **Pitch medians drop where they should.** H3 goes from 242 Hz to 104 Hz between the lines, LTX from 286 Hz to 130 Hz.
Where that stops being evidence: a single mixed-audio envelope cannot separate two speakers, only measure the sum. The transcriber can miss overlapping speech entirely, which is the exact failure I was testing for. A measurable pause is not the same claim as no overlap in any millisecond. And pitch medians say something about register, never about voice identity. One script, one scene, n=1 for each model.
## LTX drops 「这碗」 and padding silence does not bring it back
The 15.38% on LTX's first line is two characters at the very start, 「这碗」. That position is suspicious, because transcription heads routinely clip the beginning of a file.
So I padded 0.75 s of silence before and after the audio and re-ran ASR. The same two characters went missing. That makes a head-boundary artifact unlikely and points at the generation.
H3 got both lines word for word on the same script.
## Neither model leaves headroom: 871 and 796 MiB free
| | Peak | Free on a 32,607 MiB card |
|---|---|---|
| LTX-2.5 | 31,736 MiB | 871 MiB |
| MiniMax-H3, two speakers | 31,811 MiB | 796 MiB |
Under 900 MiB of slack in both cases, which means neither model is the light one. Third-party reports put LTX-2.5 into the 32 GB wall at 8 seconds of 720p, and my own runs agree that about 10 seconds is the practical ceiling for a single generation on this card.
---
## Deep dive: where the VRAM peak actually sits
You can use either model without reading any of this. The first act said neither model leaves 900 MiB. This is how that number was measured, and what happened when I tried to push it down.
### LTX's VRAM peak sits in stage-2 sampling, so smaller decode tiles miss it
LTX-2.5 leaves 871 MiB free. `VAEDecodeTiled` runs a 512 tile and is the easiest knob to reach, so the first thing worth knowing is which node actually holds the peak.
The measurement: that run kept 123 VRAM samples and 114 execution events, and the events carry `elapsed_s`. Line the two timelines up and each node interval gets its own peak.
| Node | Interval peak |
|---|---:|
| `CLIPTextEncode` | 19,032 MiB |
| `UNETLoader` | 16,632 MiB |
| **stage-1 sampling** | **31,653 MiB** |
| `LTXVLatentUpsampler` | 31,466 MiB |
| **stage-2 sampling** | **31,736 MiB** |
| `VAEDecodeTiled` | 30,873 MiB |
| `SaveVideo` | 27,193 MiB |
The peak is in stage-2, with stage-1 only 83 MiB behind it. **Both sampling stages sit at the ceiling and decode is below both**, so shrinking the tile cannot reach the number that matters.
The same table answers a related question. Text encoding peaks at 19,032 MiB and drops to 16,632 once the transformer loads, which means the text encoder unloads before sampling begins. **Swapping it for a smaller quantization does nothing for the sampling peak.**
### NVFP4 is 2.59 GiB smaller on disk and 72 MiB larger at the peak
Weights stay resident through sampling, so a smaller checkpoint is the next thing to measure. The same repository ships an NVFP4 variant at 18,721,548,408 bytes, 2.59 GiB below int8-convrot.
That variant used to fail with a dimension mismatch at the sampling stage. The checkpoint's `__metadata__` was missing `_quantization_metadata`, so ComfyUI silently dropped the quantization scale tensors and fed packed FP4 weights straight into the linear layer. Lightricks says on the HF discussion thread that it is fixed. ⚠️ **I cannot independently confirm "re-upload only, no code change"** — I inferred it from the ComfyUI-side issue still being open, not from a file revision diff. Either way, a local copy downloaded early needs checking.
You can check the header with two HTTP range requests instead of pulling the whole 18 GB. A safetensors file starts with an 8-byte little-endian u64 header length followed by that many bytes of JSON, so **before** downloading you can pull bytes 0-7 for the length and then that slice of JSON over HTTP range requests. **After** downloading, the same parse runs on the local file:
```python
import struct, json
with open(path, 'rb') as f:
n = struct.unpack('
There is a moment in every stock-photo search where you notice that none of these people work at your company. Preset TTS voices have the same problem, and it gets worse the more specific your voice is.
Narration sits on top of something you wrote, and the voice reading it is part of what people recognise. Narration sits on top of something you wrote, and the voice reading it is part of what people recognise. So I went looking, and I started with the defaults.
I did try the presets first. macOS ships `say -v Meijia`, which runs at 4.7 characters per second and is too slow to listen to. I auditioned preset voice libraries after that, and they all still sound unmistakably like a machine reading. There was no setting that would fix it, because what was missing was not a setting. So the route left was to clone my own voice, and the surprise is how little that takes.
## Zero-shot cloning is not training, so there is nothing to prepare but one recording
No fine-tune. No hour-long recording. No weight update, no GPU rental, no waiting.
You hand the model two things: a recording of your voice, and that recording's exact transcript. It extracts timbre and delivery from the pair, then applies both to whatever new text you give it. That is the entire mechanism, and it runs in the same call that produces the audio.
One consequence falls straight out of this and shapes everything downstream. Because the model aligns the audio against the transcript, the two must match word for word. That is why a stumble means re-recording the whole take. You cannot trim the audio to fix a mistake without breaking the alignment, and you cannot fix the transcript to describe what you actually said without changing what the model thinks each sound corresponds to.
## Install two packages, and let the model download itself on first run
```bash
python3 -m venv .venv && source .venv/bin/activate
pip install mlx-audio soundfile
```
That is the whole install. [`mlx-audio`](https://github.com/Blaizzy/mlx-audio) pulls in MLX, Apple's machine learning framework, which uses the Apple Silicon GPU directly. My versions: mlx 0.31.1, mlx-audio 0.5.1, Python 3.14 arm64.
The model weights are not in the package. The first `load_model` call pulls them from Hugging Face and caches them, so budget a download on your first run and nothing after that.
## Record 20 to 30 seconds in one take, in the voice you actually talk in
Quiet room. Air conditioning not blowing at you. No background music. The MacBook's built-in mic is enough; I never used an external one. Sit about 15 to 20 cm from it.
Speak at your normal pace and volume, the way you would explain something to one person sitting across from you. Not a broadcast voice. Whatever you do here is what every sentence the model generates will sound like, so performing a voice you don't normally use means committing to it for the rest of the project. Twenty to thirty seconds is the target. Mine is 23.9 seconds.
Find the mic index first:
```bash
ffmpeg -f avfoundation -list_devices true -i ""
```
Mine reports `[1] MacBook Pro的麥克風`. Then record, trim the silence, and check the levels:
```bash
# the leading colon means audio only, no video device
ffmpeg -f avfoundation -i ":1" -t 30 -ac 1 -ar 24000 ref_raw.wav
ffmpeg -i ref_raw.wav -ac 1 -ar 24000 \
-af "silenceremove=start_periods=1:start_threshold=-45dB:stop_periods=-1:stop_threshold=-45dB" \
ref.wav
ffmpeg -i ref.wav -af volumedetect -f null /dev/null 2>&1 | grep volume
```
Mine comes back at `mean_volume: -29.6 dB` and `max_volume: -10.7 dB`. A peak between -6 and -12 dB is the range you want: loud enough that the quiet parts carry, far enough from zero that nothing clips.
## Write your own reference text, and put the English terms in it
Write your own reference text rather than reading a standard passage. The point is coverage: it should contain the kinds of words you will actually be narrating.
Mine deliberately includes English technical terms in the middle of Chinese sentences — GPU, token, `llama.cpp` — because that is what my narration is full of. Read a clean literary passage into the mic and the model has never heard you switch languages mid-sentence, which is exactly the moment it will sound least like you.
Save that text to `ref_text.txt`, exactly as you said it. This file and `ref.wav` are a pair from here on.
## The whole clone is ten lines of Python
```python
from mlx_audio.tts.utils import load_model
import soundfile as sf
model = load_model("mlx-community/Qwen3-TTS-12Hz-1.7B-Base-8bit")
ref_text = open("ref_text.txt", encoding="utf-8").read().strip()
results = list(model.generate(
text="",
ref_audio="ref.wav",
ref_text=ref_text,
lang_code="auto",
split_pattern="",
verbose=False,
))
r = results[-1]
sf.write("out.wav", r.audio, r.sample_rate, subtype="PCM_16")
```
`generate` is a generator, so it needs `list()` around it, and the audio you want is the last item. `split_pattern=""` turns off the library's own text splitting, which matters because I do my own splitting one sentence at a time.
## Two names in that snippet cost me time: `12Hz` and `Base`
The model name contains `12Hz`. The full name is [`Qwen3-TTS-12Hz-1.7B-Base`](https://huggingface.co/mlx-community/Qwen3-TTS-12Hz-1.7B-Base-8bit), and those four characters are load-bearing. Leave them out and the call returns 401.
A 401 reads like an authentication problem. So you go check your Hugging Face token, then your login, then whether the repo is gated — and the actual fix is in the string you typed. If you get a 401 from this model, read the name character by character before you touch anything else.
The second name is `Base`, and it does cloning only. It has no preset voices at all. Preset voices live in the `CustomVoice` variant, and the two have different APIs, so code written against one will not run against the other. If you want presets rather than your own voice, you are downloading a different model, not passing a different argument.
## 83 seconds of narration takes 51 seconds, on the laptop
Faster than realtime, with no GPU machine involved anywhere in the path. That number is what makes the rest of the workflow practical: at this speed, regenerating a line is cheaper than deciding whether to regenerate it.
Know the pacing before you write a script, not after. My clone runs 5.3 to 6.5 characters per second, so 60 seconds of narration holds roughly 320 to 390 Chinese characters. If you are writing to a target length, that is the conversion factor.
## Score it with whisper per segment, then listen to it anyway
The mechanical check is a transcription diff. Run each generated segment through whisper, compare against the script that produced it, and compute character error rate. Mine came out at 7.6%.
What that number catches is mispronounced words. What it does not catch is whether the result sounds good, which still needs your ears — the score can be clean on a take that is flat, or oddly paced, or subtly not you. I listened to mine. It passed.
Measure it per segment rather than over the whole concatenated file. That distinction is not a style preference; it changed my reading of this pipeline by a factor of 4.6, and the mechanism is in the deep dive below.
## All three variants are Apache-2.0 and non-gated
`Base`, `1.7B-CustomVoice` and `0.6B-CustomVoice` are all Apache-2.0 and non-gated, so commercial use is fine.
Check it yourself before you build on top of it. Several comparable open TTS models are not commercially usable.
## Deep dive: three variants, no seed, and a number that lied
Nothing below changes how you run the pipeline above, so skip it if you have what you came for. It is the measurement record: which variant does what, why the same sentence comes out differently every run, and how a full-file score lied to me by 4.6x.
### Three variants, three different jobs, three different calls
I found the split between variants documented inconsistently, and what I measured differs from what several web sources claimed. Here is what the three actually do:
| Variant | What it does | Call |
|---|---|---|
| `Base` | Cloning only. No preset voices. | `model.generate(text=, ref_audio=, ref_text=)` |
| `CustomVoice` | 9 preset voices, plus an `instruct` emotion parameter | `model.generate_custom_voice(text=, speaker=, language=, instruct=)` |
| `VoiceDesign` | Describe a voice in words, get that voice | `model.generate_voice_design(text=, language=, instruct=)` |
The nine presets in `CustomVoice`:
```
serena / vivian / uncle_fu / ryan / aiden / ono_anna / sohee / eric / dylan
```
The eleven languages:
```
auto / chinese / english / german / italian / portuguese / spanish / japanese / korean / french / russian
```
`Base` takes no `instruct` parameter because its delivery comes from your recording. Telling it to sound cheerful would be a second, competing source of prosody. If you want to direct the emotion, `CustomVoice` is the variant that accepts direction.
### There is no seed, so the same sentence comes out different every run
**What I saw.** I regenerated a line I had already generated, expecting a byte-identical file, and got a different reading. The characters were right both times. The intonation drifted, and individual English letters came out differently from run to run.
**What I assumed going in.** That there was a seed parameter somewhere and I had not found it yet, since a seed is table stakes for a sampling-based generative model.
**What I did.** Went looking for one in the generate signature and the model config.
**What happened.** There is no seed exposed. Sampling is stochastic and this model exposes no seed to pin it down.
**What the assumption missed.** I had been treating run-to-run variation as a defect to eliminate. It is a property of the interface. Once that is settled, the question stops being "how do I make this deterministic" and becomes "how do I make re-rolling cheap", which has a much better answer.
### A pronunciation dictionary would not have fixed anything
**What I saw.** Certain words came out mispronounced. Not every run, which I noted at the time and did not think hard enough about.
**What I assumed going in.** That the fix was a pronunciation dictionary: collect the words that came out wrong, pin each to the reading I wanted, apply it as a preprocessing pass.
**What I did.** Started sketching the dictionary, then went back to check how consistently each word failed, because a dictionary entry needs a stable wrong answer to correct.
**What happened.** The words did not fail consistently. The same word came out one way on one run and another way on the next.
**What the assumption missed.** A lookup table maps one input to one output. It has nothing to say about variance, and building it would have produced a component that could not do the job I built it for.
### Re-rolling per sentence is what actually works
Split the narration into sentences and generate one file per sentence. When a sentence sounds wrong, re-run only that sentence.
This is only practical because generation runs faster than realtime. A single sentence takes a second or two, so re-rolling is effectively free, and you can keep pulling until a line lands right. It also decouples editing from synthesis: changing one line in the script means regenerating one file, not the whole take. On an 83-second narration that is the difference between a 51-second wait and a two-second one every time you change a word.
### CER 0.35 on the whole file, 0.076 per segment
**What I saw.** My first character error rate reading on the 83-second concatenated file was 0.35. A third of the characters wrong is not a tuning problem.
**What I assumed going in.** That the approach was finished. I was ready to write off voice cloning as not accurate enough for narration and go back to presets.
**What I did.** Before dropping it, I looked at where in the transcript the errors were rather than how many there were.
**What happened.** They were all bunched at the end of the file. Whisper hallucinates at the tail of long audio, which is known behaviour. Transcribing per segment gave 0.076. A 4.6x difference, and it made usable audio look broken.
**What the assumption missed.** I had treated a bad number as a fact about the thing being measured. The broken component was the measurement procedure, and in the number those two are indistinguishable. That is the part worth carrying to the next measurement: an aggregate over a long file can hide a defect that lives in one region of it, and the aggregate is the form you are most likely to act on.
### BreezyVoice looked like a shortcut and runs 24x slower than realtime here
[BreezyVoice](https://github.com/mtkresearch/BreezyVoice), from MediaTek, is a Chinese TTS model that also handles Chinese-English code switching. On paper it looked like a shortcut past the whole cloning step, so I tried it first.
On the MacBook it runs 24x slower than realtime. A minute of narration takes 24 minutes, which rules it out for a workflow where I regenerate individual lines while writing.
That is not a verdict on the model. It needs a GPU, and the premise of this pipeline is that it runs on the laptop I am already writing on. If you have a GPU box, measure it yourself rather than taking my number.
## Wrapping up
A 24-second recording, two packages, ten lines of Python, and the narration comes out in your own voice, on your own laptop, under a licence that lets you sell what you make with it.
Three things not to skip: match the transcript to the recording word for word, keep `12Hz` in the model name, and score per segment rather than per file.
What I am actually building with the narration is the next article.
---
**Also in this series**: [The check in the skill was written correctly and never ran once](/en/blog/ai-tic-check-that-never-ran) · [AI slop isn't the em dash, it's the structure](/en/blog/ai-slop-is-structural)
---
# MiniMax-H3 Ref2VA: Two Characters From Two Reference Images, 437 s on a 5090
URL: https://ai-muninn.com/en/blog/minimax-h3-ref2va-two-characters
Date: 2026-09-06
Series: MiniMax-H3 on RTX 5090 (Part 6)
Ref2VA is the only MiniMax-H3 mode that takes more than one reference image; the other four take a first frame, a last frame, or both. Two character sheets, one six-section prompt, 243 frames at 1344x768: **437 s** on one RTX 5090, two distinct voices, no bleed between the two faces (n=1, and I made the designs as different as I could). ASR on the dialogue came back at **CER 6.8%**, and all three errors were homophones. The trap: a `` label carries no identity, so restate the full appearance in every shot or the model invents a person.
## Hand a costume department two photos and the first question back is which robe goes on which person
That question is the entire problem with putting two characters in one AI-generated shot. One reference image is unambiguous: there is one face, and it belongs to the only person on screen. Two reference images need a binding, and nothing about "here are two pictures" tells the model which is which.
[Part 3](/en/blog/minimax-h3-rtx5090-character-lock) of this series locked one character's face with reference portraits. This part does two people in one frame, talking to each other. The scene is the Chinese idiom 自相矛盾 (*zì xiāng máo dùn*, "self-contradiction" — literally, his own spear against his own shield): a market vendor claims his shield stops everything and his spear pierces everything, a young scholar asks what happens when the one meets the other, and the vendor has no answer.
What comes out the other end is a 10.125-second clip with three spoken lines, two distinct voices, and two characters who stay themselves, in 437 seconds on a single RTX 5090. Here is the order to do it in, and the four things that will stop you.
## Ref2VA is the only H3 mode where images mean "this is who", not "this is when"
H3 has five generation modes. Four of them take images, and the difference that matters is not how many but what the images are *for* — read the right-hand column.
| Mode | What the images mean |
|---|---|
| T2VA | none — text only |
| I2VA | one image = the **first frame** |
| FL2VA | two images = first frame + last frame |
| L2VA | one image = the **last frame**, model infers the opening |
| Ref2VA | N images = **`` is an identity, `` is still a frame** |
FL2VA also takes two images, which makes it look like a candidate until you notice that its two slots are already spoken for by time. Ref2VA is the only mode whose image list is open-ended. It also splits the job: an image tagged `` says *this is who* and the model picks the frames, while one tagged `` still works as a concrete target frame or shot-planning anchor. This run used `` only.
## The references are stills, not frames — two character sheets at 45 s each
I generated both character sheets with z-image, a still-image model, taking about 45 seconds each. Full-body, neutral pose, plain background. They are never shown in the video; they exist only to be pointed at.

The distance between those two designs is deliberate and I come back to it in the deep dive. If you are doing this for the first time, make your two characters as unlike each other as the scene allows. It costs nothing and it turns "did the identities hold?" from a judgement call into something you can see at a glance.
## The node is MiniMaxH3ReferenceToVideo, and it wants an audio_vae your ImageToVideo graph does not have
If you already have an H3 graph running, it is almost certainly built on `MiniMaxH3ImageToVideo`. Ref2VA is a different node:
```
MiniMaxH3ReferenceToVideo
required: clip · vae · audio_vae · prompt · width · height · length · ref_image_size
optional: ref_images · ref_videos · ref_video_audios · ref_audios
output: ['CONDITIONING', 'LATENT']
```
Two required inputs are new compared to `ImageToVideo`: `audio_vae` (`minimax_h3_audio_vae_fp32.safetensors`) and `ref_image_size`. The outputs are identical — `CONDITIONING` and `LATENT` — so everything downstream of the node, the whole sampler chain, transfers unchanged. Converting an existing graph is a node swap plus two wires, and forgetting `audio_vae` is the single most likely reason your converted graph will not run.
`ref_images` has type `COMFY_AUTOGROW_V3`, which sounds exotic and is not. In API-format JSON it is a plain array of links:
```json
"ref_images": [["20", 0], ["21", 0]]
```
Nodes 20 and 21 are `LoadImage` nodes. The images themselves have to be `POST /upload/image`'d to ComfyUI first, then loaded — you cannot inline them into the prompt payload.
## length has step 17: 243 frames is 10.125 s and 362 frames is the ceiling
The node schema declares `length` with `step: 17` and `min: 5`. So legal frame counts are 17k+5 — 5, 22, 39, ... 243, ... 362. That grid is enforced by the node, not by a convention downstream of it, which means a round number like 240 fails at the node rather than producing something slightly off.
The two values worth memorising: **243 frames = 10.125 s** and **362 frames = 15.08 s**, the latter being the ceiling for a single generation. Anything longer is a stitching problem, not a parameter.
## ref_image_size=match scales references to the render; max makes you pay on every step
The other new required input has two settings. `match` scales the reference images down to the pixel area of the generation. `max` uses a 2048 px short edge. The node's own tooltip explains the cost:
> Reference tokens ride through every sampling step, so 'max' can be several times slower.
That is the mechanism in one sentence: reference images are not read once at the start; they are conditioning that participates in every denoising step, so their token count multiplies by your step count. I ran `match`. There is a wrinkle in that "several times slower" claim which I get to in the untested list at the end.
## The prompt is six sections, and a label is defined exactly once
This is where Ref2VA diverges most from the three-part prompts you may be used to. The format has six named sections, in order: `subject_definitions` → `summary` → `retention_analysis` → `detailed_description` → `overall_soundscape` → `non_diegetic_music`.

The design point is the arrow on the right of that diagram. A character label is **defined once** in `subject_definitions` and **reused** across the other five sections. Change what a character looks like and you edit section one; every downstream reference follows. That is the payoff for a format that otherwise looks like bureaucracy.
`retention_analysis` is the section people skip and should not. It does not take free text. Visible references (``, ``, ``) take one of four fixed markers: `fully_preserved`, `partially_preserved`, `attribute_transfer`, `weak_reference`. Audio references use a different set — `fully_copy`, `partially_copy`, `reference`, `weak_reference` — which I did not need here. Both characters in my run were tagged `fully_preserved`. The full spec lives in the official repo at [MiniMax-AI/MiniMax-H3](https://github.com/MiniMax-AI/MiniMax-H3), under `skills/h3-prompt-writing/references/ref-en.txt`.
Here is the skeleton, with the parts I am not quoting marked as placeholders:
```
subject_definitions:
— a stout middle-aged man with a round fleshy face, a thick
drooping moustache, an ochre-yellow robe with a dark-brown
collar band
— a slim young scholar, pale blue-grey robe, dark sash
summary:
[reference generation] the plot in one paragraph
retention_analysis:
: fully_preserved
: fully_preserved
detailed_description:
[Shot 1] 0-3s (S1), , stands behind
the stall and lifts the shield, voice loud and boastful:
[Chinese] 原文
[Shot 2] 3-6s ...
[Shot 3] 6-8s ...
overall_soundscape:
sounds made by things on screen — no score here
non_diegetic_music:
N/A
```
## A `` label is a pointer, and every shot has to resolve it
Writing ` stands behind the stall and lifts the shield` is not enough. The model invents a person. The label is a pointer that gets resolved from the text around it, and if the text around it says nothing about a face, there is nothing to resolve.

What do the official examples do? Shot 1 describes each subject head to toe. Later shots shorten it, but the short version still carries something you could pick the person out by:
```
[Shot 2] … (S2), the young man in the dark-grey hoodie from Shot 1, …
[Shot 3] … (S1), the blonde woman in the light-pink shirt from Shot 1.
```
Not a full restatement, and not a bare label either. The spec asks each shot to establish the current appearance; it never says how many times you have to spell it out.
I ran into the same problem later that day while generating stills. I used `local-image`'s `--reference` flag with a proper reference image, but the prompt only said "the same man" plus the scene. Output number two was a Western man in a navy shirt and trousers wearing a **wristwatch** — wrong person, wrong century, wrong continent. Restating the look item by item (head-wrap, coarse brown hemp tunic, indigo sash) locked it on the first try. A reference image gives the model something to draw *from*; it does not tell the model that this is the thing to draw.
## Dialogue goes inside the tag, everything about the speaker goes outside
Spoken lines use a tag: `[Chinese] 原文 `. Inside the tag there are exactly two things — the language marker and the verbatim line. Nothing else. Who is speaking, what their tone is, what their voice sounds like: all of that goes in the prose **outside** the tag. Speaker IDs `(S1)` and `(S2)` stay stable for the whole clip — assigned once, reused at every line. The official example introduces `(S2)` in the shot where he first speaks rather than up front.
And one hard requirement: **Chinese dialogue must be in simplified characters.** Traditional characters break sentences part-way through. This is measured, not folklore — a prior test on the same scene with the same seed scored word-for-word ASR accuracy at **0.667 with traditional characters against 1.000 with simplified**. If your script lives in traditional Chinese, convert it before it goes into the prompt.
## 243 frames with two references: 437 s on one RTX 5090
Look at the two rows as separate data points rather than a delta — two things changed between them.
| Run | Frames | Reference images | `ref_image_size` | Time |
|---|---|---|---|---|
| This article | 243 (10.125 s) | 2 | `match` | **437 s** |
| Earlier, same machine | 124 (5.17 s) | 1 | — | 136 s |
Frame count and reference count both moved, so I cannot tell you what the second reference image cost. What the table does give you is a planning number: about seven and a half minutes for ten seconds of two-character dialogue at 1344x768 on one 5090, with the config in the deep dive below.
## Four common pitfalls before your first render
1. **A frame count off the 17k+5 grid.** The node rejects it. 243 and 362 are the two you want.
2. **A missing `audio_vae`** after converting a graph from `MiniMaxH3ImageToVideo`. It is a new required input and the old graph has no wire for it.
3. **Reference images that carry no appearance in the text.** The image alone is not a binding — restate the look in every shot.
4. **Traditional-character dialogue.** It degrades mid-sentence and the failure is not obvious until you listen.
## Deep dive: four unknowns on a machine that had never run this node
You can skip this section and still run Ref2VA; everything required is covered above. What follows is why I treated four specific things as unknown, what I expected each time, and where my expectations were wrong.
The reason these were unknowns at all: this machine had **zero prior `MiniMaxH3ReferenceToVideo` jobs** in its ComfyUI history. Nothing to copy, no known-good graph, no previous run to diff against. I read the node's wiring live from `/object_info` and worked out from the schema what each input wanted. Four things I could not settle from the schema, so I designed the shot to answer them.
### Unknown 1: do two reference images contaminate each other?
**The problem.** Two images go into one `ref_images` list. There is no per-image slot in the schema saying "this face belongs to subject 1" — the binding has to come from the text.
**What I expected.** Contamination. My mental model was that both images land in one shared conditioning budget and get averaged into some composite person, most likely showing up as the wrong robe colour on the wrong body, or one character borrowing the other's face shape.
**What I did.** Rather than test it gently, I made the two designs maximally different so that any bleed would be unmissable: stout, middle-aged, ochre-yellow robe, drooping moustache versus slim, young, pale blue-grey robe, clean-shaven. Two axes of separation — build and colour — plus age.
**Result.** It did not happen. Both characters came out as themselves and stayed that way across all three shots.
**Reflecting on the expectation.** My model of a shared averaged budget was wrong, or at least it is not what dominates at n=2 references. But I should be precise about what I actually tested: this was **one run, with two characters whose appearances were deliberately very different**. I built the experiment to make failure visible, which is also what makes it the easy case. Two characters who look alike — same age bracket, same robe colour, same build — is untested and is exactly where an averaging failure would hide.
### Unknown 2: does the speaker ID actually route the voice?
**The problem.** `(S1)` and `(S2)` are just parenthesised text in a prompt. Nothing in the node schema says they mean anything to the audio path.
**What I expected.** Honestly, no strong prior. The plausible failure was one voice reading all three lines, or the voices swapping between shots.
**What I did.** Wrote the scene so `(S1)` speaks twice and `(S2)` speaks once, with the second `(S1)` line arriving after `(S2)` has spoken. If the routing were positional rather than by ID, the third line would come out in the scholar's voice.
**Result.** Two distinct voices, each matching its character, including on the return to `(S1)`.
**Reflecting on the expectation.** The speaker IDs are doing real work, not decorating the prompt. The specific thing this rules out is positional assignment — voice follows the ID, not the order of appearance. Still one run with two speakers; I have not tested three.
### Unknown 3: can I control *when* a character walks in?
**The problem.** The scholar has to enter partway through. For the first six seconds he must not be in the frame at all.
**What I expected.** This was the one I expected to fail, and it is the reason I picked this scene. Every per-second directive I had tested before was of the form "someone already on screen does an action". Presence felt like a different category — the model decides who is in the shot, and the timeline block only choreographs them once they are there. My expectation was that both characters would be standing there from frame one and the scholar would just start talking at the six-second mark.
**What I did.** Wrote the entrance as a `6-8s` directive in `detailed_description`, then extracted frames from the output at 1.5 s, 4.5 s, 7.0 s and 9.5 s and looked at them.
**Result.** Absent at 1.5 s. Absent at 4.5 s. Present at 7.0 s.

**Reflecting on the expectation.** My model was wrong at the category level, not in the details. I had assumed the timeline directives were an *animation* layer sitting on top of a fixed cast, when they are closer to a *staging* layer that also decides occupancy. The reason I believed the narrower version is that my prior tests only ever contained already-present characters — I had never given the directives a chance to control presence, so of course I had no evidence they could.
### Unknown 4: does the Chinese dialogue survive?
**The problem.** Three spoken lines, and no way to judge them by ear reliably — I know what the lines are supposed to be, which makes me a terrible listener.
**What I expected.** Some degradation. Prior H3 work in this series has a standing audio gate precisely because dialogue is the fragile part.
**What I did.** Ran the output audio through `mlx-community/whisper-large-v3-turbo`, normalised traditional to simplified with `opencc` so the comparison is not measuring script conversion, and scored character error rate with `jiwer`.
**Result.** **CER 6.8%**, with the ASR returning 44 characters against 44 expected. Three substitutions:
| Expected | ASR heard | Pinyin |
|---|---|---|
| 支 | 只 | zhī / zhī |
| 矛 | 毛 | máo / máo |
| 矛 | 毛 | máo / máo |
All three are homophones. The character count was exact and the sentence structure held, with no garbling and no repetition.
**Reflecting on the expectation.** I expected degradation and I got a number that is not zero, so the naive reading is "mild degradation, as predicted". That reading is wrong, and the correction is the useful part of this whole section.
### Why 6.8% is not the same kind of 6.8% the gate usually sees
The audio gate's own history is what nearly tripped me up here. Every clip it has logged with CER above zero was also flagged as having an audio problem, which makes non-zero CER look like a reliable failure signal. But those clips fail in different *shapes*:
- one single-character mispronunciation
- one robotic-audio case that turned 探討 into 湯頭
- one at 75%, where a repeated phrase was literally transcribed twice
A homophone substitution and a mispronunciation produce identical CER and completely different pinyin. 探討 (*tàn tǎo*) → 湯頭 (*tāng tóu*) is a different sound coming out of the model's mouth. 矛 → 毛 is the same sound, and the transcriber picking the wrong character for it. **CER cannot tell those apart; pinyin can.** If I had only looked at the number I would have called this a failed clip, and if I had only looked at the number and it had been 0%, I might have called a genuinely broken clip clean.
### Whisper's segment boundaries say the timing directives are a target, not a contract
One more thing came out of the ASR pass for free, because Whisper reports segment boundaries:
| Written directive | Whisper segment |
|---|---|
| 0-3s | 0.0–3.0 s |
| 3-6s | 3.0–6.3 s |
| 6-8s | 6.3–10.1 s |
The first two land essentially on the mark. The third runs about two seconds long. Combined with Unknown 3 — where the entrance did land inside the written window — the picture is that the directives control *ordering and presence* tightly and *duration* loosely. Budget for the last shot overrunning if you are cutting to music.
### Full environment
Every number above comes from this configuration:
```
RTX 5090 · ComfyUI 0.34.0 · torch 2.11.0+cu128
1344x768 · 243 frames · 14 steps
sampler res_multistep + simple · shift 12/3 · Spectrum ON
MiniMaxLowVRAMAttention head_chunks=16
MiniMaxChunkFeedForward chunks=8
node MiniMaxH3ReferenceToVideo · ref_image_size=match · 2 ref images
audio VAE minimax_h3_audio_vae_fp32.safetensors
character sheets: z-image, ~45 s each
```
The chunk settings come from [Part 5](/en/blog/minimax-h3-rtx5090-config-stack), which measured them on the same machine. Note the torch line: this run is on **cu128**, and Part 5 measured torch 2.13.0+cu130 as worth 1.48x on the NVFP4 config. I have not re-measured the Ref2VA path on cu130, and I do not know whether these weights take the same kernel path, so treat 437 s as the number this configuration produced rather than the floor for this machine.
### Untested
- **`ref_image_size=max` with two or more reference images.** I only ran `max` on a single-reference generation elsewhere: same seed, 22% slower, no visible identity gain. That is worth flagging because 22% is nothing like the tooltip's "several times slower" — but a single reference at `max` is also the cheapest possible version of that setting, so the tooltip may well be right at higher reference counts. Unresolved.
- **`ref_videos`, `ref_video_audios` and `ref_audios`.** I have not touched either of these. The official spec allows an `` reference for voice timbre, which is the obvious next thing to try for a recurring character.
- **Two similar-looking characters.** Everything in Unknown 1 was measured on a deliberately extreme appearance gap.
- **Three or more speakers.** Speaker ID routing is verified at two.
Back to the costume department: the two photographs turned out to be enough, but only because the prompt kept saying out loud which robe went on which person. Ref2VA gives you the slots for a cast; the text is still what does the casting. [Part 3](/en/blog/minimax-h3-rtx5090-character-lock) is where the single-character version of this problem got solved, and [Part 5](/en/blog/minimax-h3-rtx5090-config-stack) is where every performance setting in the environment block above came from.
---
# [Benchmark] Qwen3.8-Flash-Next NVFP4 on a DGX Spark: 41.7 tok/s, RAM for Traffic, Disk for the Dictionary
URL: https://ai-muninn.com/en/blog/qwen38-flash-next-nvfp4-dgx-spark-vllm-recipe
Date: 2026-09-06
Series: DGX Spark (Part 45)
NVIDIA ships its own NVFP4 checkpoint of Qwen3.8-Flash-Next. Run as-is on a DGX Spark, without MTP, it decodes at about 17 tok/s. tonyd2wild's recipe gets more out of it without rebuilding vLLM: a stock nightly image with nine Python files bind-mounted over the container's own copies, MTP on, the PLE table left on NVMe, FP8 KV cache. On my GX10 it measures 41.7 tok/s median across 40 prompts, 27.4 on prose, 42–45 on code, and 47.2 aggregate across four concurrent streams; vision and tool calls work. The llama.cpp seat on the same box — "seat" is this series' word for the one inference server that holds port 8000 — probes at 23.38, so this is 78% faster. Cold start is 12m54s and wants 25 GiB of free memory.
A bolt-on modification is one you install in a driveway. Nine parts clip onto what is already there, and when you take them off the car is stock again: nothing cut, nothing welded, the factory never involved. The recipe in this article has that shape. It runs the stock `vllm/vllm-openai:nightly` image and bind-mounts nine Python files read-only over the container's own copies with `-v host:container:ro`. Unmount them, restart, and you are back on an unmodified nightly.
This is Part 45 of the DGX Spark series. [Part 43](/en/blog/qwen4exp-dgx-spark-262k-no-tradeoff) put the same model on this box under llama.cpp with the UD-Q4_K_XL quant: 20.51 tok/s on prose, and the full 262,144-token context inside the 121 GB pool. This part swaps the runtime underneath it. The recipe is tonyd2wild's, published at [Qwen3.8-Flash-Next-NVFP4-DGX-Spark](https://github.com/tonyd2wild/Qwen3.8-Flash-Next-NVFP4-DGX-Spark); I reproduced it on my own Spark at commit `d83f10c` (2026-09-05), matched the numbers, and wrote down what it costs to get there.
## What you get: 41.7 tok/s median, 27.4 on prose, 47.2 aggregate at four streams
Look at the harness-median row first. That number decides whether 155 GB of disk and a 13-minute load are worth it. The rest of the table explains where it comes from.
| measurement | my GX10 | author's Spark | same-box llama.cpp seat |
|---|---|---|---|
| 40-prompt harness median | **41.7** | 43.9 | 23.38 (fleet probe) |
| prose | 27.4 | 29.0 | 20.51 (Part 43) |
| coding | 42.0–45.0 | 44.3 | — |
| 4 streams (per stream / aggregate) | 26.1 / **47.2** | 26.4 / 47.1 | — |
| 32K prefill | 1,666 tok/s, TTFT 17.3 s | — | — |
MTP is multi-token prediction. A small draft head bolted onto the model guesses the next few tokens, and the main model verifies all of them in a single forward pass rather than one pass per token; when the guesses land, the box emits three tokens for roughly the memory traffic of one. That mechanism is why the same checkpoint moves from 17 tok/s to over 40 without a single weight changing. It is also why prose is the slowest row: a draft head has its lowest acceptance rate on free text, and [Part 5](/en/blog/dgx-spark-deepseek-v4-flash-mtp-workload-asymmetry) measured the same pattern on V4-Flash.
The 23.38 in the right-hand column deserves a caveat. It is a fleet probe: one generic prompt my monitoring sends to whatever answers on port 8000, not the 40-prompt harness, so treat it as an order-of-magnitude reference rather than a paired result. The paired number is prose, 27.4 here against 20.51 in Part 43, same box and same model. And llama.cpp still wins one workload outright: with n-gram speculation on a repetitive file edit it reached 76.65 tok/s, because a draft source that copies straight out of the prompt beats a learned draft head whenever the answer is mostly already on screen.
## What you need: 155 GB of disk, 25 GiB of free memory, 13 minutes of patience
- One DGX Spark (GB10, 128 GB unified memory), tensor-parallel 1. The author's machine is the same class.
- About 155 GB of free disk: 124 GiB (133 GB) for the checkpoint plus the 22.2 GB container image.
- Docker with the NVIDIA container toolkit. No CUDA toolkit on the host, no compiler, no vLLM build.
- At least 25 GiB of `MemAvailable` before launch, and a `drop_caches` immediately before it. The load bottoms out at 25.6 GiB.
- 12 minutes 54 seconds of cold start: 585.81 s for the weights, another 69.16 s for the MTP draft head.
One property of the model explains those memory numbers. Of its roughly 180B parameters (125B main model, 51B PLE, 4B MTP head), 51B are a PLE, a per-layer embedding table that each token reads a few rows out of, closer to a dictionary lookup than to a matrix multiply. The launcher's default `staged` mode leaves that table on NVMe and gathers only the rows each forward pass needs, so the resident weights come to 76.48 GiB instead of the full 124 GiB on disk.
## Do it in this order: clone, download, pull, copy, launch
```bash
git clone https://github.com/tonyd2wild/Qwen3.8-Flash-Next-NVFP4-DGX-Spark ~/src/tonyd2wild-nvfp4
cd ~/src/tonyd2wild-nvfp4 && git log -1 --format='%h %ad' --date=short # d83f10c 2026-09-05
hf download nvidia/Qwen3.8-Flash-Next-NVFP4 --local-dir /home//models/qwen38-fn-nvfp4-nvidia
docker pull vllm/vllm-openai:nightly-8a728663c1c3eeace834a95f5654fa653cc1998c
mkdir -p ~/patches && cp -r single-spark-vllm-tp1/patch ~/patches/qwen4exp-ple-mmap # the launcher's default PATCH_DIR
cp single-spark-vllm-tp1/launch/qwen38fn-nvidia-tp1.sh ~/patches/
PORT=8000 NAME=qwen38fn bash ~/patches/qwen38fn-nvidia-tp1.sh
docker logs -f qwen38fn 2>&1 | grep -m1 'Application startup complete' # ~13 min
```
The launcher needs no environment variables for the fast path, because its defaults are the author's 2026-09-05 single-node best. `PLE_MODE=staged` keeps the 51B table on NVMe. `GRAPHS=nocompile` captures CUDA graphs for decode at batch sizes 4 through 24 and skips `torch.compile` entirely. `MTP=3` drafts three speculative tokens per step, and in practice around three or more get accepted. `DRAFT_VOCAB=65536` restricts the draft head to the lowest 65,536 token ids, using BPE merge order as a stand-in for frequency. It is an FR-Spec idea, and the author credits MiaAI-Lab with demonstrating it on this model. The remainder are ordinary serving knobs: `--max-num-seqs 6`, `--max-num-batched-tokens 4096`, `--kv-cache-dtype fp8_e4m3`, `--gpu-memory-utilization 0.80`, `--max-model-len 262144`. Prefix caching is off and stays off. The author cites vLLM issue #54173, a GDN-layer crash with prefix caching enabled, marks it as unverified, and I did not verify it either. Every number in this article was taken without prefix cache.
The nine overlays split three ways. Four are the author's own PLE and MTP implementation: `ple_layer.py`, `ple_mmap.py`, `model_state.py`, and `mtp_draft_vocab.py`, which lands on the container's `mtp.py`. Four are unmodified upstream PR code — `ops_ple.py` from PR #55375 by peakcrosser7, merged 2026-09-05, which fixes a fused-PLE conv state-index stride for MTP and for concurrent prefills; plus `ops_qsa.py`, `qsa.py`, and `platforms_interface.py` from PR #54846 by andreasgru, still open, which puts fp8_e4m3 and NVFP4 KV cache on the QSA path. The ninth is `modelopt.py`, an upstream file carrying two fixes of the author's own: draft-local MTP index candidates, so that vLLM's `mtp.layers.48` finds ModelOpt's `mtp.layers.0` quant entry, and a route from `FP8_BLOCK_SCALES` routed experts to `Fp8MoEMethod` with its 128×128 block scales. The author notes that sfxnz (MIT) and MiaAI-Lab (AGPL) closed the same two gaps independently on the same day, with no shared code.
Once `Application startup complete` appears, the smoke test is one request. Send `stream_options` even if you do not think you need it; the first pitfall below is what happens when you leave it out.
```bash
curl -s http://:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"qwen38-flash-next",
"messages":[{"role":"user","content":"Say hello in one sentence."}],
"temperature":0, "max_tokens":200,
"stream":true, "stream_options":{"include_usage":true}}'
```
## Four pitfalls, one of which had been hiding for two months
**vLLM streams without usage counts unless you ask for them.** A streaming response carries no token accounting unless the request includes `stream_options: {"include_usage": true}`. llama-server attaches usage on its own, so any tok/s script ported over from llama-server divides by nothing on its first run and reports nothing at all.
**vLLM validates the `model` field; llama-server answers to any name.** The night I switched, the container log filled with 404s from two scripts on my laptop that were still sending an old model id. They had been broken for two months and nobody noticed, because llama-server replies to whatever string you hand it. Audit every client's model name before you switch runtimes, not after.
**`--network host` takes port 8000 outright.** The container binds the port directly, so the existing seat has to be stopped before the new one starts. The production seat was down for 33 minutes, and that figure includes the 13-minute load plus every acceptance test.
**Prefix caching is off by design.** The launcher disables it because of the crash described above, so a repeated system prompt is re-evaluated every request. If your workload leans on long shared prefixes, budget prefill accordingly.
## Deep dive: how the model is built, and why one Spark reaches 41 tok/s
Skip this section if you only want the recipe; everything needed to run it is above. This section covers three things: how the model is built, why leaving a 47.68 GiB lookup table on disk is the right allocation rather than a compromise, and where the 2.5× between 17 and 41.7 comes from. Every one of my numbers in the six figures was measured on this GX10; the author's are labeled as his.
### One token's path
Qwen3.8-Flash-Next is about 180B parameters in three blocks: a 125B main body, a 51.2B n-gram table, and a 4B MTP draft head. The GGUF header describes the following structure:
- **A 48-layer trunk in groups of four**: three Gated DeltaNet linear-attention layers, then one full-attention layer. The linear-attention layers keep no KV cache; each holds a fixed-size state. Only the full-attention layers store KV, and they carry a DeepSeek-style sparse indexer so each query attends to its top-k 2,048 positions. Twelve of 48 layers store KV, which is the first reason a 262,144-token context fits in 17 GiB.
- **One MoE per layer**: 512 experts, each only 640 wide; the router picks 10 per token plus one shared expert. Expert parameters total 121B; the 10 routed experts a token touches add up to 2.36B, 2.60B with the shared expert.
- **The n-gram table (PLE, per-layer embedding)**: It hangs off a single early layer of the trunk (`ple_layer_ids=[2]` in the HF config, `ple.layers=[1]` in the GGUF header), and a token consults it once. The last two tokens and the last three tokens of the context are each hashed eight ways, giving eight bigram tables and eight trigram tables of about 20 million rows each. One 160-dim row is fetched from each table, and the 16 rows are concatenated into that layer. Sixteen rows of 160 bytes: 2,560 bytes per token. These 51.2B parameters never enter a matrix multiply.
- **The MTP draft head**: about 4B parameters, proposing three tokens at a time, and choosing only among 65,536 frequent token ids (the FR-Spec approach; the author credits MiaAI-Lab for demonstrating a 65,536-token draft vocabulary on this model).
### RAM for traffic, disk for the dictionary
MemTotal on this box is 121.6 GiB, shared between CPU and GPU. Once loaded, the weights are resident at 76.48 GiB (NVFP4 main body plus the MTP head); the FP8 n-gram table is 47.68 GiB. Together that is 124.16 GiB, over the limit before counting KV cache or the operating system. The table has to live on disk simply because it will not fit.
The allocation makes sense on its own terms too. Look at per-token traffic: the 76.48 GiB main body is read for every token at every layer, so its demand on memory is GB-scale; the n-gram table is read 16 rows per token, 2,560 bytes. With the table out of the way, every byte left in memory is high-traffic: weights and KV cache. At `--gpu-memory-utilization 0.80`, vLLM's KV cache budget comes to 17.04 GiB, which in FP8 holds 1,069,759 tokens, enough for 4.08 concurrent requests at the full 262,144-token context. Force the table in and that budget is gone.
How the table is read from disk determines whether it slows anything down. The recipe defaults to `PLE_MODE=staged`: before each forward pass, a preadv thread pool gathers the rows that step needs into a fixed GPU buffer. The author measures 131K rows/s that way (plain mmap manages only 10–20K rows/s because of `mmap_lock`). A decode step needs 16 rows, so the gather is on the order of 0.1 ms against a step of tens of milliseconds, and because the buffer's address is fixed, the decode path can run as a CUDA graph.
Prefill is a different matter. A 32K prompt gathers 524,288 rows, and each 160-byte row touches a full 4 KiB page: 25.6× read amplification. On my box, 32K prefill measures 1,666 tok/s and short-prompt TTFT sits between 0.21 and 0.28 s; the author's table reads 1,269 tok/s at 7K, 1,757 at 28K and 1,760 at 113K with a 0.30 s TTFT, so throughput does not fall off with length. I could not measure how much faster prefill would be with the table resident, because the table does not fit on this box. Unsloth's GGUF build keeps an IQ4_NL version of the same table, 26.85 GiB, fully resident, so its prefill numbers are not directly comparable.
### 17 to 41.7: more tokens per forward pass
NVIDIA's checkpoint without MTP decodes at 16.6–17.0 tok/s, prose and code alike. Without MTP, single-stream decode is limited by how much memory each token has to move: the main body reads an effective 9.27 GiB per token, which at the measured speed works out to 154–158 GiB/s, about 60% of the 273 GB/s spec. A smaller quantization would not move that number; [post 32](/blog/dgx-spark-nvfp4-compression-not-compute) measured that NVFP4 is fast because of compression, not because of the FP4 arithmetic unit.
MTP changes "one trip through the weights buys one token" into "one trip buys several". The draft head proposes three, the main body verifies all three in one forward pass, keeps however many it accepts, and adds one token of its own. Summed over the whole harness, a step yields 2.93 tokens on average. The rest of the gap comes from three things: decode runs as a CUDA graph rather than through torch.compile, the draft head computes logits over 65,536 ids instead of the full vocabulary, and FP8 KV lets the same memory hold twice the tokens.
Prose 27.4, code 42–45: that gap does not exist without MTP. The next token of code is easy to guess (indentation, brackets, keywords), and the draft head's acceptance at the three positions is 93% / 78% / 67%; on prose it is 65% / 39% / 22%. The 27B in [post 42](/blog/dgx-spark-bandwidth-ceiling-85-percent) going from 12.3 to 65 was the same effect, with code at 65 against long-form prose at 28 on that box.
### Nine overlay files, no vLLM rebuild
The recipe does not rebuild vLLM. It pins a nightly image by hash and, at startup, bind-mounts nine Python files with `-v` over their counterparts inside the container. Four are the author's own PLE staged loader and MTP implementation; four are files from upstream PRs not yet in the nightly (#55375 fixes the PLE conv stride, #54846 gives the QSA path FP8 KV); the last is `modelopt.py`, the upstream file plus two fixes.
With MTP enabled, the two bugs surface as this load-time error:
```
AttributeError: Layer mtp.layers.48.mlp.experts has no parameter 'w2_weight_scale_inv'
for checkpoint weight 'mtp.layers.48.mlp.experts.0.down_proj.weight_scale_inv'
```
The checkpoint quantizes the MTP experts as `FP8_BLOCK_SCALES` (group 128) under the key `mtp.layers.0.mlp.experts`; vLLM numbers the MTP layer `mtp.layers.48`, and the draft config remaps `ignored_layers` and `exclude_modules` but not `quantized_layers`, so the quantization entry is never found. Even with the prefix right, the RoutedExperts branch in `modelopt.py` only recognizes FP8, NVFP4, W4A16_NVFP4 and MXFP8. The overlay patches exactly those two places.
### Each stream slows down; total throughput goes up
Decode is bound by memory bandwidth: one forward pass moves the weights once and serves every stream in the batch, so aggregate throughput rises while per-stream throughput falls. Four concurrent streams measure 26.1 each and 47.2 aggregate; the author's six streams measure 21.7 each and 68.8 aggregate. The author ran six streams and I ran four; 17.04 GiB of KV holds 4.08 streams at the full 262K context, more at shorter ones.
On the first pass every single-stream category came in under the author's: prose 27.4 against 29.0, JSON 44.3 against 49.3, summary 31.0 against 35.4, a 2–12% gap; the concurrent numbers matched almost exactly, 26.1 / 47.2 against 26.4 / 47.1. Because the concurrent results match, neither the GPU nor memory bandwidth is likely responsible. That leaves sample size: the harness has five prompts per category. To draw Figure 4 I reran each category until it had at least 15 ten-second metrics windows, 25–26 rounds for the short-answer categories, 9 for coding and 3–5 for the long ones, 500 prompts in all. That pass measures prose 29.3, code 44.6, reasoning 46.5, JSON 47.3, HTML 47.9, narrative 28.7, summary 35.8 and formatting 31.0, against the author's 29.0 / 44.3 / 45.6 / 49.3 / 47.6 / 28.5 / 35.4 / 32.4: all eight within ±4.4% with formatting the widest at −4.3%, and the overall median, weighted back to the original 40 prompts, is 43.6 against his 43.9. The title and the first section keep the first pass's 41.7; the 43.6 lives here.
### What my estimate missed
On the morning of September 6 I used "floor 17 × MTP +35% ≈ 23" to decide that patching vLLM was not worth it, and that afternoon I read the author's 43.9. What my estimate left out is everything in this section: the acceptance length is not +35% but 2.93 tokens per step, on top of CUDA graphs, FR-Spec's small draft vocabulary and FP8 KV. Nothing short of running it would have caught that.
## The full launch command: the exact flags behind every number
The launcher wraps this, but here is what it expands to, including the cache flush the author's README asks for on every start.
```bash
# Before every start (author's README):
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
docker run --gpus all -d --restart no --network host --ipc host \
--shm-size 32g --ulimit memlock=-1:-1 --name qwen38fn \
-e HF_HUB_OFFLINE=1 -e TRANSFORMERS_OFFLINE=1 \
-e VLLM_ENGINE_READY_TIMEOUT_S=3600 \
-e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
-e CUTE_DSL_ARCH=sm_121a -e TORCH_CUDA_ARCH_LIST=12.1a \
-e FLASHINFER_CUDA_ARCH_LIST=12.1a -e FLASHINFER_DISABLE_VERSION_CHECK=1 \
-e VLLM_USE_DEEP_GEMM=0 -e VLLM_USE_V2_MODEL_RUNNER=1 \
-e QWEN4EXP_PLE_MMAP=1 -e QWEN4EXP_PLE_STAGED=1 \
-e QWEN4EXP_PLE_MMAP_THREADS=64 -e QWEN4EXP_DRAFT_VOCAB=65536 \
-v /home//models/qwen38-fn-nvfp4-nvidia:/models/qwen38fn:ro \
-v /home//qwen38fn-vllm-cache:/root/.cache \
-v $P/ple_layer.py:$VP/models/qwen4_exp/nvidia/ple_layer.py:ro \
-v $P/ple_mmap.py:$VP/models/qwen4_exp/nvidia/ops/ple_mmap.py:ro \
-v $P/model_state.py:$VP/models/qwen4_exp/nvidia/model_state.py:ro \
-v $P/mtp_draft_vocab.py:$VP/models/qwen4_exp/nvidia/mtp.py:ro \
-v $P/upstream-overlays/ops_ple.py:$VP/models/qwen4_exp/nvidia/ops/ple.py:ro \
-v $P/upstream-overlays/ops_qsa.py:$VP/models/qwen4_exp/nvidia/ops/qsa.py:ro \
-v $P/upstream-overlays/qsa.py:$VP/models/qwen4_exp/nvidia/qsa.py:ro \
-v $P/upstream-overlays/platforms_interface.py:$VP/platforms/interface.py:ro \
-v $P/upstream-overlays/modelopt.py:$VP/model_executor/layers/quantization/modelopt.py:ro \
vllm/vllm-openai:nightly-8a728663c1c3eeace834a95f5654fa653cc1998c \
--model /models/qwen38fn \
--served-model-name qwen38-flash-next qwen3.8-flash-next \
--quantization modelopt --trust-remote-code \
--max-model-len 262144 --max-num-seqs 6 --max-num-batched-tokens 4096 \
--kv-cache-dtype fp8_e4m3 --gpu-memory-utilization 0.80 \
--no-enable-prefix-caching --no-enable-flashinfer-autotune \
--compilation-config '{"mode":0,"cudagraph_mode":"FULL_DECODE_ONLY","cudagraph_capture_sizes":[4,8,12,16,20,24]}' \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
--reasoning-parser qwen3 \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--default-chat-template-kwargs '{"enable_thinking": false}'
# $P = ~/patches/qwen4exp-ple-mmap (host: the nine overlay files)
# $VP = /usr/local/lib/python3.12/dist-packages/vllm (container: the vLLM package root)
```
Cold start ran 12 minutes 54 seconds end to end: 585.81 s for the weights and 69.16 s for the MTP draft head. The vLLM log reported `Model loading took 76.48 GiB`, and the KV cache allocated alongside it holds 1,130,661 tokens, which is 4.31× the 262,144-token context (the production seat's later restart logged 17.04 GiB, 1,069,759 tokens and 4.08×; the deep dive and Figure 1 use that set). `MemAvailable` bottomed at 25.6 GiB during the load, settled at 14.3-14.9 GB in steady state, and dipped to 12.9 GiB during the 32K prefill. About 4 GB of swap was in use throughout and earlyoom, configured at `-m 6`, never fired. Short-prompt TTFT sat between 0.21 and 0.28 s. The 32K prefill took 28,903 input tokens in 17.3 s, about 1,670 tok/s, and the needle I planted mid-prompt, `PELICAN-7`, came back. Vision and tool calling both work off this same server. A 64×64 red PNG produced the answer "Red"; a Taipei weather request using a `get_weather` schema returned `{"city":"Taipei"}` with `finish_reason: tool_calls`.
| category | my GX10 | author's Spark |
|---|---|---|
| prose | 27.4 | 29.0 |
| coding | 42.0–45.0 | 44.3 |
| reasoning | 44.6 | 45.6 |
| JSON | 44.3 | 49.3 |
| HTML | 46.8 | 47.6 |
| narrative | 27.7 | 28.5 |
| summary | 31.0 | 35.4 |
| formatting | 30.3 | 32.4 |
| harness median | **41.7** | 43.9 |
| 4 streams (per stream / aggregate) | 26.1 / 47.2 | 26.4 / 47.1 |
| 6 streams (aggregate) | not run | 68.8 |
| eager mode + MTP3, no CUDA graphs | not run | 35.2 |
## Takeaways
### Three takeaways
- **RAM for traffic, disk for the dictionary.** The 47.68 GiB n-gram table is read 2,560 bytes per token; leaving it on NVMe hands the freed memory to KV cache, enough for four concurrent 262K-token requests. The price is paid in prefill, not in decode.
- **The better MTP guesses, the wider the gap between prompt types.** Without MTP it is 17 tok/s, prose and code alike; with it, a step yields 2.93 tokens on average, and the gap between prose at 27.4 and code at 42–45 is entirely acceptance rate.
- **Unmerged fixes without rebuilding vLLM.** Nine bind-mounted files are the whole recipe; when you update the image, diff those nine container paths against the new image rather than the whole repository.
---
# [Benchmark] From OOM to 8.6 minutes: a MiniMax-H3 config stack for one RTX 5090
URL: https://ai-muninn.com/en/blog/minimax-h3-rtx5090-config-stack
Date: 2026-09-03
Series: MiniMax-H3 on RTX 5090 (Part 5)
One RTX 5090, MiniMax-H3 at native 1344x768, 362 frames = 15.08 s. With nothing attached the sampler asks for 47.11 GiB and OOMs. Two KJNodes nodes plus chunk 16/8 plus torch 2.13.0+cu130 render it in 518.0 s, and the 124-frame production chain goes from about 240 s to 134.2 s. The chunk retune is worth 1.40x and the CUDA line 1.48x, both exact: on cu128 ComfyUI never registers `scaled_mm_nvfp4`, so the FP4 matmul falls back to eager. Attention kernels and the TensorRT VAE add under 8% together. Image quality was eyeballed, not blind-tested.
## Preface
Getting a couch through a doorway is not a strength problem. Either it fits or it does not, and if it does not, shoving harder only scratches the frame — you take the legs off and it goes through. How fast you then carry it up the stairs is a completely separate question, and nobody confuses the two.
Config stacks for video models blur that line constantly. [Part 1](/en/blog/minimax-h3-nvfp4-rtx5090) got MiniMax-H3 running on a single RTX 5090, [Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) halved the output time with 14 steps, SageAttention and RTX VSR, [Part 3](/en/blog/minimax-h3-rtx5090-character-lock) locked a character with reference images, and [Part 4](/en/blog/minimax-h3-effect-embeddings-rtx5090) went through the ten effect embeddings.
This post is the accounting. My graph currently has six optimizations on it. One of them is why a native 768p 15-second clip completes at all; two more are worth 40% and 48% and are mathematically exact; the last three are worth 2 to 3% each and every one changes the numerics. Here is what each one buys.
## The stack that renders 15 seconds of 768p in 518 s
Every number in this article comes from the same machine and the same fixed conditions. The row that matters most is the last one — 362 frames is H3's per-clip ceiling, and everything expensive follows from generating that many at native resolution.
| Fixed for every measurement | Value |
|---|---|
| Sampler | `res_multistep` + `simple`, 14 steps, shift 12/3, Spectrum ON |
| Weights | DiT `minimax_h3_fl2va_pruned_nvfp4.safetensors`, TE `qwen3vl_32b_heretic_minimax_h3_nvfp4.safetensors` |
| Host | Windows 11 native, ComfyUI 0.34.0, Python 3.13.7 |
| Clip length | 1344x768, 362 frames = 15.08 s (124 frames = 5.17 s) |
The full environment, verbatim:
```
ComfyUI 0.34.0 · Python 3.13.7 · torch 2.13.0+cu130
sageattention 2.2.0+cu130torch2.10.0andhigher.post6
comfy-kitchen 0.2.31 · triton-windows 3.7.1.post27 · nvidia-vfx 0.1.0.1
launch: main.py --listen 0.0.0.0 --port 8188 --enable-manager --use-sage-attention
DiT minimax_h3_fl2va_pruned_nvfp4.safetensors
TE qwen3vl_32b_heretic_minimax_h3_nvfp4.safetensors
VAE minimax_h3_video_vae_fp16 + minimax_h3_audio_vae_fp32
sampler res_multistep + simple · 14 steps · shift 12/3
```
And what that stack does to a 15-second clip, one change at a time:
| Config | 362 frames at 1344x768 |
|---|---|
| Nothing attached | **OOM** — sampler requested 47.11 GiB |
| KJNodes two nodes, chunk 8/4 | ~1056 s |
| Chunk retuned to 16/8 | 755.6 s |
| Plus torch cu128 to cu130 | **518.0 s** = 8.6 min |
The shorter production chain moves the same way. 124 frames plus the upscale to 3840x2176 took roughly 240 s on cu128 and **134.2 s** on cu130.
## Two KJNodes patches turn a 47.11 GiB request into a run that finishes
Without these patches there is no benchmark to take: the run OOMs. The sampler asks for 47.11 GiB in a single allocation and a 32 GB card says no.
Both nodes come from [ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes), and both are mathematically exact — I read the source rather than trusting the README, because "low VRAM" is a phrase that usually means an approximation.
`MiniMaxLowVRAMAttention` splits attention into head groups. Heads are independent, so computing them a group at a time is exact, not an approximation of the full attention. It also frees the normed hidden state right after the qkv GEMM, and frees the fused qkv buffer before `out_proj` allocates its output.
`MiniMaxChunkFeedForward` chunks the SwiGLU feed-forward along the packed token dimension. Activations are per-token quantized, so chunking along tokens produces the same output as one pass.
The wiring order matters. Put both patches after Spectrum so they are applied last:
```
UNETLoader → SpectrumApplyMiniMaxH3 → MiniMaxLowVRAMAttention → MiniMaxChunkFeedForward → BasicScheduler/BasicGuider
```
## Chunk 16/8 is 2.9x faster than 2/2, which is the opposite of the published rule
The node tooltip says more chunks lower the peak at slightly more overhead, which reads as an argument for the smallest value that still fits. I swept it because that is cheap to check.
Same seed, same prompt, only `head_chunks` and `ffn_chunks` changed, 1344x768 at 362 frames:
| head_chunks / ffn_chunks | Time |
|---|---|
| 2 / 2 | 2208.1 s |
| 8 / 4 | ~1056 s |
| **16 / 8** | **755.6 s** |
| 32 / 16 | 761.3 s |
More chunks are faster here: 16/8 beats 2/2 by 2.9x. The curve then flattens: 32/16 differs from 16/8 by 0.8%, which is noise.
The reason is that "fits" is not a binary. There is a band where the run exceeds VRAM and still does not OOM — Windows spills the CUDA allocation into system memory and the job pages over PCIe for the rest of its life. Coarse chunks make each per-call transient large enough to land in that band. Fine chunks keep every transient small enough to stay resident, and paying for more kernel launches is far cheaper than paying for PCIe. The band itself is the subject of the advanced section below.
## torch 2.13.0+cu130 cut 32.4% off a 15-second clip: cu128 never registers the FP4 kernel
This is the largest single lever in the stack, and it is a package upgrade rather than a graph change.
| Frames | torch 2.11.0+cu128 | torch 2.13.0+cu130 | Delta |
|---|---|---|---|
| 124 (n=3) | 181.8 s | 99.6 s | **−45.2%** |
| 362 (n=1) | 766.1 s | 518.0 s | **−32.4%** |
The 362-frame row is a single run per arm, but the control is reproducible: that 766.1 s matches the 755.6 s measured earlier in the chunk sweep, 1.4% apart.
The mechanism is two gates in series, and both of them are version checks rather than performance heuristics. First, ComfyUI's `comfy/quant_ops.py` disables the comfy-kitchen `cuda` backend outright when torch reports a CUDA major version below 13:
```python
cuda_version = tuple(map(int, str(torch.version.cuda).split('.')))
if cuda_version < (13,):
ck.registry.disable("cuda")
```
Second, even when it is enabled, comfy-kitchen's `cuda` backend only registers `scaled_mm_nvfp4` if it can resolve cuBLASLt 13 at runtime.
Querying the registry directly settles it. On cu128: `cuda` disabled is True, 44 capabilities, `scaled_mm_nvfp4` absent. On cu130: disabled is False, **46 capabilities**, `scaled_mm_nvfp4` **present**. So on cu128 the NVFP4 matmul can only go through the `eager` path; on cu130 it routes to kitchen's cuBLAS FP4 GEMM. The weights were NVFP4 the whole time — the kernel that makes them worth something was not.
Faster is only interesting if the same work was done, so I checked the Spectrum accounting in both arms' ComfyUI logs. Identical: `steps=14`, `offline_replay_calls=14`, `anchor_steps=11`, `smoothed_steps=3`, `bypassed_steps=0`, `fallbacks=0`. No steps skipped, no fallbacks taken.
Three practical conditions come with the upgrade:
- torch 2.13 has **no cu128 wheel** at all. On Windows the CUDA lines are cu126, cu130 and cu132 (cu129 exists for Linux only), so moving to 2.13 forces the CUDA change. It is one decision, not two.
- SageAttention has to be swapped to the `+cu130` build. The [same post6 release](https://github.com/woct0rdho/SageAttention/releases) carries both, so this is a reinstall, not a rebuild.
- The package that provides `RTXVideoSuperResolution` is called **`nvidia-vfx`** on PyPI. `nvvfx` is only the import name, and pip will not find it.
## SageAttention and Sol-Attn are worth 2% and 3% here, and Sol's first run is slower than not using it
Both of these are real kernel speedups that mostly do not show up end to end on this workload.
SageAttention benchmarks at 4.10x to 4.21x on the single op. End to end on this 5090 it is worth **2%** — 52.18 s down to 51.11 s. The same SageAttention build is worth **19%** on a modded 2080 Ti. The kernel did not get worse; the rest of the 5090 pipeline simply got faster around it.
Sol-Attn is `MiniMaxH3ScheduledSolAttentionPatch`, running tau 1.3 to 0.8, `dense_percent` 0.2, `sink_conditioning` `exact_kv_and_rows`, `int8_qk` true, `strict` true. Its kernel benchmarks at 1.38x to 1.65x on sequences of 8K to 65K tokens. A 362-frame clip is about 91k tokens, already beyond the published benchmark range.
| Run | Time |
|---|---|
| Baseline, no Sol | 755.6 s |
| Sol, first run | 821.3 s |
| Sol, second run | 733.2 s |
| Sol + head_chunks=1 | 730.2 s |
Sol is worth **3%** once it has settled, and the first run is **8.7% slower than not using it at all**. That is Triton autotuning, and the cache is keyed per token count, so a new clip length pays the tax again. So measure this node twice and throw the first run away.
## The TensorRT VAE is worth 1.7%, not the 9.9% someone else measured
[ComfyUI-H3VAE_TRT](https://github.com/lihaoyun6/ComfyUI-H3VAE_TRT) claims up to 1.7x on the VAE stage. A benchmark someone sent me measured **−9.9%** end to end. I measured **−1.7%**. All three numbers are correct.
The stage breakdown explains the spread. I got it by resubmitting the same seed so ComfyUI caches the sampler and only the tail re-executes:
| Stage | Time | Share |
|---|---|---|
| Sampling | ~1009 s | 86% |
| Upscale chain | ~116 s | 10% |
| VAE decode + mux | 47.0 s | 4% |
That run was 928x544, 124 frames, **8 steps with an Acc LoRA**. Cheap sampling, so VAE was around 24% of their wall clock. Step count affects sampling, not VAE time. Their run used 8 steps; mine uses 14, for roughly ten times more sampling work. The same four seconds of VAE saving is −9.9% for them and −0.6% for me. Amdahl, applied to somebody else's benchmark.
It is still worth having: engine compile took only **23.6 s**, and it is a static 256px tile, so there is no rebuild per resolution or per frame count. One caveat — the encoder profile is fixed at `T=17`, though the current node pads shorter inputs, including a single frame, up to 17 before inference.
## Three of the six levers are free, and they are the three that matter
This is the whole ledger in one table. Read the last column first: it separates the levers that are exact from the ones that trade numerics for speed.
| Lever | Worth | Cost |
|---|---|---|
| KJNodes two nodes | OOM to completing | Exact — head groups and token chunks |
| Chunk 8/4 to 16/8 | **1.40x** | Exact — same math, different call sizes |
| torch cu128 to cu130 | **1.48x** (362 frames) | Same steps, same sampler, no approximation |
| Sol-Attn | 1.03x | Changes numerics |
| SageAttention | 1.02x | Changes numerics |
| TRT-VAE | 1.02x | Changes numerics |
The first three are exact — no approximation — and they take the 15-second clip from OOM to 518.0 s. The last three together are under 8% and every one of them alters the denoising trajectory. If you only do part of this, do the top three.
## Advanced: the spill zone that makes runs 11x slower
Skip this section if you came for the config — nothing below changes how you set the machine up. It is here because the failure mode it describes is invisible in every VRAM readout, and it is what makes the chunk-size result above look backwards.
Same 362 frames, same everything, only the resolution changed:
| Resolution | Pixels | Time |
|---|---|---|
| 960x544 | 0.52 MP | 318 s |
| 1152x640 | 0.74 MP | 3576 s |
| 1344x768 | 1.03 MP | OOM without the KJ nodes, **755.6 s** with them |
1.41x the pixels cost **11.2x** the time. Attention is quadratic in tokens, so 1.41 squared predicts about 2.0x. The gap is 5.6x, and it has nothing to do with attention complexity.

And the row underneath is the one that gives it away: 1344x768 with the KJ nodes attached is 755.6 s. That is **40% more pixels and 3x faster than 1152x640**. Pixel count cannot explain an ordering like that. Allocation behaviour can.
There are three bands, not two:
1. **Fits in VRAM.** Full speed.
2. **Spills but does not OOM.** The run completes, an order of magnitude slower, because Windows has moved the allocation into system memory and every access crosses PCIe.
3. **Beyond that.** OOM.
Band 2 is the dangerous one, because from the outside it just looks like a slow run — and a slow run on a bigger resolution is exactly what you expect to see. 1152x640 sits in it. 1344x768 with the KJ nodes does not, because the nodes keep every transient small enough to stay resident. This is the spill behaviour behind the chunk-size results above.
`vram_free` will not show you any of this. Sampling it every 5 s during the run that OOMed reported a peak of **24.3 GB**, on a card with 32 GB, while the allocator was asking for 47.11 GiB. The poller sees steady-state residency; the thing that kills you is a single transient between two samples.
So the detector is not a memory reading. It is the slope: plot time against pixels and look for a point that is implausibly far above quadratic. A jump of 11.2x for only 1.41x more pixels is not model scaling. It is a spill.
---
# [Dev Workflow] AI Slop Is Structural: 93.2% Detectable With Every Style Tell Stripped
URL: https://ai-muninn.com/en/blog/ai-slop-is-structural
Date: 2026-08-31
Series: AI Workflow (Part 20)
Strip every style signal from 61,608 stories — word choice, punctuation, rhythm — and a classifier still separates human from AI fiction at 93.2% macro-F1. Style alone gets 85.8%. Switching models does not help: the human-to-AI centroid gap is 1.6x the mean AI-to-AI gap. The mechanism is over-determination — the model states its own theme, drops subplots, and leaves nothing unresolved. Caveat: half of this does not transfer to technical writing, where answer-first structure is the job.
A good forger can match the brushstrokes. What gets him caught is the composition.
StoryScope ([arXiv 2604.03136](https://arxiv.org/abs/2604.03136), COLM 2026) is that idea applied to fiction. The authors throw out every style signal — word choice, punctuation, sentence rhythm, all of it — and classify human versus AI on narrative structure alone. Macro-F1 93.2%.
A style-only classifier on the same corpus gets 85.8%.
## Structure alone beats style alone, 93.2% against 85.8%
| Features used | Macro-F1 |
|---|---|
| Style only | 85.8% |
| 30 core structural features | 84.8% |
| Full structure | 93.2% |
| Structure + style | 96.0% |
Thirty structural features, with no style information at all, land within a point of the entire style-based approach. That is the finding.
The corpus: 10,272 human short stories from Books3, each paired with generations from five models — Claude Sonnet 4.6, GPT-5.4, Gemini 3 Flash, DeepSeek V3.2, Kimi K2.5 — for 61,608 stories total (24 short of a clean 5x: the models refused that many), mean length 4,753 words.
## The surface tells are dying, and one fine-tune kills them outright
Em-dashes, "delve", the rule of three. All surface. GPT-5.4 already cut its em-dash usage, so half of what people are scanning for is a habit of one model version.
Two measured results, and neither is good news for a word-list gate:
| Intervention | Effect on detection |
|---|---|
| Fine-tune on human fiction (Chakrabarty 2026) | AI-detection on creative writing 97% to 3% |
| LAMP style rewrite, against StoryScope | 95.5% to 93.9% |
One fine-tuning pass takes a 97% detector to 3%. The same class of attack aimed at StoryScope's structural features moves it from 95.5% to 93.9%. If your gate reads words, a single fine-tune retires it. If it reads structure, a rewrite barely registers.
## Five questions that find AI drafts faster than any word list
These are the ones I actually use on a draft. Each pair compares AI-written stories with human-written ones across the full corpus.
1. Does the narrator state the theme outright?
2. Is emotion always rendered through the body?
3. Are there any subplots at all?
4. Are references named, or gestured at?
5. Is anything left unresolved?
| # | Signal | AI | Human |
|---|---|---|---|
| 1 | Narrator states the theme outright | 77% | 52% |
| 1 | Thematic explicitness (1-5) | 3.94 | 3.28 |
| 1 | Dialogue used for philosophical debate | 59% | 34% |
| 2 | Embodied metaphor for emotion | 81% | 38% |
| 2 | Olfactory imagery | 82% | 57% |
| 2 | Emotion named outright | 8% | 29% |
| 3 | No subplots at all | 79% | 57% |
| 3 | Resolution driven by protagonist choice | 69% | 46% |
| 3 | Causal-chain continuity (1-5) | 4.20 | 3.92 |
| 4 | Names a real work or author | 24% | 47% |
| 4 | Vague allusion instead | 72% | 50% |
| 5 | Resolution as internal understanding | 47% | 27% |
| 5 | Morally ambivalent protagonist | 38% | 59% |
The paper's word for the pattern is **over-determination**. Every element is doing declared work. The theme gets said out loud, emotion always lands in the chest or the throat, causality never slips, the protagonist chooses and the choice resolves the story.
Take the last two rows together. AI protagonists are morally *clearer* — ambivalence shows up in 38% of AI stories against 59% of human ones — and AI endings are nearly twice as likely to resolve into an internal understanding. A legible protagonist, then a lesson learned. That is over-determination arriving at the level of character.
That is the shape underneath all five questions. The model leaves no loose ends, and loose ends are the human fingerprint.

## Switching models does not move you out of the AI cluster
The common reaction to slop is to try another model. The geometry says no.
| Comparison | Distance |
|---|---|
| Human to AI centroid | 6.6 |
| Mean AI to AI | 4.3 |
| Closest human-AI pair | 6.2 |
| Two most distant AI models | 6.0 |
The human-to-AI gap is 1.6x the mean AI-to-AI gap. And the second half of that table is the sharper version: the *closest* human-AI pair in the whole set is still farther apart than the *two most distant* models. The six most-confused source pairs are all AI-to-AI.

You can move between models. You cannot move out of the neighbourhood.
## Every model has a structural personality, and Kimi's is not having one
Counting fingerprint features — structural traits that distinguish one source from the rest:
| Source | Fingerprint features |
|---|---|
| Human | 32 |
| Claude Sonnet 4.6 | 26 |
| GPT-5.4 | 11 |
| Gemini 3 Flash | 11 |
| DeepSeek V3.2 | 7 |
| Kimi K2.5 | 3 |
| Model | What it does structurally |
|---|---|
| Claude | Restraint. Flattest event escalation, writes epilogues, avoids dream sequences, reverent and continuist toward literary tradition at 62% against 39-56% for the others |
| GPT | Gossip and rumour as a plot mechanism at 64% against 44-55%; distant retrospective narration |
| Gemini | Tidiest endings, longest denouements, bleakest settings — 88% tagged bleak |
| Kimi | Three fingerprints, lowest per-source F1 at 0.55, sits at the generic centre |
Kimi is the interesting one. Having no personality is its fingerprint: it lands where the average AI story lands, which is itself a position.
Six-way authorship attribution on structure alone comes out at 68.4%. Not just human-versus-AI — *which* AI, from narrative shape.
## I scanned my own published article and the disease was in the template
I ran the five questions over a piece I had already shipped: [Fixing NCCL's stub-library error](/en/blog/nccl-2080ti-stub-library-fix), 15,194 characters.
One hard hit. The same lesson appeared in four places.
| Location | Section | Verdict |
|---|---|---|
| L32 | Preface | Keep — it is the motivation |
| L236 | "What this corrects" | Cut |
| L238 | "What this corrects" | Cut — it restated L236 |
| L304 | Takeaways | Keep — it is the closing |
The preface and the takeaways both earn their place; one sets up the problem and one closes it. The two in the middle were pure redundancy, and the second restated the first inside the same section.
After the edit the article came out 42 characters shorter, with zero facts lost. Forty-two characters is not the point. The point is that a reader hit the same sentence four times.
**The root cause is the template, not the prose.** I have a "what this corrects" section and a "takeaways" section. Those two headings are built to restate each other. No individual sentence was written badly; the structure requested the repetition and the model supplied it.
I have seen the section-level version of this before. In July I counted my back catalogue and found that 100 of 152 articles had exactly four FAQ pairs. Not four real questions — a slot filled to the brim.
So instead of tweaking a word list, I added the question to a review pass I already run. I added the question to the pre-publish review pass I already run, and I did not build the regex gate I originally wanted. The measurements behind that decision are below.
## Deep dive
Skipping this section costs you nothing — the five questions and the template finding above are the usable part. What follows is the measurement record: what I built and threw away, and where I think the paper is thin.
### Half the paper doesn't apply to technical writing
The paper finds humans favour non-linearity: anachrony 2.58 for humans against 2.31 for AI, delayed disclosure 1.96 against 1.68. Straightforward advice would be to withhold, reorder, let the reader assemble it.
That advice is wrong for this blog. A technical H2 has to be answer-first, both for readers scanning and for GEO, the search-answer equivalent of SEO. And I was corrected twice in July on exactly this: detective-style build-up reads worse than teaching-style for this material.
So the checklist I wrote from the paper has an explicit **does not apply** section. Half the findings are about fiction and stay there. Importing them wholesale would have made the writing worse in a way the source paper would have scored as more human.
### Why I didn't build the regex gate
The obvious move after the self-scan is a regex. I prototyped one that catches restatement-marker openers — `換句話說` ("in other words") and its relatives — deliberately excluding my own transition habits so it would not just flag my voice.
Then I ran it over the corpus that matters, which is my own archive.
| Measurement | Result |
|---|---|
| All 172 zh-TW articles | 8 hits, 4%, median 1 |
| Positive control, recall | 1/3 — missed both markerless cases |
| Positive control, precision | 1/2 — one hit was a real new conclusion, not a restatement |
The positive control is the known-bad original, the article I had already found four repetitions in.
That leaves no usable threshold. At 2 it never fires. At 0 it false-flags articles I already published and still stand behind. I got the same result when I measured sentence rhythm: nothing there to catch, so I didn't build the check. A gate that fires on your back catalogue is not a gate; it's noise — the calibration lesson from [the AI-tic check that never ran](/en/blog/ai-tic-check-that-never-ran), arrived at from the other direction.
### External review caught 3/3, including one I had missed
Instead of a regex, the question went into the review pass that already exists. Two external models read every draft for translation-ese; adding one more question to a prompt costs nothing, and dispatching to Codex is already routine here — see [the 41-minute ticket](/en/blog/agent-ticket-41min-to-73s).
Codex caught 3/3 of the repetitions I had found, with zero false positives. It also found one I had missed entirely — a three-step restatement chain inside a single argument:
> L216: the bus was never saturated
> L218: only 8.2% of Gen3 x16
> L218: dropping 8.2% to 0.1% saves you a road that was already empty
Three tellings of one fact, the last two on the same line. I had read that passage many times and never registered it as repetition, because each sentence is doing rhetorical work — statement, evidence, implication. It is only repetition if you are looking for the shape.
It also applied my exemption correctly without being pushed, quoting it back:

> a recap in a concluding section isn't automatically the disease
That is the exemption that keeps the gate usable. A model that can only pattern-match would have flagged the takeaways line at L304.
### The paper's durability claim rests on one experiment, and that experiment is a tautology
This is where I think StoryScope is weakest.
The whole "structural features are durable under adversarial rewriting" argument rests on a single run: 278 Gemini stories pushed through LAMP, giving 95.5% to 93.9%.
LAMP is a style-rewriting system. By design it does not touch structure. So the finding is that an edit which does not change structure does not change structural features. That is a tautology dressed as a robustness result.
The real adversarial tests would be prompting explicitly for non-linearity, or fine-tuning on human fiction. Neither was run — even though the paper itself cites the fine-tuning result that took detection from 97% to 3%.
### Every label rests on two annotators and 12 stories
Inter-annotator agreement is κ=0.74. Model-versus-annotator agreement is κ=0.84.
The humans agree with each other *less* than the model agrees with the humans. That was measured on 12 stories, 240 items, 2 annotators. Every label in the 61,608-story corpus rests on that validation.
I do not think it sinks the paper. The effect sizes are large enough to survive noisy labels. But "the model is more consistent than our annotators" is usually reported as a warning, not as validation.
### The rarity tail is reported as raw counts, and that hides the ratio
Mean rarity percentile: 0.71 for humans, 0.49 for AI, Cohen's d 0.83. Humans are more original on average, and it is not a small effect.
Then the tail:
| Slice | Human | AI |
|---|---|---|
| Rarest 10% | 340 | 487 |
| Top 1% | 42 | 41 |
The paper calls that tail "mixed". But the test set holds 6,885 AI stories against 1,377 human ones — a five-to-one split printed on the same page as the Cohen's d. As rates, the rarest decile is 24.7% of human stories against 7.1% of AI ones, and the top 1% is 3.0% against 0.6%. Humans lead the tail by a wider margin than they lead the average.
What survives is the part that matters for copyright: 487 AI stories still made the rarest decile. Disputes judge individual works, never distributions, and a low rate is not an empty set.
I read this backwards the first time and wrote the inverted version into the draft. The pre-publish review caught it.
### The irony: a 512-token baseline hits 99.9%
The paper's own baseline is a fine-tuned ModernBERT. It scores 99.9%.
ModernBERT has a 512-token input limit. On a corpus averaging 4,753 words, that is the first two or three paragraphs of a 5,000-word story.
So the AI tell is dense enough at the opening that none of the 304-question structural pipeline is needed to detect anything. The pipeline's value is not detection power — a small classifier reading three paragraphs already beats it. The value is the breakdown: 304 questions telling you *what* the difference is, feature by feature, which is the part you can act on when you are the one writing.
Detection was solved. Diagnosis is the contribution.
## What I actually do now
Three things came out of this.
The five questions go into the draft review, because they catch what word lists can't: over-determination, no subplots, nothing unresolved. The regex did not get built, because measuring it on 172 of my own articles gave no threshold that fires on the disease without firing on healthy work. And the repetition question went to the external reviewer that was already reading every draft, where it caught 3/3 plus one I had missed.
The real surprise was the template. I went looking for bad sentences and found a heading pair that manufactures repetition on its own. If you run a house structure over every post, audit the structure before you audit the prose — the prose is downstream.
This article has three FAQ entries. That is the whole intervention.
---
*Also in this series: [Part 19 — From 41 minutes to 73 seconds](/en/blog/agent-ticket-41min-to-73s) · [Part 17 — My skill had the check written perfectly, it just never ran](/en/blog/ai-tic-check-that-never-ran)*
---
## References
Jenna Russell, Rishanth Rajendhran, Chau Minh Pham, Mohit Iyyer (University of Maryland, College Park) and John Wieting (Google DeepMind), [*StoryScope: Investigating idiosyncrasies in AI fiction*](https://arxiv.org/abs/2604.03136), COLM 2026 (arXiv:2604.03136).
---
# [Benchmark] Ten effect embeddings for MiniMax-H3 — 10 MB that buys you bullet time, fire breath and a full year of seasons
URL: https://ai-muninn.com/en/blog/minimax-h3-effect-embeddings-rtx5090
Date: 2026-08-31
Series: MiniMax-H3 on RTX 5090 (Part 4)
Ten community effect embeddings for MiniMax-H3, all ten verified working at native 1344x768 on a single RTX 5090. They split into camera moves (bullet_time, spiral_ascent), events (fire_breath, art_is_explosion) and — the surprising group — time passing: four_seasons takes one tree from autumn leaves to bare branches to snow inside 5.17 seconds. Total download 10.7 MB. One catch: put `embedding:` mid-sentence. At the very start of the prompt the effect simply does not appear — no warning, and the output still changes, so a different file is not evidence that it worked.
## Preface
A stage magician does not carry a bag of ten different tricks. They carry ten different setups — the box, the table, the assistant standing just there — and each setup makes one trick possible. Take away the setup and the trick has nowhere to happen.
Effect embeddings work the same way, which is the part that took me longest to see. [Part 1](/en/blog/minimax-h3-nvfp4-rtx5090) got MiniMax-H3 running on a single RTX 5090, [Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) halved the generation time, and [Part 3](/en/blog/minimax-h3-rtx5090-character-lock) locked a character's identity with a reference image. This one is about ten small files that add camera work and visual events to a shot — and about the shape a prompt has to be in for them to land.
## The 768p baseline is the thing that makes any of this worth looking at
All the clips below use one configuration, so here it is first. H3's native canvas is a **768-pixel short edge** — [Comfy's own documentation](https://docs.comfy.org/tutorials/video/minimax/minimax-h3) puts it as 1344x768 at 16:9, with both dimensions rounded to a multiple of 32.
| Setting | Value |
|---|---|
| Resolution | 1344 x 768 (native, no upscaling) |
| Frames | 124 = 17x7+5, at 24 fps → 5.167 s |
| Steps | 14 |
| Sampler / scheduler | `res_multistep` + `simple` |
| Spectrum solver | ON (shift 12 / 3) |
| Weights | `pruned_int8_convrot`, 20.97 GB |
| Time per clip | 206–260 s |
Two of those rows carry most of the weight. **The frame count is not free-form**: the duration snaps to a 17k+5 grid, so 124 frames is legal and 120 is not. And **the resolution is not a quality dial you can turn down and make up for later**. I spent a chunk of an evening trying to generate at 864x480 and repair the result afterwards — the faces come back wrong in a way that upscaling cannot fix, because they were never resolved in the first place. Native 768p is roughly four times the pixels and roughly four times the wait, and it is the difference between a face and a smear.
The Spectrum solver is the one acceleration worth having here, and notably it earns *more* at this resolution than at the old 480p baseline. That is unusual — most speed tricks give back less as you scale up.
## Put the marker mid-sentence, not at the front of the prompt
The first time I attached `fire_breath` I put the marker at the very start of the prompt. The dragon came out beautifully. No fire.
I assumed the effect was too weak, so I shortened the prompt and specified the dragon's posture more tightly. Still no fire.
Three arms, same seed, same scene, 14 steps, 1344x768. The only variable is where the marker sits:
| Start of the prompt | Fire? |
|---|---|
| `embedding:minimaxh3_fire_breath [Shot 1] A dragon...` | no |
| ` embedding:minimaxh3_fire_breath [Shot 1] A dragon...` (leading space) | no |
| `[Shot 1] embedding:minimaxh3_fire_breath A dragon...` | yes |

Row two was my first guess — if position is the problem, pad the front with a space. It still produced nothing.
**So the rule is "put it mid-sentence", not "make sure there is a space before it."** In practice you never have to remember it: the H3 prompt format already opens with `integrated_multimodal_description: [Shot 1]`, so dropping the marker after `[Shot 1]` satisfies it for free.
### Why I pulled my first explanation
My original explanation was that ComfyUI splits the prompt in [`comfy/sd1_clip.py` line 594](https://github.com/Comfy-Org/ComfyUI/blob/6c62ca0b6bbee7ef293ca475f7904065af5bfb42/comfy/sd1_clip.py#L594) (pinned to commit `6c62ca0` — line numbers on `master` drift) with `re.split(r'(?<=\s)embedding:', ...)`, that the `(?<=\s)` lookbehind demands preceding whitespace, and that a marker at position zero therefore falls through as plain text.
The regex is real and does read that way. It is not enough to explain the measurement. Line 602, a few lines further down:
```python
to_tokenize = [split[0]]
# ...
for word in to_tokenize:
if word.startswith(self.embedding_identifier) and self.embedding_directory is not None:
```
When the split does not fire, the first segment is still tested with `startswith`. On that code path alone, an `embedding:` at position zero should still be recognised.
**The measurement holds; my account of it does not.** I have not pinned down where the real cause lives. The tensor inside these files is named `qwen3vl_32b`, so H3's text encoder is not the SD1 path, and the difference may sit there. I have no evidence for that, so it stays a guess rather than a conclusion.
Whatever the cause turns out to be, two practical takeaways still hold.
**Nothing warns you.** The `logging.warning` in that file fires when a named embedding file is missing, which is a different situation. Your console stays clean throughout.
**The output still changes.** The runs where nothing happened still have a different md5 from the control, because the literal text is real tokens and real tokens move the conditioning. Checking "did my change do something" by comparing files gives you a yes, and it is the wrong yes.
## An effect embedding is a paragraph somebody else wrote, not a keyword
The second thing to understand before writing prompts is that these are not trigger words.
Each file is a tensor of shape `[N, 5120]`, where N runs from 50 for `art_is_explosion` to 142 for `four_seasons`. ComfyUI expands a multi-row embedding into one conditioning token per row — the loop is right there in the same function. So `embedding:minimaxh3_fire_breath` does not look anything up. It **splices 118 pre-encoded vectors into your prompt**, and those vectors were somebody's description of what fire breath looks like, run through the text encoder once and frozen.

That has a direct consequence for how you write the rest of the prompt: **the more specific your own words are, the harder they compete with those vectors.** A long, tightly specified scene description does not reinforce the effect. It competes with it.
The prompt shape that works is a subject with room around it:
- Give the effect something to act **on** — a dragon for `fire_breath`, a spinning kick for `bullet_time`, one lone tree for `four_seasons`, an empty flower bed for `blooming_flowers`.
- Do not describe the effect yourself. You are paying for those 118 vectors; do not overwrite them.
- Do not pin down what you want the effect to change. Writing "stands still, facing the camera" in front of a camera-move embedding cancels the thing you asked for.
## Camera moves: three embeddings that only change how the shot is framed
The first group leaves the content alone and rewrites the camera.
`bullet_time` is the clearest demonstration of the "give it room" rule. The subject needs to be doing something worth freezing, and the shot needs to be wide enough that an orbit has somewhere to travel. A tight close-up gives the effect nothing to work with.
`truman_show` is the odd member of the group: it changes the camera, but it also brings a whole aesthetic with it — the manicured lawns, the flat daylight, the sense of being watched. That is the 90 vectors doing scene-setting work, not just camera work.
## Events: four embeddings that make something happen
The second group adds an occurrence to the shot.
`art_is_explosion` being the smallest file is a useful hint about how these were made. Fifty vectors is a short description — roughly "there is an explosion in this composition" — which is why it composes so cheerfully with a subject as ordinary as three pieces of fruit on a table. The bigger embeddings are more opinionated and will fight a strong scene description harder.
## Time passing: the two that genuinely surprised me
The third group is the reason this article exists. These two do not move the camera or add an object. They move time.
A 5.17-second clip has 124 frames to work with, and both of these spend that budget on a transformation rather than on motion. `four_seasons` at 142 vectors is the largest embedding in the set, which makes sense: a season change is a lot more to specify than an orbit.
The subject choice matters more here than anywhere else. **One tree in an open field.** **One empty flower bed.** A busy scene has too much that would have to change together, and the model spends its frames trying to keep everything consistent instead of transforming anything.
## `kiss_camera` locks a camera move and an action together
This one gets its own section because it shows the pattern you would use to build your own: 97 vectors that specify a camera move *and* the thing that happens at the end of it. The two are locked together, which is exactly what you want for a beat like this and exactly what you do not want if you only wanted the push-in.
## Cheat sheet: what to feed each embedding
| Embedding | Vectors | Give it | Type |
|---|---:|---|---|
| `art_is_explosion` | 50 | any still subject | event |
| `dark_magic` | 59 | a figure with visible hands | event |
| `truman_show` | 90 | a person in an open outdoor space | camera + mood |
| `bullet_time` | 94 | a body mid-action, wide framing | camera |
| `kiss_camera` | 97 | two faces | camera + event |
| `fire_breath` | 118 | a creature with a mouth | event |
| `blooming_flowers` | 123 | bare soil, empty bed | time |
| `spiral_ascent` | 131 | a figure with sky above | camera |
| `storm_magic` | 137 | a figure, big sky | event + mood |
| `four_seasons` | 142 | one tree, open ground | time |
Installing them is a copy job. Drop the ten `.safetensors` from [`Comfy-Org/MiniMax-H3`](https://huggingface.co/Comfy-Org/MiniMax-H3) into `ComfyUI/models/embeddings/` and restart. You need ComfyUI 0.34.0 or later. Comfy's documentation says to reference them from a `CLIPTextEncode` node; the `prompt` field on `MiniMaxH3ImageToVideo` reads them just as well, so an existing H3 workflow needs no rewiring.
---
## Deep dive: full parameters and the accelerations that did not earn their place
You can stop here if you only want to use the embeddings; everything you need is above. The rest is methodology and measurements.
### The exact generation config
Every clip in this article came out of the same graph, one variable changed at a time:
```text
model MiniMax-H3, pruned_int8_convrot (20.97 GB)
resolution 1344 x 768 # native short edge 768, both dims %32 == 0
frames 124 # 17*7+5, the only nearby legal value
fps 24 # → 5.167 s
steps 14
sampler res_multistep
scheduler simple
spectrum enabled, shift 12 / 3
seed fixed per comparison, varied across effects
```
Wall time landed between 206 and 260 seconds per clip on one RTX 5090. The spread is mostly scene complexity, not the embeddings — `bullet_time` measured 212.0 s against a 206.4 s control with the same seed and prompt, a gap that sits inside run-to-run noise. In other words, the embedding adds no measurable overhead — it is conditioning, not extra compute.
### Match the sampler to the LoRA family
One parameter that is easy to get wrong when adapting a workflow from elsewhere: `res_multistep` is correct for the lightx2v-family distillation LoRAs, and `euler` is correct for PDD. Mixing them will not throw an error. It just quietly produces worse frames. If you copy a graph from a tutorial that used a different acceleration LoRA and keep its sampler, this is where the quality goes.
### Speedups I tested and rejected
**BlockCache** (`T8mars/comfyui-minimax-h3-blockcache-T8`): the author's own numbers are 485.8 s → 443.8 s on an RTX 4060 Ti with INT8 ConvRot, a 1.09x speedup, best case 403.2 s for 1.20x. It is **mutually exclusive with the Spectrum solver**, and Spectrum is worth more than that at 768p. Straightforward no.
**Step-count reduction below 14**: covered in [Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) — 20 steps to 14 was free, and going further was not.
**Generate at low resolution and repair afterwards**: this is the one I most wanted to work, because 864x480 generates in about a quarter of the time. The face-repair path in the T8 node pack runs cleanly and measurably improves facial detail — the audit reports 124/124 frames detected, zero rejected, and the repaired faces have formed eyes and glasses where the 480p originals had smears. It is still unusable: the repair crops a region, regenerates it and pastes it back, and the paste boundary is visible as an ellipse against the compressed background around it. I swept the blend parameters — feather from 12 to 128 source pixels, colour match to 1.0, elliptical against full-crop regions, blend down to 0.7 — and the edge survives all of them. **The boundary is inherent to cut-repaint-paste, not a tuning problem.** Native 768p is the answer.
### What the ten files actually are
Ten `.safetensors`, 10.7 MB total. silveroxides opened [PR #50](https://huggingface.co/Comfy-Org/MiniMax-H3/discussions/50) and Lexius merged it into the Comfy-Org repository. Comfy's documentation lists them and gives the `embedding:name` syntax, but no usage examples and no guidance on prompt shape — which is the gap this article is trying to fill.
Shapes, read off the files:
```text
minimaxh3_art_is_explosion [ 50, 5120] 512 kB
minimaxh3_dark_magic [ 59, 5120] 604 kB
minimaxh3_truman_show [ 90, 5120] 922 kB
minimaxh3_bullet_time [ 94, 5120] 963 kB
minimaxh3_kiss_camera [ 97, 5120] 993 kB
minimaxh3_fire_breath [118, 5120] 1.21 MB
minimaxh3_blooming_flowers [123, 5120] 1.26 MB
minimaxh3_spiral_ascent [131, 5120] 1.34 MB
minimaxh3_storm_magic [137, 5120] 1.40 MB
minimaxh3_four_seasons [142, 5120] 1.45 MB
```
H3's conditioning width is 5120, so these tensors work anywhere the graph accepts text conditioning. That includes the `MiniMaxH3ImageToVideo` prompt field, with no `CLIPTextEncode` in the path.
---
*Also in this series: [Part 1 — first clip on one RTX 5090](/en/blog/minimax-h3-nvfp4-rtx5090) · [Part 2 — the three switches that halve generation time](/en/blog/minimax-h3-rtx5090-speedup-vsr) · [Part 3 — locking a character with a reference image](/en/blog/minimax-h3-rtx5090-character-lock)*
---
# [Benchmark] GLM-5.3-Flash 320B on One DGX Spark: 15.4 tok/s with Vision Working
URL: https://ai-muninn.com/en/blog/glm53-flash-one-dgx-spark
Date: 2026-08-30
Series: DGX Spark (Part 44)
GLM-5.3-Flash (320B-A18B) at UD-Q2_K_XL is 108.72 GB and fits one DGX Spark's 121 GB pool with a 262,144-token context, ready in 85 seconds. English prose decodes at 15.40 tok/s, Chinese at 16.23, Three.js code at 23.64; the spread tracks MTP draft acceptance, 36.01% versus 41.03%. Vision works, but only with --spec-type off: the draft runs in its own KV cache and image embeddings leave a hole in it, so every image request returns HTTP 500. Build with CUDA toolkit 13.0. A 13.2 build compiles clean, serves fine, and returns garbage.
A cargo bike is slower than a road bike, and that is not the point of it. You buy one because it carries the kid, the groceries and the dog at the same time, and no road bike does any of that at any speed.
GLM-5.3-Flash is the cargo bike of the four large models I have running on this DGX Spark. It decodes English prose at 15.40 tok/s, which is last place by a wide margin. What it does that the other three do not: it reads images, it ships under MIT, and its architecture declares a 1,048,576-token position space.
This is Part 44 of the DGX Spark series. [Part 43](/en/blog/qwen4exp-dgx-spark-262k-no-tradeoff) put a 177B MoE at its full 262K context into this same pool, and an earlier part asked whether [2-bit stays usable at 284B](/en/blog/dgx-spark-deepseek-v4-flash-284b-q2-quality). This one is the largest model I have loaded on the box, and the first that does something the fast ones cannot do at all.
## The flagship does not fit; Flash is a different model that does
The flagship GLM-5.3 is 744B-A40B. Its smallest GGUF is `UD-IQ1_S` at 216.72 GB, nearly twice what a 121 GB machine has. There is no quant tier low enough to close that. I got these sizes by summing the file listings from the HuggingFace API rather than estimating from parameter count, because a 1-bit MoE's on-disk size is not a clean function of its parameters.
GLM-5.3-Flash is 320B-A18B and does fit. It is not a shrunk flagship — it is a separate base model. Its `config.json` reports the architecture as `glm5_next` / `Glm5NextForConditionalGeneration`:
- 288 routed experts plus 1 shared, 8 active per token
- 45 layers, alternating three `linear_attention` blocks to one `deepseek_sparse_attention`
- one MTP layer (`num_nextn_predict_layers: 1`) — MTP is multi-token prediction, a small head that guesses the next few tokens so the main model can verify several at once instead of generating them one at a time
- `max_position_embeddings: 1048576`
- a `vision_config` block, so it is natively multimodal rather than bolted together from a separate vision model
The license is **MIT**; the flagship ships under the GLM-5.3 License. For anything you plan to put in front of users, that difference is larger than any of the numbers below.
## Take UD-Q2_K_XL, not the officially recommended IQ3_XXS

Here is the quantization ladder from [unsloth/GLM-5.3-Flash-GGUF](https://huggingface.co/unsloth/GLM-5.3-Flash-GGUF). The row that matters is the third one.
| quant | weights |
|---|---|
| UD-IQ1_S | 93.09 GB |
| UD-IQ1_M | 97.58 GB |
| **UD-Q2_K_XL** | **108.72 GB** |
| UD-IQ3_XXS | 120.37 GB |
| UD-Q3_K_XL and up | 147.54 GB+ |
Unsloth's own docs point 128 GB machines at `UD-IQ3_XXS`. That advice compares weights against total memory and stops there. Put 120.37 GB of weights into a 121 GB machine and there is nothing left for the KV cache — not for 262K, not for 32K, not for anything. The recommendation is correct about the weights and silent about the rest of the bill.
`UD-Q2_K_XL` leaves the room the KV cache needs. After the model loads:
```
$ free -g
total used free shared buff/cache available
Mem: 121 107 2 0 12 13
```
107 GB used, 13-14 GB available. That headroom is what pays for the context.
If you want vision, also pull `mmproj-F16.gguf` (1.13 GB). It is the vision projector and it is a separate file from the four weight shards.
## CUDA toolkit 13.2 builds clean, serves fine, and returns garbage

This is the one thing on the page that will cost you an afternoon if you get it wrong, because two of the three failure modes do not look like build problems.
| toolkit | what you get |
|---|---|
| 12.x | server dies at warmup with `CUDA error: invalid argument`, never reaches ready |
| 13.2 | starts, serves, answers every request — output is garbage |
| **13.0** | correct |
The 13.2 row is the dangerous one. There is no error, no assert, no warning. The server comes up, `/health` is green, requests return 200, and the text is nonsense.
The cause is that **CMake resolves the CUDA toolkit path independently of the compiler you specify.** Pass only `-DCMAKE_CUDA_COMPILER` and you get exactly what you asked for — your nvcc — while CMake goes off and searches for headers in its own order, usually finding an older system copy first. A new compiler against old headers means the `cudaLaunchConfig_t` layout that `cudaLaunchKernelEx` expects does not match what the headers describe, the kernel launch returns `invalid argument`, and the process dies on the first `soft_max` at warmup. That is the 12.x row. The 13.2 row is the same class of mismatch landing somewhere that does not raise.
So pass both, pointed at the same place:
```bash
cmake -B build -DGGML_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES=121a-real \
-DCUDAToolkit_ROOT=/usr/local/cuda-13.0 \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-13.0/bin/nvcc \
-DCMAKE_BUILD_TYPE=Release
```
**There is exactly one line to check, and cmake prints it for you.** Two lines of its output sit next to each other:
```
-- The CUDA compiler identification is NVIDIA 13.0.88
-- Found CUDAToolkit: /usr/local/cuda-13.0/targets/sbsa-linux/include (found version "13.0.88")
```
If those two versions disagree, that is the bug, and it is the whole acceptance test. You can read it in five seconds and it tells you before the build finishes whether the binary is going to be worth running.
The text-only build comes from a branch that has the GLM-5.3-Flash architecture:
```bash
git clone https://github.com/eauchs/llama.cpp.git
cd llama.cpp
# this commit is no longer an ancestor of the branch head — fetch it explicitly
git fetch origin 8a8d0bcc4d5fdf024c457526245bec4bc3a12adc
git checkout 8a8d0bcc4d5fdf024c457526245bec4bc3a12adc
cmake --build build --target llama-server -j
```
166.57 s to build on this machine.
## 262K and 32K both load in 85 seconds
```bash
llama-server -m GLM-5.3-Flash-UD-Q2_K_XL-00001-of-00004.gguf \
-ngl 99 -c 262144 -ctk q8_0 -ctv q8_0 -fa on \
--jinja --spec-type draft-mtp
```
Ready in **85 seconds**, and that number does not move when you drop `-c` to 32768. Load time here is dominated by pulling 108 GB of weights off disk, not by allocating context, so a smaller window does not buy you a faster start. Useful to know when you are iterating: there is no cheap-to-load configuration to develop against.
> **Do not try 1M context.** Unified memory has no clean OOM wall to stop you. Going over does not kill the process. It starts thrashing swap, and the scheduler stops making progress: you can ssh in and see the banner, but your commands never run. Mine is not sitting next to me, so that cost a long wait for something with no error message at either end.
Start at `-c 32768` and work up.
For the record, the build and weights these numbers came from:
- `llama.cpp 0.3.0-dev (build 10677, commit 8a8d0bcc4)`, `CMAKE_CUDA_ARCHITECTURES=121a-real`
- weights: 4 shards, 108,720,071,427 bytes
## Chinese prose runs 5.39% faster than English, and the draft acceptance says why
Same server, same parameters (`max_tokens=1024`, `temperature=0`, `reasoning_effort="low"`), three runs each, and the only thing that changed between the two sets was the language of the prompt. Look at the third row — that is where the speed comes from.
| | English | Chinese |
|---|---|---|
| median decode | 15.40 tok/s | **16.23 tok/s** |
| range over 3 runs | 15.08-15.51 | 15.83-16.69 |
| MTP draft acceptance | 36.01% | **41.03%** |
| completion tokens | 333 | 362 |
Chinese accepts about five more percentage points of the draft. Every accepted draft token is one the model did not have to run a separate verification round for, so a higher acceptance rate means fewer forward passes per output token. This is not an inference about why the numbers differ; it is a counter the server reports, and it moves in the direction the speed moves. Pooling all three runs per language holds the ratio: 364/1008 = 36.11% for English, 431/1053 = 40.93% for Chinese.
The runs were reproducible. SHA-256 of the three English completions is identical across all three, and the same for the Chinese set. All six requests came back with `finish_reason: stop`, and no samples were dropped.
**One number here is a trap: characters per second.** English came out at 64.88 chars/s, Chinese at 15.47. That looks like English is 4x faster, and it is the opposite of the real result. Two things stack up to produce it: token density (4.4 characters per token in English, 1.01 in Chinese) and the model choosing to write different amounts (1,456 English characters, 367 Chinese). Tokens per second is the speed of the machine. Characters per second only tells you how long you sit there before the answer stops moving.
One quality note while I was reading the Chinese output: it came back in Traditional Chinese rather than Simplified, and across the whole passage there was a single wrong character — a substitution close to a homophone. That is the cost of 2.4-bit experts, and I am reporting it rather than filtering it out.
## Three.js code decodes at 23.64 tok/s, 52% faster than prose
I asked for a single self-contained HTML file: Three.js from a CDN, a voxel-style Japanese castle keep with a stone base, tapering tiers, per-tier overhanging roofs, a decorative finial, a ground plane, lighting, and a slow automatic camera orbit.
It produced 2,136 completion tokens in 92.06 s of wall time — **23.64 tok/s decode** — 5,249 characters, ending in ``, `finish_reason=stop`. It ran on the first try.
What it got right: the stone base, three tapering tiers, per-tier eaves, white walls against dark roofs, ground and lighting, and the automatic orbit. It reads as a castle keep at a glance.
What it got wrong: the finial rendered as a Christian cross, where the real thing is a shachihoko or a giboshi. My prompt only said "decorative finial", so half of that is mine.
Same server, same flags, three tasks:
| task | decode |
|---|---|
| Three.js single-file HTML | **23.64 tok/s** |
| Chinese prose | 16.23 tok/s |
| English prose | 15.40 tok/s |
The ordering has the same explanation as the language gap. The next token in a block of code is far more predictable than the next token in a paragraph, so the draft head guesses right more often, and more of the work lands in verification instead of generation.
## Vision works, but you have to drop one flag
Vision needs a different build from the text one above. Unsloth's own PR branch carries both the model architecture and the vision projector, and that is the pair you want:
```bash
git clone -b glm5next/upstream https://github.com/unslothai/llama.cpp.git
cd llama.cpp && git checkout d07e71ede7
cmake --build build --target llama-server llama-mtmd-cli -j
```
Configuration took 4.87 s; the build took 136.19 s.
```bash
llama-server -m GLM-5.3-Flash-UD-Q2_K_XL-00001-of-00004.gguf \
-ngl 99 -c 32768 -ctk q8_0 -ctv q8_0 -fa on \
--jinja --mmproj mmproj-F16.gguf
```
**Note what is missing: there is no `--spec-type`.** That is a hard requirement, not a simplification for the example. With speculative decoding on, every image request returns HTTP 500. The deep dive below has the mechanism and the numbers from an experimental patch; the operational summary is that you pick vision or you pick speculation.
Ready in 97 s. I checked it in three layers, all HTTP 200, because "the server started" is not evidence that the vision path is wired up.
| layer | check | result |
|---|---|---|
| mechanism | `/v1/models` | `capabilities: ["completion","multimodal"]` |
| low bar | 64x64 solid red PNG, asked its color | `Red` |
| high bar | 1200x400 black-on-white text image | read back with Levenshtein distance **0** |
| not regressed | `The capital of France is` | `**Paris**`, `finish_reason: stop` |
The high bar was `THE SILVER ROBOT READS SEVEN BLUE MAPS.` transcribed exactly. One thing about that zero: the ground-truth file lived in a different run's directory, and a distance of 0 against the wrong image is a meaningless result that looks like a perfect one. I compared sha256 of both files before accepting it. Cross-run comparisons need a hash, not a matching filename.
Encoding the image into context cost 678 tokens at 193.94 tok/s.
To my knowledge nobody has published this measurement for GLM-5.3-Flash on a single Spark, which is most of why this section exists.
## It is the slowest of the four models on this box
Same machine, same English prose task:
| model | decode |
|---|---|
| Qwen3.8-Flash-Next IQ1_S | **32.27 tok/s** |
| DeepSeek-V4-Flash-0731 (vLLM sparkinfer) | 24.95 tok/s |
| Qwen3.8-Flash-Next Q4_K_XL | 23.38 tok/s |
| GLM-5.3-Flash Q2_K_XL | **15.50 tok/s** |
Last, by about half. These are different models at different quants, so read the table as order-of-magnitude context rather than a controlled head-to-head — what it establishes is that nothing about this model is a speed story.
Its value sits in the column I cannot benchmark: native multimodality, an architecture built for 1M context, and an MIT license. None of the three faster entries offers any of that.
For an outside reference point, an NVIDIA forum post reports **2x** Sparks running vLLM with NVFP4 at 19.58 tok/s on prose. This is one machine at 15.40 English and 16.23 Chinese, so roughly half the hardware for about 80% of the speed. Different engine, different quant format, so the comparison is loose, but it is the closest published number to what I ran.
I have deliberately not benchmarked against the 46.9 and 62.9 tok/s figures floating around the community, because none of the posts publish their prompt. One repo author put it well: a single-stream tok/s number without the prompt that produced it does not mean anything. Prompt length, output length and content all move this metric by more than the differences people are arguing about.
## Takeaways
A 121 GB machine runs a 320B model, and you do not have to drop to 1-bit to do it.
Four decisions carry the whole setup:
1. **`UD-Q2_K_XL`, not the officially recommended `UD-IQ3_XXS`** — that recommendation does not budget for the KV cache.
2. **CUDA toolkit 13.0 only**, with `-DCUDAToolkit_ROOT` and `-DCMAKE_CUDA_COMPILER` both set. Verify from cmake's own "Found CUDAToolkit" line.
3. **Start `-c` at 32768.** Load time is the same at 262144, and 1M takes the machine down without an error message.
4. **Drop `--spec-type` if you want vision.** They do not coexist today.
It is the slowest of the four models I run on this box at 15.5 tok/s. It is also the only one that sees images, the only one under MIT, and the only one with a 1M-context architecture — and its Chinese is faster than its English.
## Deep dive: why an image request returns HTTP 500 when `--spec-type` is on
You can skip this section — the recipe above stands without it. What follows is the debugging log: what I assumed at each step, what I did to test it, and where the assumption was wrong.
### The error names the draft context, not the vision path
**The problem.** With `--spec-type draft-mtp`, both image requests returned HTTP 500. The server survived — `/health` still answered `{"status":"ok"}` afterwards. The only difference between the working run and the failing one was that flag; everything else, including the image bytes, was identical.
**What I expected the fix to be.** That the model could not see the image, and that I had built the wrong branch or pointed at the wrong `mmproj`. A 500 on an image request reads like a broken vision path, and rebuilding was the obvious next move.
**What I did instead.** Read the server log before touching the build.
```
E decode: failed to initialize batch
E spec process: llama_decode(ctx_dft) head=0 failed rc=-1 (pos=36)
E srv decode: failed to process speculative batch
the last position stored in the memory module of the context (i.e. the KV cache)
for sequence 3 is X = 19
it is required that the sequence positions remain consecutive: Y = X + 1
```
**Result.** Every line names `ctx_dft` — the draft context — and the speculative batch. Nothing in it mentions the vision path. The numbers close the case: the target context is at position 36, the draft stopped at 19, and the 17-slot gap is exactly the span the image occupied. The image was processed correctly. What failed is that the draft never learned it happened.

**Where my expectation was wrong.** I mapped "image request fails" onto "image handling is broken", which is the same error as reading a symptom's location as its cause's location. The image and the draft are two subsystems that happen to touch the same position counter, and only one of them was misbehaving. A rebuild would have taken twenty minutes and changed nothing.
### Is this unimplemented, or a path that quietly does not take effect?
**The problem.** A 17-token hole in the draft KV means nobody is telling the draft that an image consumed those positions. Either the code to do that was never written, or it exists and does not fire.
**What I expected.** That it was never written. Vision plus speculative decoding is a narrow combination and "nobody got to it yet" is the base rate for this kind of gap.
**What I did.** Read the wiring in `tools/server/server-context.cpp` and `common/speculative.cpp`.
**Result.** The wiring is there. Images enter the main context as embeddings: `process_mtmd_chunk` calls `mtmd_helper_decode_image_chunk()`, and the position advance comes from `mtmd_input_chunk_get_n_tokens()`. That function takes a callback, and the callback calls `common_speculative_process`. So the draft is supposed to be told.
What varies is what the draft does when it is told. Four implementations run an independent draft KV, and they split two ways on a batch that carries an image:
- `draft_eagle3` returns true when `embd != nullptr`, skipping the batch and leaving the hole
- `draft_mtp` does the same, and carries a literal `// TODO: how to make it work with vision tokens?`
- `draft_dflash` and `draft_dspark` do not skip, but flatten M-RoPE's multi-dimensional positions into a single scalar
The five ngram-family `process()` functions are `// TODO: implement; return true` and structurally cannot reach this failure at all.
**Where my expectation was wrong.** I was asking "which speculative mode is broken", and that is the wrong axis. The discriminator is **whether the mode keeps its own draft KV cache**, and the source says so directly:
```cpp
add_config_if_enabled(..., params.draft.ctx_dft != nullptr);
```
That guard applies to exactly those four. Modes that share the target's KV (`is_mem_shared`, the Gemma-4 style arrangement) never see a position mismatch, because there is only one set of positions to be consistent with. This is also why the whole class of bug is absent in vLLM and SGLang: they let MTP assistant layers share the target's KV. Both have their own open issues about feeding multimodal input to a draft, so it is not that they solved something llama.cpp did not — it is that the dividing line is the engine's KV design, not the model.
### The upstream fix is one file, and I measured it rather than trusting it
**The problem.** [PR #25144](https://github.com/ggml-org/llama.cpp/pull/25144) fixes this. It is a small change — +16/-6 in a single file — giving the draft its own position space instead of reusing the target's. It has not been merged.
**What I expected.** That an unmerged one-file fix for a reproducible crash is probably fine and just needs someone to press the button, and that applying it locally would give me working vision plus speculation.
**What I did.** Read why it is being held, then applied it and measured.
ggerganov's position is that `llama_batch` should first be refactored to carry vision and target embeddings together, so the case can be supported properly across the board rather than patched at one site. Reading the diff, that holds: it fixes `draft_mtp` and touches neither `eagle3` nor `dflash`. The PR author had also measured two variants, which is the part worth stealing — merely relaxing the position check stops the crash but yields **0% acceptance**, because the hole is still there and a draft with a hole in it is useless. Renumbering is what actually makes the draft work.
`git apply --check` returned 0 and it applied cleanly. Three runs each:
| workload | draft_n | accepted | acceptance | median decode |
|---|---|---|---|---|
| prose | 1585 | 581 | 36.66% | 17.61 tok/s |
| image continuation | 1106 | 724 | **65.46%** | 21.52 tok/s |
**Result.** Images stopped returning 500, and the text path was not harmed — 36.66% acceptance on prose against 36.01% unpatched is the same number. On the surface this looks like a clean win, and the 21.52 tok/s on image continuation looks like a large one.
Then I read the logs. Across six long generations, `llama_decode[1] returned -1` appears **2,661 times**, while `head=0` failures appear **0** times. That string appears 0 times in the unpatched logs, so it is not pre-existing behavior I am now noticing. Head 0 works; every MTP head past the first is erroring. The 48.50% weighted acceptance the server reports in its timings is real telemetry, and it is being produced by a draft path that is partly failing and retrying at a rate nobody would choose to pay.
**Where my expectation was wrong.** I treated "small diff, reproducible bug, author measured it" as a proxy for "safe to run", and the maintainer's objection as procedural conservatism. The objection was about scope, and scope turned out to be the thing: patching one site in a shared mechanism leaves the other heads in a state the patch never considered. The verdict is that this is experimental evidence about where the boundary is, not a configuration to run.
**If you want vision, drop `--spec-type`. That is still the answer today.**
## Deep dive: two operational traps that each cost an hour
Neither of these is about this model in particular. Both are the kind of thing that produces a confident wrong conclusion.
### An empty `content` field is not the model failing the task
**The problem.** A code-generation request came back with `content` empty. At `max_tokens: 8192` it produced 28,851 characters of reasoning and nothing else. I raised it to 16384 and got 54,842 characters of reasoning and still nothing else.
**What I expected the fix to be.** That the budget was too small for the task, which is why I raised it the first time. When that failed, my next hypothesis was that a 2-bit quant of this model could not do code generation at all — and I was one step away from writing that down as a finding.
**What I did instead.** Looked at what was filling the budget rather than at the size of the budget. This model always thinks. Without an explicit `reasoning_effort`, it spends the entire allowance reasoning and never reaches the answer.
**Result.** `reasoning_effort: "low"` fixed it on the first try. The castle keep in the section above came out of the very next request.
**Where my expectation was wrong.** I read "no output" as "cannot do it", when the request had never gotten as far as attempting the task. Before concluding a model cannot do something, check that `content` is non-empty and that `finish_reason` is not `length`. Those two fields separate "failed the task" from "never started it", and I had both in the response the whole time.
### `llama-server --help` gets truncated when the GPU is busy
**The problem.** I grepped `--help` for a flag, did not find it, and concluded that this build did not support it.
**What I expected.** That `--help` is a static string dump and therefore trustworthy. It is the most boring output a program produces.
**What I did instead.** Nothing, at first — that is the trap. I acted on the absence. The check I should have run is whether the output was complete, and it was not: `llama-server` initializes CUDA before printing help, so when the GPU is loaded the output stops partway with no marker that anything is missing.
**Result.** The flag existed. The grep was scanning a truncated string.
**Where my expectation was wrong.** An empty grep result has two causes that look identical from where I was standing: the pattern is absent from the corpus, or the corpus is not what I think it is. Before asserting a flag does not exist, confirm the output is whole — compare the line count, or check that the known last line is present — or sidestep the initialization entirely:
```bash
CUDA_VISIBLE_DEVICES=-1 llama-server --help | grep -- --mmproj
```
### Environment
- **Machine**: one NVIDIA DGX Spark, GB10 (sm_121a), 121 GiB unified memory, aarch64 Linux, driver 580.159.03, CUDA toolkit 13.0.88
- **Text build**: `eauchs/llama.cpp`, commit `8a8d0bcc4d5fdf024c457526245bec4bc3a12adc` (fetch the SHA directly — the branch head has since diverged from it), target `llama-server`, 166.57 s
- **Vision build**: `git clone -b glm5next/upstream https://github.com/unslothai/llama.cpp.git`, commit `d07e71ede7`, targets `llama-server llama-mtmd-cli`, configure 4.87 s, build 136.19 s
- **Server**: `llama.cpp 0.3.0-dev (build 10677, commit 8a8d0bcc4)`, `CMAKE_CUDA_ARCHITECTURES=121a-real`
- **Model**: [unsloth/GLM-5.3-Flash-GGUF](https://huggingface.co/unsloth/GLM-5.3-Flash-GGUF), `UD-Q2_K_XL`, 4 shards, 108,720,071,427 bytes, plus `mmproj-F16.gguf` (1.13 GB)
- **Prose runs**: `max_tokens=1024`, `temperature=0`, `reasoning_effort="low"`, 3 runs per language, all `finish_reason: stop`, no samples excluded
---
Also in this series: [A 177B MoE at Full 262K Context on a DGX Spark](/en/blog/qwen4exp-dgx-spark-262k-no-tradeoff) · [284B at 2-bit: is it still usable?](/en/blog/dgx-spark-deepseek-v4-flash-284b-q2-quality)
---
# [Benchmark] A 177B MoE on Three Modded 2080 Tis: 23 tok/s at 128K, 77 on a File Edit
URL: https://ai-muninn.com/en/blog/qwen4exp-177b-three-2080ti
Date: 2026-08-28
Series: 改裝 2080 Ti 22G (Part 17)
Qwen3.8-Flash-Next is 176.94B parameters and it runs on three modded 2080 Ti 22G cards — 23.14 tok/s at 128K context, no tensor overrides. Turn on `--spec-type ngram-mod` and a file-edit task jumps from 22.09 to 77.56 tok/s, 3.51×, with 90.3% draft acceptance and byte-identical output. Prose gains 0.17%, which is nothing. It fits because only 10 of 512 experts fire per token and 51B of the weights are an n-gram table you gather from, not a matrix you multiply against. Caveat: the 1-bit quant is only 4.6% faster than the 4-bit one, so the smaller file buys you nothing.
A hardware store with 512 aisles is still a small shop to work in, as long as each job sends you down ten of them. And the fat parts catalogue behind the counter eats half the floor space without slowing anybody down, because nobody does arithmetic with a catalogue. You look things up in it.
That is the shape of Qwen3.8-Flash-Next. Here is the line llama.cpp prints when it loads:
> `model params = 176.94 B`
Three modded 2080 Tis have 66 GB of VRAM between them. Those two numbers look incompatible, and they are not, for reasons that are entirely visible in the file header.
This is Part 17 of the modded-2080-Ti series. [Part 12](/en/blog/why-4bit-isnt-faster-on-2080ti) established that on this card quantization buys VRAM and not time. [Part 14](/en/blog/qwen38-dual-2080ti-tensor-parallel) got two cards working together with tensor parallel, and [Part 16](/en/blog/nccl-2080ti-stub-library-fix) fixed the NCCL stub trap that made multi-card runs die on their first request. This part is the payoff: the biggest model I have put on this box, ten independent rounds of measurement, and one result I did not expect.
## What you need: three 22 GB cards, one PR, and one GGUF
The architecture is `qwen4exp`. Support arrived through [PR #27742](https://github.com/ggml-org/llama.cpp/pull/27742), which merged on 2026-08-27 — it was still open while I was measuring. Every number in this article comes from commit `6c5afc86a` of that branch, pinned before the merge.
```bash
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git fetch origin pull/27742/head:qwen4exp
git checkout 6c5afc86a
cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75
cmake --build build -j "$(nproc)"
```
`CMAKE_CUDA_ARCHITECTURES=75` is Turing, which is what a 2080 Ti is.
The box: 3× modded RTX 2080 Ti 22 GiB (66 GB VRAM total), EPYC 7402 24C/48T, 123 GB of system RAM. Weights from [unsloth/Qwen3.8-Flash-Next-GGUF](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF) — get the `UD-IQ4_XS` split, which is the one I recommend below.
## Why 177B fits: 10 experts of 512, and a 51B table you look things up in
Dump the GGUF header before you plan anything, because it answers the fit question by itself.
| key | value | what it means |
|---|---|---|
| `expert_count` / `expert_used_count` | 512 / 10 | ~6B parameters actually compute per token |
| `block_count` | 48 | 48 layers to place with `-ngl` |
| `ple.layers` | 1 | only 1 of 48 layers carries the n-gram table |
| `context_length` | 262144 | the trained ceiling, not the usable one |
The row to look at is the first one. Ten routed experts out of 512, plus one shared expert, means the model is 177B on disk and roughly 6B in the multiply.
The second thing to look at is `ple.layers = 1`. With `ple.ngram_size = 3` and `heads_per_ngram = 8`, that block is an n-gram lookup table, and a lookup table is not a weight matrix. The gather is sparse: the rows that come back do get projected and mixed into the hidden state, but what touches the math is those few rows, not the 51B behind them. Because it sits on exactly one layer, "looked up once per token" is literal rather than a figure of speech.
That splits the parameter count into three parts that behave completely differently:
```
176.94 B parameters in the GGUF
~125 B backbone: 48 layers × 512 experts, 10 fire per token
└─ ~6 B actually multiplied on any given token
~51 B n-gram table (ple.layers = 1): sparse gather, not a dense matmul
0 B MTP head: 4 B in the official model card, absent from this GGUF
```
The official model card says 125B with 6B activated, plus a 51B n-gram embedding and a 4B MTP head — 180B in total. MTP is a small extra head that guesses the next few tokens so the big model can check them in one pass. My GGUF says 176.94B. The missing 4B is that MTP head, dropped at conversion: I scanned all 1,224 tensors in the file and not one of them is a `nextn` tensor.
So 180B, 176.94B and "6B active" are all correct at the same time. They count different things, and only one of them predicts your speed.
That difference is also what decides where each part lands at runtime:

## The config to copy: 23.14 tok/s at 128K, and no `-ot` anywhere
This is what I run.
```bash
llama-server -m Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf \
--split-mode layer -np 1 --no-mmap -fa on -t 24 \
-ngl 46 -c 131072 -ctk q8_0 -ctv q8_0 \
--spec-type ngram-mod
```
Four of those flags are load-bearing. So is one that is not in the command at all — the first row below.
| flag | why it is set that way |
|---|---|
| no `-ot` / `--override-tensor` | zero tensor overrides at 32K, 128K and 262K |
| `-np 1` | the default opens four slots and roughly halves prefill |
| `-ctk q8_0 -ctv q8_0` | frees exactly enough VRAM for one more layer |
| `-ngl 46` | `-ngl 47` OOMs at startup here; walk yours down from the top |
Two of those need more than a table cell.
**The missing `-ot` surprised me.** All three operating points ran with no tensor overrides. On a 119B MoE last month I spent hours hand-placing expert tensors. Here `--split-mode layer` plus an `-ngl` number is the entire placement strategy, and at 32K all 48 layers go on the GPU.
**`-ctk q8_0 -ctv q8_0` buys a layer, not speed.** At 128K with an f16 KV cache the highest `-ngl` that loads is 45, which gives 22.66 tok/s. Switching the KV cache to 8 bits frees exactly enough VRAM for one more layer: `-ngl 46`, 23.14 tok/s. One layer, 2.1%.
On `-np 1`: prefill is the phase where the model reads your prompt before it writes anything, and four parallel slots split that budget four ways. If you are one person at one terminal, say so.
## 32K to 128K costs 11.5%. 128K to 262K costs 82.5%
Three operating points, each at the highest `-ngl` that actually loads. Look at the decode column and how it falls off a cliff between rows two and three.
| context | `-ngl` | KV cache | decode | VRAM used |
|---|---|---|---|---|
| 32,768 | 48 | f16 | **26.16 tok/s** | 62,720 MiB |
| 131,072 | 46 | q8_0 | **23.14 tok/s** | 61,942 MiB |
| 262,144 | 40 | q8_0, `-ub 512` | **4.05 tok/s** | 57,044 MiB |

Four times the context costs 11.5%. The next doubling costs 82.5%. The reason is in the `-ngl` column: 262K needs so much KV cache that eight layers get evicted to the CPU, and eight layers on an EPYC's RAM is what 4 tok/s looks like.
The 262K row still does real work. Its first prefill chewed through 255,125 tokens in 66.68 minutes — 63.77 tok/s. And the context is genuinely there: a needle test, which means hiding facts at known depths and asking for them back, put three distinct facts at roughly 10%, 50% and 90% depth. All three came back.
> 66.68 minutes to read the prompt, then 4.05 tok/s to answer it. The context works. Sitting in front of it does not.
If you want long context on this hardware, 128K is the operating point. That mirrors [what Part 3 found on a 27B](/en/blog/context-vs-vram-256k-oom-2080ti) at a totally different scale — including the failure mode, which shows up again below.
## `--spec-type ngram-mod`: 3.51× on a file edit, 0.17% on prose
This is the finding I did not see coming.
Speculative decoding normally means running a second, smaller model to draft tokens that the big model then verifies. `--spec-type ngram-mod` needs no second model at all. It drafts from repetition already present in your context: if a chunk of text is about to appear again, it guesses that chunk and lets the target model check it.
Two tasks, both cold, both at the recommended config. Look at the right-hand column.
| task | speculation off | speculation on | |
|---|---|---|---|
| prose generation | 22.98 tok/s | 23.02 tok/s | +0.17%, i.e. nothing |
| file edit | 22.09 tok/s | **77.56 tok/s** | **3.51×**, 90.3% accepted |
On prose, llama.cpp did not even emit a draft line. There was nothing to guess.
The file-edit task is deliberately the most ordinary thing an agent does all day: paste a 130-line Python file (upstream `conversion/llava.py`), ask for the whole file back with one class renamed. Almost every output token already exists in the input, so 90.3% of the drafted tokens survive verification.

**This is not a quality tradeoff.** Speculation here is exact — the target model verifies each drafted token, so a draft it would not have produced itself gets thrown away. I ran the speculative version three times and got three SHA256-identical outputs, and both diffs against the non-speculative run were empty.
Cite the cold number, 77.56, not a repeat. Repeats at 128K came in at 67.14 and then 65.42, as draft acceptance slid from 90.3% to 79.3%. The longer the context, the more candidate repetitions there are to guess wrong about.
## Three quants on one yardstick: the 1-bit is 4.6% faster than the 4-bit
Same binary, same flags, same 8,121-token prompt. `max ngl` is the highest layer count that loads.
| quant | size | max ngl | decode | prefill | context verified |
|---|---|---|---|---|---|
| UD-IQ1_S | 68 G | 48 | 26.74 tok/s | 533.08 tok/s | 262,144, needle 3/3 |
| UD-IQ4_XS | 88 G | 48 | 25.56 tok/s | 529.02 tok/s | 262,144, needle 3/3 |
| UD-Q4_K_XL | 104 G | 36 | 16.02 tok/s | 329.52 tok/s | 131,072, needle 3/3 |
Compare rows one and two. The 1-bit quant is 4.6% faster than the 4-bit quant, and that is the whole return on 20 GB of saved space. Both fit entirely in VRAM at `-ngl 48`, so once everything is already on the GPU, having more room left over does not make anything go faster. That is [Part 12's conclusion](/en/blog/why-4bit-isnt-faster-on-2080ti) — quantization buys VRAM, not time — holding at 177B.
Row three is where quant tier does matter, and it matters for one reason: 104 G does not fit in 66 GB. Only 36 of 48 layers land on the GPU, twelve run on the EPYC, and decode comes out 37% below the IQ4_XS row.
Row one used to have a blank cell. It is filled now: IQ1_S runs at 262,144 with `-ngl 44`, q8 KV and `-ub 512`, and answers all three needles at 255,207 tokens.
The blank came from my own client, not from the model. The 255K probe was killed by a 3,600-second timeout at 247,850 tokens, 97% of the way in. Raising the timeout to 10,800 seconds was the entire fix. The full prefill takes 64.27 minutes at 66.18 tok/s and decode at full context settles at 4.61 tok/s, so this is a proof that the context works rather than a setting to sit in. I did not try `ngl 43` or lower, so 44 is a value that works, not a measured ceiling.
Filling that cell also puts a boundary on the claim above. On an 8,121-token prompt the 1-bit quant is only 4.6% faster. At a full 262,144 it fits 44 layers and decodes at 4.61, while IQ4_XS fits 40 and decodes at 4.05 — **13.8% faster**. The 20 GB was always saved; it only converts into speed once context has made VRAM the scarce thing.
## The capability probe could not tell the three quants apart
I wrote seven questions designed to expose low-bit degradation, expecting the 1-bit quant to visibly fall over. All three quants scored 6/7. The probe cannot separate them, and reporting that is more useful than quietly dropping it.
The column worth looking at is the one where nothing varies.
| quant | score | the failure |
|---|---|---|
| UD-IQ1_S | 6/7 | Q6 |
| UD-IQ4_XS | 6/7 | Q6 |
| UD-Q4_K_XL | 6/7 | Q6 |
All three failed the same question, and the problem was my grading rubric, not the models. Q6 asked for code: the code compiled, passed every assert I wrote, and came in at 38 non-blank lines against a criterion that demanded 40 to 60. That is a length check I wrote badly, failing a correct answer three times.
What this does not tell you is that low-bit quantization is free. It tells you that seven questions of mine cannot detect the difference — a null result on a probe, not a finding about the model. The first version of this table did show a clean degradation curve, and it was an artifact of my own harness. That story is in the deep dive.
## A DGX Spark runs the same model. Single-stream decode is not faster
The DGX Spark is worth comparing because its 121 GB unified-memory pool sits at the opposite end of the design space: one pool, and no quant-tier-versus-context tradeoff at all. It runs the larger UD-Q4_K_XL, loads the full 262,144 context directly in 4m40s, and sits at roughly 104 GB resident.
| | 3× 2080 Ti, UD-IQ4_XS | DGX Spark GB10, UD-Q4_K_XL |
|---|---|---|
| prose, cold | 23.02 tok/s | 20.51 tok/s |
| file edit, cold | 77.56 tok/s | 76.65 tok/s |
| file edit, repeats | 67.14 / 65.42 | 88.02 / 78.74 |
| max context | 131,072 at this quant | 262,144, loaded directly |
The row that matters is the second one: 77.56 against 76.65 is a tie. Different quants and different prompt lengths sit behind these columns — the Spark's prefill of 366.19 tok/s was measured on an 18,092-token prompt against the 2080 Ti box's 8,121 — so treat the table as two boxes doing the same job, not as a controlled head-to-head.
What the Spark buys is the absence of a tradeoff. It holds 104 G of weights and a 262K context in the same pool, and I never had to choose. What it does not buy is single-stream decode speed. Three secondhand cards match it.
Two things on the Spark I cannot explain, and they are in the deep dive rather than hidden: it went unreachable for about three minutes during load, and one of its three file-edit outputs came back without its Markdown code fence — which speculation is not supposed to be able to do.
## Speed here depends on the task, not on the quant tier you picked
Line up the three big numbers from this box. The same model, the same cards, the same week.
| | decode |
|---|---|
| prose, 128K | 23.02 tok/s |
| file edit, speculation on | 77.56 tok/s |
| 262K, eight layers on the CPU | 4.05 tok/s |
That is a 19× spread with the weights never changing. Meanwhile the entire distance between a 1-bit quant and a 4-bit quant is 4.6%.
I spent most of a week picking quants, and the quant was the least important decision in the whole exercise. What the model is being asked to do — write prose, edit a file it can see, or reach across a quarter-million tokens — moves the number by an order of magnitude. Choose the operating point for the task first. The quant tier only starts mattering again at the moment it decides how many layers fit on the card.
## Deep dive: the two batches I threw away, and the full table
You can skip this section and still reproduce everything above. What follows is the measurement log and the complete dataset. What follows is the measurement log — the failures, the numbers I voided, and the full data at no row limit.
### The capability scores I published first were 3/7, 5/7, 4/7 — and every cell was invalid
The first capability batch produced a beautiful result. IQ1_S 3/7, IQ4_XS 5/7, Q4_K_XL 4/7 — degradation visible, monotonic in the direction I expected, exactly the story I had set out to tell.
I expected to spend the next hour writing that up. Instead I did the thing I do when a result agrees with me too well, which is open the raw responses before believing them. What I expected to find was ordinary wrong answers: a bad algorithm, a hallucinated API.
What I found was this, on cell after cell:
```
finish_reason = length
completion_tokens = 512
content_len = 0
```
The model had spent its entire token budget inside a thinking block and emitted zero characters of actual answer. My judge saw an empty string, called it wrong, and scored it FAIL. Every single one of those 21 cells was scoring "did not answer" as "answered incorrectly".
Three fixes, all of them to my harness:
1. `max_tokens` from 512 to 4096.
2. Thinking off through the request field, not the prompt: `"chat_template_kwargs": {"enable_thinking": false}`.
3. A three-state judge — PASS, FAIL, and **INVALID**, where INVALID is excluded from the denominator instead of counted as a failure.
After the rerun all 21 cells were valid, and the scores came out 6/7 across the board. The clean degradation curve evaporated.
My original expectation was wrong at a level below the one I was checking. I had assumed a wrong answer and a missing answer are different enough that I would notice, so I only ever validated the scoring rule. Both arrive at a judge as a string that is not the right answer. The distinction that matters — did the model answer badly, or did it never get to answer — lives in `finish_reason` and `completion_tokens`, and my harness was not looking at either. A judge with only two states cannot report "this cell is broken", so it silently reports "the model is bad" instead, and the shape it produces is a degradation curve.
**One useful takeaway.** `/no_think` in the prompt is not reliable on its own. The old batch still produced 221 characters of `reasoning_content` with it in place. With the request-level `enable_thinking: false`, all 21 requests came back with a reasoning length of exactly 0.
### `-ngl 45` at 262K reaches READY, answers, and then dies at token 83,968
At 262K I started from the top and walked `-ngl` down until the server loaded. It loaded at 45. It printed READY, answered short requests correctly, and looked completely healthy.
My expectation, and I want to be precise about it because it is the wrong one: I believed that if the KV cache is allocated at startup for the full declared context, then a server that reaches READY at `-c 262144` has already reserved everything it will ever need. Loading is the hard part; after that you are just doing arithmetic.
So I fed it the real 255K prompt. It died partway through:
```
CUDA1 needs another 1245.72 MiB
```
At token 83,968. Not at load, not at 262,144 — a third of the way in, needing 1.2 GB that nothing had reserved. Dropping to `-ngl 40` fixed it and cost 82.5% of decode, which is the 4.05 tok/s row.
The reflection is that "loads successfully" and "finishes the job" are different claims, and I keep having to relearn it. [Part 3 hit this exact shape](/en/blog/context-vs-vram-256k-oom-2080ti) on a 27B — max the context, watch it load, watch it crash a few turns into real use. I assumed that lesson was about that model, or about that generation of llama.cpp. It is about the sizing method. Any headroom you did not watch get consumed is headroom you have not proven exists.
Q4_K_XL does the same thing one notch up: `-ngl 37` reaches READY and then runtime-OOMs on long prompts. That is why the table above lists its max as 36.
### 88 G of weights, 62 GB of VRAM, and all 48 layers on the GPU

The IQ4_XS file is 88 G. The box has 66 GB of VRAM. I expected `-ngl 48` to fail immediately, and planned to spend the evening hand-placing expert tensors with `-ot` the way I did on the 119B.
It loaded. `-ngl 48` at 32K, all 48 layers on the GPU, 62,720 MiB resident across three cards. No overrides.
I did not chase this down tensor by tensor, so what follows is inference and I am labelling it as such: the gap between the 88 G on disk and the 62,720 MiB resident is roughly what a 51B table costs at this quant, and the header says that table lives on one layer. Plausible. Not confirmed.
What I got wrong was more basic than the mechanism. I was treating `-ngl 48` as "all the bytes are on the GPU" when it means "all 48 blocks are on the GPU", and I had just finished reading a header that told me one of those blocks is a lookup table rather than a stack of weight matrices. Layer count and file size measure different things in this architecture. I read the header, understood it, and then sized the run as if I had not.
### The first speed batch was measured on a build 11 commits behind, so I voided all of it
The first full speed sweep looked fine. Numbers in a plausible range, consistent across repeats, nothing anomalous.
Then I checked what I had actually built. The branch had moved 11 commits since my checkout, on an architecture whose support is still an open PR — which means those commits are exactly the ones fixing how this model runs.
I expected the rebuild to move things by a rounding error, keep the old numbers as a sanity check, and get on with it. Instead I threw the whole batch away without comparing, and reran everything on `6c5afc86a`. Every number in this article comes from that commit.
Looking back at that expectation: what would a comparison have been worth? My instinct was to diff old against new and report the delta as a finding. But the delta between two arbitrary points on a moving branch is not a property of anything — it is not the model, not the hardware, not even a release. It is the state of somebody's branch on a Tuesday. Voiding beats reporting when the independent variable is not a variable anyone can look up.
That is the same call I made on the capability batch. Both times the numbers were tooling artifacts, not properties of the thing under measurement.
### Short prompts gave me the opposite prefill conclusion, so both sets are void
Early rounds recorded prefill on whatever prompt was handy — 43 to 81 tokens. I treated those numbers as real and drew a conclusion about which configuration prefills faster.
Then a later round, on a proper 8,121-token prompt, ranked the configurations **the other way round**.
I expected short-prompt prefill to be noisy. Noise averages out and you top up repetitions until the spread closes. What I got was not noise. It was bias: at 43 tokens, fixed per-request overhead dominates, so I was ranking setup cost rather than throughput. Two conclusions pointing in opposite directions do not average into a weaker conclusion. They void each other.
The rule I now apply: prefill counts only on prompts of 8,000 tokens or more. In the context table above, that means **only the 262K row's prefill figure is trustworthy** — 63.77 tok/s on a 255,125-token prompt. I have left the other rows' prefill out of the table entirely rather than print numbers I would not defend. The quant comparison table's prefill column is fine, because that one was run on the 8,121-token prompt on purpose.
### Two anomalies on the DGX Spark I did not resolve
I am documenting both without an explanation, because a comparison that reports only the clean results is not much of a comparison.
**It vanished from the network for three minutes.** During the 4m40s model load, Tailscale and SSH were both unreachable for roughly three of those minutes. No reboot. No OOM kill in `dmesg`. The server was healthy afterwards and served every request I sent it. My working theory going in was memory pressure triggering a kill, and `dmesg` says otherwise, so I have a symptom and no cause.
**One output lost its code fence.** The third file-edit run came back without its Markdown code fence, so strict byte-identity failed on the Spark while the 2080 Ti box returned three identical SHA256s from the same task.
This one bothers me more than the network drop, because it should not be possible. Speculation is exact by construction — the target model verifies every drafted token, so the output is supposed to be indistinguishable from the non-speculative one. My expectation was that byte-identity is a property I could rely on and use as a correctness gate, and on one machine it held perfectly three times out of three. On the other it did not. I do not know whether the cause is sampling nondeterminism, something in the GB10 path, or the harness, and I did not isolate it. Until I do, byte-identity is evidence on this box and not a guarantee on all of them.
### Full context / ngl / KV table
Every operating point I loaded, including the ones that failed. Decode in tok/s, VRAM as the total across all three cards.
| context | `-ngl` | KV | decode | VRAM |
|---|---|---|---|---|
| 8,192 | 45 | f16 | 22.62 | 58,020 MiB |
| 8,192 | 45 | q8_0 | 22.41 | 57,910 MiB |
| 32,768 | 49 | f16 | OOM at startup | — |
| 32,768 | 48 | f16 | 26.16 | 62,720 MiB |
| 32,768 | 48 | q8_0 | 25.71 | 62,304 MiB |
| 131,072 | 47 | q8_0 | OOM at startup | — |
| 131,072 | 46 | q8_0 | **23.14** ← recommended | 61,942 MiB |
| 131,072 | 45 | f16 | 22.66 | — |
| 262,144 | 45 | q8_0 | OOM at token 83,968 | — |
| 262,144 | 40 | q8_0, `-ub 512` | 4.05 (prefill 63.77) | 57,044 MiB |
Three things this table shows that the three-row version above cannot.
Rows one and two: at 8K, q8_0 KV is very slightly *slower* than f16 — 22.41 against 22.62 — and saves only 110 MiB. At that depth the KV cache is small, so quantizing it saves nothing worth having and costs a little dequantization. The q8_0 recommendation is specific to deep context. Do not carry it down to short-context runs.
Rows seven and eight are the trade the recommendation rests on: `-ngl 46` with q8_0 KV beats `-ngl 45` with f16 KV, 23.14 against 22.66. Same context, one more layer on the GPU, 2.1%.
The `-ub 512` on the last row shrinks the physical batch llama.cpp prefills with, which lowers peak scratch VRAM. It is the difference between 262K loading at all and not.
### What I verified before each run
`--split-mode layer` on this box means NCCL is in the path, and NCCL on these cards has a specific trap: Ubuntu's packaged 2.22.3 is a stub under the CUDA 13 driver, and it fails in a way that masquerades as an out-of-memory error. [Part 16 covers that in full](/en/blog/nccl-2080ti-stub-library-fix).
Because a stub NCCL can turn a healthy configuration into a fake OOM, I checked per run rather than trusting the environment variable, by reading which library the process had actually mapped:
```bash
grep -o '/[^ ]*libnccl[^ ]*' /proc/"$(pgrep -x llama-server)"/maps | sort -u
```
Every run in this article resolved to the self-built 2.31.2. That trap already has its own article, so it does not appear anywhere in the data above — which is the point of checking.
---
**Also in this series**: [Part 16: Fixing NCCL's stub-library error](/en/blog/nccl-2080ti-stub-library-fix) · [Part 14: Two modded 2080 Tis reach 59.6 tok/s](/en/blog/qwen38-dual-2080ti-tensor-parallel) · [Part 12: Why your 4-bit quant isn't faster](/en/blog/why-4bit-isnt-faster-on-2080ti) · [Part 3: 256K loaded fine, then crashed in real use](/en/blog/context-vs-vram-256k-oom-2080ti)
---
# [Benchmark] A 177B MoE at Full 262K Context on a DGX Spark: 76.65 tok/s on a File Edit
URL: https://ai-muninn.com/en/blog/qwen4exp-dgx-spark-262k-no-tradeoff
Date: 2026-08-28
Series: DGX Spark (Part 43)
Qwen3.8-Flash-Next in UD-Q4_K_XL is 104 GiB. A DGX Spark holds all of it plus a 262,144-token context in one 121 GB pool, because 51B of the parameters are an n-gram lookup table that can live on the CPU. Load takes 4m40s. A file edit decodes at 76.65 tok/s with ngram speculation; prose at 20.51. Three modded 2080 Tis hit 77.56 on the same edit, so this box did not buy speed. It bought never having to trade quant tier against context. One cmake flag decides whether any of the output means anything.
In a studio apartment the dining table folds down over the bed. Nothing is broken. You just pay for every meal by putting away somewhere to sleep. Move into a place with a real kitchen and dinner does not cook faster — you stop rearranging furniture.
That is the whole difference I measured. On three modded RTX 2080 Ti 22G cards, 66 GB of VRAM total, every operating point for this model costs something. Want the better `UD-Q4_K_XL` quant? 104 GiB does not fit, only 36 of 48 layers land on the GPU, and decode drops from about 25 tok/s to **16.02**. Want the model's native 262,144 context? Layers fall from 48 to 40 and decode at full depth is **4.05 tok/s**. Every cell in that grid trades something away. I wrote that box up in [A 177B MoE on Three Modded 2080 Tis](/en/blog/qwen4exp-177b-three-2080ti).
> 3× 2080 Ti, 66 GB of VRAM: pick the quant tier or pick the context.
> DGX Spark, 121 GB in one pool: pick both.
This is Part 43 of the DGX Spark series. [Part 42](/en/blog/dgx-spark-bandwidth-ceiling-85-percent) measured this box's memory bandwidth ceiling and found single-stream decode already sitting at 85% of it. This part puts the largest model I have run on it into that same pool: GB10, 121 GB unified memory, 104 GiB of weights loading directly, 262,144 context opening directly. There is no tradeoff left to calculate.
## Why 104 GiB of weights fit in 121 GB of memory
104 against 121 sounds like it should not work, and it is not even close to tight. The reason is in what those parameters are.
Qwen3.8-Flash-Next reports 176.94B parameters. Of those, roughly 51B is an n-gram lookup table — a structure the model indexes into a few rows at a time, not a weight matrix it multiplies against. Every token pulls a handful of rows out of it. A sparse gather like that does not need to sit on the fast side of the machine, so it can be pinned to the CPU and paged from NVMe through mmap, and the GPU side has room left over.
Look at the last row. That number is the reason a quarter-million tokens is affordable here at all.
| what | where it lives | size |
|---|---|---|
| `per_layer_token_embd` (the 51B table) | CPU, paged from NVMe via mmap | — |
| the other 48 layers | GPU | — |
| dense K/V cache at 262,144 tokens | GPU | **~6 GiB** |
Six gibibytes for 262,144 tokens works out to about **24 KiB per token** of dense K/V, which is small enough to look like a typo next to a normal transformer. It is small because only 12 of the 48 layers use full attention. The other 36 use linear attention, which keeps a fixed-size running state instead of a per-token cache, so its memory does not grow as the conversation gets longer. Twelve layers of real KV plus thirty-six layers of constant state is why the dense K/V is that cheap.
It is not the whole bill, though. The same commit also allocates a QSA indexer cache for those twelve layers, roughly another 9 KiB per token. Add them and the allocation that actually grows with context is about 33 KiB per token — around **8.25 GiB** at 262,144. Still cheap for this much context. Just don't budget from the 6.

## The build: one cmake flag decides whether your output means anything
Support for `qwen4exp` arrived through [PR #27742](https://github.com/ggml-org/llama.cpp/pull/27742), which merged on 2026-08-27 — it was still open while I was measuring. Every number here comes from commit `6c5afc86a` of that branch, pinned before the merge.
```bash
git clone https://github.com/ggml-org/llama.cpp ~/llamacpp-qwen4exp
cd ~/llamacpp-qwen4exp
git fetch origin pull/27742/head:pr27742 && git checkout pr27742
cmake -B build -DGGML_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES=121 \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-13.0/bin/nvcc \
-DGGML_NATIVE=OFF -DLLAMA_CURL=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build --target llama-server -j 16
```
**`-DCMAKE_CUDA_COMPILER` cannot be omitted.** On this box `/usr/local/cuda` goes through alternatives and resolves to 13.2. Someone in the PR thread ran a clean A/B — same source, same cmake flags, same GGUF, only that one parameter different — and the 13.2 build produced deterministic garbage output without throwing an error, without tripping an assert, and with the server starting and answering normally. The same binary runs other architectures fine, so the binary is the last thing you would suspect. That A/B is not mine. I took the conclusion and avoided the version; I did not reproduce the broken build.
`-DGGML_NATIVE=OFF` is also required. Leave it on and the ggml-cpu ARM feature detection emits compiler flags that gcc rejects on Grace.
One more thing that will make you stare at your terminal: the same cmake configure prints *two* CUDA version numbers.
> `-- The CUDA compiler identification is NVIDIA 13.0.88`
> `-- Found CUDAToolkit: /usr/local/cuda/targets/sbsa-linux/include (found version "13.2.78")`
The first line is the compiler you are actually building with. The second is just the headers path CMake located. Do not read it as either a failure or a pass.
**Smoke-test the binary with a small GGUF you already have before downloading 104 GB.** I had `UD-IQ1_S` (68 G) on disk, so I loaded it and asked `The capital of France is`:
```
Paris. Given a list of countries and their capitals, answer the question...
```
That one check saved four hours. If you download first and only then find the binary emitting garbage, that time is gone and you have no way to tell a bad build from a bad download.
## The config to copy: 262,144 context, 4m40s to load
```bash
build/bin/llama-server \
-m Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \
--alias qwen38-flash-next \
-lm mmap -ot per_layer_token_embd=CPU \
-ngl 999 -c 262144 -np 1 \
--spec-type ngram-mod \
--temp 1.0 --top-p 0.95 --top-k 20 \
--host 127.0.0.1 --port 8199
```
Load takes about **4 minutes 40 seconds**, and steady state sits around **104 GB** resident.
Four of those flags carry weight:
- `-ot per_layer_token_embd=CPU` together with `-lm mmap` is what makes the memory layout above possible. Without them the 51B table goes where everything else goes, and the fit stops working.
- `-ngl 999` puts the rest on the GPU. There are 48 layers, so any number past 48 means all of them.
- `--spec-type ngram-mod` turns on speculation with no draft model — more on what that is worth below.
- **`-np 1` must be explicit.** More than one in-flight request hits an indexer cache assert in `qwen4exp.cpp` and the server aborts. This is a branch under review, not a shipped feature, and one slot is the supported configuration today.
## 76.65 tok/s on a file edit, 20.51 on prose: one number cannot describe this
Speculation makes a single throughput figure meaningless, so here are four. The number to quote is the second row.
| task | tok/s |
|---|---|
| prose, cold | 20.51 |
| **file edit, cold** | **76.65** |
| file edit, repeat 2 / 3 | 88.02 / 78.74 |
| prefill, 18,092-token prompt | 366.19 |
The spread comes from how ngram speculation works. It needs no draft model: it drafts the next few tokens from repetition already sitting in the context, and the model verifies them. Hand it a file and ask for one line changed, and nearly every output token already exists in the input, so the drafts land. Ask for prose and there is nothing to copy, so it drafts nothing and you get the base rate.
> A file edit is almost entirely repetition of its own input. Prose is none of it.
> That is the whole 20-to-77 spread.
Quote **76.65**, not the 88. Runs two and three are fast partly because ngram now recognizes my own previous answer sitting in the context. That is the speed of asking the same question twice, not the speed of the setting.
## What it can answer: 6/7 on a probe built to separate quant tiers
I keep a seven-question probe for exactly one job — telling quant tiers apart. Explain speculative decoding. Multi-step age reasoning. Write `merge_intervals`. Multi-step arithmetic with an exact output format. Three instruction constraints held at once. A program of 40 to 60 lines. Strict JSON.
`UD-Q4_K_XL` scored **6/7**. The single failure was the program-length question: the code compiled under `py_compile`, passed every assert I wrote, and came in at **38 non-blank lines** against a criterion demanding 40 to 60. That is my rubric being picky, not the model failing.
> **Caveat, and it matters.** Those seven questions ran on the **other** box — 3× 2080 Ti — against the same `UD-Q4_K_XL` weights and the same frozen criteria. Same weights, different machine. I did not re-run them on the Spark. Read the score as a property of the quant, not as a measurement of this hardware.
## DGX Spark vs 3× 2080 Ti: decode ties, the tradeoff does not
Same model, same week, two very different boxes. Look at row two.
| | DGX Spark | 3× 2080 Ti |
|---|---|---|
| quant it can run | UD-Q4_K_XL, 104 G | UD-IQ4_XS, 88 G |
| **file edit, cold** | **76.65 tok/s** | **77.56 tok/s** |
| cost of the 262K context | none | decode falls to 4.05 |
Decode is essentially tied. The much more expensive machine did not buy speed.
What it bought is row three. On the three-card box every extra context window and every step up in quant tier has to be paid for out of something else — layers move to the CPU, or the context has to shrink, or you take the smaller quant. Here neither costs anything, because there is one pool and everything is already in it.
That difference is invisible if you only ever run one kind of job. Pick a quant, pick a context, and both boxes give you roughly the same tokens per second. It shows up the moment you want a better quant *and* a whole codebase in context at the same time, which on the 2080 Ti box is the one combination you cannot have.

## Deep dive: a stalled download, a machine that vanished, and one output that changed
Skipping this section does not affect anything above — the recipe stands on its own. What follows is the debugging log: three problems, what I assumed each one was before I looked, and where those assumptions were wrong.
### Why was a 104 GiB download crawling at 74 KB/s?
**The problem.** `hf download` was pulling the four shards of `UD-Q4_K_XL` and the log's own estimate was around 74 KB/s. At that rate the download finishes some time next month.
**What I expected the fix to be.** My home uplink, or Hugging Face throttling me. Both are common causes of a slow download, and both have the same remedy: give up and retry off-peak. I was about to do that.
**What I did instead.** Ran a range request straight at the Hugging Face CDN as a control — same host, same file, none of the Python client in the path. It came back at about **4.30 MB/s**.
**Result.** Roughly 58× the rate the downloader was reporting, so the network was never the constraint. The culprit is the Xet transfer path in `huggingface_hub` 1.28.0 doing adaptive concurrency: I watched it walk itself down from 10 parallel streams to 1 and stay there. I kept the partial download, restarted with the Xet path disabled, and the three large shards came down over plain parallel HTTP:
```bash
HF_HUB_DISABLE_XET=1 hf download unsloth/Qwen3.8-Flash-Next-GGUF \
--include "*UD-Q4_K_XL*"
```
Total: **1:28:26**.
**Where my expectation was wrong.** I reached for "the network is slow" because that is the base rate — most slow downloads really are the network. What I skipped is that the base rate only applies when you have no way to check. Here checking cost one `curl` with a `Range` header and about thirty seconds. The general shape: when a suspect layer reports a number, **measure one path to the same destination that does not go through that layer**. If the two numbers agree the layer is innocent, and if they disagree you already know where to look.
### The box dropped off the network for three minutes mid-load
**The problem.** During the 262K load, SSH died. Then Tailscale stopped answering too. The machine was simply gone.
**What I expected the fix to be.** An OOM kill had taken the box down, and 104 GB of weights into a 121 GB pool was the obvious reason why. I was already composing the `dmesg` command to go read the postmortem and planning to back the context off to 131,072.
**What I did instead.** Waited. Roughly three minutes later Tailscale came back on its own.
**Result.** No reboot, and nothing had been killed:
```bash
dmesg -T | grep -iE 'oom|killed process' # no output
```
No OOM kill anywhere in `dmesg`. The server was healthy afterwards, the model had loaded fine, and the total load time was 4m40s — the blackout sat in the middle of it. Nothing needed fixing.
**Where my expectation was wrong.** I read "unreachable" as "dead," and those are different claims about different subsystems. What actually happened is that the network stack was not getting scheduled while the load saturated memory and I/O. A dropped connection is a symptom that a machine is busy; it is not evidence of a cause of death. This box has exactly one memory pool, and pulling 104 GB into it genuinely occupies the thing — including the parts of the kernel that would have answered my ping. The test that separates the two cases is cheap and I skipped it: if it were an OOM kill the process would be gone when the box came back, and it was not.
### The third identical request produced different output
**The problem.** I sent the same file-edit request three times to check that speculation was not altering results. Runs 1 and 2 had identical SHA256. Run 3 differed. Speculative decoding is not supposed to be able to do that — it verifies every drafted token against the model, so the text should be indistinguishable from an unspeculated run.
**What I expected the fix to be.** That speculation is not exact on this architecture, or that the qwen4exp branch has a verification bug. I had the llama.cpp speculation path open and was ready to go read how `ngram-mod` accepts drafts.
**What I did instead.** Read the diff first. There was exactly one difference: run 3 omitted the Markdown code fence — the three-backtick `python` opener and its closing line. The program body was byte-identical all three times.
**Result.** The server in the recipe above runs with `--temp 1.0 --top-p 0.95 --top-k 20`, and my requests did not override temperature. A fence token is exactly the kind of near-tied choice that stochastic sampling flips. This is sampling randomness, and there is no bug.
**Where my expectation was wrong.** I conflated two guarantees that sound alike.
> Speculation guarantees the distribution you sample from. The sampler still rolls the dice.
Identical text is a property of a deterministic sampler, not of exact speculation, and nothing hands it to you at temperature 1.0. I was about to spend an evening in the speculation code looking for a bug that my own sampler settings explain. Settling it properly needs temperature 0 or a fixed sampler seed, and I have not run that here. On the 2080 Ti box I did run the same model at `temperature=0` three times and got three identical SHA256s — that is the valid consistency evidence, and it is on the other machine.
### Environment
- **DGX Spark**: GB10, 121 GB unified memory, sm_121a, aarch64, driver 580.159.03
- **llama.cpp**: PR #27742 at commit `6c5afc86a`, built with CUDA 13.0.88, `-DCMAKE_CUDA_ARCHITECTURES=121` (CMake rewrites this to `121a` for this chip)
- **Model**: [unsloth/Qwen3.8-Flash-Next-GGUF](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF), `UD-Q4_K_XL`, four shards, about 104 GiB
- **Prefill prompt**: the API reported 18,134 prompt tokens, 42 of them cached, so 18,092 were actually evaluated — the 366.19 tok/s is over that evaluated count. My first candidate was only 5,680 tokens, which is too short to measure prefill with — fixed per-request overhead dominates and you end up ranking setup cost. Re-ran with an 18,134-token prompt; the 366.19 tok/s in the table is the 18,092 tokens llama.cpp timed on that run.
---
# [Benchmark] Qwen3.8-27B hits 65 tok/s on one DGX Spark — 12.3 without speculative decoding
URL: https://ai-muninn.com/en/blog/dgx-spark-bandwidth-ceiling-85-percent
Date: 2026-08-23
Series: DGX Spark (Part 42)
GB10 has 273 GB/s of memory bandwidth. Qwen3.8-27B NVFP4's language backbone is 18.77 GB, and every token reads all of it. That puts a hard ceiling at 14.54 tok/s. Measured without speculation: 12.32, or 85% of the ceiling. Two recommended optimizations came back empty — one was noise, one isn't supported on SM121. Speculative decoding is the only real lever: DFlash2 with a draft budget of 12 gives a median of 65.02 tok/s on coding (10 runs, 56.6–69.3), 5.28x the baseline. The jump from 53.89 to 65 wasn't a better method — my draft budget was just too small.
## The bottleneck is a doorway, not a workforce
You can hire ten movers, but the doorway is one person wide. Adding people doesn't help. You either make the furniture smaller or you carry more per trip.
This is part 42 of the **DGX Spark** series. [Part 19](/en/blog/dgx-spark-nvfp4-trap-gb10-fp8-wins) measured NVFP4 losing to FP8 and blamed the hardware. [Part 25](/en/blog/dgx-spark-nemotron-3-nano-w4a16-74-toks) fixed half of that, showing NVFP4 wins on bandwidth rather than on compute. This one closes the loop: **how much bandwidth is actually left, and where the rest of the speed lives**.
Almost none is left. And the speed lives somewhere I got wrong at first — someone had to ask before I found it.
## 273 ÷ 18.77 = 14.54: you can compute your ceiling before you benchmark anything
Every token an LLM emits requires reading the entire weight set from memory into the chip. Not part of it. All of it. That gives single-stream generation a hard physical ceiling:
> bandwidth ÷ bytes read per token = tokens per second
GB10 runs LPDDR5X at **273 GB/s** ([NVIDIA spec](https://www.nvidia.com/en-us/products/workstations/dgx-spark/)). The denominator needs care. [RadixArk/Qwen3.8-27B-NVFP4](https://huggingface.co/RadixArk/Qwen3.8-27B-NVFP4) is 20.42 GB on disk, but text-only chat never touches parts of it. Summing the safetensors headers tensor by tensor:
| Component | Size | Read every token? |
|---|---|---|
| Language backbone | **18.77 GB** | yes |
| Vision tower | 0.86 GB | only with images |
| MTP head | 0.79 GB | only with speculation on |
The denominator for text-only work is **18.77 GB**, not 20.42.
273 ÷ 18.77 = **14.54 tok/s**. That's the wall for this model on this box without speculation.

## Measured: 12.32 tok/s, or 85% of the ceiling
Running [SGLang](https://github.com/sgl-project/sglang) with a 262144 context, bf16 KV cache and `mem-fraction-static` at 0.90. Ten runs, each prompt carrying a unique prefix so the cache never engages:
| | |
|---|---|
| Median of 10 | **12.3162** |
| Min / max | 12.3022 / 12.3844 |
| Spread | **0.67%** |
Long-form prose and short chat came in at 12.42 and 12.33. All three workloads land within 1% of each other.
That flatness is itself the evidence. Compute-bound throughput moves when the work changes. This doesn't move at all, which means the clock is measuring one thing: how long it takes to drag 18.77 GB across the bus.
12.32 ÷ 14.54 = **about 85%**.
## I chased the remaining 15% down two paths and came back with nothing
What's left has to cover scheduling, sampling and framework overhead. But that's an argument, not a measurement, so I tested two candidates that both had outside evidence behind them. Both on the no-speculation baseline:
| Change | Why I tried it | Result |
|---|---|---|
| Pin the container to the ten Cortex-X925 big cores | [MiaAI-Lab](https://github.com/MiaAI-Lab/Qwen3.8-27B-SGLang-DGX-Spark) measured +2–7% | **Unmeasurable.** Effect +0.029% against 0.751% drift |
| Switch to the `flashinfer_cutedsl` backend | It's in SGLang's backend list | **Not supported.** Rejected at startup |
The second one failed cleanly:
```
mm_fp4 does not support backend 'cute-dsl' with capability 121
```
The first is more interesting. Not only was the effect far below the drift, **it changed sign between rounds** — +0.056% then −0.135%. That's what noise looks like. Effects don't do that.
So "you can't recover it by swapping kernels" is no longer something I derived. It's two attempts that came back empty.
## The only lever: get more tokens out of one weight read
Speculative decoding runs a small fast model ahead of the big one to guess the next several tokens, then has the big model **verify the whole batch in one pass**. Correct guesses are kept, wrong ones thrown away.
The trick is that verifying a batch and generating a single token cost the big model **the same weight read** — 18.77 GB either way. Guess well enough and one trip buys you several tokens.
This is where DGX Spark shines. Unified memory makes that verification pass nearly free. On a compute-constrained box, verification becomes the new bottleneck and the discount evaporates.

## Where 65 tok/s came from: not a better method, a bigger draft budget
I tested all three speculative decoders. DFlash2 won. But my first number was 53.89, not 65 — and the whole gap sits in one flag.
| DFlash2 draft budget | Coding decode | Acceptance length |
|---|---|---|
| 8 (recipe default) | 53.89 | 6.12 |
| **12** | **65.02** (10 runs, 56.6–69.3) | 7.48 |
| 16 | 69.21 | 8.13 |
Where did the 8 come from? **I copied someone else's recipe default.** Copying a default inherits their tuning, not their optimum.
The signal for whether there's room left is **saturation** — acceptance length divided by draft budget:
| Method | Acceptance length | Draft budget | Saturation | Reading |
|---|---|---|---|---|
| DFlash2 | 6.12 | 8 | 76.5% | nearly full, more budget might pay |
| MTP | 4.16 | 5 | **83.2%** | fullest of the three, budget-limited |
| DSpark | 4.68 | 8 | **58.6%** | guessing badly, more budget won't help |
Not acceptance rate. A high acceptance rate can just mean the budget is so small there's barely anything to get wrong.
### Five runs isn't enough to call a median here
I measured draft budget 12 twice. First time, five runs, median 68.57. Second time, fresh container, ten runs, median **65.02**, ranging 56.6 to 69.3.
**The five-run median landed on the high side.** Acceptance rate is bound to the content being generated, so this config's spread is wide by nature — 19.5% here, against 0.67% with no speculation. **When spread runs that wide, five runs won't pin a median.**
I was about to put 68 in this article's title. Someone asked me to reproduce it first. What's listed here is 65, plus the ratio against the no-speculation baseline from the same session: **5.28x**. Ratios survive thermal drift; absolute numbers don't.
## The same flag is a large win on code and a 12% loss on chat
Raising the draft budget isn't universally good. It depends on what you're generating:
| Workload | Draft budget 8 | Draft budget 16 | Change |
|---|---|---|---|
| Coding | 53.89 | 69.21 | large gain |
| Long prose | 28.14 | 28.07 | −0.25% |
| Short chat | 26.04 | 22.97 | **−11.8%** |
Acceptance rate again: the next token in a code block is easy to guess (73.1%), the next token in casual conversation isn't (28.1%). When guessing is hard, a bigger draft just means paying more verification cost and throwing more away.
So the recommendation splits by workload rather than shipping one global default:
| Workload | Use | Measured |
|---|---|---|
| **Coding** | DFlash2, `--speculative-num-draft-tokens 12` | **65.02** (10 runs, 56.6–69.3) |
| Long prose | DFlash2, budget 8 | 28.14 |
| Short chat | DFlash2, budget 8 | 26.04 |
| Restricted to the in-checkpoint MTP head | EAGLE, `steps 5 / topk 4 / draft 16` | 41.57 |
Next time you see someone post "DGX Spark does XX tok/s", the first question is **what they were generating**, not what flags they used.
## Speculative decoding changes your output — and that isn't speculative decoding's fault
I assumed this wasn't worth writing about. Checking it changed my mind.
Same prompt, `temperature=0`, fixed seed. The code that comes out with DFlash2 on is **not the same code** that comes out with it off. Both are valid implementations. The divergence starts at one capitalized letter inside a docstring and everything downstream follows from there.
My first guess was floating-point jitter. That turned out to be wrong: running either config three times gives byte-identical output every time. So these are two stable paths that disagree with each other.
The answer came from a control with **no speculative decoding anywhere in it** — same server, same request, once alone and once alongside a second concurrent request:
```
batch=1 39e462cb7494b66f...
batch=2, req A b660d8f884b9d35c...
batch=2, req B b660d8f884b9d35c...
```
**Going from one concurrent request to two changed the output**, and the two requests inside that batch agree with each other. Batching changes the reduction order inside the matmuls. Floating-point addition isn't associative, so a near-tied token flips.
So the speculative decoding difference is the same effect. **This isn't specific to speculative decoding** — anything that changes the batch shape can do it. But you should know it happens — particularly if you have tests that expect identical output from identical input.
## The config that produced these numbers
Single DGX Spark (GB10 / SM121 / aarch64 / 128 GB unified memory), driver 580.159.03, using [MiaAI-Lab's SGLang recipe](https://github.com/MiaAI-Lab/Qwen3.8-27B-SGLang-DGX-Spark) — the public setup I found that gets DFlash2 running on this box.
```bash
--mem-fraction-static 0.90 # not 0.95
--context-length 262144 # YaRN off
--kv-cache-dtype bf16 # not fp8
--fp4-gemm-backend flashinfer_cutlass # not auto
--speculative-algorithm DFLASH
--speculative-num-draft-tokens 12 # 12 for code, 8 for chat
```
0.95 plus a handful of concurrent requests will hard-reboot the machine. The bf16 KV cache has two independent reasons behind it: DFlash speculative decoding is fundamentally incompatible with *every* KV cache quantization — its draft path needs non-causal attention and the backends reject that combination outright, so the engine won't even start ([vLLM #41559](https://github.com/vllm-project/vllm/issues/41559)), and separately I measured fp8 KV driving output into infinite repetition back in March. And `auto` is out because this build of SGLang never rewrites it to whatever the autotuner picked, so you lose the audit trail.
One more thing that will make you doubt your own numbers: **a DFlash2 stream event carries about 3.75 tokens**. Count events and you'll compute roughly 9 tok/s and conclude something is broken. Divide `completion_tokens` by wall time instead.
---
## Deep dive: how these numbers were taken, and six things I got wrong
Skip this section and nothing above stops working. What follows is the measurement process, the places my reasoning failed, and every raw value.
### I expected a dense model to cash in the bandwidth savings. It didn't.
**Where I started**: every previous NVFP4 measurement on GB10 was on a MoE model, and MoE only lights up a few experts per token, so halving the weight width saves relatively little. Qwen3.8-27B is dense — every token reads everything.
**What I expected**: dense NVFP4 would clearly beat same-size FP8, maybe by 2x.
**What I did**: ran the config above across three workloads with speculation off.
**What happened**: about 12.4. [Reports of the same model in FP8 on the NVIDIA developer forum](https://forums.developer.nvidia.com/t/qwen3-8-27b-fp8-any-fools-out-there-messing-with-fp8/380443) sit around 15 to 20 — someone else's box and settings, not a control.
**Where my model was wrong**: I missed a layer. Halving the width does save bandwidth, but that saving only converts fully into speed when bandwidth is the sole bottleneck — and it already was, so the saving is **already inside the 12.4**. On top of that, the FP8 numbers I was comparing against came from someone else's box, engine and prompts. That's not a control group; it's two numbers with three variables between them.
### The 85% figure started life as 93%
**Where I started**: computing the ceiling, I took `du -sb` on the model directory and got 20.42 GB.
**What I expected**: model size is what gets read per token.
**What I did**: 273 ÷ 20.42 = 13.37, measured 12.44, published-in-my-head **93%**. Clean number. Nearly shipped it.
**What happened**: summing safetensors headers tensor by tensor turned up a 0.86 GB vision tower and a 0.79 GB MTP head, neither of which text-only chat reads a single byte from. The real denominator is 18.77 GB, ceiling 14.54.
**Where my model was wrong**: `du` is a derived number and I treated it as ground truth. A 1.65 GB error sounds small, but it moved "how much headroom is left" from 7% to about 15% — a factor of two. Those are different answers to "is this worth optimizing".
### Proving it isn't silently dequantizing: use bandwidth, not logs
**Where I started**: NVFP4 has a classic failure mode where the engine loads 4-bit weights but dequantizes back to BF16 on-chip before the math, so none of the bandwidth saving materializes. The file is 4-bit; the speed is BF16.
**What I expected**: grep the startup log for the kernel path.
**What I did**: grepped, found `fp4_gemm_runner_backend='flashinfer_cutlass'` and no `marlin` — the usual dequant fallback.
**What happened**: that evidence is too soft. A log printing a format name doesn't prove that path is executing. I've been fooled by exactly that string on another card. So I checked it against physics instead:
| Assumption | Bytes per token | Ceiling | Measured 12.32 is |
|---|---|---|---|
| Really reading 4-bit | 18.77 GB | 14.54 | 85% |
| Dequantizing to FP8 first | 37.5 GB | 7.28 | **169%** |
| Dequantizing to BF16 first | 75.1 GB | 3.64 | **338%** |
If it were secretly dequantizing, the measured speed would exceed a physical limit. It can't. The weights really are being read at their packed 4-bit width.
**Why this generalizes**: the method doesn't depend on the engine being honest about what it's doing. Any "is my quantization actually doing anything" question can be attacked this way first.
### Two easy wins, two dead ends
**Where I started**: 12.3 against a 14.54 ceiling left roughly 15% unaccounted for, and I wanted to know whether any of it was reachable.
**What I expected**: both candidates had outside evidence — big-core pinning was measured at +2–7% by someone else, and `flashinfer_cutedsl` is a listed backend that `auto` simply doesn't pick on this arch.
**What I did**: an A/B/A/B block design, two rounds of five runs per config, with cooldowns in between. Alternating blocks rather than running one config to completion means thermal drift hits both configs equally — **and the gap between the two rounds is a direct measurement of the drift itself**.
**What happened**: big-core pinning came in at +0.029% against 0.751% drift, with the sign flipping between rounds. `flashinfer_cutedsl` was rejected by a capability gate.
**Where my model was wrong**: I nearly skipped this experiment on the grounds that a 2–7% effect is smaller than my noise threshold. That reasoning was broken. My threshold was calibrated for comparing against other people's published numbers; **within one box and one session the variance is 0.4%**. "The effect is smaller than the noise" is a measurement design problem, and the fix is to reduce the noise, not to skip the measurement.
### The costly one: my draft budget was too small, and it took someone else asking
**Where I started**: the first round finished with DFlash2 at 53.89 winning every workload. Clean-looking result.
**What I expected**: each method uses its own recommended settings, fastest one wins.
**What I did**: gave MTP 5 draft tokens and gave DSpark and DFlash2 8 — the latter two copied from recipe defaults, the first one hardcoded by me. I even wrote an explicit instruction not to sweep that parameter, on the grounds that someone had measured larger budgets performing worse **on a different inference engine**.
**What happened**: after being asked "are you sure nothing's off here", I looked at acceptance length instead of acceptance rate. MTP's saturation was 83.2% — it was consuming 4.16 of the 5 tokens it was allowed, the highest of the three. **It was budget-limited, not accuracy-limited.** Rerunning with a bigger budget put DFlash2 well above where it had been.
**Where my model was wrong**: two errors stacked. The comparison itself was unfair — a 5-token method against 8-token methods. Worse, I used a parameter sweep from a different engine to **forbid an experiment on mine**. That conclusion was true in its own context. It was never evidence about my machine.
### The second costly one: five runs is not a headline number
**Where I started**: draft budget 12 measured 68.57 across five runs. I put it in the recommendation table and in a draft of this article's title.
**What I expected**: five runs is fine; every other config had a spread of 2–8%.
**What I did**: after being asked to confirm it, spun up a fresh container and ran ten.
**What happened**: median **65.02**, ranging 56.63 to 69.30, spread **19.5%**. The five-run median had landed on the high side of the distribution.
**Where my model was wrong**: I applied an average spread to a config that is unusually unstable. Speculative decoding's acceptance rate is coupled to the content being generated, so its jitter is an order of magnitude wider than the non-speculative case. **Above roughly 15% spread, five runs won't give you a stable median.** And this number was headed for a public title — better it collapses now than after publication.
### A model I proposed, then had to throw away
The first round's three data points fit a suspiciously tidy relationship:
```
decode ≈ k × baseline × acceptance_length, k between 0.69 and 0.74
```
I wrote it into the second round's plan as an **explicit hypothesis under test**, requiring every new config to report its k. Results:
| Config | k | In band? |
|---|---|---|
| DFlash2 draft 12 | 0.700 | yes |
| DFlash2 draft 16 | 0.685 | marginal |
| MTP steps7/topk1/draft8 | **0.576** | no |
| MTP steps5/topk4/draft16 | **0.610** | no |
**Falsified.** Acceptance length alone doesn't predict throughput — a linear chain draft and a tree draft have different proposal costs, and one coefficient can't carry both.
It's here because of what it demonstrates: **an estimate's legitimate job is to design an experiment, not to cancel one.** It got falsified, and the falsification is one of this round's results.
### One gotcha that will send you the wrong direction
Wanting to pin the FP4 backend explicitly, I added a `--fp4-gemm-runner-backend` flag. The container exited with code 2 immediately, and the launch script's readiness check had no idea — it kept curling a port that had never opened until it timed out on its own. I spent eight minutes convinced the server wouldn't start. The actual message was in the container log:
```
sglang serve: error: unrecognized arguments: --fp4-gemm-runner-backend flashinfer_cutedsl
```
The field is `fp4_gemm_runner_backend` in the server args, but the CLI doesn't accept the dashed spelling.
**"Bad flag" and "server won't start" are indistinguishable at the readiness-check layer** — both are connection refused — and the information that separates them lives in a different file. Readiness checks should confirm the thing being checked is still alive before they start waiting for it to get healthy.
### Every raw value
Every response had `cached_tokens` at 0, confirming the prefix cache never engaged. Throughput is always `completion_tokens` divided by wall time, never stream events. Output length was pinned at 520 tokens per run (`finish_reason` was `length` every time), so the only variable is elapsed time.
⚠️ **The cells marked as 5 runs are weaker evidence than the two marked 10.** See the section on spread above — flagging it rather than presenting them as equal.
**Round one: three methods, each on its own default budget (5 runs each)**
| Method | Coding | Long prose | Short chat |
|---|---|---|---|
| No speculation | 12.44 | 12.42 | 12.33 |
| MTP n=5 | 35.71 / 79.2% | 24.42 / 45.8% | 21.11 / 37.5% |
| DSpark budget 8 | 42.88 / 52.8% | 19.36 / 15.5% | 17.64 / 13.4% |
| DFlash2 budget 8 | 53.89 / 73.1% | 28.14 / 30.1% | 26.04 / 28.1% |
**Round two: fair comparison and parameter sweep (coding only, bracket design `REF→M1→M2→M3→D1→D2→REF`, drift 1.307%, 5 runs each)**
| Cell | Parameters | Decode | Acceptance rate | Acceptance length | Saturation |
|---|---|---|---|---|---|
| REF_A | MTP steps4/topk1/draft5 | 35.70 | 79.40% | 4.16 | 83.2% |
| M1 | MTP steps7/topk1/draft8 | 38.80 | 63.10% | 5.42 | 67.7% |
| M2 | MTP steps4/topk4/draft8 | 38.58 | 51.45% | 4.60 | 57.5% |
| M3 | MTP steps5/topk4/draft16 | 41.57 | 29.75% | 5.47 | 34.2% |
| D1 | DFlash2 draft12 | 68.57 | 62.95% | 7.88 | 65.7% |
| D2 | DFlash2 draft16 | 69.21 | 47.40% | 8.13 | 50.8% |
| REF_B | MTP steps4/topk1/draft5 | 36.17 | 79.64% | 4.19 | 83.9% |
**Round three: independent reproduction (fresh container, 10 runs each)**
| Config | Ten raw values | Median | Range | Spread |
|---|---|---|---|---|
| No speculation | 12.32 / 12.38 / 12.33 / 12.34 / 12.31 / 12.30 / 12.34 / 12.31 / 12.31 / 12.31 | **12.3162** | 12.302–12.384 | 0.67% |
| DFlash2 draft12 | 56.63 / 63.76 / 68.46 / 68.17 / 66.68 / 62.98 / 64.56 / 65.48 / 63.47 / 69.30 | **65.0181** | 56.63–69.30 | **19.5%** |
Ratio: 65.0181 ÷ 12.3162 = **5.28x**.
### A correction to part 19
In [part 19](/en/blog/dgx-spark-nvfp4-trap-gb10-fp8-wins) I wrote this:
> This is a silicon-level limitation. No driver update, no firmware flash, no software patch can add a missing transistor circuit.
**That sentence is wrong.** [Part 25](/en/blog/dgx-spark-nemotron-3-nano-w4a16-74-toks) already corrected half of it by showing `mma.kind::mxf4nvf4` really does fire on the W4A4 path. The bandwidth arithmetic in this article corrects the other half — the weights genuinely are read at 4-bit width, so the silicon is not missing that capability. What part 19 measured was the software layer picking the wrong kernel path.
I've left part 19 as written and added an update notice at the top instead. The reasoning that went wrong is more useful preserved than quietly corrected.
## Takeaways
**Where the time went**: those eight minutes where the server looked hung. A bad flag and a server that won't start look identical at the readiness-check layer, and what tells them apart lives in a different file.
**Reusable diagnostics**, three of them. Bandwidth back-calculation: to find out whether your quantization is doing anything, compare measured throughput against the physical ceiling under each hypothesis and discard whatever exceeds it. Saturation: to find out whether speculative decoding has room left, divide acceptance length by draft budget rather than reading acceptance rate. And the batch=1 versus batch=2 control: to determine whether some feature causes a difference, **find a setup with none of that feature in it that reproduces the same difference**.
What stays with me isn't the multiplier. It's where it was hiding. I used somebody else's finding to forbid a measurement I should have taken, then used a five-run median as a number fit for a headline. Both times I had a reasonable-sounding excuse to skip one observation. Both times it took one question from someone else to surface it.
---
# [Benchmark] MiniMax-H3 1080p Isn't Unsupported, It's Three and a Half Hours
URL: https://ai-muninn.com/en/blog/minimax-h3-rtx5090-character-lock
Date: 2026-08-23
Series: MiniMax-H3 on RTX 5090 (Part 3)
First time using MiniMax-H3 for a scene with named characters, and I got three things wrong in one afternoon. A 1080p request came back 502 — I assumed the shim rejected the resolution; the backend had accepted it and was still rendering **three and a half hours later**. A wide shot came out with a blurry face — upscaling only enlarges blur, so I reshot as a close-up. And a prompt describing "greying temples, coarse robes" — the character's canonical look — produced the wrong person, because text has no way to say **this trait belongs to this face**. Fix: reference portraits from a still-image model, then text-to-video → reference-to-video.
## A 502 that wasn't a rejection, blur that upscaling can't undo, and a prompt that described a face instead of naming one
[Part 1](/en/blog/minimax-h3-nvfp4-rtx5090) of this series got MiniMax-H3 running on one RTX 5090. [Part 2](/en/blog/minimax-h3-rtx5090-speedup-vsr) made it faster. Neither one put an actual character in front of the camera. This part does: a reunion scene between Yang Guo and Xiaolongnü, two leads from the wuxia novel *The Return of the Condor Heroes*.
Three things went wrong. Each time, I fixed the wrong thing first, because the symptom showed up somewhere other than the cause.
I'm generating through a shim in front of ComfyUI — a small translation layer that takes a plain HTTP request and turns it into the node graph ComfyUI actually runs. ComfyUI's own interface is a node graph you edit in a browser, not something you can `curl`, so a script that wants to drive it needs something in between. My shim takes OpenAI-style JSON in and speaks ComfyUI's graph format to the backend.
## Finding 1: the 502 was the shim giving up, not the backend saying no
I built this pipeline around generating at a resolution where time and quality are both acceptable, then handing the result to VSR to enlarge. That's what Part 2 is about. So "render small, upscale after" wasn't a workaround I discovered here — it was the premise.
What I had never done is measure what skipping it costs. So I sent a 1920×1080 request. It came back **502** after a few minutes. I sent 1280×720. Also **502**. Two data points, same error, obvious conclusion: this pipeline only accepts the native 864×480 resolution and rejects anything larger.
That conclusion was wrong, and I only found out by going and checking ComfyUI's own `/history` on the backend after the fact. Every one of those requests had reached the backend, been accepted, and produced an output file. Nothing was rejected. The 502 comes from the shim's own polling loop — it waits up to a fixed timeout (`video_history_timeout`, 300 seconds by default, overridable by an environment variable) for the job to show up as finished, and when that timer runs out it throws in the towel and returns 502 to the caller. **The backend doesn't know or care.** It keeps rendering in the background regardless of what the shim just told me.
So the 1080p request really did take longer than any reasonable timeout — 12,599 seconds, which is three and a half hours, against a 300-second budget. The 502 there is accurate in spirit even if the message is wrong: this is going to time out. But the two 720p attempts took 239 and 229 seconds. Both are under 300. Both should have returned 200. I don't have a clean record of what actually happened on the wire for those two — most likely I generalized from the 1080p failure and assumed the same error applied, without separately confirming it. That's a gap in my own logging, not a fact about the system.
So the original design holds — it just has a number behind it now. Render at native resolution and upscale afterward, not because the model refuses larger sizes, but because asking it to render 1080p directly costs three and a half hours and the upscale costs seconds. The rough rule I use is to generate at about half the target dimensions and enlarge from there. (The backend's VSR pass already does a 2x enlargement; the `ffmpeg` line below only takes that 1728x960 result the rest of the way to an exact 1920×1080.)
That only works under one condition, and the next section is where it fails. VSR does invent detail — Part 2 covered that; the texture you see after the upscale wasn't in the source frames. What it invents is plausible texture. What it can't recover is **information the source never resolved**.
So the dividing line isn't subject matter, it's whether the thing you care about got enough pixels in the source. Mist in the valley, fabric in motion, texture on a cliff face — the source has the shape, and the upscale just sharpens it. A face occupying a few dozen pixels never had its features resolved at all, so VSR gives you something face-shaped rather than that specific person's face.
```bash
ffmpeg -i in.mp4 -vf "scale=1920:1080:flags=lanczos" out.mp4
```
## Finding 2: a blurry face at 480p isn't something the upscaler can rescue
The opening wide shot rendered fine and fast — 105 seconds at 864×480, the model's native resolution — but the faces were mush. I expected the output-side upscale (the pipeline runs a 2x video super-resolution pass, VSR for short, before delivering anything) to sharpen that up. It didn't, and thinking about it for five seconds explains why: VSR sharpens detail that exists; it can't invent detail that was never rendered. A face standing at the bottom of an 864×480 frame gets maybe a few dozen pixels across the eyes. There's no information there to recover — upscaling a blurry region just makes a bigger blurry region.
The fix is framing, not another parameter. I reshot the same scene as a close-up instead of a wide shot, so the face occupies far more of the 864×480 canvas to begin with. 98.5 seconds, and the face came out clean. Character work at this native resolution has a strict framing requirement: push the camera in before you touch any setting.
## Finding 3: describing a look is not the same as naming a face
This is the one that took the longest to see, because my prompt wasn't vague. I wrote "greying temples at the sideburns, coarse cloth robes" — which, in the source novel, is exactly this character's canonical appearance. I assumed that description would identify him.
It didn't. The model read those words as literal age and condition descriptors and, entirely reasonably, drew a white-haired man in rough clothing who looked about sixty. It isn't that the model doesn't have some notion of who this character is — a lot of text-to-video models have seen plenty of text about famous wuxia characters during training. It's that a text prompt contains no mechanism for tagging a trait as belonging to one specific face rather than describing a type of person in general. "Greying temples" doesn't point at a person; it points at a category, and the model drew the category.
Adjectives don't add up to an identity. The fix was to stop trying to describe a face into existence and instead show one. I generated two static reference portraits with z-image — a still-image model, which only has to draw one clean face and doesn't need to handle motion or camera work — and switched the video generation from **t2v** (text-to-video, generate from a prompt alone) to **r2v** (reference-to-video, generate conditioned on one or more reference images). I passed both portraits in an `images` array. The render took 121.4 seconds, and the character finally looked like the right person.


That gave me a clean division of labor: static faces go to a still-image model, motion goes to H3. Trying to make one model do both, at least for a face you actually need to be a specific person, doesn't work at this resolution with a text prompt alone.
## Deep dive
Skip this section if you only wanted the three findings above. This section has the full run table, the sampler settings held constant across all six generations, one performance difference I deliberately don't attribute, and the remaining gaps in the data.
### Don't over-index on the 16-second difference
The final r2v run (121.4 s) was 16 seconds slower than the opening t2v run (105 s). It would be easy to write that off as "reference images cost 16 seconds." **I'm not making that claim, and you shouldn't infer it from this post either.** The r2v path loads a different weights file (`ref2va_pruned_nvfp4` instead of `fl2va_pruned_nvfp4`) and a different text encoder than t2v does. Alternating between the two checkpoints in the same session forces an unload-and-reload of well over ten gigabytes of weights. Some portion of those 16 seconds is genuinely the cost of processing two reference images; some portion is model-swap overhead from testing t2v and r2v back to back. I never isolated the two, so I'm reporting this as an open question, not a finding.
### The full run table
All six generations below share the same sampler configuration: sampler `res_multistep`, scheduler `simple`, 14 steps, denoise 1.0, noise seed 42, blend weight 0.5, degree 4, ridge lambda 0.1, window size 2.0, flex window 0.75, warmup steps 5, tail actual steps 1, max history 8. Every clip is 158 frames at 24 fps, which is 6.58 seconds of output before any resizing. `cfg` (classifier-free guidance scale) is not listed because it's a linked input in the `BasicGuider` node and the backend doesn't persist its value anywhere I can retrieve after the fact.
| Run | Size | Backend time | Weights | Reference images |
|---|---|---|---|---|
| Opening wide shot | 864×480 | 105 s | `fl2va_pruned_nvfp4` | none |
| 1080p attempt | 1920×1080 | 12,599 s | `fl2va_pruned_nvfp4` | none |

| 720p attempt 1 | 1280×720 | 239 s | `fl2va_pruned_nvfp4` | none |
| 720p attempt 2 | 1280×720 | 229 s | `fl2va_pruned_nvfp4` | none |
| Close-up rework | 864×480 | 98.5 s | `fl2va_pruned_nvfp4` | none |
| Final r2v | 864×480 | 121.4 s | `ref2va_pruned_nvfp4` | 2 |
Pixel count relative to the native 864×480 canvas: 720p is 2.2x the pixels, 1080p is 5.0x. Backend time scaled very differently: 720p came in at roughly 2.2-2.3x the native time — close to linear with pixel count — while 1080p was **120x**, wildly out of proportion to a 5x pixel increase. Something other than raw pixel count is driving that 1080p number, and I don't have an isolated measurement of what. One terminology note: the 864×480 run was delivered at 1728x960, because the backend applies a 2x VSR upscale on the way out. Throughout this article "native resolution" means the model's input resolution, not the size of the file you get back.
### Known gaps in the data
- **`cfg` value**: unrecoverable. It's a linked `BasicGuider` input and the backend's `/history` doesn't store it.
- **Output filenames**: `/history` stores the prompt definition that was submitted, not the filename the render eventually produced.
- **Output resolution**: `/history` only records the 864×480 input size for each job. The 2x VSR upscale happens further down the backend pipeline and leaves no trace in that history — I know it happened because the delivered file's dimensions don't match the input, not because anything logged it.
- **Step count discrepancy**: my own earlier notes on this pipeline say the r2v path runs 20 steps. All six runs pulled from the backend for this post show 14. I can't reconcile the two records: either my notes describe an older shim configuration, or the shim's default step count changed after I wrote them. Unresolved.
- **720p 502s**: as noted above, I don't have direct confirmation that both 239 s and 229 s runs actually returned a clean 200. I'm inferring it from the fact that both durations are under the 300 s timeout, not from a captured response.
## The pattern across all three
Every mistake here had the same shape: I fixed something at the location where the symptom showed up, instead of the location where the cause actually lived. The 502 showed up at the shim, so I assumed the limit was in the shim — it was actually a timeout racing an unrelated backend job that was never going to fail on its own. The blur showed up in the delivered frame, so I reached for the delivery-side fix (upscaling) — the missing information was baked in three steps earlier, at generation time, by the framing. The wrong face showed up in the video output, so I kept rewriting the video prompt — the actual gap was upstream of video generation entirely, in the fact that text has no slot for "this exact face" and a reference image does.
None of these were hard problems once I looked in the right place. All three cost real time because the right place wasn't the place making the noise.
---
Built on [ComfyUI](https://github.com/Comfy-Org/ComfyUI). Resolution upscaling in this post uses [FFmpeg](https://ffmpeg.org/).
---
# [Benchmark] Fixing NCCL's Stub-Library Error Cut PCIe Traffic 99% and Barely Moved Speed
URL: https://ai-muninn.com/en/blog/nccl-2080ti-stub-library-fix
Date: 2026-08-23
Series: 改裝 2080 Ti 22G (Part 16)
Ubuntu Questing's `libnccl2` 2.22.3 links, loads a model, and then dies on the first real request against a CUDA 13.0 driver: `Cuda failure 'CUDA driver is a stub library'`. Building NCCL v2.31.2 from source with `sm_75` gencode fixes it, with no llama.cpp rebuild. The result is the interesting part. PCIe traffic per card fell from 1,286 MB/s to 15 MB/s, a 99% drop — and code generation went from 55.65 to 56.24 tok/s, which is a tie. Prefill gained 14.6%, and time to first token at 20K context gained 13%. The bus was never the bottleneck.
A new bridge opens and the ten-mile detour you have been driving for a year disappears. Your commute gets a minute shorter. The miles were never what made it slow — it was the twelve traffic lights, and the bridge removed none of them.
This is Part 16 of the modded-2080-Ti series. [Part 14](/en/blog/qwen38-dual-2080ti-tensor-parallel) got two 22GB cards to 59.632 tok/s on Qwen3.8-27B with llama.cpp tensor parallel, and in its FAQ I wrote that NCCL was a no-go on this machine. That sentence was wrong. I had issued a verdict without ever capturing an error message, and this article is the correction. [Part 15](/en/blog/pcie-allreduce-dual-2080ti) then measured how much PCIe bandwidth the AllReduce eats — an AllReduce being the step where two GPUs combine their partial results back into one answer, which happens constantly once you split a model's math across cards. Every number in Part 15 was measured on the fallback path, because of the failure in this article.
So this part fixes it. And the honest headline is that fixing it barely helped, which turned out to be more useful than a win.
## The symptom looks like "old GPU not supported," and it isn't
This is the trap, and I fell in it. `libnccl2` installs from apt. CMake finds it. `ldd` on `llama-server` resolves `libnccl.so.2` cleanly. The server starts, the model loads, the log looks completely normal. Then the first real request kills the process.
Nothing in that sequence points at a version mismatch. It points at "this five-year-old GPU generation isn't supported anymore," which is exactly the conclusion I jumped to in Part 14.
To see the failure without llama.cpp's 40 layers of machinery on top of it, I wrote a 40-line C program: initialize a communicator across both cards, run one fp32 AllReduce, run one bf16 AllReduce. That is the entire probe.
```
== [1] ncclCommInitAll ==
init OK
== [2] AllReduce fp32 ==
!! NCCL FAIL -> unhandled cuda error
```
Init succeeds. The first collective fails. That boundary is the whole diagnosis in one line: `ncclCommInitAll` is mostly host-side setup — topology discovery, allocating buffers, opening peer handles — while the first collective is the first moment a kernel actually has to launch on the GPU. Something between those two points is broken, and it is not the GPU's ability to hold the communicator.
Turning on NCCL's own logging gives the line that names it:
```bash
NCCL_DEBUG=INFO ./nccl_probe
```
```
misc/strongstream.cc:60 NCCL WARN Cuda failure 'CUDA driver is a stub library'
```
## What's established: Ubuntu's NCCL 2.22.3 doesn't match a CUDA 13 driver
`CUDA_ERROR_STUB_LIBRARY` is a real error code — 34. The CUDA toolkit ships `stubs/libcuda.so`, a fake library that exists so you can link CUDA programs on a build machine that has no GPU driver installed. Its functions are a few bytes each and they return exactly this code. So the error is telling us something specific: a real stub entry point got called.
So my first instinct was that the stub had ended up on the library search path. It hadn't. The symlink chain is exactly right:
```
libcuda.so -> libcuda.so.1 -> libcuda.so.580.173.02 (96 MB, the real driver)
```
The stub is 70 KB and sits in a toolkit directory nothing in this process looks at. `libnccl.so.2` has no RUNPATH pointing at it either. And the driver works: `cuInit(0)` returns 0, `cuDriverGetVersion` returns 13000, `cuDeviceGetCount` sees all three cards in the box.
So this is where the chain breaks. A stub entry point was called, no stub is on any path this process reads, and **I could not work out how NCCL got there.** I don't have a root cause to give you, only a boundary: on this box the pairing below is broken, and a self-built newer NCCL isn't.
| | |
|---|---|
| driver | 580.173.02 — a **CUDA 13.0** driver |
| NCCL from apt | `libnccl2` **2.22.3** — a CUDA 12-era package |
An earlier draft of this section did explain the mechanism. It said that since CUDA 12, `cuGetProcAddress` hands back a callable stub pointer for symbols the loaded driver doesn't have, and that calling one gives you error 34. Fact-checking killed it: NVIDIA documents a missing symbol as returning `CUDA_SUCCESS` with a null `pfn` and `CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND` — no callable stub anywhere in it. I had invented a mechanism to make the story close, which is the exact failure this article is about, so it's staying out.
The package version is release-specific: 2.22.3 is what Ubuntu Questing offers, and there is nothing newer in the archive for it. Noble is on 2.18.5. Either way, the route forward is building NCCL from source.
## The fix: build NCCL 2.31.2 with sm_75 gencode
Nothing exotic. Clone [NVIDIA/nccl](https://github.com/NVIDIA/nccl), check out a current tag, build for your architecture, install to your home directory.
```bash
git clone https://github.com/NVIDIA/nccl /home/you/nccl-src
cd /home/you/nccl-src
git checkout v2.31.2-1
export CUDA_HOME=/usr # see trap 2
make -j 16 src.build \
NVCC_GENCODE="-gencode=arch=compute_75,code=sm_75" \
PREFIX=/home/you/nccl-install
make src.install \
NVCC_GENCODE="-gencode=arch=compute_75,code=sm_75" \
PREFIX=/home/you/nccl-install
```
`NVCC_GENCODE` is the flag that decides which GPU architectures get real compiled kernels baked into the library. `compute_75` / `sm_75` is Turing, which is what a 2080 Ti is.
Then point llama.cpp at it:
```bash
LD_LIBRARY_PATH=/home/you/nccl-install/lib
# and do NOT set GGML_CUDA_ALLREDUCE=internal — on Linux, NCCL is already the default
```
**No llama.cpp rebuild is needed.** `llama-server` links `libnccl.so.2` dynamically, so swapping the search path is the entire deployment. Verify with `ldd` that `libnccl.so.2` now resolves to the home-built copy instead of `/usr/lib/x86_64-linux-gnu/`. The system library is never touched, and rollback is deleting one environment variable. (That assumes the ordinary shared-library build, which is what you get by default — a build that statically links NCCL wouldn't respond to a path swap at all.)
### Trap 1: `src.install` rebuilt without my gencode
This is the nastiest one, because nothing errors.
I passed `NVCC_GENCODE` to `src.build` and not to `src.install`, and the install step started compiling again rather than installing what I had just built. The saved build log has the flags going past — `-gencode=arch=compute_60,code=sm_60` through `sm_90`, no `sm_75` anywhere — and real compilation starting behind them. The build output looks fine. The install output looks fine. You would go on believing you built it correctly.
Two things bound that claim, because it is one observation rather than a documented property of NCCL's build system. It is what happened on this setup and I have the log; someone reading the Makefiles could reasonably conclude it shouldn't happen. And the default architecture set depends on your CUDA toolkit — this box runs CUDA 12.4, whose defaults exclude `sm_75`. On a CUDA 13 toolkit the defaults already include it, and the omission costs you nothing.
Which is the argument for verifying rather than believing, whichever toolkit you're on:
```bash
cuobjdump --list-elf /home/you/nccl-install/lib/libnccl.so | grep -oE 'sm_[0-9]+' | sort -u
```
`sm_75` should be in that list.
### Trap 2: no `CUDA_HOME` and it fails in about five seconds
Upstream's Makefile looks for `/usr/local/cuda/bin/nvcc`, which is where NVIDIA's own installer puts it. Distro packages put `nvcc` in `/usr/bin`. Hence `export CUDA_HOME=/usr`. This one is loud and immediate, which makes it the pleasant kind of trap.
## PCIe traffic fell 99%, speed rose 14.6% — read the units column carefully
Here is prefill, the phase where the model chews through your prompt before it writes anything. One table, both quantities, units side by side — because the first person I showed this to read the 99% drop as a slowdown.
| prefill | over PCIe (`internal`) | over NCCL | change |
|---|---|---|---|
| PCIe traffic, rx per card | 1,286 MB/s | 15 MB/s | down 99% |
| PCIe traffic, tx per card | 1,342 MB/s | 5 MB/s | down 99.6% |
| speed | 800 tok/s | 917 tok/s | **up 14.6%** |
MB/s is bus traffic. tok/s is speed. In this table they move in **opposite** directions, and that is the point: less traffic, more speed.

The mechanism is a reroute, not a saving. On `GGML_CUDA_ALLREDUCE=internal`, every AllReduce byte crosses PCIe twice: each card writes its half down into pinned host memory, then reads the peer's half back up. A prefill batch's payload is large, so that 1.3 GB/s was almost entirely AllReduce and almost nothing else. On NCCL, the two GPUs talk directly over the NVLink bridge and the host-memory stop doesn't exist. What's left on PCIe is what always belonged there — the prompt going up once, logits coming back.
## How I know AllReduce's PCIe cost went to zero, not just down
A 99% drop still leaves 15 MB/s. Is that a residual AllReduce, or something else entirely? The way to tell is to compare against a run that has no AllReduce at all, which is a single card.
| prefill, rx per card | MB/s |
|---|---|
| single GPU — no AllReduce at all | 10 |
| dual + NCCL | 15 |
| dual + `internal` | 1,286 |
Look at the top two rows. NCCL lands back on the single-card floor. AllReduce's contribution to PCIe really did go to zero; the 15 MB/s that remains was never AllReduce in the first place.
Decode does the same thing — 35 MB/s against a single-card 31 — it just looks like a much smaller drop. That's because only about 101 of decode's 132 MB/s was AllReduce to begin with; the rest is token I/O and MTP draft traffic. Both phases go to zero. The percentages differ only because AllReduce's share of the total differed between them.
And on the NVLink side, GeForce cards expose no throughput counters at all, so I can't show those bytes arriving. They left the gauge, not the machine.
## Then the speed barely moved
Code generation is what this box actually does all day, so it is the number I care about. Five runs each:
| | tok/s median | range | MTP accept rate |
|---|---|---|---|
| over PCIe (`internal`) | 55.65 | 50.88–56.72 | 77.9% |
| over NCCL | 56.24 | 55.66–59.01 | 73.1% |
That is a tie. One percent apart on the median, and the ranges overlap heavily. The difference does not hold up, and I can't claim NCCL is faster here.
There's a curiosity buried in the last column. MTP is the model's built-in draft head, which guesses several tokens ahead so the big model can verify them in one pass; the accept rate is how often those guesses survive. The PCIe arm had the *higher* accept rate — 77.9 against 73.1 — and still didn't come out ahead. It was getting more free tokens per forward pass and ending up in the same place, which suggests NCCL is doing slightly more real work per unit time. Just not enough to see.
Time to first token does differ, and it differs in the place it should. Seven runs each:
| context depth | over PCIe | over NCCL | |
|---|---|---|---|
| short prompt | 592 ms | 569 ms | ranges overlap, doesn't count |
| ~4K | 1,723 ms | 1,514 ms | 12% faster |
| ~20K | 6,632 ms | 5,779 ms | 13% faster |
Deeper context, bigger gap. And at depth the ranges don't overlap at all — 5,729–5,786 against 6,598–6,865 — so this is the one claim in the whole article that stands up cleanly.
One more thing worth having, which isn't a median. The PCIe arm's code throughput swings across 50.88–56.72, an 11% spread. NCCL's swings across 55.66–59.01, 6%. "Occasionally much slower" damages the felt experience of a coding assistant more than "slightly slower on average" does, and that 50.88 is what occasionally-much-slower looks like on a chart.
## Traffic down 99%, speed flat — where did the win go?
Back to what Part 15 measured: [that bus was never full](/en/blog/pcie-allreduce-dual-2080ti). The busiest single cell in the whole PCIe run was 8.2% of Gen3 x16. Going from 8.2% utilization to 0.1% frees a road that already had nobody on it.
What actually limits token generation is **round-trip count**, not bytes. Every token, every layer: write your half out, wait for the other card, read the combined result back. A faster wire makes each of those trips shorter. It removes none of them, and there are thousands.
That explains the shape of every number above:
- **Prefill** pushes one big payload through the interconnect. Transport dominates, so changing the wire helps — +14.6%.
- **Generation** moves tens of KB at a time but does it dozens of times per token. Latency dominates, and the wire barely matters — a tie.
- **Time to first token** gains 12–13% because getting to the first token means shoving the entire prompt through once. That *is* a prefill.
So I fixed it, and it barely helped. The 99% drop with a flat speed number is not a disappointing result; it is a measurement that tells you where the bottleneck isn't, and it heads off an entire category of advice — buy a Gen4 board, add a bridge, get a faster link — that would have cost money and changed nothing.
### This narrows Part 15's split-mode advice
[Part 15](/en/blog/pcie-allreduce-dual-2080ti) measured prefill as fastest on dual layer split — 944.8 tok/s against tensor split's 844.9 — and recommended layer split for prefill-heavy work: long prompt, short answer. That recommendation holds for the backend that article measured. On NCCL, tensor split's prefill goes from 800 to 917 tok/s in my runs here, close enough to layer split's 944.8 that the tradeoff largely disappears. So if Part 15 sent you to layer split, it's worth re-running that comparison once NCCL is working.
## Advanced: five hypotheses I killed on the way here
Skip this section if you just wanted the fix; everything needed to reproduce it is above. What follows is the diagnosis, which took considerably longer than the fix and consisted mostly of refuting myself.
### Hypothesis 1: Turing has no bf16, so NCCL's bf16 AllReduce can't work
llama.cpp compresses large AllReduce tensors to bf16 before sending them. Turing has no native bf16 support. That is a genuine, checkable incompatibility, and it was my first guess — I expected the fix to be forcing fp32 reductions somewhere in llama.cpp's CUDA backend.
That's what the 40-line probe was for: one fp32 AllReduce and one bf16 AllReduce, in that order, so I could see which one died. The fp32 call failed first, with the identical error. The bf16 call never even ran.
Wrong, and wrong in a useful way: the failure had nothing to do with data type, which meant it also had nothing to do with llama.cpp. I had been reasoning about a layer above the actual problem.
### Hypothesis 2: the packaged library has no sm_75 kernels
Next guess, and this one had hard evidence behind it. Dump the architectures compiled into the packaged library:
```bash
cuobjdump --list-elf /usr/lib/x86_64-linux-gnu/libnccl.so.2 | grep -oE 'sm_[0-9]+' | sort -u
```
```
sm_50 sm_60 sm_61 sm_70 sm_80 sm_90
```
No `sm_75`. And `--list-ptx` comes back empty, so there isn't even PTX — the intermediate form CUDA can compile on the fly for an architecture it wasn't built for — to fall back on. I thought this was conclusive: no kernels for my card, no PTX to generate them from, case closed, and the fix would be a rebuild with the right gencode.
Then someone knocked it down in one sentence: *you have the hardware, why wouldn't it compile?*
They were right, and the reason is a rule I knew and hadn't applied. CUDA's binary compatibility rule is that a cubin built for compute capability X.y runs on X.z as long as z ≥ y. `sm_70` is 7.0. The 2080 Ti is 7.5. Same major version, higher minor — those kernels should load and run fine on my card.
The reflection here is the one I keep: I had taken an observation ("this library contains no sm_75") and promoted it to a cause ("therefore it cannot run on my card") without ever testing the step in between. The observation was true. The inference was mine, and it was wrong.
### Hypothesis 3: the driver itself is broken
By this point "CUDA driver is a stub library" was on the screen, and the most literal reading is that the driver is somehow the stub. I expected to find the toolkit's `stubs/` directory ahead of the real driver on the search path — a classic misconfiguration, and an easy fix.
So I called the driver API directly, outside NCCL:
```
cuInit(0) -> 0
cuDriverGetVersion -> 13000
cuDeviceGetCount -> 3
```
All three succeed. The symlink chain resolves to the real 96 MB `libcuda.so.580.173.02`, and the 70 KB stub isn't anywhere this process looks. The driver was never the problem.
That killed the misconfiguration story, and it is also where the diagnosis stops being a clean chain. I went looking for how NCCL could reach a stub entry point when no stub is on any path this process reads: `libnccl.so.2` has no RUNPATH into the toolkit's `stubs/` directory, and the driver resolves to the real library. I never found the route.
Which left me with a version mismatch I could act on and a mechanism I couldn't demonstrate. My expectation going into this hypothesis — that a stub error means a stub file in the wrong place — was wrong in a way I couldn't replace with anything better, so I stopped trying to explain the failure and started trying to replace the component.
### Hypothesis 4: P2P or NVLink isn't working
Worth ruling out, since the collective is exactly where peer access would first matter. I expected to find peer access disabled, in which case the fix is `NCCL_P2P_DISABLE=1` and a slower but working path.
`cudaDeviceCanAccessPeer` returns 1 in both directions. NCCL's own `NCCL_DEBUG=INFO` output shows all four channels coming up `via P2P/direct pointer` — meaning NCCL had already established the fast GPU-to-GPU route before it died. The topology was healthy the entire time. The failure is downstream of it.
### Hypothesis 5: an environment variable can work around it
The cheap-shot phase. NCCL has a large surface of environment switches, and if one of them dodges the broken code path, that's a fix with no compiler involved. I tried:
- `NCCL_CUMEM_ENABLE=0`
- `NCCL_P2P_DISABLE=1`
- both together
- `NCCL_GRAPH_MIXING_SUPPORT=0`
- `NCCL_LAUNCH_MODE=PARALLEL`
All five failed identically, at the same failure site, with the same message. Which is itself informative: a failure that ignores every configuration knob is not a configuration problem. That was the point I stopped looking for a workaround and started building from source.
### Going dual-card silently disables CUDA graphs
Unrelated to NCCL, but I ran into it while reading the CUDA backend and it affects every dual-GPU llama.cpp setup:
```c
if (!use_cuda_graph || ggml_backend_cuda_get_device_count() != 1) {
return;
}
```
Any device count other than 1 and the CUDA graph optimization is skipped entirely. CUDA graphs replay a pre-recorded sequence of kernel launches instead of issuing them one at a time, which mostly buys back launch overhead — exactly the kind of per-token cost that matters at decode.
So going dual-card means giving up CUDA graphs. It is a fixed cost, unrelated to AllReduce, and **both** paths in this article pay it equally, so it doesn't affect any comparison above. It does go some way toward explaining why dual-card generation gains never match the "two cards, twice the speed" intuition.
### What I did not isolate: version or gencode
Being honest about the limit of this result. I changed two things at once:
| | before | after |
|---|---|---|
| NCCL version | 2.22.3 | 2.31.2 |
| gencode | no `sm_75` | `sm_75` |
I never built a third library — 2.22.3 with `sm_75` added — to separate them.
The circumstantial evidence favours the version. The error was `CUDA driver is a stub library`, which is a driver-API compatibility failure, not `no kernel image is available for execution on the device`, which is what an architecture miss actually looks like. And by the binary compatibility rule from hypothesis 2, the packaged library's `sm_70` kernels should have run on a 7.5 card regardless.
But circumstantial is the right word. **This article demonstrates that a newer build fixes it. It does not identify the line the old one broke on.**
### Measurement conditions
Same EPYC box throughout, two modded 22GB 2080 Tis on GPU0/GPU1, PCIe Gen3 x16 with an NVLink bridge between them, llama.cpp `b10064`.
PCIe traffic plus prefill and decode throughput:
- Huihui Qwen3.8-27B abliterated, Q4_K
- `-sm tensor`, 262K context, `--parallel 2`, MTP `n=3`, KV cache at f16
- 3 repetitions per arm
Code tok/s and TTFT — the config that actually serves traffic on this box:
- orcarouter Qwen3.8-27B, Q8_0
- `-ctk q8_0 -ctv q8_0`, otherwise identical
- 5 repetitions for code, 7 for TTFT
⚠️ **Those two sets use different models — Q4_K versus Q8_0 — and their numbers are not comparable to each other.** The first set exists so it lines up with Part 14's published baseline. The second set answers a different question: did the thing I actually use every day get faster.
TTFT was measured on a streaming response, as wall-clock time from sending the request to the arrival of the **first chunk containing content**. Not the server's own `timings` fields, which are only computable after the run finishes and cannot see the part of the wait you spend staring at an empty screen.
## Takeaways
1. **Don't issue a verdict without an error message.** "I couldn't get it working" and "it doesn't work" are separated by an entire diagnosis. I skipped that diagnosis in Part 14 and the wrong sentence sat on this site for a day.
2. **An observation is not a cause.** "This library contains no sm_75" was true and verifiable. "Therefore it can't run on my card" was something I added on top, and it sent me down the wrong road for hours.
3. **Traffic falling 99% while speed stays flat is the result, not a failed result.** It proves the bottleneck was never on that link — which is more useful than a 15% win, because it forecloses a whole category of "just get a faster interconnect" advice before anyone spends money on it.
---
**Also in this series**: [Part 15: A reader asked how much PCIe dual-GPU AllReduce eats](/en/blog/pcie-allreduce-dual-2080ti) · [Part 14: Two Modded 2080 Tis Reach 59.6 tok/s](/en/blog/qwen38-dual-2080ti-tensor-parallel)
---
# [Benchmark] Dual-GPU AllReduce Only Uses 8% of PCIe Gen3 x16 — It Moves Little, Very Often
URL: https://ai-muninn.com/en/blog/pcie-allreduce-dual-2080ti
Date: 2026-08-23
Series: 改裝 2080 Ti 22G (Part 15)
Two modded 22GB 2080 Tis running Qwen3.8-27B under llama.cpp's `-sm tensor`, on the `GGML_CUDA_ALLREDUCE=internal` backend. In the production config — 262K context, MTP, 54.9 tok/s — PCIe peaks at 8.2% of the Gen3 x16 bus. A four-arm control run puts the net AllReduce cost at 67 MB/s per card at decode, 973 MB/s at prefill. This backend stages every reduction through pinned host memory, which is why PCIe carries it and the NVLink bridge doesn't. Scope: llama.cpp has more than one AllReduce implementation, and these numbers describe only this one.
Two people assemble one machine in separate rooms. There is a hatch in the wall between them, and normally they pass parts straight through it. The hatch jams. So they fall back on the old procedure: every step, each walks out, puts their half on a table in the hallway, waits for the other to do the same, carries the combined result back. The hatch is still there. It is still, in principle, the fast way. It just isn't the way anything is moving today.
This is Part 15 of the modded-2080-Ti series. [Part 14](/en/blog/qwen38-dual-2080ti-tensor-parallel) got two 22GB cards to 59.632 tok/s on Qwen3.8-27B with llama.cpp tensor parallel plus MTP, up from 37.1 on one card. A reader emailed after it went up with a specific request: re-run the benchmarks with `nvidia-smi dmon -s t` open in another terminal, and show how much PCIe bandwidth the AllReduce actually eats.
My first reaction was that it probably couldn't be measured. There is an NVLink bridge between those two cards, so I assumed the AllReduce rode NVLink and the PCIe counters would sit near zero. That assumption was wrong on this box, and finding out why turned out to be the more interesting half of the article.
## The one command that measures this, and the one flag people skip
`nvidia-smi dmon` is the device monitor: one line per GPU per interval, one second by default. `-s` picks which metric group you get.
| group | what it prints |
|---|---|
| `p` | power and temperature |
| `u` | utilization |
| `m` | framebuffer and BAR1 memory |
| `e` | ECC errors and PCIe replay errors |
| `t` | PCIe throughput — `rxpci` and `txpci`, in MB/s |
`t` is the one that answers this question. The full command I used:
```bash
nvidia-smi dmon -s t -i 0,1 -d 1 -o T
```
`-i 0,1` picks the two cards. `-d 1` is the one-second interval. `-o T` adds a timestamp column, and that is the flag worth arguing about. Without timestamps you cannot align the samples to the start and end of your own request, which means you cannot separate your traffic from whatever else is touching those GPUs. I found that out the hard way; see the quiescing section in the second half.
The whole thing is read-only. It does not slow the benchmark down.
## The bridge looks healthy, but GeForce doesn't expose its traffic counters
Here is why I thought this was a dead end. The bridge reports itself as present and healthy:
```
GPU 0: Link 0: 25.781 GB/s, Link 1: 25.781 GB/s
GPU 1: Link 0: 25.781 GB/s, Link 1: 25.781 GB/s
```
The topology matrix agrees, showing `NV2` between GPU0 and GPU1. So my model was: the reduction rides NVLink, PCIe stays quiet, and the counters I was being asked to read would show nothing.
The NVLink side can't be read anyway. Ask for its data counters and you get:
```
Data Tx: N/A
Data Rx: N/A
```
Same on all three cards in the box. There is no clean product-family rule to quote here — NVIDIA documents these counters per device, and a workstation card like the RTX A6000 does return real Tx/Rx values. What I can say is what I measured: on these 2080 Tis, nothing. So: invisible on PCIe, unreadable on NVLink. Both windows dark. That was where I stopped guessing and went to read the source.
## The `internal` AllReduce backend stages every reduction through pinned host memory
The file is `ggml/src/ggml-cuda/allreduce.cu` in b10064. Its header comment states the design outright:
```
// Two reduction strategies are selected per call by tensor size:
//
// * Chunked kernel path (small reductions): a single CUDA kernel both
// stages data through pinned host memory and performs the local sum.
// Cross-GPU synchronization happens *inside the kernel* (busy-wait on
// a host-memory flag), which keeps launch overhead low for the
// latency-sensitive token-generation case.
//
// * Copy-engine path (large reductions): the transfer is split into
// D2H + H2D cudaMemcpyAsync chunks driven by the GPU's copy engine,
// followed by a small device-side add kernel.
```
Both strategies go through pinned host memory. The small path is the token-generation hot path; the large path is prefill. The large one says it in the code itself, device to host and then host to device:
```c
CUDA_CHECK(cudaMemcpyAsync(..., cudaMemcpyDeviceToHost, p->streams[i]));
CUDA_CHECK(cudaMemcpyAsync(
p->dev_tmp[i] + offset, p->host_large[peer].host + offset, this_bytes,
cudaMemcpyHostToDevice, p->streams[i]));
```
The strongest evidence sits a few lines below that, in a note explaining why the code is shaped this way:
```
// atomicAdd_system() requires hostNativeAtomicSupported, which is unavailable
// on PCIe-attached consumer GPUs without NVLink, so the volatile path is the
// portable choice.
```
This backend was written for consumer cards that have no NVLink at all. Once you are on it, having a bridge changes nothing about the route the data takes.
> **Scope, before any of the numbers below.** llama.cpp ships more than one AllReduce implementation, and `-sm tensor` runs on whichever one your build selects. Everything below applies to `GGML_CUDA_ALLREDUCE=internal`, the backend this machine is configured for. llama.cpp ships other AllReduce implementations with different data paths, so check which backend your build selects before you apply these numbers to it.
One caveat: even on `internal`, NVLink still carries some traffic. Even on `internal`, NVLink is not fully unused. llama.cpp calls `cudaDeviceEnablePeerAccess` at init, and ordinary cross-device tensor copies use `cudaMemcpyPeerAsync`, which does ride the bridge. The bridge isn't idle. It just isn't carrying the hottest path, which is the per-layer AllReduce.

So the PCIe counters would show something after all. Which raised the next problem: how do you tell AllReduce traffic apart from the ordinary host-to-device traffic that any inference run produces?
## Four arms, because a single number can't isolate AllReduce
You can't. Not from one measurement. Whatever `-sm tensor` shows on the PCIe counters includes every byte the process moves for any reason. That was my own itch more than anything else: once I knew the reduction was going over PCIe, I wanted to know how much of the traffic was actually *it*. Getting that number means running a control that does the same work without AllReduce.
Four arms, same model, identical flags, differing only in how the model is split:
- **A** — one GPU, `-sm none`. No AllReduce at all. This is the PCIe floor.
- **B** — two GPUs, `-sm layer`. Each card owns whole layers, so there is one handoff at the layer boundary and still no AllReduce.
- **C** — two GPUs, `-sm tensor`. Weight matrices are sliced, so both cards compute a piece of every layer and reconcile twice per layer.
- **C'** — C plus `--spec-type draft-mtp --spec-draft-n-max 3`, the production config from Part 14.
**C minus B is the net AllReduce cost.** C's absolute value is not; it still contains all the ordinary traffic that B also has.
Model: Huihui Qwen3.8-27B abliterated, Q4_K, 16.8 GB. It fits on one card, which is the only reason arm A can exist at all. Shared flags across all four:
```bash
-ngl 99 -c 16384 --parallel 1 --jinja -fa on --metrics -fit off
```
KV cache left at f16, no vision model loaded. Context is 16K rather than the 262K I run in production, because one card cannot hold 262K of KV and arm A has to be the same as the others. That is safe for this question: the AllReduce payload scales with hidden size, not with context length.
Three reps per arm. Eight seconds of idle before each measurement, to confirm the baseline was actually zero. All twelve reps passed and none were discarded.
## Across all four arms, PCIe never gets past 8% of the Gen3 x16 ceiling
The column to look at is `decode rx` and `prefill rx` — those are per card, not the two summed.
| arm | decode tok/s | decode rx | prefill tok/s | prefill rx |
|---|---|---|---|---|
| single GPU | 24.1 | 31 MB/s | 567.3 | 10 MB/s |
| dual, layer | 25.6 | 22 MB/s | 944.8 | 72 MB/s |
| dual, tensor | 37.7 | 89 MB/s | 844.9 | 1,045 MB/s |
| dual, tensor + MTP | 44.3 | 146 MB/s | 797.9 | 1,068 MB/s |
Net AllReduce cost, tensor minus layer: **67 MB/s per card at decode**, and **973 MB/s per card at prefill**. The ratio is a separate number, and worth not confusing with the first one: the tensor arm carries 4.0× as much total traffic as the layer arm at decode (89 vs 22 MB/s), and 14.5× as much at prefill (1,045 vs 72 MB/s).
Those multipliers look dramatic until you put them against the bus. This is PCIe Gen3 x16, 15,750 MB/s per direction. Decode uses under 1% of it. Prefill uses about 6.6%. Counting transmit as well as receive, the heaviest cell anywhere in the four arms is 1,265 MB/s, which is 8%. The production config, measured in the next section, nudges that to 8.2% and no further.

The practical takeaway, and it applies only to the `internal` backend: if you are on it and eyeing a Gen4 board upgrade specifically to make llama.cpp tensor parallel go faster, that money buys nothing. There is no bandwidth wall here to lift, and the bridge isn't on the path being measured. Don't extend that verdict to a build running a different AllReduce implementation — this data doesn't cover those.
> **How each number was computed.** For each rep I kept only the samples inside the actual request window, aligning the server's reported start and end against the `dmon` timestamps, took the **mean** inside that window, then the median across the three reps.
>
> Mean, not median, because this traffic is bursty. A real layer-split prefill window, second by second: `13, 13, 12, 11, 13, 15, 13, 0, 1111, 10, 0, 70`. The median calls that 13 MB/s. But the second that read 1111 really did move 1.1 GB, and "how much of the bus got used" is total bytes over time. The median throws the bursts away.
>
> My first pass used the median and produced "80×" for prefill AllReduce amplification. That number was wrong — the denominator was understated.
## The real production config tops out at 8.2% of the bus
The box was already quiesced for the four arms, so while it was quiet I ran the production config too — the one that actually serves traffic, the Part 14 command verbatim: `-sm tensor`, 262K context, `--parallel 2`, MTP at n=3, mmproj attached, KV left at f16. Three reps, same `dmon` method.
It couldn't have been one of the arms. Every arm has to fit on a single card for arm A to exist, which costs you 262K context, the second slot and the vision projector. Run on its own it keeps every production setting, so these numbers come from the real serving config rather than a stripped-down control.
The column that matters is the last one.
| phase | tok/s | rx per card | tx per card | share of Gen3 x16 |
|---|---|---|---|---|
| decode | 54.9 | 97–129 MB/s | 244–379 MB/s | rx 0.6–0.8%, tx 1.5–2.4% |
| prefill | ~801 | 1,132–1,166 MB/s | 1,282–1,290 MB/s | rx 7.2–7.4%, tx 8.1–8.2% |
The busiest single cell across every measurement in this article is that 8.2%, and it turns up here rather than in the controls. So "PCIe isn't saturated" isn't an artifact of a rig assembled to be measurable. The same result holds for the workload that actually serves traffic.
VRAM usage is a useful sanity check that the rerun really did reproduce the original config: 18,890 MiB on GPU0 and 17,752 MiB on GPU1, against 18,888 and 17,738 published in Part 14. Near-identical, which is what you want to see before trusting anything else in the row.
Decode came in at 54.9 tok/s here versus 59.632 in Part 14, about 8% lower. Different prompt, different measurement window. I'd read those as two independent measurements of the same configuration rather than as a regression, and I'm not going to massage them into agreeing.
## Prefill is 11% faster on layer split than on tensor split
This one I did not expect. Look at the prefill column again: the fastest arm is the plain layer split at 944.8 tok/s, not tensor at 844.9. Tensor parallel is about 11% slower at prefill.
The reason is what prefill is. It feeds a large batch through the model, so both cards already have plenty of work in front of them. Parallelism was never the constraint there. What tensor parallel adds at that point is reconciliation on every layer — the ~1 GB/s measured above, plus the two cards waiting on each other to arrive. You pay the tax and get nothing back for it.
Decode is the mirror image. One token at a time doesn't come close to filling a single card's compute units, so slicing each layer across both cards is worth doing: 37.7 vs 25.6 tok/s, a 47% gain. Adding MTP on top takes it to 44.3.
So there is no single right answer to "which split mode should I use". A long-prompt, short-answer workload — dump in a document, ask one question about it — is prefill-heavy, so layer split is the better deal there. Long chatty generation is tensor parallel's home ground. Pick per workload, not once.
One caveat that has to be said plainly: the 44.3 tok/s here is **not** comparable to Part 14's 59.632. This run used 16K context, one slot, and a different prompt, all so the four arms would stay identical to each other. Part 14 was the 262K production configuration. Different measurement windows. Don't put the two numbers on the same line.
## What limits dual-card decode is round trips, not bytes
At decode, tensor parallel moves 89 MB/s per card on a bus that does 15,750. If bandwidth were the constraint, there would be more than a hundredfold headroom left over. There plainly isn't, since decode only reached 37.7 tok/s.
The time goes into round trips. Every token, every layer, two AllReduces. Each one: write your half to host memory, wait for the peer to write theirs, read theirs back. Very few bytes each time, but dozens of waits per token.
The internal backend's small-tensor path busy-waits for exactly this reason — the kernel spins on a host-memory flag until the peer's token number matches. The source says this keeps "launch overhead low for the latency-sensitive token-generation case". That path was written to minimize latency, not to maximize bandwidth, and the counters agree with the source.
Which tells you what actually speeds up dual-card decode: **fewer round trips**, not a wider bus. MTP is precisely that. One forward pass yields several tokens, so the same round-trip cost gets amortized over more output. That's where 44.3 vs 37.7 comes from, a 17% gain that has nothing to do with bandwidth.
## Advanced: the measurement rig, and the three traps in it
Skip this section if you only wanted the numbers — nothing below changes them. What's here is how the four arms were built, the two flags that nearly invalidated the comparison without saying anything, and the full per-GPU data with its spread.
### The full four-arm config
Copy-pasteable. Everything above the split-mode lines is identical across all four arms.
```bash
# shared by all four arms, identical
-ngl 99 -c 16384 --parallel 1 --jinja -fa on --metrics -fit off
--chat-template-kwargs '{"enable_thinking":false}'
--temp 0.7 --top-p 0.80 --top-k 20 --min-p 0.0
--presence-penalty 1.5 --repeat-penalty 1.0
# A single card
CUDA_VISIBLE_DEVICES=0 -sm none
# B dual, layer split
CUDA_VISIBLE_DEVICES=0,1 GGML_CUDA_ALLREDUCE=internal -sm layer
# C dual, tensor
CUDA_VISIBLE_DEVICES=0,1 GGML_CUDA_ALLREDUCE=internal -sm tensor
# C' dual, tensor + MTP
CUDA_VISIBLE_DEVICES=0,1 GGML_CUDA_ALLREDUCE=internal -sm tensor \
--spec-type draft-mtp --spec-draft-n-max 3
```
### Trap 1: `--fit` is on by default, and `-sm tensor` ignores it
**The problem.** I built the four arms by writing one shared flag string and appending the split mode. That felt airtight, so my working assumption was that the arms were identical by construction and the only thing left to worry about was measurement noise.
**What I did.** Started arm C and read the server's startup output instead of skipping straight to the benchmark. It printed this:
```
common_fit_params: failed to fit params to free device memory:
llama_params_fit is not implemented for SPLIT_MODE_TENSOR, abort
```
**What that means.** `--fit` auto-adjusts parameters you didn't explicitly specify so the model fits in available VRAM, and it is on by default. `-sm tensor` doesn't support it, so it gives up at startup. Consequence: arms A and B get auto-tuned, arms C and C' don't. The four arms stop being one condition, and nothing tells you they've diverged — the numbers still come out, and they still look reasonable.
**The fix.** `-fit off` explicitly, on all four arms.
**Where my assumption was wrong.** I thought "identical flag string" was the same thing as "identical condition". It isn't, once a flag makes decisions on your behalf. The general rule I took from this: in a controlled comparison, any flag that decides something for you has to be turned off — not because it decides badly, but because it decides *differently* for different arms, which is the one thing a control cannot tolerate.
### Trap 2: `--help` still lists `-sm row`, but the code is gone
**The problem.** I wanted a third control. Row split seemed ideal: another way of dividing the model, another traffic pattern to compare against. The help output backs that up:
```
-sm, --split-mode {none,layer,row,tensor}
```
All four modes, right there.
**What I did.** Started the server with `-sm row` on b10064. Model load died.
**Why.** The CUDA implementation of row split was deleted upstream in [PR #24216](https://github.com/ggml-org/llama.cpp/pull/24216), merged 2026-07-06, titled "CUDA: remove -sm row, refactor cuBLAS". The help text was never updated. So the flag parses, and then there is nothing behind it.
**Where my assumption was wrong.** I treated `--help` as a statement about the build I was running. It's a statement about the string table in that build. Listed in help does not mean implemented, and that inverts the normal instinct, which is to trust the tool's own documentation over your memory. Part 14 has more on this one; it cost me a whole evening there, and here it only cost a third arm.
### Trap 3: the median threw away the bursts
**The problem.** I had twelve reps of per-second samples and needed one number per arm per phase. Reflexively I reached for the median, on the standard reasoning that it's robust against outliers and I didn't want one weird second dominating a result.
**What I did.** Computed it, and got a prefill AllReduce amplification of 80×. That felt too large, so I went back and printed the raw window instead of just its summary. Arm B, prefill, GPU1 `rxpci` in MB/s, one sample per second through the request window:
```
t+0 13
t+1 13
t+2 12
t+3 11
t+4 13
t+5 15
t+6 13
t+7 0
t+8 1111
t+9 10
t+10 0
t+11 70
```
**What that proves.** Both statistics are computed correctly. The median of that window really is 13 MB/s, and the mean really is about 106. The 1111 is not an artifact — that second genuinely moved 1.1 GB across the bus, and the zeros around it are the copy engine idle between bursts.
**Where my assumption was wrong.** I picked a statistic that answers a different question than the one being asked. "What is a typical second" is what the median answers. The question here is "how much of the bus got used", which is total bytes over elapsed time, and that is the mean by definition. Robustness against outliers is a virtue only when the outliers are noise. Here the outliers *were* the signal — the bursts are the entire transfer.
### How thin the decode sampling really is
Stating this plainly rather than burying it: the decode numbers are weak, and I don't want them quoted as though they aren't.
`dmon` tops out at one sample per second. Each decode run only lasted 3 to 7 seconds. That gives **4 to 10 samples per rep**, and it shows: arm C GPU0's three reps spread from 51 to 175 MB/s. Prefill is in much better shape at 13 to 22 samples per rep, and the reps converge — arm C GPU0 came in at 1033, 1176, 1038.
So: prefill numbers are citable, decode numbers are order-of-magnitude only. Measuring decode properly needs finer sampling than `dmon` offers, which is a different tool and a different article.
It does not change the headline, though. Even the single largest decode sample in the entire dataset — arm C' GPU1 at 209 MB/s — is 1.3% of the ceiling.
### Full data, all four arms
Per rep: mean inside the request window. Across reps: median. Parentheses show the spread across the three reps.
| arm | phase | GPU | rx MB/s | tx MB/s | samples per rep |
|---|---|---|---|---|---|
| A | decode | 0 | 31 (26–38) | 23 | 10, 10, 6 |
| A | prefill | 0 | 10 (9–45) | 6 | 21, 22, 22 |
| B | decode | 0 | 22 (21–26) | 5 | 6, 8, 6 |
| B | decode | 1 | 22 (22–29) | 34 | 6, 8, 6 |
| B | prefill | 0 | 33 (10–99) | 3 | 13, 14, 13 |
| B | prefill | 1 | 110 (14–117) | 108 | 13, 14, 13 |
| C | decode | 0 | 115 (51–175) | 56 | 5, 4, 6 |
| C | decode | 1 | 63 (48–72) | 50 | 5, 4, 6 |
| C | prefill | 0 | 1038 (1033–1176) | 1265 | 14, 15, 15 |
| C | prefill | 1 | 1052 (1030–1087) | 1240 | 14, 15, 15 |
| C' | decode | 0 | 97 (86–235) | 154 | 4, 6, 5 |
| C' | decode | 1 | 195 (182–209) | 245 | 4, 6, 5 |
| C' | prefill | 0 | 1071 (989–1169) | 1118 | 15, 15, 14 |
| C' | prefill | 1 | 1064 (1048–1335) | 1215 | 15, 15, 13 |
One pattern in there is worth pointing at, because it confirms the two split modes are doing what they claim. Under layer split, GPU0 barely transmits at all — 3 to 5 MB/s — while GPU1 carries everything, 34 to 108. That asymmetry is the pipeline fingerprint: the last layers and the output head live on the second card, so data flows one way and doesn't come back. Tensor split is far more symmetric on both columns, which is what you'd expect when both cards have to reconcile on every layer.
### The NVLink counters these cards don't report
For completeness, since this is the fact the whole article depends on:
```bash
nvidia-smi nvlink -gt d -i 0
```
```
Data Tx: N/A
Data Rx: N/A
```
Same output on all three cards in the box. Don't read that as a rule about consumer versus datacenter hardware — NVIDIA documents this per device and there's no clean line to draw; an RTX A6000 returns real values. It's a fact about these 2080 Tis, and it has a consequence worth stating: this article is only measurable because the reduction goes over PCIe. Put it on the bridge instead, on cards that report nothing, and it's invisible on PCIe and unreadable on NVLink at once — no counter anywhere to read.
### Quiescing: verify the baseline is zero, don't assume it
**The problem.** My first casual attempt at this, before I'd designed the arms, just started `dmon` and fired a request at the running server.
**What I saw.** A steady ~1 GB/s that looked, at a glance, like a beautiful result:
```
02:41:41 0 963 367
02:41:41 1 1119 349
02:41:42 0 1390 316
```
**What it actually was.** Not mine. Another client was hitting the same server, and roughly 150 MB/s kept flowing after my own request had finished — which is what gave it away.
**The fix.** For the real run the serving instance was stopped entirely, and every single measurement was preceded by 8 idle seconds confirming a zero baseline on both cards.
**Where my assumption was wrong.** I assumed nobody was using the box because I hadn't asked anyone to. That's not evidence of anything. Verify the baseline *is* zero; don't reason your way to it.
## Takeaways
1. **`nvidia-smi dmon -s t` answers this in one line, read-only, without slowing the run down.** Align the samples to your request's start and end, or you can't separate your traffic from anyone else's.
2. **There is no single right dual-GPU split mode.** Prefill-heavy work favors layer split, 11% faster. Generation-heavy work favors tensor split, 47% faster. The workload picks, not the config file.
3. **One flag can sit on top of completely different implementations.** `-sm tensor` is the same flag either way, but the AllReduce underneath it is selectable, and everything here was measured on `GGML_CUDA_ALLREDUCE=internal` — where the reduction goes through host memory and the bridge isn't on the path, so a bridge buys nothing for tensor parallel. Before carrying any benchmark's numbers onto your own box, mine included, check which implementation it actually measured.
---
**Also in this series**: [Part 14: Two Modded 2080 Tis Reach 59.6 tok/s on Qwen3.8-27B With llama.cpp Tensor Parallel](/en/blog/qwen38-dual-2080ti-tensor-parallel)
---
# [Benchmark] Two Modded 2080 Tis Reach 59.6 tok/s on Qwen3.8-27B With llama.cpp Tensor Parallel
URL: https://ai-muninn.com/en/blog/qwen38-dual-2080ti-tensor-parallel
Date: 2026-08-22
Series: 改裝 2080 Ti 22G (Part 14)
Two modded 22GB RTX 2080 Tis running Qwen3.8-27B (Q4_K, with its built-in MTP draft head) hit 59.632 tok/s decode using llama.cpp's `-sm tensor` split mode, up from 37.1016 tok/s on one card. Splitting the model alone bought nothing: two cards without MTP running decoded at 37.5449, barely above baseline. `-sm row`, the older split mode, was removed upstream in July 2026. The allreduce between the two cards runs over plain PCIe; NCCL, the Linux default, crashed on first call. The gain holds on a 21K-token prompt too, at 48.989 tok/s. Caveat: the KV-cache and draft-depth comparisons below are 1-2 runs per configuration.
Two people carrying a long table are slower than one person dragging it, unless somebody calls the cadence. The extra pair of hands was never the hard part; the calling was. Two GPUs running one model work the same way: bolting in the second card takes ten minutes, and getting the two of them to agree with each other on every layer is the rest of the story.
This is Part 14 of the modded-2080-Ti series. [Part 13](/en/blog/chat-template-kv-mtp-free-speedup) got one card from 41.6 to 47.6 tok/s by fixing a broken chat template and retuning the draft depth on Qwen3.8's built-in MTP head. This part adds a second card and asks a different question: does splitting one model across two GPUs actually help, or does it just move the bottleneck somewhere else?
Short answer: it helps, but only on the second attempt, using a split mode most older guides don't mention, with an environment variable that isn't in anyone's example command.
## What you need
- **Two GPUs with enough combined VRAM**, ideally matched. Mine are both modded RTX 2080 Ti 22GB cards, Turing, compute capability sm_75, in one EPYC box.
- **A recent CUDA build of [llama.cpp](https://github.com/ggml-org/llama.cpp) with NCCL support.** I used `b10064`.
- **Qwen3.8-27B as a Q4_K GGUF**, with its built-in MTP (multi-token prediction) draft head: a small extra head baked into the model that guesses several tokens ahead so the big model can verify them in a single forward pass instead of generating them one at a time.
- **Patience for one environment variable nobody puts in their example command.** Covered below.
## The production config
```bash
CUDA_VISIBLE_DEVICES=0,1 \
GGML_CUDA_ALLREDUCE=internal \
llama.cpp-b10064/build-cuda75-nccl/bin/llama-server \
-m /path/to/Qwen3.8-27B-Q4_K.gguf \
-sm tensor -fa on -c 262144 \
--spec-type draft-mtp --spec-draft-n-max 3 \
--mmproj /path/to/mmproj.gguf
```
Four things in that command are doing more work than their length suggests:
| flag / var | what it does |
|---|---|
| `GGML_CUDA_ALLREDUCE=internal` | picks the PCIe allreduce path over NCCL. An allreduce is the step that combines partial results computed on separate GPUs back into one answer, needed constantly once a model's math, not just its layers, is split across cards. Leave this unset and NCCL is the default on Linux, and NCCL is the one that didn't work for me (deep dive below) |
| `-sm tensor` | split mode: the flag that decides how a model's weights get divided across GPUs. `tensor` slices individual weight matrices so each card computes a piece of every layer's math, instead of giving each card whole layers to itself |
| `--spec-draft-n-max 3` | draft depth for MTP. 3 beat 2, 4, 5 and 7 (n=6 untested); not the depth that won on one card |
| `--mmproj` | the vision projector GGUF. I didn't need vision for this workload, but I loaded it anyway and ran a smoke test: asked the model the colors in a three-color-block PNG, and got red, green, and blue back correctly |
I did not pass `-ctk` or `-ctv`. The main KV cache stays at f16 by default, and that default turns out to matter quite a bit (also in the deep dive).
## 37 to 59.6 tok/s: what two cards plus MTP actually buys you
Decode speed on the same coding prompt, four configurations, each one changing exactly one thing from the row above it:
| Setup | decode tok/s (code) | vs. one-card baseline |
|---|---:|---|
| 1 card, Q4_K + MTP n=4 | 37.1016 | baseline |
| 2 cards, `-sm row` (build b9870) | 38.4308 | +3.6% (noise) |
| 2 cards, `-sm tensor`, no MTP | 37.5449 | +1.2% (nothing) |
| 2 cards, `-sm tensor` + MTP n=3, f16 KV | 59.632 | +60.7% |
The takeaway from that table is simple: splitting the model alone gets you nothing. Both middle rows sit within measurement noise of the single-card number. Whatever GPU you add, if the draft head isn't also running across it, you paid for a second card to sit there.

The 59.632 tok/s figure is a mean of two short-prompt runs: 61.339 tok/s with 281 of 352 drafted tokens accepted, and 57.925 tok/s with 274 of 373 accepted. On the same config with a real 21,201-token prompt filling the context first, prefill ran at 776.805 tok/s and decode settled to 48.989 tok/s with 258 of 420 tokens accepted, slower than the short-prompt number as expected with more context to attend over, but nowhere near the single-card baseline. Traditional-Chinese prose decode came in at 34.4 tok/s on the same config, against 18.6074 on one card.
Final VRAM per card: 18,888 MiB and 17,738 MiB. For reference, the one-card baseline's own acceptance rate already sat at 68.22% and 70.17% on code, 21.92% and 22.86% on prose. MTP was doing real work before the second card entered the picture at all. Tensor parallel didn't invent that mechanism. It just gave it more headroom to run in.
## Within 10-22% of a current mid-range pair, for a fraction of the price
As of 2026-08-22, I couldn't find a published paired benchmark of Qwen3.8-27B on dual 2080 Tis using llama.cpp tensor parallel plus MTP. That's a narrow claim on purpose: it means I didn't find one, not that one doesn't exist.
What is published is a fair comparison target. A community table for this same model reports [65.9 tok/s at draft depth 2 and 76.0 tok/s at draft depth 3 on two RTX 5060 Tis](https://github.com/sudoingX/qwen38-mtp):
| Setup | decode tok/s |
|---|---:|
| 2× RTX 5060 Ti, n=2 (community) | 65.9 |
| 2× RTX 5060 Ti, n=3 (community) | 76.0 |
| 2× modded 2080 Ti, n=3 (this run) | 59.632 |
That card is current-generation. Mine is a 2018 flagship with a factory VRAM mod. It puts a pair of five-year-old secondhand cards within shouting distance of a current mid-range pair, about 22% behind their n=3 figure and 10% behind their n=2 one, for a fraction of the price: each of mine cost ¥2079 on Taobao and landed around NT$11,000 with shipping at the time I bought them, about NT$22,000 for the pair.
For context, published llama.cpp numbers for dual-2080-Ti setups already floating around online sit in the 38-50 tok/s band. Those runs are on Qwen3.6, not Qwen3.8, a different model version, and not directly comparable to either number above.
## `-sm row` won't start on any current build: it's not your hardware
If you've read older llama.cpp multi-GPU guides, you've seen `-sm row`. Don't use it. Its CUDA implementation was removed by [PR #24216, "CUDA: remove -sm row, refactor cuBLAS"](https://github.com/ggml-org/llama.cpp/pull/24216), merged 2026-07-06. On a current build, passing it fails at load with `device CUDA0 does not support split buffers`.
Check your own binary before spending an evening on this:
```bash
strings | grep -c split_buffer
```
Zero means your build has row split removed. My old `b9870` binary, from before the removal, returned 45.
## No `--fit` under `-sm tensor`: set your context by hand
`-sm tensor` is the successor split mode, from [PR #19378, "ggml: backend-agnostic tensor parallelism (experimental)"](https://github.com/ggml-org/llama.cpp/pull/19378), merged 2026-04-09. It's still marked experimental in `docs/multi-gpu.md`, and one gap in that experimental status will bite immediately: it doesn't support `--fit`, the flag that otherwise auto-sizes context to whatever VRAM is available.
Leave out `-c` under `-sm tensor` and you don't get an error. You get llama.cpp's default context, silently, whatever that happens to be on your build. Always pass `-c` explicitly.
## NCCL is the Linux default, and it's the one that didn't work for me
On Linux, llama.cpp's default allreduce path under tensor parallel goes through NCCL. Mine built and started fine on that default, then failed the moment it had to actually run a reduction between the two cards during a real request.
Setting `GGML_CUDA_ALLREDUCE=internal` switches to a plain PCIe path using pinned host memory, and that's the path that works, on this hardware, tonight. Why the default one doesn't is where the next section picks up.
## Deep dive
Skipping this section costs nothing. Everything above is enough to reproduce the setup. What follows is the order I actually found it in, including the parts where I was wrong.

### `-sm row` dying wasn't a hardware verdict
`-sm row` refused to load with `device CUDA0 does not support split buffers`. My first read of that message was architectural: Turing is five years old, and "device does not support X" reads like a compute-capability wall, a feature fenced off from older silicon as newer generations added better primitives.
I went looking for confirmation before doing anything else, and found [PR #24216](https://github.com/ggml-org/llama.cpp/pull/24216) instead. The row-split CUDA implementation was deleted outright on 2026-07-06, for every GPU generation, as part of a cuBLAS refactor that removed the split-buffer code path entirely. To check, I rebuilt against `b9870`, the last release before that commit landed, and pointed the exact same two 2080 Tis at `-sm row`. It started. It ran at 38.4308 tok/s.
The GPUs never lost anything. The feature was removed from the codebase on a fixed date, independent of what card anyone owns. "Device does not support" was describing the binary, not the silicon.
### Linking is not the same as working
NCCL is llama.cpp's default allreduce path on Linux under `-sm tensor`, and my build linked against it cleanly: no missing symbols, no loader errors, and the server came up. I read that as done: symbols resolved, library present, server up. I expected the default path to just work.
It didn't. The server started, answered non-generation requests fine, and then failed the moment a real request forced an actual reduction between the two cards. Switching the allreduce path with `GGML_CUDA_ALLREDUCE=internal` was the fix. It moves the reduction through pinned host memory over PCIe. I never found out why NCCL threw that error, and I want to be straight about that: I had decided in advance that this branch got one attempt, so when it blew up I took the other path instead of debugging it. Whether NCCL would be faster once fixed is still an open question here, not a settled one.
**Update, 2026-08-23:** that question now has an answer. The cause was a distro package that didn't match the driver. A self-built NCCL runs fine, and the speed difference turned out smaller than I'd have guessed — [Part 16](/en/blog/nccl-2080ti-stub-library-fix) has the numbers.
Linking only proves the dynamic loader found the right symbols at the right addresses. It says nothing about whether the call path those symbols point to is healthy once you actually invoke it. I had conflated "the library loaded" with "the path works." The two turned out to be unrelated facts.
### The draft depth that lost on one card won on two
Part 13 swept MTP draft depth on a single card, and n=4 won there, beating n=2 and n=5. I carried that number into the tensor-parallel setup expecting it to still lead, or at worst tie.
I swept again anyway: n=2 landed at 52.50 tok/s (acceptance 0.679), n=3 at 59.4415 (acceptance 78.87% and 74.12% across two samples), n=4 at 57.7197, n=5 at 51.4095, and n=7 at 44.3623, falling further to 37.1107 on a second run. High depth got both slower and less consistent. n=6 never actually ran; a conditional branch in my sweep script didn't fire for it, so the honest answer there is untested, not "worse."
n=3 won, not n=4. Splitting the model across two cards changes how much wall-clock time the big model's own forward pass costs per step, which changes the ratio between draft overhead and verification payoff the whole optimization is balancing. The old winner became the runner-up. Whatever depth won on your last config, re-run the sweep after changing the split mode. Don't carry the number over.
### KV cache quantization taxes acceptance, not prefill
I assumed quantizing the main KV cache, the running memory of keys and values for tokens already processed, would cost about what it costs on a single card: a small, roughly fixed hit to decode speed, worth it for the VRAM back. I didn't expect it to interact with MTP at all. The draft head and the KV cache felt like separate concerns.
I ran the same prompt at 64K context, draft depth 3, across three KV types, two samples each: q4_0 gave 57.16 tok/s (acceptance 0.729) shallow and 45.01 (0.579) deep; q8_0 gave 52.67 (0.655) and 51.20 (0.719); f16 gave 59.96 (0.807) and 53.73 (0.726). Prefill speed was effectively identical across all three: 767.60, 760.20, and 766.21 tok/s.
f16 wins on both speed and acceptance, and the flat prefill numbers rule out the obvious explanation. The cost isn't in reading the prompt faster or slower. MTP's guesses get checked against the KV cache's actual stored representation, and a coarser representation gives the draft head less to agree with, so the tax lands on acceptance rate, which then drags decode speed with it, not on the read-heavy prefill phase at all. All three KV types load fine up to the full 262,144 context; f16 at that length costs 17,670 MiB per card. Two samples per type is thin, so treat the ranking as solid and the exact gaps between the numbers as approximate.
### Q8_0 weights: the tax lands on code, and f16 KV hits a wall at scale
I expected switching the model weights from Q4_K to Q8_0 to be roughly uniform: better numbers everywhere, a flat cost in speed and VRAM, independent of what kind of text was being generated.
It wasn't uniform. Against the Q4_K production numbers (59.632 code, 34.4 prose), Q8_0 weights gave 55.13 tok/s on code, a 7.5% drop, and 34.90 on prose, a 1.5% bump that is inside noise. The deep-context run came in at 46.10, and VRAM peaked at 19,824 and 18,674 MiB per card. The 8-bit tax landed almost entirely on code generation and left prose alone.
Then I tried pushing Q8_0 weights out to the full 262K context the way I had with Q4_K. With the main KV cache also at q8_0, 131K context gave 54.34 tok/s on code, 31.81 on prose, 42.51 deep. At the full 262,144 it gave 49.93 on a needle-in-a-haystack retrieval check, 48.77 deep, 51.11 code, VRAM peaking at 20,426 MiB with 2,102 MiB of headroom, and the retrieval check passing 3 of 3 across all three workloads.
Then I tried the config that had won the KV-quantization comparison above: main KV at f16, on top of Q8_0 weights, at 262,144. Straight CUDA out-of-memory. A mixed attempt, K cache at f16 and V cache at q8_0, hit a tensor-split assertion failure at the same context length. Backing off to 196,608 finally passed, at 52.32 tok/s, VRAM peaking at 20,944 MiB, headroom down to 1,584 MiB.
f16 KV won the earlier comparison at 64K context on Q4_K weights. It isn't a free lunch once the weights themselves get bigger: on Q8_0 weights, it can't reach full context on this card at all. Whether f16 KV is the right choice depends on the context length you actually need, not just on which KV type wins a benchmark at one fixed length.
Three things I was wrong about that day, in order. I read `-sm row`'s load failure as a hardware verdict on five-year-old Turing cards, and wrote off dual-GPU llama.cpp on this box entirely; upstream had deleted that code path a month earlier, and `-sm tensor` was alive under a different flag the whole time. I also assumed splitting the model across two cards would be the win by itself, which is why the +1.02% from `-sm tensor` alone was the most deflating number of the day. And I carried the single-card best draft depth into a new split configuration without re-testing it, which turned out to be wrong on every count once the compute path underneath it changed.
---
**Also in this series:**
- [#1 I scored a 22GB-modded 2080 Ti for ~$340 all-in](/en/blog/modded-2080ti-22gb-local-agent)
- [#12 Why isn't your 4-bit quant faster on a 2080 Ti?](/en/blog/why-4bit-isnt-faster-on-2080ti)
- [#13 Free 15% speedup: one broken chat template, one starving MTP head](/en/blog/chat-template-kv-mtp-free-speedup)
---
# [AI Agent] From 41 Minutes to 73 Seconds: Why My Coding Agent's Small Tickets Were So Slow
URL: https://ai-muninn.com/en/blog/agent-ticket-41min-to-73s
Date: 2026-08-21
Series: AI Workflow (Part 19)
A stuck coding-agent ticket took 41 minutes. The same type of ticket now takes 73 seconds. Dissecting 41 Codex sessions (734 minutes, 3,086 tool calls) turned up a formula: wall-clock time is roughly tool calls times 14.3 seconds, about 9 of which is pure model thinking. Command execution was under 38% of total time, so the machine wasn't the bottleneck. The fix was embedding prior results in tickets instead of referencing them, skipping startup lookups for tiny tickets, and re-measuring instead of trusting a "done" report. Caveat: across two weeks, only one delay was genuinely Codex's fault, a single 97-minute API stall.
You ask a coworker to grab you a coffee from the café downstairs, and he's gone for forty minutes. That's usually not because the café is far. It's because you never said which café, and company policy made him re-read the employee handbook before he was allowed to leave the building.
That's roughly what was happening to my AI coding agent tickets.
In my setup, Claude Code acts as the commander: it talks to me, makes the judgment calls, cuts tickets, and decides whether a result is good enough to accept. The actual engineering work — the file edits, config changes, benchmark re-runs — gets dispatched to [OpenAI Codex CLI](https://github.com/openai/codex) running headless in the background. Each job runs off a ticket, a single self-contained file with four sections: goal, steps, machine-checkable acceptance, and red lines (what not to touch). I wrote about the ticket format itself in an [earlier article](/en/blog/dispatch-tickets-not-conversations). A watchdog, a small script that checks whether the background job's log is still producing fresh output, catches the case where a hung process looks identical to a busy one.
The logic is supposed to be simple: judgment is expensive, execution is cheap, so the expensive model ([Claude Code](https://claude.com/claude-code)) spends its budget on deciding what a result means, and a cheaper executor grinds through the mechanical work.
It stopped feeling simple when tiny, change-one-flag tickets started taking 40+ minutes. Not the hard tickets, the small ones, where the entire job was "flip this number, re-measure, report back." I couldn't tell if the executor was actually slow or if I was just writing bad tickets, and the two explanations point at completely different fixes: one says pay for a smarter executor, the other says fix your own writing.
## Is Codex slow, or are my tickets bad?
I couldn't answer that from inside a single session. One ticket taking 41 minutes tells you nothing about whether 41 minutes is normal. So I pulled two weeks of Codex sessions and looked at all of them at once: 41 sessions, 734 minutes of wall-clock time, 3,086 tool calls, reconstructed from the `rollout-*.jsonl` session records plus my own ticket logs.
I didn't read 3,086 tool calls by hand. That's not a job for the commander. I handed the sweep to a read-only scout subagent to chew through the raw records, then judged the aggregates it handed back myself. That division of labor turned out to matter later, past the point where the numbers alone answer the question.
## Wall-clock time is roughly tool calls times 14.3 seconds
The aggregates converged on a rule of thumb: wall-clock time is roughly the number of tool calls times 14.3 seconds. About 9 of those seconds, on every single call, is pure model thinking — the executor deciding what to do next, not running anything.
I checked it against a ticket outside the sample: 54 tool calls predicted 12.9 minutes. The actual run took 13.0 minutes.
That reframes the whole question. If most of the 14.3 seconds per call is thinking rather than doing, the lever isn't "make the machine faster." It's "make the executor need fewer calls."
## Command execution was under 38% of the total time
Across the two weeks, actual command execution accounted for less than 38% of total time, and that number is an overestimate, since it includes time spent polling while a long job finishes. Zero ssh timeouts anywhere in the sample.
The machine wasn't slow. Whatever was eating the other 62%-plus was happening before or around the commands, not inside them.
## Where the 41 minutes actually went
One ticket shows exactly where the time went: a probe I'd codenamed `hina-nmax7-probe`. Forty-one minutes, start to finish. Here's the breakdown:
- **19.6 minutes**: idle gap between my launching the ticket and anything actually starting. Nothing was running at all.
- **8.6 minutes across 9 tool calls**: the executor re-digging through the previous ticket's logs, because that ticket's results weren't embedded in this one, only referenced.
- **13 minutes**: the actual investigative work the ticket was for.
- Of that 13 minutes, only **4.4 minutes** was real machine work: commands running, output being produced.

4.4 minutes out of 41. About a tenth of the ticket was the thing the ticket was supposedly for.
## What separated the 9-minute ticket from the 41-minute one
I went back and compared a ticket that ran fast, 9 minutes, 35 tool calls, against one that ran slow. The difference wasn't complexity. It was what got written into the ticket text.
The fast ticket pasted the actual flags, the actual reference numbers, and the actual boundary permissions directly into the file. Something close to this:
```
# Goal
Confirm whether raising the speculative-decode draft width improves decode
throughput without regressing acceptance rate.
# Steps
1. Change --spec-draft-n-max from 4 to 5 in the serve config.
2. Restart the inference server.
3. Run the standard decode-speed probe.
# Acceptance (machine-checkable)
- Decode tok/s >= reference value 47.5, or a logged reason it's lower.
- Server starts clean (no crash in the first 60 seconds).
# Red lines
- Touch only --spec-draft-n-max. Don't change any other serve flag.
- If decode tok/s regresses below 47.5, roll back to 4 and report. Don't
keep tuning other knobs to compensate.
```
The slow ticket, instead of a number like 47.5, said something closer to "the evidence already exists" and pointed back at an earlier run. That sentence is an instruction to go dig. Digging means more tool calls, and every tool call is taxed at roughly 14.3 seconds whether it's productive or not.
Referencing a number is not the same as providing it. The executor can't see what you saw. If the number isn't in the file, it doesn't exist yet.
## The config had drifted: cheapest model, priciest thinking setting
While dissecting the sessions, I found something unrelated to any of this: the executor model was configured as `gpt-5.6-luna` with reasoning effort set to `max`. That pairs the cheapest model in the lineup with the most expensive thinking setting, the opposite of what you'd want. The ops doc said the default should be `gpt-5.6-sol`. Nobody had checked whether the running config still matched the doc.
## The four fixes that cut the ticket to 73 seconds
I applied four changes:
1. Executor model back to `gpt-5.6-sol`. `luna` wasn't just the cheaper pick — it had been feeling noticeably dumber in practice.
2. Reasoning effort down from `max` to `medium`.
3. "If you reference it, include it" became a hard rule in the ticket template: paste the actual numbers and prior results into every new ticket, never point back at where they used to live.
4. Micro-tickets can now skip the mandatory startup knowledge-base lookup by carrying an explicit exemption phrase.
I re-ran a ticket of the same type. 73 seconds. 5 tool calls. Zero startup lookups. Executor model confirmed as `gpt-5.6-sol` in the session record. 16,130 tokens. No new tooling, no bigger machine, no smarter model than the one already on the shelf. Just a differently written ticket and a config file that matched its own documentation.
| | Before | After |
|---|---|---|
| Wall-clock | 41 min | 73 s |
| Tool calls | 54 (9 spent on log archaeology) | 5 |
| Startup KB lookups | every launch | 0 |
| Executor model | gpt-5.6-luna, effort max | gpt-5.6-sol |
| Tokens | n/a | 16,130 |
## Three rules that outlast this one ticket
1. **Embed the data in the ticket.** The executor can't read your mind, and it can't see the terminal you were looking at an hour ago.
2. **Never make the agent do log archaeology.** If a ticket forces the executor to go find something you already know, that's a bug in the ticket, not a task for the executor to work around.
3. **"Done" from the executor isn't done.** Re-run the acceptance checks yourself and measure it. A report is a claim, not a result.
## Deep dive
Skipping the rest of this article costs you nothing. The rules above are the whole point. What follows is how I got there, including the places I almost got it wrong.
### Why I didn't read 3,086 tool calls by hand
My first instinct was to read the records myself. That doesn't survive contact with the volume: 3,086 calls, and the deeper you wade in, the less attention you have left for the only question that matters, which is what the numbers mean. So the sweep went to a read-only scout subagent that chewed the raw records into aggregates, and I judged the aggregates. The formula came out of those, and it held on a ticket the scout hadn't touched: 54 calls predicted 12.9 minutes against a measured 13.0.
### The hypothesis I walked in with was wrong
I expected the story to be "Codex is slow." Across the full two weeks, exactly one delay was genuinely on Codex's side: a single 97-minute generation stall on the API side, an isolated incident, not a pattern. Every other minute of the 734 traced back to how tickets were written and launched, not to the model doing the work. If I hadn't checked that split before acting on the hunch, the fix would have been "move to a pricier executor model," which costs real money every ticket after that and leaves the actual problem, badly written tickets, untouched. The expensive fix would have made the dashboard look better and the underlying habit worse, since a smarter model would have kept quietly absorbing the cost of tickets that never should have needed 41 minutes in the first place.
### The near-miss during the 73-second re-run
The re-run's internal probe reported 26.2 tok/s decode speed against a reference of 47.5. For a moment that looked like a regression from the reasoning-effort change. It wasn't. The two numbers came from different measurement windows: a cold run on a short prompt versus a reference measured on a 64K-deep-context harness. Those two numbers just aren't comparable. I'd written "don't compare numbers from different measurement windows" into my own notes the day before this happened, and nearly broke it within 24 hours of writing it down.
### Three things that only showed up in the aggregate
- The environment called `nomcp` (short for no-MCP, meant to run headless with zero MCP tools loaded) doesn't actually block MCP tools. Suspected cause: a plugin path that bypasses the block. Unconfirmed.
- Watchdog verdicts, whether a hung job got flagged as dead, aren't persisted to disk anywhere.
- The launch log gets clobbered by a plain `>` redirect on relaunch, erasing the previous run's trail before anyone can read it.
All three follow the same pattern: the config says X, the system does Y. None of them would show up from watching one session at a time. They only surface when you dissect a batch instead of trusting whichever run happens to be in front of you, and none of them were what I went looking for. The formula and the four fixes were the answer to the question I asked; these three were the answer to questions I hadn't thought to ask yet.
---
# [Benchmark] Free 15% Speedup on a 2080 Ti: One Broken Chat Template, One Starving MTP Head
URL: https://ai-muninn.com/en/blog/chat-template-kv-mtp-free-speedup
Date: 2026-08-21
Series: 改裝 2080 Ti 22G (Part 13)
Two free llama.cpp changes: 41.6 → 47.6 tok/s (+15%) decoding Qwen3.8-27B Q4_K on a modded 2080 Ti 22GB. The GGUF's embedded chat template was a broken snapshot that re-rendered history differently every turn, so the KV cache missed and every turn re-prefilled from scratch (worst case, measured: 163 seconds per turn on a 64K-token chat). A community template file restores 94.5% cache hits. Separately, Qwen3.8's built-in MTP head drafts up to seven tokens but my config had `--spec-draft-n-max` pinned at 2; raising it to 4 is the sweet spot. Caveat: depth 6 OOMs at boot on a full card, and clean-probe acceptance (0.99) is about 20% higher than acceptance on real traffic.
My daily-driver LLM rig is a modded RTX 2080 Ti with 22GB of VRAM, serving [Huihui-Qwen3.8-27B-abliterated](https://huggingface.co/huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF) as a Q4_K GGUF: 16.8 GB, fully on GPU, llama.cpp 2026-08 build. (How this seat came to exist is [its own story](/en/blog/qwen38-27b-ud-on-one-2080ti).)
[Part 12](/en/blog/why-4bit-isnt-faster-on-2080ti) ended in a negative result: on Turing, swapping quantization formats buys you nothing. This part is the opposite. Two changes, no new weights, no quality trade-off: decode went from 41.6 to 47.6 tok/s, and multi-turn conversations stopped re-reading themselves from the top.
## Your GGUF ships a frozen chat template — mine was broken
A chat template is the jinja layer that renders a conversation — system prompt, turns, tool calls — into the literal token stream the model sees. Every GGUF embeds a copy, frozen at conversion time. It never tracks upstream fixes. If the template had a bug the day someone ran the converter, you are running that bug forever.
Don't trust the file on Hugging Face. Ask the running server what it's actually using:
```bash
curl -s http://localhost:8082/props \
| python3 -c "import json,sys; print(json.load(sys.stdin)['chat_template'])"
```
Mine turned out to be the old official Qwen template, with three telltale signs. All three were present:
- Line 47: `reasoning_effort|default('xhigh')`. Reasoning effort defaults to maximum. Every request that doesn't explicitly dial it down burns thinking tokens at the highest setting.
- Line 48: `raise_exception('Unexpected reasoning effort ...')`. A whitelist that rejects values it doesn't know — including OpenAI-style `"high"`, which is what half the client libraries send.
- The word `think` appears 8 times. In the fixed template it appears 98 times. The entire machinery for handling `` blocks in conversation history simply isn't there.
## A template that re-renders history differently kills the KV cache
llama.cpp keeps a prefix cache: the attention keys and values for tokens it has already processed. If your new prompt starts with the same tokens as the last one, those tokens cost nothing. Multi-turn chat should be the ideal case — each request is the previous request plus one exchange.
Except each request re-renders the full history through the template. If the template handles `` blocks inconsistently, the rendered history changes between turns. Different tokens, different prefix, cache miss, full re-prefill.
My worst observed case: a 64K-token conversation re-prefilled on every single turn. At this card's 394 tok/s prefill, that came out to a measured 163 seconds of waiting per turn before the first new token. The model wasn't slow. It was rereading the entire conversation each time I spoke.

## The fix is one drop-in jinja file and three flags
[froggeric's Qwen-Fixed-Chat-Templates](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates) is a community-maintained repo with one drop-in template covering Qwen 3.5, 3.6, and 3.8. Apache-2.0. Download the file, then:
```
--jinja \
--chat-template-file ./chat_template.jinja \
--reasoning-format deepseek
```
One naming trap: `--reasoning-format deepseek` names the think-tag dialect — `... ` as popularized by DeepSeek R1 — not the model brand. Qwen uses the same tags. There is no `qwen` value. I looked.
Verify the cache actually holds now. Send the same two-turn conversation twice; the second response carries the receipt:
```json
"prompt_tokens_details": { "cached_tokens": 69 }
```
against `prompt_tokens: 73`. That's a 94.5% hit rate, and the 4 misses are the genuinely new turn content — the cacheable part hit 100%.
## The MTP head is underfed at the default draft depth
Second change, unrelated mechanism. Qwen3.8 ships with an MTP head — a multi-token prediction head baked into the model, acting as its own draft generator for speculative decoding (guess a few tokens ahead, verify them in one forward pass; accepted guesses are nearly free). llama.cpp enables it with `--spec-type draft-mtp`.
My config had the draft depth, `--spec-draft-n-max`, pinned at 2 — and today's llama.cpp default of 3 is barely better. z-lab's [DFlash2 model card](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2) mentions in passing that Qwen3.8's built-in head is a seven-token head. I was asking a seven-token head for two tokens.
The tell was in my stats before I ever read that card: at depth 2, acceptance was 1.00. Constantly. Every draft accepted sounds like winning. It actually means the head is being asked for far less than it was trained to give.
| `--spec-draft-n-max` | decode tok/s | acceptance | mean tokens/step |
|---|---|---|---|
| 2 (my old setting) | 41.6 | 1.00 | 3.0 |
| 4 | 47.6 | 0.99 | 4.95 |
| 5 | 47.0 | 0.95 | 5.8 |
| 6, 7 | server won't boot | — | — |
The sweet spot is depth 4 at 47.6 tok/s: beyond it, acceptance decays faster than draft length grows, and beyond 5 the server refuses to start at all (see the deep dive).
## The full flag set
```
--jinja
--chat-template-file ./chat_template.jinja # froggeric's fixed template
--reasoning-format deepseek
--spec-type draft-mtp
--spec-draft-n-max 4 # was 2 in my config; llama.cpp default is 3
```
Decode 41.6 → 47.6 tok/s. Multi-turn cache hits sit at 94.5%; before the fix, a long conversation could stall for 163 seconds per turn. The money was on the table the whole time, hidden in a jinja file and a config value nobody had touched in months.
It's like a friend who makes you repeat the entire conversation from the beginning every time you talk — the problem isn't his memory. His note format keeps changing.
## Deep dive
Skippable. Act 1 above is the whole tutorial; this is the log of what went wrong while measuring it.
### Depth 6 doesn't lose the benchmark — it never boots
I assumed the depth sweep would trace a performance curve, with depth 6 and 7 simply landing slower than 4. So I set `--spec-draft-n-max 6` and restarted the service. The journal, verbatim:
```
E ggml_backend_cuda_buffer_type_alloc_buffer: allocating 260.02 MiB on device 0: cudaMalloc failed: out of memory
E common_speculative_init_result: failed to create MTP context
E srv load_model: failed to create MTP context
E srv llama_server: exiting due to model loading error
```
The MTP context buffer is allocated at boot and grows with depth. Depth 6 wanted an extra 260 MB; the card had 481 MB free, fragmented; cudaMalloc failed; the server exited. That broke my mental model of the sweep: on a maxed-out card, VRAM at boot — not the performance curve — sets the ceiling for many knobs. You never get to measure "slower". You get "won't start".
### A port that answers is not a server that works
I assumed my readiness check — curl the server, get a response — meant the new config was live. After the depth-6 OOM, systemd crash-looped the service, and each short-lived instance bound the port and happily answered `/v1/models` and even `tokenize` (neither touches the GPU) before dying on the first real generation request.
The check had to evolve three times. Version 1, "curl responds": fooled by the old instance still answering during graceful shutdown. Version 2, "curl responds and the PID changed": fooled by the crash loop's parade of short-lived new PIDs. Version 3, "actually completes a generation": finally honest, because generation is the first thing that touches the GPU. Ask the server to do work, not to say hello.
### Why is depth 6 logging acceptance 0.76 if it never booted?
Mid-sweep, a batch of acceptance-0.76 lines showed up in the journal and I read them as depth-6 results limping along before a crash — confusing, since the boot had failed. I checked the PID on those lines. Same PID as the old instance. The server had never restarted; those numbers were another session's live agent traffic landing inside my measurement window.
That exposed a useful split: clean probes accepted at 0.99, while real agent coding traffic over the same period accepted at 0.67–0.78, with mean accepted length 3.7–4.1. Probes are great for A/B-ing configs against each other. For real-world throughput, knock about 20% off the probe number. And before crediting any result to a config, verify the process that produced it was actually running that config.
---
# [Just for Fun — Advanced] Why Isn't Your 4-Bit Quant Faster on a 2080 Ti? I Tore Open the CUDA Backend to Find Out
URL: https://ai-muninn.com/en/blog/why-4bit-isnt-faster-on-2080ti
Date: 2026-08-20
Series: 改裝 2080 Ti 22G (Part 12)
Quantizing to 4-bit doesn't make a 2080 Ti faster — it only makes the file smaller. Dumping the CUDA backend's `.so` with `nm -D` shows why: Turing has kernels for s4×s4 and s8×s8, but none for s4×s8 or s4×f16. Every 4-bit format — GGUF, AWQ, GPTQ, Marlin — dequantizes weights back to fp16 before the GEMM, because that mixed-width instruction doesn't exist. Proof it's compute-bound, not bandwidth-bound: W4A8's 12.54GB (36% less than INT8's 19.53GB) still measured 454s against INT8's 239s. The only natively accelerated quant on this card is W8A8-INT8, and even that needs a quality check first — Wan 2.2's LowNoise DiT under W8A8 dropped to visible noise.
## Intro
Repacking a truckload of cargo from big boxes into small ones saves warehouse rent. It doesn't save labor — the movers still unpack every small box back into a big one before they carry it. You paid to shrink the boxes, and the carrying cost didn't move.
That's the trap in this article. You quantize a model. The file drops to half its size, but tok/s doesn't change. Sometimes it gets worse.
This is part 12 of the modded 2080 Ti series, picking up right where [#11](/en/blog/minimax-h3-on-modded-2080ti-22gb) left off. That one got MiniMax-H3 running on this card with INT8 and ruled out W4A4 on quality grounds — but it left one question unanswered: why is there nothing between them, no way to keep 4-bit weights without sacrificing quality? This article follows that question all the way down to the instruction level.
## Turing Has No Instruction for 4-Bit Times 16-Bit
I dumped comfy-kitchen's CUDA backend, `_C.abi3.so`, with `nm -D` and `c++filt`, then classified every symbol by `cutlass::arch::SmXX` and by operand width. Look at the last two columns — they're empty on every architecture:
| Arch | s4×s4 | s8×s8 | s4×s8 | s4×f16 |
|---|---|---|---|---|
| Sm75 (Turing, this card) | 32 symbols/dtype | 64 symbols/dtype | — | — |
| Sm80 (Ampere) | — | 96 symbols/dtype | — | — |
| Sm89 (Ada) | 56 symbols/dtype | — | — | — |

The hardware instructions `mma.s4.s4` and `mma.s8.s8` exist. `mma.s4.s8` does not. Both operands to a tensor core matrix multiply have to be the same width — you can't multiply a 4-bit weight against a 16-bit activation in one instruction, on any of these three architectures. This isn't a software gap. The instruction simply doesn't exist.
## So GGUF, AWQ, GPTQ, and Marlin All Take the Same Detour
Every 4-bit format on the market routes around the missing instruction the same way: dequantize the 4-bit weights back to fp16, once per layer, then run an ordinary fp16 GEMM.
The [TurboMind paper](https://arxiv.org/abs/2508.15601) (arXiv 2508.15601v2) spells out the sequence for its own INT4 path: load the INT4 weights, convert with I2F, dequantize to FP16, then run the FP16 tensor core GEMM. That's the same dequant-to-fp16 principle GGUF's Q4 kernels use.

Quantization on this card buys VRAM headroom. It does not buy time.
## The Proof: a Smaller Quant Format Ran Slower
If the win were bandwidth, a smaller file should always be faster. IQ3_M is smaller and more aggressive than Q4_K, and it measured slower on all three workloads:
| Workload | Q4_K | IQ3_M | Change |
|---|---|---|---|
| struct | 45.9 tok/s | 37.1 tok/s | −19% |
| reasoning | 45.3 tok/s | 39.9 tok/s | −12% |
| create | 29.3 tok/s | 28.6 tok/s | −3% |
Q4_K's dequant is a linear block multiply-add. IQ3_M's is a nonlinear codebook lookup — much heavier per weight. That moves the bottleneck from VRAM bandwidth to dequant compute. "Smaller file means faster" needs two things to hold: the workload has to be genuinely bandwidth-bound, and the dequant has to be cheap. Turing fails both.
## The One Native 4-Bit Path Is Broken by Design
W4A4 — 4-bit weights *and* 4-bit activations — does have a native instruction. At the kernel level it's fast: `blocks.0.attn.out_proj` went from 19.256ms in eager mode to 1.373ms in CUDA, a 14.02× speedup, and the biggest matrix in the model, which OOMs in eager, completes in 3.063ms under W4A4. Caveat: that was measured on a nearly-full GPU and may be inflated. End to end, across a full fp32 pipeline, it only bought 6.3%.
Quality is what kills it. Relative error is 0.0110 for INT8 versus 0.2005 for W4A4 — 18× worse. The full autopsy, including the color tearing it produced on a video model, lives in [#11's "Why W4A4 doesn't work" section](/en/blog/minimax-h3-on-modded-2080ti-22gb).
So this card has exactly two rungs on the quantization ladder: W4A4, native but broken, and INT8, native and fine. There's no middle band.
## What to Actually Run
This table covers the decision; the row underneath is the part people skip.
| Situation | Use | Why |
|---|---|---|
| Model doesn't fit in VRAM | GGUF Q4 | It runs — don't expect the dequant to be free |
| Fits, and you want speed | W8A8-INT8 | Only natively accelerated quant path: 2.07–2.83× vs FP16, measured on Wan FFN shapes |
| NVFP4 / FP8 | Skip | Emulated here — GGUF Q4_K_M ran 53.083s vs NVFP4's 142.434s (video-gen benchmark), GGUF 2.68× faster |
| Quality doesn't matter | W4A4 | Fast but 18× the error of INT8 |
INT8 isn't a free pass either. Wan 2.2's LowNoise DiT under W8A8 dropped to SSIM 0.345642 — visible confetti noise in the output. Always eyeball a quality A/B before you ship a quant, even the one with a real hardware path.
Quantization on this card still saves the rent. The labor bill doesn't shrink.
## Deep dive: the W4A8 case file
Reading this section is optional. It doesn't change what to run — that's already decided above. It's the investigation that got me there, including a hypothesis I killed with my own measurement and a claim from July I had to walk back.
### Reading 36% fewer weight bytes — why didn't I get a single second back?
comfy-kitchen's W4A8 path — 4-bit weights, 8-bit activations — ships with a claim from its author of roughly 1.09× INT8's speed. My expectation: W4A8's weights come to 12.54GB against INT8's 19.53GB, 36% less to read per step. Under fixed memory bandwidth, that alone should win.
I measured both on the same H3 DiT from #11, under identical conditions: 864×480, 124 frames, 14 steps, Spectrum on, seed 42.
| Format | Time | Residency |
|---|---|---|
| INT8 | 238.55s | `loaded partially`, 778.39MB offloaded |
| W4A8 | 454.19s | `loaded completely`, zero offload |
W4A8 was 90% slower with a fully resident model and zero offload — the best-case residency scenario. If it were bandwidth-bound, that's exactly backwards. The slowness is compute, not memory traffic, which means tuning `--reserve-vram` for this comparison is pointless. My own experiment killed my own hypothesis.
A related datapoint, with an explicit caveat attached: on the H3 video DiT (2026-08-05, same box), a fully resident Q3 GGUF took 189.23s against an offloaded INT8's 110s — 72% slower. But the two arms there differ in more than quantization (Q3_K_M vs INT8-ConvRot, different residency), so on its own it only proves that a fully-resident GGUF still loses to an offloaded INT8. The W4A8-vs-INT8 pair above is the clean isolation.
### The banner prints `asym_w4a8_int8` — so why is it slow?
First suspicion: maybe W4A8 isn't actually dispatched as a native op — maybe it's just masquerading as one while a slow generic kernel runs underneath. The startup banner seemed to refute that; it lists `asym_w4a8_int8` under `Native ops:`.
Reading the code showed the suspicion was right, just not in the way I expected:
```python
# around comfy_kitchen/backends/cuda/__init__.py:2258
used = _C.cutlass_int8_dequant(...) # returns False on Turing (guard requires major >= 8)
if not used:
return eager_w4a8_int8_linear(...) # ← the slow path
```
`_cuda_device_supports_cutlass_int8_dequant` requires `major >= 8`. Turing is `major == 7`, so every call falls into `eager_w4a8_int8_linear`. The banner only means "the runtime recognizes this op's name." It says nothing about whether that op has a fast path on your card.
That distinction generalizes, so I kept a table of it:
| What you see | Why it isn't evidence of a fast path |
|---|---|
| `Native ops:` lists the op name | Not-in-disabled-list, not hardware acceleration |
| `--force-fp16` | Storage format only |
| `Using sage attention` in the startup banner | The flag was accepted, not that it dispatches fast |
| `pip install sageattention==2.2.0` succeeds | Installable isn't the same as dispatchable on this card |
### Is the guard hiding missing software, or missing hardware?
My assumption after finding the guard: the cutlass fused-dequant template just wasn't compiled for sm_75 yet — a software gap, patchable with enough time.
I dropped below the application layer and went back to the `nm -D` dump, this time with output dtypes broken out:
| Arch | Operand width | Output dtype | Symbols |
|---|---|---|---|
| Sm75 | s4×s4 | bf16 | 32 |
| Sm75 | s4×s4 | f16 | 32 |
| Sm75 | s4×s4 | f32 | 32 |
| Sm75 | s8×s8 | bf16 | 64 |
| Sm75 | s8×s8 | f16 | 64 |
| Sm75 | s8×s8 | f32 | 64 |
| Sm80 | s8×s8 | bf16 | 96 |
| Sm80 | s8×s8 | f16 | 96 |
| Sm80 | s8×s8 | f32 | 96 |
| Sm89 | s4×s4 | bf16 | 56 |
| Sm89 | s4×s4 | f16 | 56 |
| Sm89 | s4×s4 | f32 | 56 |
No mixed-width symbol shows up on any architecture, at any output dtype. The absence is at the instruction-set level, not the compiled-template level. That distinction matters because the fix is different: a software gap means wait for an update; a hardware gap means change your method.
### Two landmines I stepped on along the way
**(a) A silent METADATA claim.** comfy-kitchen 0.2.28's wheel METADATA declares no torch dependency, which reads as version-agnostic. But its `na.py` uses PEP-585 `list[int]`, and torch 2.6.0's `infer_schema` only accepts `typing.List[int]`. Nothing errors until schema inference actually runs. Production was down for 4 minutes. METADATA silence isn't proof of no dependency.
**(b) My own leftover script.** `h3_rescale.py`, with `SCALE=1.0`, is a numeric no-op — but it still calls `sc.mul_(INV)` unconditionally. W4A8 stores `weight_s_rel` as fp8, and Turing has no fp8 units, so the call throws `"mul_cuda" not implemented for 'Float8_e4m3fn'`. Code written for an old config becomes a roadblock in a new one, and it never announces that it's idle.
### What my July selection matrix got wrong — and what it still got right
My selection matrix from July claimed three things: AWQ/W4A16 uses native `mma.sync.s4` on Turing, Marlin needs sm_80+, and AWQ beats GGUF by 1.5–2×.
Six days later, the TurboMind paper overturned the first claim — it's dequant-to-fp16, not a native mixed-width instruction. A month after that, vLLM v0.27.1's docs overturned the second — Marlin has supported sm_75 since roughly v0.14.
Both specific claims were wrong. The underlying conclusion never moved: Marlin is still a dequant kernel, just a well-optimized one, and at batch size 1, no 4-bit format on this card runs on native mixed-width MMA. The software path changed; the hardware limitation didn't.
### A signal worth waiting for
The s8×s8 kernel is already in the official comfy-kitchen wheel. The only thing blocking W4A8 on this card is the one arch guard at `major >= 8`. If fused dequant opens up for sm_75, interpolation puts W4A8 (12.54GB) around 104s — 12% faster than INT8, roughly matching the author's ~1.09× claim.
That's interpolation, not a measurement, and even verifying it is currently walled off. My attempt to build it from source died at phase 0: the official build requires CUDA ≥ 12.8, this box has nvcc 12.4, and no `.so` was ever produced. For now it's a reason to wait, not a verified result.
---
**Also in this series:**
- [#9 0xc0000409: When My AI Service Died Silently and the Log Ate the Evidence](/en/blog/0xc0000409-crash-detective-2080ti)
- [#10 Two Identical 2080 Tis, One 3.4× Slower — the Culprit Was a Single dtype Log Line](/en/blog/2080ti-turing-fp32-fallback)
- [#11 Wait, a 2080 Ti Can Run MiniMax-H3? 1080p With Audio on a 2018 Card](/en/blog/minimax-h3-on-modded-2080ti-22gb)
---
# [Junk-Tier Big Models #5] Qwen3.8-27B on a 2018 22GB card: 30 tok/s, and it one-shot a 3D scene
URL: https://ai-muninn.com/en/blog/qwen38-27b-ud-on-one-2080ti
Date: 2026-08-18
Series: 洋垃圾跑大模型 (Part 5)
Old hardware gets demoted quietly. A card that was a flagship in 2018 becomes the card you run batch jobs on, then the card you keep meaning to sell. Mine is a modded RTX 2080 Ti with 22GB on it, and for most of this year its job has been making thumbnails.
Then Qwen3.8-27B fit on it. The full 27B, at a quantization that holds up, with 128K of context and about 30 tokens per second.
The first thing I asked it to do is the reason this article exists.
## One sentence, 430 seconds, a voxel pagoda that runs

👉 **[Open it and have a play](/demos/qwen38-ud-voxel-pagoda.html)** — drag to orbit, scroll to zoom.
That is a floating island: three-tier red pagoda, grey tiled eaves, a spire on top, a torii gate, cherry trees. 20,506 blocks. It came back as one HTML file, generated in a single shot, and I did not edit a line of it.
The prompt was 55 words and named no library:
> Design and create a very creative, elaborate, and detailed voxel art scene of a pagoda in a beautiful garden with trees, including some cherry blossoms. Make the scene impressive and varied and use colorful voxels. Use whatever libraries to get this done but make sure I can paste it all into a single HTML file.
It chose Three.js itself. It decided to make the island float. The day/night toggle and the petal-storm button were not requested. 430 seconds, 13,513 tokens.
## What you need
- **A 22GB or larger GPU.** Mine is a modded RTX 2080 Ti 22G — Turing, compute capability sm_75, 22,528 MiB. A 24GB card gives you more headroom.
- **A CUDA build of [llama.cpp](https://github.com/ggml-org/llama.cpp).** I used `b10064`. No rebuild is needed for this model — the stock binary just runs it. ⚠️ One gotcha worth ten minutes of your life: the metadata keys inside this GGUF are prefixed **`qwen35.`**, not `qwen38`, so grepping the header for `qwen38` turns up nothing.
- **17 GB of disk.**
## Step one: get the weights
Take the **UD-Q4_K_XL** build from [unsloth's GGUF repo](https://huggingface.co/unsloth/Qwen3.8-27B-GGUF). It is a dynamic quant, meaning the precision is not uniform across the model — layers that hurt quality when squeezed keep more bits, the rest get fewer. At the same file size it beats a flat Q4_K.
```bash
huggingface-cli download unsloth/Qwen3.8-27B-GGUF \
Qwen3.8-27B-UD-Q4_K_XL.gguf \
--local-dir ~/models/qwen38-27b-ud
```
You get **16.7 GiB** (17,923,394,624 bytes). The same repo also has `mmproj-F16.gguf` at 884 MiB — that is the vision projector, which you only need if you want to feed it images. Skip it for text.
## Step two: start the server
```bash
CUDA_VISIBLE_DEVICES=0 \
llama-server -m ~/models/qwen38-27b-ud/Qwen3.8-27B-UD-Q4_K_XL.gguf \
--alias qwen38-27b-ud --host 0.0.0.0 --port 8082 \
-ngl 99 -c 131072 -ctk q4_0 -ctv q4_0 \
--parallel 1 --jinja -fa on --metrics \
--spec-type draft-mtp --spec-draft-n-max 2 \
--chat-template-kwargs '{"enable_thinking":false}' \
--temp 0.7 --top-p 0.80 --top-k 20 --min-p 0.0 \
--presence-penalty 1.5 --repeat-penalty 1.0
```
Loaded, VRAM sits at **20,788 / 22,528 MiB**. That leaves 1.7 GB spare.
## Step three: verify what is actually loaded
```bash
curl -s http://127.0.0.1:8082/props | python3 -c \
"import json,sys; d=json.load(sys.stdin); \
print(d['model_path'].split('/')[-1], d['default_generation_settings']['n_ctx'])"
```
You want the filename you downloaded and `131072`.
⚠️ **Trust the file `-m` points at, never the service description string.** My systemd unit description still names a model from three months ago, while the `-m` path underneath it has been swapped twice since. When someone asks what a machine is running, the description is the least trustworthy field on it.
## What each flag does
| flag | why |
|---|---|
| `-ngl 99` | all layers onto the card. The whole 27B fits, so there is none of the arithmetic about how many layers to offload that MoE models force on you |
| `-c 131072` | 128K context. 192K also fits, but 128K is plenty for normal use |
| `-ctk q4_0 -ctv q4_0` | store the KV cache — the running memory of the conversation — at 4-bit. A 128K KV cache does not fit uncompressed |
| `-fa on` | Flash Attention. Turing gets it too |
| `--spec-type draft-mtp` / `--spec-draft-n-max 2` | the model ships its own MTP head, a small extra layer that guesses the next couple of tokens so the big model can verify them in one pass instead of generating them one at a time. **n=2 is the measured sweet spot** — n=3 came out slower |
| `--parallel 1` | one request at a time. The card is already saturated, so concurrency just makes everyone queue |
| `--temp 0.7 --top-p 0.80 --presence-penalty 1.5` | the official non-thinking sampling values, copied as-is |
| `--metrics` | exposes `/metrics`, which is where the tok/s numbers below come from |
## 30-31 tok/s, with less than 1 tok/s of spread
Same prompt, three runs:
| run | seconds | completion tokens | tok/s |
|---|---:|---:|---:|
| 1 | 430.5 | 13,513 | 31.4 |
| 2 | 382.8 | 11,630 | 30.4 |
| 3 | 421.6 | 13,156 | 31.2 |
The consistency matters more to me than the number. On this card, almost all the variance I measure comes from the prompt, not from the machine.
## The most important parameter is not in the launch command
The command above carries `--chat-template-kwargs '{"enable_thinking":false}'`, so **thinking is off by default**. That default exists for short agent loops: a 150-word task pulled off a task board cannot afford five minutes of deliberation before it starts.
Leave that default in place for a big job, though, and it cannot one-shot 20,000+ characters of working code. It will still write, still write at length, and then quietly come apart somewhere — a variable name that stops matching, a loop condition that turns to garbage, or a scene that builds correctly with the camera parked where none of it is visible.
The fix is to turn thinking back on per request, with a ceiling:
```bash
curl -s http://127.0.0.1:8082/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen38-27b-ud",
"messages": [{"role": "user", "content": "…"}],
"max_tokens": 40960,
"chat_template_kwargs": {"enable_thinking": true},
"thinking_budget_tokens": 2048
}'
```
`thinking_budget_tokens` hard-stops the reasoning at 2048 tokens and lets the answer finish. **Without the ceiling it will spend the whole budget reasoning and hand you an empty answer.** One run burned past 30,000 tokens and came back with `finish_reason: length` and not a word of content. The pagoda used roughly 2,000 tokens of reasoning and 13,513 of answer.
## It worked once in three runs
Same config, same prompt, three tries today: one scene that runs, two that do not.
The two failures both produced code that loads and throws no syntax error, and then sits on its own loading screen forever, because one line inside the animation loop throws on every frame. So one-shotting a working 3D scene at this size is a dice roll, not a capability you can schedule around. What you see above is what it can do, not what it does every time. In practice: run it a few times and pick one, or treat the output as a draft and walk the last mile yourself.
Which is also why acceptance has to mean opening a browser. Both failures passed every static check I threw at them, `node --check` included. The code is perfectly legal JavaScript. The only way to find out it does not move is to run it.
---
**Also in this series:**
- [#1 119B MoE on three 2080 Tis at 74 tok/s](/en/blog/run-119b-moe-on-3x-2080ti)
- [#2 Poolside Laguna S 2.1 (118B coding MoE) on one 22GB card](/en/blog/laguna-118b-moe-on-one-2080ti)
- [#3 284B on one 22GB card, 18% faster than a DGX Spark](/en/blog/deepseek-v4-flash-284b-on-one-2080ti)
- [#4 DeepSeek-V4-Flash-0731 on one 22GB 2080 Ti](/en/blog/ds4-0731-on-one-2080ti-howto)
---
# [Announcement] On hiatus until August 21
URL: https://ai-muninn.com/en/blog/back-after-acute-cholecystitis
Date: 2026-08-15
The open models are landing thick and fast right now, and my gallbladder picked exactly this moment to give out. Nothing new here for a couple of weeks.
Hi everyone. This is a genuinely great stretch to be into local models — the full DeepSeek V4 Flash, Qwen 3.8, MiniMax H3, all within days of each other. There is a ridiculous amount to play with. Go enjoy it.
I'd love to be joining in. Instead I've spent about a week in a hospital bed: gallstones, a blocked duct, and the kind of inflammation that gets you admitted rather than sent home with painkillers. I kept telling myself I could still get some benchmarking done between the bad stretches.

I can't even.
(Anyone who can actually run benchmarks through this is built differently. XD)
Look after yourselves out there.
---
# [Benchmark] Running MiniMax-H3 on a DGX Spark — and why NVIDIA VSR is off the table for now
URL: https://ai-muninn.com/en/blog/dgx-spark-minimax-h3-span-upscaler
Date: 2026-08-07
Series: DGX Spark (Part 41)
Fifteen seconds of 1080p with its own audio, generated on a DGX Spark: **741 s**, down from 1,477. The biggest single win was not the sampler — it was the upscaler nobody profiles. Replacing Real-ESRGAN with **SPAN** took **282.3 s (22.3%)** off the total, from a model 15x smaller. One 997 s run splits three ways: sampling 56%, upscaling 32%, everything else 12%. The caveat is a hard one: NVIDIA's own Video Super Resolution cannot run here, because `nvidia-vfx` ships x86_64 wheels only and an NVIDIA engineer has said on the forum there is currently no plan to change that.
## The plain version: some things cannot be installed, because there is nothing to install
If you write software, you carry an assumption you probably never notice: as long as you are willing to do the work, the feature exists. Wrong version, upgrade it. Missing dependency, add it. Worst case, pull the source code and build it yourself. Everything is reachable if you are stubborn enough.
Precompiled vendor binaries break that assumption, and they break it completely.
A CPU architecture is the instruction set a chip understands. Most computers use x86_64, the Intel and AMD one. Phones, Apple Silicon Macs and this machine use ARM. Compiled code does not carry across: a program built for one will not run on the other, and the fix is to compile it again for the architecture you have.
Except compiling it again requires having the source. NVIDIA's video upscaler does not ship as source. It ships as finished binaries, and the vendor decides in advance which architectures get built. They built x86_64. They did not build ARM, and they have said they do not plan to.
So this is not a difficult install. There is nothing to install, nothing to build, and no amount of stubbornness that gets around it. Most of the time you never notice, because most of the time somebody already built the thing for your machine. The one time you do notice, it is a wall with no door.
---
## Fix the upscaler first, the sampler second
When a suitcase comes in over the airline limit, everyone repacks the clothes. The clothes are what you can see. The heavy thing is usually a pair of boots at the bottom that nobody thought to weigh.
I spent two days on step counts and attention kernels — the clothes — and never once put a stopwatch on the upscaler sitting at the end of the graph. When I finally did, it was 32% of the render.
[The sibling article](/en/blog/minimax-h3-rtx5090-speedup-vsr) runs the same model on a single RTX 5090, where three stacked switches halved the time. This one is a DGX Spark, which is a different machine in the two ways that matter here: it has one pool of memory shared between CPU and GPU, and it has an ARM CPU, which takes the best switch from that article permanently off the table. Fifteen seconds of 1080p video with its own audio track now takes **981 seconds**, down from 1,477.
---
## The machine and the model: MiniMax-H3 makes the picture and the sound in one pass
The machine is a DGX Spark: a GB10 chip, 128 GB of unified memory on the spec sheet and 121 GB that `free -g` will actually hand you (one pool of RAM that the CPU and the GPU both allocate from, rather than system RAM plus separate video memory), an aarch64 CPU, and sm_121 as its compute capability — NVIDIA's per-generation capability number, in this case the Blackwell generation.
The model is [MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3), 33B parameters. The thing that makes it worth the trouble is that it generates the video **and** its audio in a single forward pass, meaning one trip through the model produces both. Lip sync is not something you align afterwards with a separate tool; it is inherent, because the mouth and the sound were computed together.
Everything below is the working configuration, in the order you would do it.
---
## Step one: stop the resident model to free up the memory
The Spark has a language model running on it as a service. Before anything else, stop it:
```bash
systemctl --user stop ds4-mia-v053-0731-8000.service
```
This step cannot be skipped, and it is not housekeeping. Unified memory means there is one pool: the resident model holds about 85 GB of it, MiniMax-H3 peaks at about 72 GB, and 85 + 72 is more than 121. On a machine with separate video memory you would get away with this, because the language model would be sitting in a different place. Here they are competing for the same bytes.
Watch it drain before you continue:
```bash
free -g # before: 116 / 121 used
# after: 4 / 121 used
```
---
## Step two: launch with --cache-none, or your benchmark reports 0.00 seconds
```bash
~/comfy-venv/bin/python ~/ComfyUI/main.py \
--listen 127.0.0.1 --port 8188 \
--cache-none --use-sage-attention
```
(`--use-sage-attention` turns on SageAttention, a drop-in replacement for the attention kernels that runs faster. Once it is installed, it is just this flag.)
`--cache-none` is required, not optional, and it is required for a reason that will otherwise waste an afternoon. ComfyUI keys its execution cache on node inputs. Resend the same prompt with the same seed and the entire graph hits cache and reports **0.00 seconds** — no error, no warning, just a spectacular number. Benchmark without that flag and you will measure the cache.
`--use-sage-attention` switches the attention implementation to SageAttention. More on why that is worth 20% further down.
---
## Step three: five files, and NVFP4 is real hardware here
Five downloads, each into its own directory under `~/ComfyUI/models/`:
| File | Directory |
|---|---|
| `minimax_h3_fl2va_pruned_nvfp4.safetensors` | `diffusion_models/` |
| `qwen3vl_32b_heretic_minimax_h3_nvfp4.safetensors` | `text_encoders/` |
| `minimax_h3_video_vae_fp16.safetensors` | `vae/` |
| `minimax_h3_audio_vae_fp32.safetensors` | `vae/` |
| `2xNomosUni_span_multijpg.safetensors` | `upscale_models/` |
Two of those need a word. The text encoder is the part that turns your prompt into numbers the video model can condition on. And there are two VAEs — a VAE being the encoder/decoder pair that converts between real pixels or audio samples and the compressed space the model actually works in — because the video and the audio are two independent outputs, each with its own compressed space.
NVFP4 is a 4-bit number format — the same weights in far less space, at some cost in precision. What matters here is that this chip understands it natively. You can see it at startup: `nvfp4` appears in the `Native ops` line, which means real hardware instructions rather than software emulation. So the quantised build saves time here, not just disk space. Do not assume the same on a non-Blackwell card, where NVFP4 only saves disk space.
---
## Step four: 14 steps, 960x540, and upscale to 1080p
The sampler is `res_multistep` with the `simple` schedule, 14 steps, 24 fps, length 362 frames — which is 15.08 seconds. Generate at 960x540 and upscale to 1920x1080. Spectrum is enabled at its author's defaults; it is the community node pack for H3 (`ComfyUI-Spectrum-MiniMax-H3`) and it takes over the sampling stage.
Two of those numbers are choices rather than defaults.
**Why 14 steps and not the template's 20.** Twenty is conservative in the way shipped defaults usually are. Fourteen measured 14.5% faster on this machine, 1,477 s down to 1,263.5 s, and I could not see a quality difference. There is a gap in that judgement and I have not closed it: what I compared was the **picture**. This is a talking pipeline, and I never put 14 steps and 20 steps side by side and listened to the dialogue. I shipped 14.
**Why 960x540 plus an upscale, rather than native 1080p.** Because it is cheaper, and in the opposite direction from how it sounds. On a roughly 5-second test clip at 20 steps with the same seed, native 1344x768 took **637 s**, while generating at 960x540 and upscaling 2x with ESRGAN took **349.9 s** — **1.82x faster, with a larger output frame**. The sampling canvas shrinks far more than the upscaler costs.
⚠️ That comparison is a short clip at 20 steps, **not the same job** as this 15-second 14-step pipeline. Read it for direction, not for seconds.
---
## Where 997 seconds actually go: sampling 56%, upscaling 32%, everything else 12%
The first move in optimising this was not to change anything. It was to find out where the time goes. Read the middle row of this table — that is the one nobody profiles.
| Stage | Seconds | Share |
|---|---|---|
| Sampling (14 steps) | 558 | 56% |
| Real-ESRGAN upscale | 316 | 32% |
| Load + VAE decode + audio/video encode | 123 | 12% |

Upscaling alone eats a third of the run, and across two days of tuning step counts and swapping in SageAttention I never measured it once.
The bottom row kills a common intuition too. "VAE decode is expensive" is wrong here: model loading, both VAEs and the video encode add up to 123 s together, less than half of what the upscaler costs on its own.
So: fix the upscaler first, the sampler second.
---
## SPAN upscales the same 362 frames 6.4x faster than Real-ESRGAN
NVIDIA's Video Super Resolution cannot be installed on this machine at all — evidence for that in the next section — so instead of the vendor path I went to the lightweight architectures supported by [spandrel](https://github.com/chaiNNer-org/spandrel), a library that loads a wide range of upscaling model formats, and picked SPAN.
Same 362 frames, 960x540 to 1920x1080, on the same machine. The column to read is the middle one:
| Upscaler | Seconds | Model size |
|---|---|---|
| Real-ESRGAN x2plus | 316.0 | 64 MB |
| **SPAN** | **49.2** | **4.3 MB** |
| Bilinear stretch (baseline) | 15.4 | — |
That last row is not an upscaler competing with the other two — it is the floor. Reading 362 frames, resizing them and writing them back costs 15.4 s no matter what you use, so I subtracted it from the first two rows. What is left in those rows is what the upscaler itself costs.
**6.4x faster, from a model 15x smaller.**

---
## The full ladder: 1,477 s down to 741 s, half the time for two switches
Every row below is measured except the last one. Compare rows two and four — they differ in exactly one thing, the upscaler.
| Steps | SageAttention | Upscaler | Total |
|---|---|---|---|
| 20 | off | Real-ESRGAN | 1,477 s |
| 14 | off | Real-ESRGAN | 1,263.5 s |
| 14 | on | Real-ESRGAN | 1,010 s |
| 14 | off | **SPAN** | **981.2 s** |
| **14** | **on** | **SPAN** | **741.0** |
Rows two and four: 1,263.5 down to 981.2, a saving of **282.3 s (22.3%)** from swapping the upscaler and nothing else.

The bottom row is the production configuration, both switches on. For a while that cell was an estimate — multiply the two savings and you land near 743 s — and an estimate does not belong in a column of measurements. So I went back and ran it: **741.0 s**, with `execution_cached=0` so nothing was served from cache. The estimate was off by two seconds.
I later ran the same configuration once more to change the dialogue, and got **731.0 s**. So run-to-run spread on this cell is about **1.4%** — do not read a few seconds as a signal.
That run's output is the clip below. I gave it a line from this article to say:
Episode 5 in the second half is the story of why that measurement took so long to happen.
One more gap worth knowing about before you copy this: I compared SPAN and Real-ESRGAN output on a phone screen and could not tell them apart. I have not compared them side by side on a large display. I kept the Real-ESRGAN files in place, so switching back costs one node change.
---
## The same clip on three machines: 314 / 741 / 1,383 seconds
Same model, same 15.08-second 362-frame 1920x1080 clip with audio, each machine running the config I actually ship on it:
| machine | released | config | seconds | vs 5090 |
|---|---|---|---|---|
| [RTX 5090](/en/blog/minimax-h3-rtx5090-speedup-vsr) | 2025 | 14 steps · SageAttention · RTX VSR | 314.0 | 1.0x |
| **DGX Spark (GB10)** | 2025 | 14 steps · SageAttention · SPAN | **741.0** | 2.4x |
| [Modded RTX 2080 Ti 22G](/en/blog/minimax-h3-on-modded-2080ti-22gb) | 2018 | **20 steps** · SageAttention · RTX VSR | 1,383 | 4.4x |
Eight years of hardware is worth **4.4x** on this particular job — and all three finish.
⚠️ **This is not a single-variable comparison.** It is three shipped configs. The biggest mismatch is step count: the 2080 Ti run is 20 steps while the other two are 14. Going 20 to 14 measured 14.5% faster on the GB10, so the 2080 Ti would be quicker at 14 — I have not run it.
## Video Super Resolution cannot be installed on aarch64, and NVIDIA says there is currently no plan to change that
Four layers, each one enough on its own.
**The wheel does not exist.** A wheel is the prebuilt package format pip installs. `pip download nvidia-vfx` fails on aarch64. NVIDIA's own index carries exactly two platforms: x86_64 Linux (`manylinux_2_27_x86_64.manylinux_2_28_x86_64`) and Windows amd64. **Nothing for ARM.**
**The source is public, but building it gets you a loader with nothing to load.** I had this layer wrong at first; this is the corrected version.
NVIDIA does publish [Maxine-VFX-SDK](https://github.com/NVIDIA-Maxine/Maxine-VFX-SDK), so "there is no source" is simply false. But open `nvvfx/src/NVVideoEffectsProxy.cpp` and you see what that source is:
```c
#define nvLoadLibrary(library) dlopen("lib" library ".so", RTLD_LAZY)
static const HINSTANCE NvVfxLib = nvLoadLibrary("NVVideoEffects");
... nvGetProcAddress(getNvVfxLib(), "NvVFX_CreateEffect");
```
**Every API call is a `dlopen` plus a `dlsym`.** What is public is a shim. The effects themselves live in `libNVVideoEffects.so`, which is closed, ships only inside the wheel, and only for x86_64. Compile the shim for aarch64 and it will happily go looking for something this platform does not have.
Unpacking the x86_64 wheel shows what the shim is reaching for: I unpacked the x86_64 wheel to check. `nvidia_vfx-0.1.0.1-cp312-abi3-manylinux_2_27_x86_64.whl` is 597 MB and 39 files, and **zero** of them are compilable sources. What is inside is `libnvinfer.so.10` (TensorRT, NVIDIA's inference runtime), `libnvidia-ngx-vsr.so.1.8.2` (45 MB, which is VSR itself), a set of `libnpp*.so.12` image-processing libraries, and five `.py` files that are a thin binding layer over the binaries. The other repo, `NVIDIA-Maxine/nvidia-vfx-python-samples`, is sample applications — a different thing again from the SDK source above, and neither one contains the effect implementations.
**Withholding it is the design, not an oversight.** I went looking for `libnvidia-ngx-vsr.so` on the machine itself, in case the driver shipped it. It is nowhere. What does exist is `/usr/lib/aarch64-linux-gnu/libnvidia-ngx.so.580.159.03`, and that is the loader, not the feature. Quarkslab's reverse engineering of this stack states it flatly: on Linux the `libnvidia-ngx-dl{feature}.so` files are "not publicly provided". ⚠️ They were looking at older NGX driver files rather than this wheel, but it matches what I found on the machine — the driver ships the loader, the feature comes from somewhere else, and that somewhere else is x86_64 only. The driver ships the thing that would load VSR, and does not ship VSR. That is not a missing install. That is the design.
**Officially, there is no plan.** An NVIDIA employee posting as `aniculescu` answered the DGX Spark forum thread "No nvidia-vfx wheel for DGX Spark" (2026-04-01) with "There is currently no plan to add NVIDIA VFX support on Spark". That thread started exactly the way mine did — someone installed `Comfy-Org/Nvidia_RTX_Nodes_ComfyUI` on a Spark and hit the missing wheel, filed as GitHub issue #9.
Sort this out before you go searching. Four NVIDIA products have confusingly similar names, and only one of them is the thing in this section:
- **Maxine / Video Effects SDK, the `nvidia-vfx` package** — Linux and Windows, x86_64 only. This is the one.
- **RTX Video Super Resolution** — a consumer driver feature, no batch API to call.
- **RTX Video SDK** — Windows only.
- **Maxine NIM**, now branded AI for Media — a separate release line that runs on cloud, datacenter and workstation.
---
## Three traps specific to this machine
**Memory can only be read with `free -g`.** GB10's `nvidia-smi` returns `[N/A]` in the memory column. That is not broken and it is not zero: with unified memory there is no separate block of video memory to report, so there is no number to print. I stared at `nvidia-smi` for a while assuming it was a permissions problem.
**Swapping ComfyUI instances means waiting for memory to actually drain.** After killing an instance holding 72 GB, do not kill it and `sleep 10` before starting the next one. That 72 GB will not have been released yet, and the new instance loading on top of it pushes the machine into an out-of-memory kill. Poll `free -g` until there is genuinely enough free, then start. This is episode 5 below, and it cost me the machine for five minutes.
**Do not add `LD_LIBRARY_PATH=/usr/local/cuda-13.2/compat`.** The pip build of torch does not need it. I tested it as a single variable and it changed nothing except the number of things that could go wrong.
---
## SageAttention 2.2.0 installs on sm_121 and aarch64 straight from the wheel
The community advice for sm_121 is that you have to build SageAttention v3 with `compute_121a`. That was not my experience. Version 2.2.0 installs directly from the wheel under torch 2.13.0+cu130 on this machine and works.
It takes **20.1%** off the full pipeline (1,263.5 s to 1,010 s), or 31.6% if you compare like for like against the stage it actually touches. The RTX 5090 in the sibling article measured 18.8% for the same change, so two different chips agree on the rough size of the win.
---
## Deep dive: the calls I got wrong
The rest of this is the working record: five episodes of what I expected, what I did, and where the expectation turned out to be wrong. Skip it and the configuration above still works.
### 1. Measuring the upscaler without running the pipeline
**What the problem was.** A 997-second total. I knew the upscaler was part of it and had no idea how big a part.
**What I expected to do about it.** Run the whole pipeline twice, swap the upscaler between runs, subtract. That is 34 minutes for the first answer, and another 34 for every candidate after it.
**What I actually did.** The upscaler eats decoded frames and does not care how those frames were produced. So skip generation entirely and feed it a finished clip:
```text
LoadVideo -> GetVideoComponents -> ImageScale(960,540)
-> [upscaler under test] -> CreateVideo -> SaveVideo
```
**Whether it worked.** It worked. Three variants measured in 15 minutes instead of an afternoon: bilinear 15.442 s, Real-ESRGAN 331.466 s, SPAN 64.626 s.
**Where that expectation was wrong.** I believed that measuring one stage requires running the whole pipeline. It does not. Any stage that does not care about its upstream can be lifted out and weighed on its own, and a ComfyUI graph is full of nodes like that — the constraint was in my head, not in the graph.
### 2. The negative-103-second VAE
**What the problem was.** I wanted the time distribution and had only the total.
**What I expected to do about it.** Subtract the two pieces I knew from the total. I put the cold model load — reading 38 GiB of weights off disk the first time — at 211 s **from memory, not measurement**; sampling comes straight out of the logs; whatever was left is "VAE plus upscale plus encode", about 228 s.
**What I actually did.** Used the trick from episode 1 to measure Real-ESRGAN directly instead of leaving it inside that lump.
**Whether it worked.** It failed, and it failed loudly. Real-ESRGAN alone measured 316 s, which is more than my estimate for the entire remainder. Subtract it and the VAE stage comes out at **negative 103 seconds**. I handed the table to Codex to fill in and it refused to write that number down, on the grounds that the 228 s estimate and this direct measurement cannot both be true. That was the right call. The wrong version would have been printing a negative number with a "possible measurement error" footnote; the right one is declaring the two datasets mutually exclusive and resolving the contradiction before either goes in a table.
**Where that expectation was wrong.** The decomposition method itself was fine. The broken part was the 211 s cold-load estimate — never measured, and holding up the entire table. One directly measured cell invalidates a table built on estimates, and the question to ask is not "which number do I like" but "can these two coexist".
### 3. I got the VSR verdict right with the wrong yardstick
**What the problem was.** Does the GB10 support NVIDIA's Video Super Resolution or not?
**What I expected to do about it.** Read the official support list. One lookup, done.
**What I actually did.** Read the old Maxine SDK's `install_feature.sh`, which lists only datacenter cards (T4, A2, A10, A16, A40, L4, L40, A100, H100), and concluded GB10's compute capability was out of range.
**Whether it worked.** Right conclusion, wrong reason. The current `nvidia-vfx` wheel supports Turing through Blackwell — I later installed it successfully on a 2018 RTX 2080 Ti. Compute capability was never what blocked GB10. The CPU architecture was. From the same round of checking I also got a fact flatly wrong in the other direction: I wrote that "GX10's driver 580.159.03 falls just short of 580.82", when 580.159 is greater than 580.82. The driver requirement had actually passed.
**Where that expectation was wrong.** I treated "check the support list" as one action when it is two separate questions: **which list, and which release line**. A wrong yardstick that happens to hand you the right conclusion is worse than a wrong conclusion, because you keep the wrong understanding — and the wrong understanding is what fails you on the next machine. I carried it to the 2080 Ti and got that one backwards.
### 4. I lost a flag while measuring the SPAN total
**What the problem was.** The post-SPAN total was still an estimate (997 minus 267, about 730) and I wanted a measured number.
**What I expected to do about it.** Run the pipeline once.
**What I actually did.** Wrote a script that stops the inference server, starts ComfyUI, submits the workflow and reads the timestamps back from `/history`, which is ComfyUI's completed-job endpoint.
**Whether it worked.** It produced **981.243 s**, and I nearly filed it. Then I read the startup banner and saw `Using pytorch attention`. My script was missing `--use-sage-attention`, so 981 is the number for PyTorch's built-in attention (SDPA), not for the production configuration. Compared against 1,010 s — the run that did have SageAttention on — it would have said "SPAN only saves 3%". The correct comparison is 1,263.5 s, the Real-ESRGAN baseline that also had no SageAttention: **282.3 s, 22.3%**, which agrees with the 267 s predicted back when I measured the upscaler on its own.
**Where that expectation was wrong.** I believed a control run needs "same job, same seed". What actually has to match is the **whole launch command**. One missing flag put the two runs on two different attention implementations, and that difference is worth 20% — bigger than the 22% I was trying to measure. Machines with less automation are more exposed to this, because every launch is typed by hand and hands drop flags.
### 5. Re-running it, I took the whole machine down
**What the problem was.** Episode 4 had to be run again, this time with the flag.
**What I expected to do about it.** Kill the old ComfyUI, wait a moment, start the new one.
**What I actually did.** The script ran `pkill` and then `sleep 10`.
**Whether it worked.** It failed, and this is the expensive one. The old instance held about 72 GB of unified memory, ten seconds is nowhere near enough for the kernel to reclaim that, and loading the new instance on top drained the machine to the point where **the kernel started killing processes to get memory back**. The process it picked was `tailscaled`, which is how I reach this machine, so my SSH session dropped for four and a half minutes. The cascade also took out `user@1000.service`, the per-user session manager. `/run/user/1000` disappeared with it, so every `systemctl --user` command returned "Failed to connect to bus" and the inference server could not be restarted at all. The fix:
```bash
sudo systemctl reset-failed user@1000.service
sudo systemctl start user@1000.service
```
That brings the runtime directory back and the inference server starts normally again.
**Where that expectation was wrong.** I believed releasing 72 GB takes a fixed amount of time, so a fixed `sleep 10` covers it. It takes a **variable** amount of time, and the only correct way to write that step is a loop that polls `free -g` until enough is free. There is a second thing I had wrong: I assumed the kernel kills the process holding the most memory. It does not necessarily, and here it picked the one process that was my only way into the machine.
## Loose ends
- **Cache-DiT is measured but not deployed.** It is a caching layer for diffusion transformers and it took 9.3% off (996.956 s to 903.990 s). A dry run confirmed it touches neither torch nor triton and coexists with Spectrum. It is sitting in a quarantine directory, and deploying it amounts to putting it back.
- **Dialogue quality at 14 steps is unverified.** I compared the picture only; I never listened to 14 against 20 side by side.
---
# [Just for Fun — Advanced] Wait, a 2080 Ti Can Run MiniMax-H3? 1080p With Audio on a 2018 Card
URL: https://ai-muninn.com/en/blog/minimax-h3-on-modded-2080ti-22gb
Date: 2026-08-06
Series: 改裝 2080 Ti 22G (Part 11)
A modded RTX 2080 Ti 22G from 2018 renders 15 seconds of 1080p video with audio in 23 min 03 s, using MiniMax-H3 — a 33B model whose four files come to 38 GiB on disk. The same clip on a 5090 takes 314s, so this card is 4.4× slower. Slow, not incapable. Three things make it fit: an INT8 diffusion transformer (W4A4 is 18× worse and tears the frame), a W4A4 text encoder (fine there, worth 8.6%), and `--reserve-vram 4`, which is the sampler's activation budget rather than OS headroom. SageAttention adds 16.8% while logging two fallbacks per run. Caveat: reserve-vram is the one value you keep retuning per clip length.
## Intro
When you rent a moving truck, everyone compares horsepower, and the number that actually decides how much you move in one trip is cargo volume. Old GPUs get ruled out of new workloads the same way. The problem usually isn't speed — slow is a scheduling problem and you can wait it out. It's that the weights don't fit, and there is no "just leave it running longer" for a tensor with nowhere to live.
[MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3) is a 33B model that generates video and its audio track in a single forward pass. Its four files come to 38 GiB on disk, half again as much as this card holds. Read the right-hand column — that is why they fit anyway:
| file | on disk | when it is on the card |
|---|---|---|
| text encoder Qwen3-VL-32B (W4A4) | 13.20 GiB | runs once at the start, **then unloads** |
| **diffusion transformer (INT8)** | **19.53 GiB** | **resident for the whole sampling run** |
| video VAE (fp16) | 4.85 GiB | loaded only for the final decode |
| audio VAE (fp32) | 0.56 GiB | same |
| total | 38.14 GiB | never resident at the same time |
So the 38 GiB is not a bill you pay all at once. It is four tenants taking turns in one room.

**What decides whether this card works is the middle row: the DiT sits there at 19.53 GiB and the card holds 22.** The remaining 2.47 GiB has to absorb every intermediate tensor sampling produces, and that margin explains everything else in this article.
I already had this model running on a 5090 — that write-up covers [getting MiniMax-H3 running on a single RTX 5090](/en/blog/minimax-h3-nvfp4-rtx5090) and is the prerequisite for this one. Here it runs on a modded RTX 2080 Ti 22G: Turing, sm_75, 22,528 MiB, a card that shipped in 2018 and had its memory chips swapped by someone in Shenzhen.
Config first, then the measured speed and quality, then how it got there.
## The config that runs it
These three versions are welded together — upgrade any one and SageAttention stops building:
```bash
torch 2.6.0+cu124 · triton 3.2.0 · sageattention 1.0.6
python main.py --listen 127.0.0.1 --port 8188 \
--reserve-vram 2 --use-sage-attention # a 15-second clip needs 4
```
```
diffusion minimax_h3_fl2va_pruned_int8_convrot.safetensors ← INT8, not W4A4
text encoder qwen3vl_32b_heretic_convrot_w4a4.safetensors ← W4A4 is fine here
VAEs minimax_h3_video_vae_fp16 + minimax_h3_audio_vae_fp32
sampler res_multistep + simple · 20 steps · fps 24
resolution generate at 960×540 → upscale to 1920×1080
rescale SCALE = 1.0 (no rescaling needed once INT8 replaced W4A4)
```
Three of those choices are load-bearing, and each one is a place I lost time.
### Why `--reserve-vram` and not something else
The flag reads like "memory held back for the operating system," and it is that — but on this card it is simultaneously the budget the sampler gets for activations. Both meanings share one number and they pull in opposite directions.
Three values on the same 15-second clip. Only one of the three is a real failure:
| `--reserve-vram` | outcome | cost |
|---|---|---|
| 2 | `torch.OutOfMemoryError` after 43.5 s, peak 21,948 / 22,528 MiB | fails |
| 4 | fits | 1,383.0 s |
| 8 | 9.5 GB of weights evicted to streaming | over 5 min per step |
Reserve too little and the activations have nowhere to go. Reserve too much and the weights stop fitting, so they stream in from host memory every step. **Short clips run happily at 2; a 15-second clip needs 4.** This is the one number you will keep adjusting, and it scales with clip length rather than resolution.

The transferable part: **an OOM does not mean it doesn't fit.** It means it doesn't fit *under the current allocation policy*.
### Why the DiT must be INT8 while the text encoder can be W4A4
Same quantization format, two models in the same pipeline, opposite verdicts:
| model | at W4A4 | verdict |
|---|---|---|
| diffusion transformer | relative error 0.2005 vs INT8's 0.0110 | full-frame colour tearing — unusable |
| text encoder Qwen3-VL-32B | 24 GiB → 13.2 GiB, worth 8.6% wall clock | free money |
The DiT is where error compounds, once per step across 20 steps. The text encoder produces conditioning that is consumed once and never iterated on, so the same error has nowhere near the leverage. **"W4A4 is bad" is not a portable conclusion** — where the tensor sits in the graph decides it.
### Why SageAttention stays on and the log noise stays ignored
With the flag on, every attention call logs this:
```
[ERROR] Error running sage attention: out of resource: shared memory,
Required: 67584, Hardware limit: 65536 ... using pytorch attention instead
```
while the startup banner says `Using sage attention`. It looks broken. The seconds say otherwise:
| build | seconds | |
|---|---|---|
| **SageAttention on** (2 fallbacks per run) | **133.37** | fastest |
| SDPA (flag off) | 160.25 | 16.8% slower |
> 💡 **A fallback line is not a failure.** sm_75 exceeds the 64KB shared-memory limit only on *some* attention shapes; every other call still takes the fast path. Verify with seconds, never with the presence of a log line.
## What it looks like running: 23 minutes, same specs as the 5090
Here is what `ffprobe` says about the file in the player above, and the render cost that produced it:
```
output 1920x1080 · 24 fps · 362 frames · AAC 32 kHz stereo · 15.083 s
render 1,383.046 s (23 min 03 s) · 20 steps · 88.87 s/step
```
Read the middle column for this card; the right one shows what the same job costs on current silicon:
| clip | modded 2080 Ti 22G | RTX 5090 |
|---|---|---|
| 15 s · 1080p · audio | 1,383.0 s | 314 s |
| 3 s · 960×540 upscaled to 1080p · 73 frames | 253.8 s | — |
That makes the 2080 Ti **4.4× slower**. It is not incapable, just slow, and the two lead to completely different decisions. "This card can't do it" makes you buy a 5090. "This card takes 23 minutes" makes you queue a batch before bed and collect it in the morning.
The surprise is in the upscale stage. RTX Video Super Resolution runs on this card, and it is not the bottleneck:
| card | frames | upscale time | per frame |
|---|---|---|---|
| RTX 5090 | 362 | 11.17 s | 30.9 ms |
| modded 2080 Ti 22G | 73 | 3.45 s | 47.3 ms |
**1.53× slower per frame**, on a card seven years older — a much smaller gap than the 4.4× on generation. I isolated the upscale stage with the cache-separation method from [the 5090 speedup article](/en/blog/minimax-h3-rtx5090-speedup-vsr).

⚠️ One thing I cannot explain: the quality-mode ranking is **inverted** between the two cards. On the 5090, `ULTRA` produces the largest file, which is what you would expect when it keeps the most detail. On the 2080 Ti, `ULTRA` produces the *smallest* — 643 KB against `HIGHBITRATE_ULTRA`'s 703 KB. Pick the mode by measuring on your own machine rather than copying mine.
---
## The same clip on three machines: 314 / 741 / 1,383 seconds
Same model, same 15.08-second 362-frame 1920x1080 clip with audio, each machine running the config I actually ship on it:
| machine | released | config | seconds | vs 5090 |
|---|---|---|---|---|
| [RTX 5090](/en/blog/minimax-h3-rtx5090-speedup-vsr) | 2025 | 14 steps · SageAttention · RTX VSR | 314.0 | 1.0x |
| [DGX Spark (GB10)](/en/blog/dgx-spark-minimax-h3-span-upscaler) | 2025 | 14 steps · SageAttention · SPAN | 741.0 | 2.4x |
| **Modded RTX 2080 Ti 22G** | 2018 | **20 steps** · SageAttention · RTX VSR | **1,383** | 4.4x |
Eight years of hardware is worth **4.4x** on this particular job — and all three finish.
⚠️ **This is not a single-variable comparison.** It is three shipped configs. The biggest mismatch is step count: the 2080 Ti run is 20 steps while the other two are 14. Going 20 to 14 measured 14.5% faster on the GB10, so the 2080 Ti would be quicker at 14 — I have not run it.
## Deep dive: how that config got there
Skippable — everything above is the complete working setup. This half is the road taken to get there, including one branch I followed all the way to the end before realising it was the wrong one.
### The longest detour: seeing the fallback and trying to fix it
The reasoning went like this:
1. Every attention call logs a fallback, while the banner claims SageAttention is on
2. So fix it, and SageAttention runs at full speed
3. Derive where `Required: 67584` comes from, halve `BLOCK_M` from 128 to 64 — **the message really does disappear**
4. Measure: **176.2 s, slower than doing nothing at all**
Halving `BLOCK_M` doubles the block count, and twice the scheduling and boundary handling costs more than the fast path saves. The unpatched build takes the large-block fast path on most calls and pays SDPA's price on a few; the patched build pays a small penalty on every call. Two fallbacks are cheaper than a globally worse tiling.
**An earlier judgment went down with it.** I had used the patched build to represent "SageAttention", concluded it was useless on Turing, and wrote that down. The untouched build was the fastest of the three the whole time.
| build | seconds | |
|---|---|---|
| SageAttention untouched (2 fallbacks) | **133.37** | fastest |
| SDPA (flag off) | 160.25 | baseline |
| SageAttention, patched kernel (0 fallbacks) | 176.2 | slowest |

The measurement design is the part worth copying. I ran the three arms interleaved — `A B C A B C A B C` — in a single window, `argv` byte-identical between arms except for the flag under test. The control arm's range across three runs was **1.15 s, or 0.7%**, so a 16.8% effect is 24× the noise floor and needs no statistical argument. Raw: SDPA 160.88 / 159.73 / 160.13; Sage 133.51 / 133.18 / 133.41. Interleaving matters more than repetition count — it is what absorbs thermal drift, which a sequential `AAA BBB` design folds straight into the effect.
> 💡 A fallback line is noise, not a symptom. Chasing it into the kernel trades performance for a tidy log.
The derivation below is sound and, as far as I can find, original. Only its conclusion changed — from "I fixed it" to "I should not have."
#### Where 67,584 comes from
`Hardware limit: 65536` is 64KB, Turing's per-SM shared memory. `Required: 67584` overshoots by exactly **2,048 bytes** — a 3% overshoot, and the kernel is simply unlaunchable. Three turns pinned it:
**Turn one: resolution didn't change the number.** Three different resolutions, three identical `Required: 67584`. A shared-memory requirement independent of input size is not a function of sequence length; it is a compile-time constant.
**Turn two: the arithmetic matches exactly.** SageAttention 1.0.6's h96 kernel defaults to `BLOCK_M=128, BLOCK_N=64`. The three tiles it stages come to `(128×4 + 64×2 + 64×1) × head_dim`, or `704 × head_dim`:
```
BLOCK_M × 96 × 4 (fp32) = 128 × 96 × 4 = 49,152
BLOCK_N × 96 × 2 (fp16) = 64 × 96 × 2 = 12,288
BLOCK_N × 96 × 1 (int8) = 64 × 96 × 1 = 6,144
total = 67,584
```
Exact to the byte, and **96 is the only value that lands there** — 128 gives 90,112 and 64 gives 45,056. So whatever attention call reached this kernel had head_dim 96, which is precisely what `core.py:98`'s `if headdim == 96:` routes here.
⚠️ **That call is not the main DiT.** MiniMax-H3's official transformer config says `attention_head_dim = 128`, so the 96 comes from somewhere else in this pipeline. I have not tracked down where.
Root cause: [SageAttention](https://github.com/thu-ml/SageAttention) 1.0.6 has **no architecture branch**. Its block sizes assume far more shared memory than Turing's 64KB (Ampere is 100-164KB depending on the part, Hopper 228KB), and 64KB is never checked for.

**Turn three: half of the error message's own advice is wrong.** It suggests "Reducing block sizes or num_stages". I changed `num_stages` from 4 to 2 and the requirement did not move — not one byte, which follows directly from the arithmetic: `num_stages` is not in it.
#### Right parameter, wrong file
I halved `BLOCK_M`, restarted, and got the identical 67,584. My first read was that the derivation was wrong.
It wasn't. `core.py:98` routes the call to the h96 kernel and I had been editing the head_dim 128 one. Then I hit the same wall again: editing only h96 also did nothing. All **six** kernels under `sageattention/` need the change, and it only takes effect after clearing `~/.triton/cache` and the `__pycache__` directories — Triton caches compiled kernels by source hash, and a stale entry reproduces the old requirement perfectly.
> 💡 "My change had no effect" has at least two causes — wrong parameter and wrong file — and they present identically. Distinguishing them costs one deliberate act of sabotage: break the file you *think* you are editing badly enough that it must throw, and see whether it does.
### I misjudged RTX VSR too
I wrote off RTX Video Super Resolution on this card before ever running it, on the strength of an old Maxine SDK support table full of A100 and H100-class parts.
Wrong yardstick. The current `nvidia-vfx` wheel supports Turing through Blackwell. It installed and it ran — the 47.3 ms/frame above is it.
### Why W4A4 does not work
Included so nobody has to walk it again. The reasoning went: the INT8 DiT is 19.53 GiB and fills the card almost completely — and Turing has an INT4 path, so W4A4 would halve it again.
- **Straight quantization blew up.** The weights overflow INT4's representable range and it will not run at all.
- **So it needs rescaling.** `SCALE` at 1, then 1/16, 1/64, 1/256 — eventually it ran to completion.
- **The video came out, and it was unusable**: colour tearing across the whole frame, neon bokeh smeared away.
- The microbenchmark matches what the eye sees: relative error **0.2005** against INT8's **0.0110**, 18× worse.
⚠️ **This is as far as I took it.** All four `SCALE` values broke in the identical way and removing the upscaler did not help either, so I stopped there and went back to INT8. That is not the same as proving W4A4 can never work on this DiT — only that none of the paths I tried produced a usable frame. Those weights are deleted from my machine.
---
# [Benchmark] Twice as Fast: MiniMax-H3 on an RTX 5090, 625s Down to 314s
URL: https://ai-muninn.com/en/blog/minimax-h3-rtx5090-speedup-vsr
Date: 2026-08-06
Series: MiniMax-H3 on RTX 5090 (Part 2)
Same 15-second 1080p clip with audio, same seed: **625 s → 314 s on one RTX 5090**, with no visible quality loss. Three stacked changes: 20→14 steps (−18.9%), SageAttention 2.2.0 (−18.8%), and NVIDIA's **RTX Video Super Resolution** replacing Real-ESRGAN (−23.7%). The upscaler turned out to be the largest single win and the one I had never measured — Real-ESRGAN is a 2021 image model run across 362 frames, while VSR is video-native on TensorRT: **109 s → 11.2 s** for that leg alone. One limit: `nvidia-vfx` ships x86_64 wheels only, so ARM is out.
## Half the render time came off, and most of it was the upscaler
People who tune cars fixate on the engine, because horsepower is the number that photographs well. What actually drops the lap time is often one small part nobody bothered to measure — and swapping it is where the speed suddenly shows up.
I did the software version of that. Two days on samplers, step counts and attention kernels, and I never once measured the upscaler sitting at the end of the graph.
[The previous part](/en/blog/minimax-h3-nvfp4-rtx5090) covered getting MiniMax-H3 to run on a single RTX 5090 at all — which four files to download, where they go, and how to write a prompt the model will follow. This part is about the three switches that took the same output from 625 seconds to 314.
Each row below stacks on the one above it. Read the right-hand column: every change is worth roughly a fifth, and they compound.
| Configuration | Total time | Change |
|---|---|---|
| 20 steps + Real-ESRGAN (starting point) | 625 s | — |
| 14 steps | 507.0 s | −18.9% |
| + SageAttention 2.2.0 | 411.8 s | −18.8% |
| + RTX VSR replacing Real-ESRGAN | **314.0 s** | −23.7% |
Total: **−49.8%**. Ten minutes and 25 seconds becomes five minutes and 14 seconds.
The output is the same file in every measurable respect. Same prompt, same seed throughout, and `ffprobe` on both ends of the ladder agrees:
```text
1920x1080 · 24 fps · 362 frames · aac 32000 Hz stereo · 15.083 s
```
Not "roughly the same length" or "close enough" — the same frame count, the same audio stream, the same duration to three decimal places. The picture did not get worse either, which I will come back to with a frame-by-frame comparison.
---
## Dropping 20 steps to 14 costs nothing visible
The MiniMax-H3 template ships with 20 sampling steps. That number is conservative rather than measured, in the way that shipped defaults usually are.
At 14 steps I cannot see a difference. Not "a small difference I decided to accept" — I pulled matching frames and could not point at one.
Across my three machines this switch measured between 14.5% and 18.9%, depending on how the rest of the configuration is set. The same flag is worth different amounts on different boxes.
This is the cheapest of the three switches: it is one number in the sampler node, it needs no new package, and it applies whether or not you do anything else in this article.
---
## SageAttention 2.2.0 takes another 18.8%, and PyPI will not give it to you
SageAttention replaces the attention kernel with a quantized implementation. On the 5090 (sm_120) it took the render from 507.0 s to 411.8 s — **18.8%**.
I ran the same comparison on a GB10 (sm_121) the same day and got 20.1%. Two independent machines landing that close to each other is the difference between a measurement and a fluke.
Enabling it is a launch flag:
```bash
python main.py --use-sage-attention
```
There are two traps, and both of them fail quietly.
**The version on PyPI is not the one you want.** The newest `sageattention` package published there is **1.0.6**, a different generation of the kernel. You need 2.x, which means a prebuilt wheel from elsewhere or a build from source at [thu-ml/SageAttention](https://github.com/thu-ml/SageAttention). I installed 1.0.6 first. ComfyUI started, the flag was accepted, nothing complained, and my numbers simply did not match what other people were reporting. I went looking at the wrong layer for a while before checking the installed version.
**The flag only resolves one package name.** `--use-sage-attention` looks for a package called `sageattention`. SageAttention 3 ships as a separate package named `sageattn3`; ComfyUI registers it but never selects it automatically, so the flag will not pick it up. If you install `sageattn3` and expect the flag to find it, you get exactly the speed you had before, with no message telling you why.
---
## Swapping the upscaler cut 97.8 seconds
Here is the part I should have looked at first.
The pipeline generates at 960×540 and upscales 2× to 1920×1080. The upscaler in the template is Real-ESRGAN `x2plus` — a solid model, released in 2021, and an **image** model. Running it over a 15-second clip means running it 362 separate times, once per frame, with no knowledge that the frames are related.
NVIDIA's Video Super Resolution is video-native and runs on TensorRT. ComfyUI has an official node pack that wraps NVIDIA's `nvidia-vfx` package: [Comfy-Org/Nvidia_RTX_Nodes_ComfyUI](https://github.com/Comfy-Org/Nvidia_RTX_Nodes_ComfyUI). It provides an `RTXVideoSuperResolution` node that drops straight into the slot where `ImageUpscaleWithModel` was. Nothing else in the graph changes.
Isolated cost of the upscale leg alone, measured with the trick described in the deep dive. The middle column is the one that changed how I think about this pipeline:
| Upscaler | Upscale leg | Full pipeline |
|---|---|---|
| Real-ESRGAN x2plus | ~109 s | 411.8 s |
| RTX Video Super Resolution | **11.2 s** | **314.0 s** |
Close to 10× on the leg, 97.8 seconds off the total.

The obvious question is what you give up for that. I put frame 180 from both runs side by side at full size. VSR holds slightly more skin detail; ESRGAN gives slightly cleaner background bokeh. Neither one breaks down anywhere. I had to zoom to 200% before I could point at a difference at all, and at that point I am no longer describing something a viewer would notice.
---
## Why was my 1080p output 1056 pixels tall?
This one cost me a while, because nothing anywhere reported an error.
MiniMax-H3's `_empty_av_latent()` computes the latent height as `height // 16`. Ask for 540 and you get:
```text
540 / 16 = 33.75 → floor 33 → 33 × 16 = 528
```
So the generation is 960×528, not 960×540. Upscale that 2× and you get **1920×1056**. Twenty-four pixels short of 1080, in a file that otherwise looks completely correct — right aspect ratio at a glance, right frame count, right audio.
The fix is one node. Put an `ImageScale` between the H3 node and the upscaler, set to 960×540, bilinear, crop disabled:
```text
MiniMaxH3ImageToVideo (960×540)
→ ImageScale (bilinear, 960×540, crop=disabled)
→ RTXVideoSuperResolution (scale 2.0)
→ CreateVideo (fps 24)
→ SaveVideo (mp4/h264)
```
Check for this specifically, because it fails silently. Nothing raises, nothing warns, and you find out when something downstream expects 1080 and does not get it.
---
## The quality dropdown shows 4 modes out of 17, and the 4 are the wrong family
The `RTXVideoSuperResolution` node's quality dropdown offers four options: `LOW`, `MEDIUM`, `HIGH`, `ULTRA`.
The underlying `nvvfx.effects.QualityLevel` enum has **17**. Read the right-hand column, because what each family was trained on decides which one you want:
| Family | Members | Designed for |
|---|---|---|
| Baseline | `BICUBIC` | reference, no model |
| Standard | `LOW` `MEDIUM` `HIGH` `ULTRA` | typical compressed video |
| High bitrate | `HIGHBITRATE_` ×4 | clean sources: ProRes, high-bitrate H.265 |
| Deblur | `DEBLUR_` ×4 | a blurry source |
| Denoise | `DENOISE_` ×4 | a noisy source |
NVIDIA's own documentation says the standard modes are trained on typical compressed video and **actively remove compression artifacts**.
Diffusion output has zero compression artifacts. It was never encoded. A model trained to find and suppress artifacts, pointed at footage that has none, will find the closest thing available — which is real texture. The result is over-sharpening or erased detail, depending on which way the model guesses.
The `HIGHBITRATE_*` family skips artifact suppression entirely. It was built for sources that were already clean, which is exactly what comes out of a diffusion model.
Adding those options is a one-line change: the dropdown is a single list of strings in the node definition, and the `HIGHBITRATE_*` names come straight from `nvvfx.effects.QualityLevel`. Do not bother adding `DEBLUR_*` or `DENOISE_*` — they solve a blurry source and a noisy source respectively, and we have neither.
---

## 960×540 is the floor, and a bigger file is the warning sign
If the upscaler is this cheap, the next thought is obvious: generate smaller, upscale harder, save even more time. I swept it, all runs on the same seed, all upscaled to the same 1920×1080 output.
Read the file-size column, not the time column — the time column just says what you would expect.
| Generation canvas | Upscale | Time | Output size | My verdict on the picture |
|---|---|---|---|---|
| 960×540 | 2× | 308.3 s | 3.4 MB | baseline |
| 720×405 | 2.67× | 181.1 s (−41.3%) | 3.6 MB | barely holds up |
| 480×270 | 4× | 68.7 s (−77.7%) | **7.5 MB** | too soft |
The 480×270 run produced a file more than twice the size of the baseline, from a quarter of the pixels. Same frames, same encode settings, and the smallest source gives the biggest file.
That extra high-frequency information cannot have come from the source, because the source does not contain it. VSR invented it. The picture looks soft to the eye and busy to the encoder at the same time, which is a good description of texture that was synthesized rather than resolved.

**More detail is not more information.**

---
## Effective face pixels: write "close-up" instead of raising the resolution
There is a ruler you can apply before spending any GPU time at all, and it explains the table above better than the resolutions do.
What matters for a face is not the canvas size. It is how many pixels of that canvas the face occupies. Both rows below are the same 960×540 canvas; the right-hand column is the only thing that differs:
| Shot | Face on screen | Effective face pixels |
|---|---|---|
| Wide shot | ~170×200 | 34,000 |
| Close-up | ~420×540 | 226,800 |
That is 6.7× apart, on identical settings, for the cost of one word in the prompt. Writing "close-up" buys more face detail than raising the generation resolution does, and it is free.
Apply the ruler to the sweep: a close-up at 480×270 works out to roughly **31,900** effective face pixels — the same tier as the wide shot on the full canvas, which already was not enough. That is why it looked soft, and I could have predicted it without running anything.
---
## 4K on the same line costs 73.9 seconds
The same node handles 4K. Generate at 960×540, set the scale to 4×, and you get 3840×2160 in **73.9 s**, producing a 16 MB file with the same 362 frames and the audio intact. The node accepts either a scale multiplier or an exact target size.
One caveat before you point it at everything: at 4K an even smaller fraction of each output pixel traces back to the source. That makes it a good fit for "the source was already good enough and I want it bigger", and a poor fit for "the source was not good enough and I want the upscaler to fix that".
---
## RTX VSR is x86_64 only, and that is not a "not yet"
`nvidia-vfx` ships only `manylinux_2_27_x86_64` wheels. Linux and Windows on x86_64 install it without trouble. ARM machines cannot install it, and there is no ARM binary inside the wheel to fall back to.
A separate article covers why that road is closed.
---
## The same clip on three machines: 314 / 741 / 1,383 seconds
Same model, same 15.08-second 362-frame 1920x1080 clip with audio, each machine running the config I actually ship on it:
| machine | released | config | seconds | vs 5090 |
|---|---|---|---|---|
| **RTX 5090** | 2025 | 14 steps · SageAttention · RTX VSR | **314.0** | 1.0x |
| [DGX Spark (GB10)](/en/blog/dgx-spark-minimax-h3-span-upscaler) | 2025 | 14 steps · SageAttention · SPAN | 741.0 | 2.4x |
| [Modded RTX 2080 Ti 22G](/en/blog/minimax-h3-on-modded-2080ti-22gb) | 2018 | **20 steps** · SageAttention · RTX VSR | 1,383 | 4.4x |
Eight years of hardware is worth **4.4x** on this particular job — and all three finish.
⚠️ **This is not a single-variable comparison.** It is three shipped configs. The biggest mismatch is step count: the 2080 Ti run is 20 steps while the other two are 14. Going 20 to 14 measured 14.5% faster on the GB10, so the 2080 Ti would be quicker at 14 — I have not run it.
## The whole config, as of 2026-08
For a 15-second 1080p video with audio on an RTX 5090, this is what I run:
```text
generate 960×540 · length 362 · 14 steps · res_multistep + simple · Spectrum on
correct ImageScale → 960×540 (bilinear, crop=disabled)
upscale RTXVideoSuperResolution · scale 2.0 · HIGHBITRATE_HIGH
encode CreateVideo (fps 24) → SaveVideo (mp4/h264)
launch python main.py --use-sage-attention
```
One wiring note that belongs with it: `VAEDecodeAudio` goes straight into `CreateVideo.audio`. Only the image path passes through the upscaler. Route the audio through the wrong place and nothing errors — you get a silent video, and you find out when you play it back.
---
## Deep dive
You can skip this section and still use everything above. What follows is how the numbers were obtained, including the measurement I got wrong on the first pass and the prediction that turned out to be half right.
### Weighing one node: ComfyUI's cache does the isolation for you
The problem I started with: the pipeline takes around 400 seconds and ComfyUI does not report per-node timing. So "how much of that is the upscaler" had no obvious answer, and for two days I treated it as unanswerable and tuned the parts I could see.
ComfyUI's execution cache keys on node inputs. That is the whole trick:
1. Run the graph once, fully. Everything executes, everything caches.
2. Resend the same graph with **one parameter changed on the upscale node** and nothing else touched.
3. Every upstream node cache-hits. Only the upscale node and the encode after it actually re-run.
4. That run's wall time is the upscale leg.

Measured: **314.0 s** for the cold full run, **11.2 s** for the hot resend. So on the VSR configuration, the upscale costs 11.2 seconds.
To get Real-ESRGAN's cost, subtract VSR's leg from that 97.8-second difference. The two full runs differ by 97.8 s, and VSR's leg is 11.2 s, so ESRGAN's leg is about 109 s. That derivation only holds if every other node is genuinely identical, so I diffed the two workflow JSONs before trusting it: node 16 was the sole difference.
### Why did the first hot run take 32.4 s instead of 11.2?
The first time I ran the resend it came back in **32.4 s**, not 11.2.
My immediate explanation was that switching the quality level forces a TensorRT engine reload, so the first run after a change pays a one-time model load. That is a completely reasonable story. It fits the symptom, it fits how TensorRT works, and it is wrong.
The `execution_cached` lists from `/history` say what actually happened:
```text
run 1 (HIGH) cached = 1,2,3,4,5,6,7,8,9,10,12,15
run 2 (HB_ULTRA) cached = 1,2,3,4,5,6,7,8,9,10,11,12,15,18
run 3 (ULTRA) cached = 1,2,3,4,5,6,7,8,9,10,11,12,15,18
```
Run 1 is missing nodes 11 and 18. It was a partial cache, so two extra nodes re-executed — no model load involved at any point.
The lesson: read the `execution_cached` node list; don't reason backwards from wall-clock seconds. Seconds will hand you a plausible story, and a plausible story does not have to be true. I had a mechanism, a justification and a number that agreed with each other, and the only thing that settled it was a list the API had been returning the entire time.
### All four quality modes for 55 seconds of GPU time
With the cache trick, sweeping quality modes costs almost nothing — the generation runs once and every mode after that is an 11-second resend.
| Mode | Upscale leg | Output size |
|---|---|---|
| `HIGH` (standard) | 32.4 s ※ | 3.4 MB |
| `HIGHBITRATE_HIGH` | — | 3.6 MB |
| `HIGHBITRATE_ULTRA` | 11.2 s | 3.6 MB |
| `ULTRA` (standard) | 11.2 s | **3.9 MB** |
※ partial cache, see above. The real figure is 11.2 s like the others.
The times are effectively identical across modes. There is **no speed/quality trade-off here** — pick purely on the picture, because the clock does not care which one you choose.
File size works as a proxy for high-frequency content: same frames, same encode settings, so a bigger file means more detail in the picture. Which makes `ULTRA` the most suspicious of the four at 3.9 MB, given what the resolution sweep showed about where invented detail comes from.
### The mode ranking flipped on a 2080 Ti
I ran the same four modes on a 2080 Ti to see whether the ordering held. It did not. There `ULTRA` came out **smallest** at 643 KB, against `HIGHBITRATE_ULTRA` at 703 KB — the exact opposite of the 5090 result.
I have not tracked down why. It could be the TensorRT engine selected for the older architecture, or a different code path in `nvidia-vfx`, and I have not done the work to say which.
The actionable conclusion survives not knowing: pick the mode on your own machine. The ranking is not a property of the modes.
### My prediction was half wrong: the face does not collapse, it goes smooth
Before pulling frames from the 480×270 run, I wrote down what I expected: "the face will collapse."
It does not. Frame 180 shows structure, placement and proportion all intact. Eyes are where eyes go, the jawline is where the jawline goes, nothing is smeared or doubled. What degrades is texture. Skin becomes a smooth even gradient. Hair goes from individual strands to a single block.
So the face-pixel ruler pointed in the right direction and got the failure *mode* wrong. Not enough pixels does not produce breakage. It produces **smooth and empty**.
That distinction has a practical consequence, and it is why I am spending a paragraph on a prediction I got wrong. Breakage you spot instantly, in isolation, on the first playback. Smooth-and-empty needs a side-by-side to see at all — on its own it just looks like a slightly soft clip, which is a thing real footage does. So if you are going to push the generation resolution down, do not judge one clip by itself and decide it is fine. Compare it against the tier above.
### What transfers to your machine and what does not
Every number in this article is one machine on one day. Some of it travels and some of it does not.
What changes across machines:
- **The x86_64 limit on VSR is hard.** There is no ARM binary in the wheel, so this is not a performance question and no amount of patience fixes it.
- **The quality-mode ranking flips.** See the 2080 Ti above. Sweep it yourself; it costs 55 seconds.
- **SageAttention's payoff depends on architecture.** sm_120 gave 18.8%, sm_121 gave 20.1%, and older architectures are a different story covered in a separate article.
The ratios and the method do transfer: whether the upscale leg is worth measuring at all, how to weigh it separately from everything else, and why `HIGHBITRATE` is the right family for diffusion output regardless of which member of it wins on your card.
---
The cache-separation trick is not about upscalers. Any stage of any ComfyUI pipeline can be weighed on its own, as long as you can change that stage's inputs and nothing else — which is most stages, most of the time.
I spent two days on the sampler because the sampler is the part that feels like the engine. The stage that actually made the difference sat at the end of the graph the whole time, costing 109 seconds a run, and the only reason I never fixed it is that I never put a number on it.
---
# [Benchmark] Running MiniMax-H3 on one RTX 5090: four files, 31.7 GB, 175s per talking clip
URL: https://ai-muninn.com/en/blog/minimax-h3-nvfp4-rtx5090
Date: 2026-08-04
Series: MiniMax-H3 on RTX 5090 (Part 1)
MiniMax-H3 is a 33B model that emits video **and stereo audio from one forward pass** — dialogue, room tone and score arrive with the picture, so lip-sync is structural rather than fixed up afterwards. The official deploy example asks for four GPUs and full-precision weights come to 115 GB. Pruned and quantized, **four files totalling 31.7 GB run on one RTX 5090**: 175 s for a 864×480 ten-second clip, 26,914 MiB peak VRAM. Weights on [HuggingFace](https://huggingface.co/coolthor/MiniMax-H3-pruned-NVFP4).
## In plain terms: the picture and the sound arrive together
Making a short clip of someone talking has normally been a relay. One model draws the frames. A second model speaks the line. Then you spend your evening nudging the mouth to match the audio, because those two models never met.
H3 collapses the relay. Feed it text and one pass produces the frames **and** the soundtrack — the spoken line, the wind, the score. The mouth matches because the mouth and the voice are two views of the same computation. There is no seam for them to drift apart at.
The catch is size. This post is about shrinking it until a consumer card can hold it, and then getting a first clip out.
---
## Preface
There are two ways to record a band. Track by track — drums first, bass on top, vocals last — which lets you fix any single part but leaves you spending days making the parts sound like they happened in one room. Or you put everyone in the room and hit record once.
Most video models today are the first kind. H3, which MiniMax released on 2 August 2026, is the second.
This is the beginner path on **one RTX 5090: which files to download, where they go, and how to write a prompt it will actually follow.** The other machines I tried and the detours are not in here.
---
## What you end up with
A local setup that can:
- Generate 4 to 15 seconds of 24fps video with 32 kHz stereo audio, from text alone
- Sync lips to dialogue automatically, in any of 11 well-supported languages
- Cut between multiple shots inside a single prompt, at cut points you choose
- Put specific text on screen, character for character
**What it cannot do:** 2K. That needs H3-Regenerate-2K, which was not open-sourced — MiniMax exposes it through their API instead. Locally you get the 768p stage only.
Easier to show than describe. Fifteen seconds, generated locally, no post, no lip-sync pass:
---
## Check your card first: four files, 31.7 GB
This is where beginners get caught, because "33B model" badly undersells the download.
H3 needs four files:
| File | Job | Full precision | Quantized build I used |
|---|---|---|---|
| Transformer | Generates the video and audio | 61.73 GiB | **11.67 GiB** (NVFP4) |
| Text encoder | Reads your prompt | 47.97 GiB | **14.61 GiB** (NVFP4-AWQ) |
| Video VAE | Decodes latents into frames | 4.85 GiB | same |
| Audio VAE | Decodes latents into sound | 0.56 GiB | same |
| | | **115 GiB** | **31.69 GiB** |
⚠️ Those are **disk** numbers, not VRAM numbers, and I conflated the two in my first draft. Actual peak VRAM is **26,914 MiB**, because only the transformer and the text encoder are resident at once:
```text
11.67 GiB (transformer) + 14.61 GiB (text encoder) = 26.28 GiB = 26,911 MiB
measured peak 26,914 MiB
```
The two VAEs only come in at the end, to turn latents into frames and samples. **So "will it fit" is a question about the transformer plus the text encoder, not about the sum of all four files.**
Three things that stop you on first read:
**The text encoder is bigger than the video model.** That encoder is Qwen3-VL-32B — a 32B vision-language model whose entire job here is reading your prompt. Quantized it is 14.61 GiB against the transformer's 11.67. "33B model" describes the transformer only; you are feeding two large models.
**There are two VAEs, one for picture and one for sound.** Which is the clearest evidence that audio is a first-class output here rather than a bolt-on: video goes out through the video VAE, audio through the audio VAE, both from the same transformer.
**There are two transformers and you only ever use one**, which the next section is about.

---
## FL2VA or Ref2VA? Start with FL2VA
The two transformers differ by **task**, not by precision:
| checkpoint | Accepts | Use when |
|---|---|---|
| **FL2VA** | 0 to 2 images | General generation, including plain text-to-video |
| **Ref2VA** | ≤9 images, ≤3 video clips, ≤3 audio clips (≤15 s total, 12 files max) | You need the model to reference a specific character, place or voice |
Here is the part that trips everyone up: **the checkpoint names and the task names are two different sets.** The FL2VA checkpoint covers four tasks, and the official docs split them like this.
| Task | Images you supply |
|---|---|
| **T2VA** | none — plain text to video |
| I2VA | one, used as the first frame |
| FL2VA | two, first and last |
| L2VA | one, used as the last frame |
Put differently: you download the **FL2VA file**, but when you run it with no image the task you are running is **T2VA**. The prompt section below shows why that distinction costs you an entire line.
**Start with the FL2VA checkpoint running the T2VA task.** No assets to prepare, and every number in this post was measured that way.
**The two transformers are never loaded together** — they are separate paths for separate tasks, so switching task means switching file. Downloading both costs another 11.67 GiB of **disk** and changes peak VRAM not at all. Keep both if you have the space; get one working first.
---
## Download: what goes where
The quantized pieces live in two repos, which is the one genuinely annoying part.
```bash
# 1. Transformer (NVFP4, mine)
hf download coolthor/MiniMax-H3-pruned-NVFP4 \
--include "diffusion_models/minimax_h3_fl2va_pruned_nvfp4.safetensors" \
--local-dir ComfyUI/models
# 2. Text encoder + both VAEs (Comfy-Org's repo)
hf download Comfy-Org/MiniMax-H3 \
--include "text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors" \
"vae/minimax_h3_video_vae_fp16.safetensors" \
"vae/minimax_h3_audio_vae_fp32.safetensors" \
--local-dir ComfyUI/models
```
Both repos mirror ComfyUI's `models/` layout, so `--local-dir ComfyUI/models` drops everything where it belongs:
```text
ComfyUI/models/
├── diffusion_models/minimax_h3_fl2va_pruned_nvfp4.safetensors 11.67 GiB
├── text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors 14.61 GiB
└── vae/
├── minimax_h3_video_vae_fp16.safetensors 4.85 GiB
└── minimax_h3_audio_vae_fp32.safetensors 0.56 GiB
```
⚠️ My repo is gated but on auto-approve — tick two boxes and you are through, no human in the loop. Those boxes exist because the license requires them; the license section explains why.
---
## First run: change these three values
The official ComfyUI template runs as-is, but three values are worth changing before you start.
**① Set steps to 10, not the template's 20.**
The template says 20. I ran it: 324 seconds a clip. Then I read MiniMax's own reproducibility script, `reproducible-768p-t2va-request.sh`, and **there is no step field in it** — it carries `task`, `prompt`, `target{short_edge, aspect_ratio, duration_seconds}`, `seed` and `conditions`, and no step count anywhere. Step count is an SGLang server-side default that was never published.
So the 20 is a number a template author picked. Measured, 20 down to 10: **324 s → 172 s, 47% off, no visible quality difference.** The weights are CFG-distilled and were never going to need many steps.
**② Start at 864×480.**
H3 defaults to a 768-pixel short side. Get the chain working at 864×480 before you push higher — resolution is the expensive knob here.
**③ Set the length explicitly, in seconds.**
Frame counts have to land on a `17k + 5` grid; ten seconds is 243 frames (10.125 s at 24fps). **Leaving the field empty silently falls back to the template default.** No error, just a clip of the wrong length and no obvious reason why.
One clip then looks like this:
| | |
|---|---|
| Resolution × length | 864×480, 243 frames (10.125 s) |
| Steps | 10 |
| Time | **175 s** |
| Peak VRAM | **26,914 MiB** |
Environment: ComfyUI 0.30.1, torch 2.11.0+cu128, `res_multistep` + `simple`, 500W power cap, SageAttention off.
---
## The prompt is the real barrier, and there is a reason
Once the chain runs, the hard part turns out to be writing for it. That is architectural.
The full H3 system has three modules and **only the middle one shipped**:
| Module | Job | Open? |
|---|---|---|
| H3-Context-IR | Compiles a plain request into structured context | ❌ |
| **H3-Base** | Generates 768p video and audio | ✅ **this one only** |
| H3-Regenerate-2K | Re-generates at 2K with the original context | ❌ |
The model card is direct about it:
> H3-Context-IR is critical to the quality of the final output, **so we strongly recommend incorporating it into your generation pipeline or following the "Prompting Guidance" to build your own context-processing system.**
So that "prompt writing guide" is not a tips document. **It is the output format of the module you did not get**, and MiniMax is telling you to hand-assemble what it would have emitted.

### The prompt has two parts, and text-only generation uses just the second
The spec splits a prompt into **an alignment instruction, then three core fields.**
The instruction only exists when you supply images, and it has to state which picture maps to which second of the target video. It must be the very first line, followed by a blank line before the fields:
```text
For the target video, at 0.00 seconds into the target video, (from [Shot 1]) is fully referenced.
```
**Plain text-to-video (T2VA) has no such line** and starts straight at the fields. One less thing to get wrong, which is why beginners should start there.
The three fields:
```text
integrated_multimodal_description: [Shot 1]