Skip to content

[Docs] Inkling 2 Mini: measure setup's four small-card settings one at a time - #247

Open
okada-shogo wants to merge 3 commits into
simplexai-labs:mainfrom
okada-shogo:port/docs-inkling-flags
Open

okada-shogo wants to merge 3 commits into
simplexai-labs:mainfrom
okada-shogo:port/docs-inkling-flags

Conversation

@okada-shogo

@okada-shogo okada-shogo commented Nov 23, 2026 •

Copy link
Copy Markdown

Problem and result

Setup's small-card settings make Inkling 2 Mini's answers worse to make them faster, and setup adds them by
itself, with no option to leave them out. To turn them off, delete "--attn-requant", "q5_0", "--loop-bf16", "--tail-skip", "4", "--expert-swaps", "0" from "args" in terminal/strata-inkling-<size>.json and restart the
server. The docs now say both, first thing in the new section.

On a card that does not hold every expert, setup starts Inkling 2 Mini with --attn-requant q5_0 --loop-bf16 --tail-skip 4 --expert-swaps 0. The docs measured them only together, on one laptop. This adds a short section to
docs/models/inkling.md with each setting alone and all four, on three cards: speed, how much the answers move,
and how many experts --tail-skip 4 leaves out.

Three of the settings round the numbers more coarsely (lossy). --tail-skip 4 skips computation: a token's experts ranked 5th to
8th that are not on the card are not computed. The docs now say so.

Short version. Decode tok/s (tokens written per second), higher is better, median of 2 runs, IQ4_NL unless the
model column says otherwise. Each column is one setting alone, then all four together:

Decode tok/s after a 302-token prompt:

Card Model none --expert-swaps 0 --loop-bf16 --attn-requant q5_0 --tail-skip 4 all four
RTX 4060 Ti 16 GB IQ4_NL 49.0 41.3 49.9 54.8 50.9 53.9
Quadro RTX 4000 8 GB IQ4_NL 30.9 23.8 29.6 30.9 31.0 30.9
RTX 2070 Super 8 GB UD-Q2_K_XL 39.3 32.3 40.0 43.6 43.7 43.0

Decode tok/s after an 8,192-token prompt:

Card Model none --expert-swaps 0 --loop-bf16 --attn-requant q5_0 --tail-skip 4 all four
RTX 4060 Ti 16 GB IQ4_NL 44.6 42.8 45.5 49.4 46.2 52.5
Quadro RTX 4000 8 GB IQ4_NL 21.7 22.8 20.2 19.6 19.9 18.3
RTX 2070 Super 8 GB UD-Q2_K_XL 32.7 32.9 33.4 34.8 37.4 40.5
  • The gain comes from --attn-requant q5_0 and --tail-skip 4. --expert-swaps 0 is slower on every card after
    a short prompt.
  • Answers (same top-1 token as default; two default runs give 98.2-99.0%): --loop-bf16 and --expert-swaps 0
    give 98.1-98.9%. --attn-requant q5_0 gives 95.6-97.0%, --tail-skip 4 96.4-97.9%, all four 94.3-95.0%.
  • --tail-skip 4 leaves out 0.9% of a token's expert picks on the 16 GB card, but 8% alone and 24.5-26.5% with the
    other three on the 8 GB cards with IQ4_NL. The engine's "experts from VRAM" count counts those as VRAM hits.

Related discussion

none

Approach

Docs only. One new subsection under the small-card paragraph of docs/models/inkling.md: a plain warning and how
to turn the settings off, then the measurements. Nothing about setup changes.

How the runs were made
  • Engine: main d1f711e, CUDA build (one binary for the Turing boxes; built on the box for the RTX 4060 Ti).
  • Files: ggml-org's Inkling-2-Mini-IQ4_NL.gguf, and Unsloth's UD-Q2_K_XL with its tensors copied byte for byte into
    the inkling2_loop layout.
  • Speed: once-mode runs, 2 rounds, the order of the settings reversed in the second round. Reported as medians.
  • Answers: a greedy run with the defaults and --top-probs 20 is the reference. Every other setting is fed the
    same tokens (--follow) and compared step by step: top-1 match and KL(default ‖ setting) over the top 20. The
    defaults are run twice more as the noise floor.
  • Left-out experts: counted with the doorbell off (STRATA_POLY_BELL=0; the doorbell is how the card hands its
    misses to the CPU one token at a time), because with it on the engine counts them as VRAM hits. With it off they
    drop out of the hit rate's denominator, so that figure reads high too. For one token at a time both paths drop the
    same experts.

