Repository navigation
Description
Area
[Engine] (speed, kernels, models, the server and API)
Your question
I ran Inkling 2 Mini on an AMD card on native Linux, which the Inkling page lists as not run yet. It works, but prompts
are about 4x slower than an unmerged branch on the same card. Is that the expected state today, and is that branch's
work going into main?
Setup: RX 9060 XT 16 GB, gfx1200, CachyOS, kernel 7.3.5-2-cachyos, ROCm 10.1.0, no container. Main at 36e654b, built
from source with cmake -S engine -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DCMAKE_HIP_ARCHITECTURES=gfx1200 and --target strata-poly -j4. It configured and built clean in about two minutes.
The branch I am comparing against is 3bc4042 from
https://github.com/okada-shogo/PolyStrata/tree/inkling2-amd-preview (15 commits on old PR #200). It gives prompt
attention a wave32 WMMA kernel on gfx12 by default and makes NVFP4's int8 prompt tiles the HIP default. Main has
neither on AMD as far as I can see, and those two look like the whole difference.
Two questions:
- Is ~250-290 tok/s prompts the expected state for Inkling 2 on RDNA4, or should main do better on gfx1200 and
something in my build or flags is wrong? - Is the preview branch's work planned as PRs? poly: Inkling 2 Mini (inkling2 / inkling2_loop) #200 is closed and I could not find it in the open ones.
What you tried
- Built main twice: the default build, and one with
-DSTRATA_POLY_MMQ=ON -DSTRATA_GGML_DIR=engine/third_party/strata-llama.
The default is faster, so the numbers below use it. - Ran the same two models and the same prompts on the preview build from the branch above, on the same card.
- Compared greedy output: main and the preview build give the same token ids on both models, so only speed differs.
- Load: UD-Q2_K_XL fits whole (3,072 of 3,072 experts, 7.3 GiB). UD-Q4_K_M keeps 1,976 of 3,072 (8.9 GiB).
- Did not run the HIP tests, Windows, other cards, or prompts past 8,192 tokens.
Results
--max-context 32768 --vram-reserve-mib 2048 --kv q8_0, greedy, one engine a run. Prompts are 2,048 and 8,192 tokens
of text. Writing is 128 tokens after a 1,200-token prompt. Two runs of the default build differ by under 2%.
| UD-Q2_K_XL 2,048 | UD-Q2_K_XL 8,192 | UD-Q4_K_M 2,048 | UD-Q4_K_M 8,192 | writing | |
|---|---|---|---|---|---|
| main, default build | 274 tok/s | 286 | 215 | 265 | 39.4 |
main, STRATA_POLY_MMQ=ON |
171 | 172 | 53 | 81 | 39.2 |
| preview branch 3bc4042 | 1,188 | 1,304 | 1,019 | 863 | 44.5 |
Activity
github-actions commentedon Nov 24, 2026
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
[-]Inkling 2 on AMD: native Linux, RX 9060 XT (gfx1200), ROCm 10.1[/-][+][Engine] Inkling 2 on AMD native Linux (gfx1200): prompts ~4x below an unmerged branch[/+]github-actions commentedon Nov 24, 2026
Thanks, this follows the format now.
okada-shogo commentedon Nov 24, 2026
Thanks for the careful numbers. Short answers:
To try them together now, there is a new preview branch:
https://github.com/okada-shogo/PolyStrata/tree/inkling2-amd-preview-2
See PREVIEW-AMD.md for what is in it and how to build it.
Build it as you built main, with -DCMAKE_HIP_ARCHITECTURES=gfx1200. It runs the prompt expert products on the int8 matrix cores by default, not through rocBLAS (STRATA_POLY_HIP_INT8=0 turns that off).
If you use setup or a run config it wrote: setup adds --attn-requant q5_0 --loop-bf16 --tail-skip 4 whenever the card cannot hold every expert of the size, on any OS. Run setup with --inkling-small-card off or remove the three flags; --tail-skip skips experts and changes the output.
What we measured on an RX 9070 XT (gfx1201, native Linux, ROCm 7.2.4, --threads 11 --vram-reserve-mib 700 --kv fp16, mean of 3 runs, the same flags for both). Your card has half the compute units, so expect lower numbers:
We have not run gfx1200 or ROCm 10.1. Could you post your table again with a column for preview-2? If prompts are still far below the old preview's 1,188-1,304, a run with ROCm 7.2.x would tell us whether ROCm 10.1 is the cause.
I'm still working on porting changes from the old AMD preview branch based on #200, but once the currently open PRs merge it should be a touch faster I think.
okada-shogo commentedon Nov 24, 2026
Correction on the ROCm part: ROCm 10 itself isn't slower (on our RX 9070 XT, main reads 2K prompts at 1,372 tok/s on 10.2 vs 1,286 on 7.2.4). The likely cause on your system is Arch's rocblas package (which CachyOS uses): it's built with -DBUILD_WITH_HIPBLASLT=OFF, and without hipBLASLt main's prompt path runs 57% slower (same on both ROCm versions). The preview's int8 path doesn't use rocBLAS for the expert products, so it should be much less affected. A ROCm 7.2.x run isn't needed.
Tako88 commentedon Nov 25, 2026
Built
inkling2-amd-preview-2(a15b75516) for gfx1200 as PREVIEW-AMD.md says, with no small-card flags. Here is the table you asked for.Setup. RX 9060 XT (gfx1200, 16 GB), native Linux (CachyOS, kernel 7.3.5-2), ROCm 10.1.0. Built with:
Runs:
--max-context 32768 --vram-reserve-mib 700 --kv q8_0 --threads 5, the same flags on every build, greedy, one engine per run, median of 3, the three runs within 0.5%. Prompts are 2,048 and 8,192 tokens of real text; decode is 128 tokens after a 1,200-token prompt.Prompt tok/s:
36e654b1HIP_INT8=0BELL=03bc4042cDecode tok/s after 1,200:
HIP_INT8=0BELL=0Experts in VRAM: UD-Q2_K_XL 3,072 of 3,072 (7.3 GiB) on every build. UD-Q4_K_M: preview-2 2,627 (11.8 GiB), main 2,372 (10.6 GiB) at 2,048 and 2,420 (10.8 GiB) at 8,192.
The int8 path works on gfx1200, and it is most of the win: 782 against 364 on Q2 prompts (+115%), 864 against 264 on Q4 at 2,048 (+227%), 985 against 282 at 8,192 (+250%). The rest of the merged PRs add some on their own: with
HIP_INT8=0, Q2 is 364 against main's 287 (+27%) and decode 51.0 against 40.1.BELL=0leaves prompts as they are and costs Q4 decode: 45.97 with the bell, 42.05 without. Q2 decode is unchanged (50.54 against 50.53).Where it still falls short on this card.
inkling2-amd-preview(3bc4042c) reads Q2 at 1,202.6 / 1,304.4 and Q4 at 1,049.0 / 886.2. So preview-2 wins Q4 at 8,192 (+11%) and decode at both sizes, and loses everywhere else: Q2 prompts 0.61x to 0.65x, Q4 at 2,048 0.82x, Q2 decode 0.90x.Q2 is the case I would like an answer on, because every expert is in VRAM on all three builds and no work goes to the CPU or through the stage buffer, so it can only be the kernels. One difference I noticed: the expert-MMQ gate takes an extra argument in the old branch,
Is something in that selection picking a slower tile for Q2_K on gfx1200, and is the old branch's Q2 prompt path still coming into main, or is the int8 path meant to replace it and be faster?
Row 3 of your table cannot run.
--draft-modelwith the published drafter fails on main and on preview-2 alike:The two files HF lists, the repo-root
dspark-Inkling-2-Mini-Q8_0.ggufandMainline_Support/dspark-Inkling-2-Mini-Q8_0.gguf_file, are byte-identical (md5 f9f7cbbbf2e8613a471572a72bdd196a, 503,889,952 bytes), and neither carriesdflash.dspark.markov_rank, whichds_open()inengine/src/poly/inkling2.cpprequires. Is there a newer drafter file somewhere, or does the reader need to accept this one?On the rocBLAS correction: you are right, and it is the likely cause here too. Arch's
rocblas 10.1-2has no hipBLASLt dependency (ldd librocblas.so.5.7lists none), even thoughhipblaslt 10.1-1is installed. That is why main reads 2,048-token Q2 prompts at 287 tok/s here rather than somewhere near your 1,372.I did not compare greedy ids against main on this branch, so I have nothing to say about the rounding yet.
okada-shogo commentedon Nov 25, 2026
Thanks for the careful table, this is really useful: same flags on every build, medians, and the
HIP_INT8=0/BELL=0columns make it easy to read.Prompts. You're right that preview-2 leaves speed on the table: some of the old preview's AMD prompt work isn't in it yet. Your Q2 case, with every expert in VRAM, is a clean test of exactly those kernels. We're putting together another branch with them and will post it here with numbers, so you can rerun the same table.
The drafter. It looks like the root
dspark-Inkling-2-Mini-Q8_0.ggufon Hugging Face was replaced on 2026-11-23 with a file in a different (newer) format, which our reader doesn't take. We're still confirming the details. In the meantime, the older file still seems to be there asdspark-Inkling-2-Mini-Q8_0_Old.gguf, which should load. We'll follow up once we know more.rocBLAS: thanks for checking
ldd. That matches what we saw.