Validation

Passed:

Speed, per setting S in {none, --expert-swaps 0, --loop-bf16, --attn-requant q5_0, --tail-skip 4, all
four, --expert-swaps 4, --expert-swaps 16}, with and without STRATA_POLY_BELL=0:

strata-poly --model <file> --tokens @<prompt ids> --max-new 256 --kv fp16 --max-context 32768 S   # 302 and 8,192-token prompts
strata-poly --model <file> --tokens @<prompt ids> --max-new 1   --kv fp16 --max-context 32768 S   # 302 and 2,048 (prompt only)

Answers:

strata-poly --model <file> --tokens @<prompt ids> --max-new 256 --kv fp16 --max-context 32768 --top-probs 20             # reference
strata-poly --model <file> --tokens @<prompt ids> --max-new 256 --kv fp16 --max-context 32768 --top-probs 20 --follow @<reference tokens> S

Prompts: 302, 112 (code), a short chat, and 2,048 tokens (128 written).

Hardware What ran Result
RTX 4060 Ti 16 GB, Threadripper 2950X, Linux (rented) speed + answers, IQ4_NL (also on 4 and 2 cores, five-turn serve, nsys); answers, UD-Q2_K_XL all runs rc=0
RTX 2080 Ti 11 GB, Ryzen 9 3900X, Linux (rented) answers, IQ4_NL and UD-Q2_K_XL all runs rc=0
Quadro RTX 4000 8 GB, Ryzen 5 5600X, Linux (rented) speed, IQ4_NL all runs rc=0
RTX 2070 Super 8 GB, Ryzen 5 3600XT, Linux speed, UD-Q2_K_XL; IQ4_NL on 4 and 2 cores, five-turn serve, nsys all runs rc=0
Answers: every setting, same top-1 (%) and KL (nats)

Each setting is fed the default run's tokens and compared step by step with the default. "default, 2nd run" and
"default, 3rd run" are the default run again: the noise floor.

Same top-1 token as the default, % of steps, higher is better:

Card Model Experts on the card Setting Same top-1
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 default, 2nd run 98.2%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 default, 3rd run 99.0%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --expert-swaps 0 98.1%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --loop-bf16 98.1%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --attn-requant q5_0 95.6%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --tail-skip 4 97.9%
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 all four 95.0%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 default, 2nd run 98.4%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 default, 3rd run 98.9%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --expert-swaps 0 98.9%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --loop-bf16 98.4%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --attn-requant q5_0 97.0%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --tail-skip 4 96.4%
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 all four 94.3%
first of the two cards above UD-Q2_K_XL all --attn-requant q5_0 94.6%
second of the two cards above UD-Q2_K_XL all --attn-requant q5_0 97.0%
both cards UD-Q2_K_XL all each of the other three 100%

Mean KL(default ‖ setting) over the default's top 20 tokens, in nats, lower is better:

Card Model Experts on the card Setting Mean KL (nats)
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 default, 2nd run 0.0022
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 default, 3rd run 0.0015
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --expert-swaps 0 0.0109
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --loop-bf16 0.0037
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --attn-requant q5_0 0.0319
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 --tail-skip 4 0.0248
RTX 4060 Ti 16 GB IQ4_NL 2,619 of 3,072 all four 0.0220
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 default, 2nd run 0.0013
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 default, 3rd run 0.0017
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --expert-swaps 0 0.0024
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --loop-bf16 0.0019
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --attn-requant q5_0 0.0135
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 --tail-skip 4 0.0098
RTX 2080 Ti 11 GB IQ4_NL 1,582 of 3,072 all four 0.0337
first of the two cards above UD-Q2_K_XL all --attn-requant q5_0 0.0139
second of the two cards above UD-Q2_K_XL all --attn-requant q5_0 0.0230
both cards UD-Q2_K_XL all each of the other three 0

On the 16 GB card one step of most settings, the default with the doorbell off included, has KL 6-8, which sets
the means. Medians: 0.0002 and 0.0001 (again), 0.0004 (--expert-swaps 0), 0.0003 (--loop-bf16), 0.0017 (--attn-requant q5_0), 0.0007 (--tail-skip 4), 0.0025 (all four).

Expert swaps: speed, hit rate and traffic (IQ4_NL, after a 302-token prompt)

Decode tok/s after a 302-token prompt, IQ4_NL, median of 2 runs, higher is better. --expert-swaps caps how many
experts the engine may swap onto the card per token; the default is 64:

Card Model Setting Decode tok/s
RTX 4060 Ti 16 GB IQ4_NL default (--expert-swaps 64) 49.0
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 16 48.8
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 4 48.1
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 0 41.3
Quadro RTX 4000 8 GB IQ4_NL default (--expert-swaps 64) 30.9
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 16 29.6
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 4 28.1
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 0 23.8

The engine's counters for the same runs. "VRAM hits" is the % of a token's experts found on the card (as the
engine counts it); "CPU experts" is the time the CPU spends on the experts not on the card:

Card Model Setting VRAM hits (%) CPU experts (ms per token) Swaps per token Swap upload (MB per token)
RTX 4060 Ti 16 GB IQ4_NL default (--expert-swaps 64) 96.8% 1.6 1.55 7.9
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 16 96.8% 1.8 1.55 7.9
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 4 96.5% 2.3 1.47 7.6
RTX 4060 Ti 16 GB IQ4_NL --expert-swaps 0 91.6% 8.0 0 0
Quadro RTX 4000 8 GB IQ4_NL default (--expert-swaps 64) 77.8% 6.6 3.89 20.1
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 16 76.4% 7.1 3.59 18.6
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 4 70.9% 10.0 2.82 14.6
Quadro RTX 4000 8 GB IQ4_NL --expert-swaps 0 46.5% 23.0 0 0

Fewer swaps gave fewer hits and slower writing on every card. Each swap also copies the outgoing expert back to RAM
when RAM holds no copy (nsys on the RTX 2070 Super, tokens 9-40: 79 MB up and 79 MB down a token by default).

Failed:

none observed

Not run:

  • The answers on an 8 GB card. This is where --tail-skip 4 leaves out the most, so its accuracy cost there is
    not measured.
  • UD-Q4_K_XL and UD-Q3_K_XL, Windows, and the laptop from the existing paragraph.

Limits

  • The Quadro is a rented 100 W card, and its runs vary a lot (default: 29.5-32.2 tokens/s after 302 tokens,
    19.1-24.3 after 8,192). Its "all four is slower after 8K" is within that spread.
  • Two rounds per point. Each box is compared only with itself.
  • Side finding, not in the docs: on the RTX 2070 Super the doorbell off (STRATA_POLY_BELL=0) wrote faster than
    main's default (UD-Q2_K_XL 44.3 vs 39.3 tokens/s). On the Quadro, 32.1 vs 30.9 is within its 29.5-32.2 spread. On
    the 16 GB card it was slower (47.4 vs 49.0).
  • port/setup-no-swaps-0 (and a planned PR that has setup ask before adding these settings) edit the same
    paragraph of docs/models/inkling.md; whichever lands second needs a small rebase.

🤖 Generated with Claude Code

okada-shogo and others added 3 commits November 23, 2026 09:22
Speed of each of setup's small-card settings alone and all four, on an RTX 4060 Ti
16 GB, a Quadro RTX 4000 8 GB and an RTX 2070 Super 8 GB; how much each moves the
answers against two default runs; and how many experts --tail-skip 4 leaves out,
which the engine's "experts from VRAM" count takes as found in VRAM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new section now opens with a warning: setup adds the four settings by itself
on a card that does not hold every expert, they make the answers worse, and
--tail-skip 4 leaves out 9% to 27% of a token's expert picks on the 8 GB cards.
It says how to take them out of the run config, or keep the rounding and turn
only --tail-skip off.

Review fixes: KL medians beside the means, which one outlier step sets; the
--loop-bf16 and --expert-swaps 0 agreement as numbers; --loop-bf16 also changes
nothing with UD-Q2_K_XL fully on the card; the left-out count for the RTX 2070
Super with IQ4_NL; the two gains after 8K; what the doorbell is; the prompt-batch
rule for leaving an expert out; the VRAM figure with the doorbell off; the CPUs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ult-run medians

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@okada-shogo
okada-shogo marked this pull request as ready for review November 23, 2026 01:36
okada-shogo added a commit to okada-shogo/PolyStrata that referenced this pull request Nov 23, 2026
… small-card settings one at a time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant