llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Qwen3.8-27B (hybrid Gated DeltaNet): decode throughput collapses ~25x at context positions >~80K while prompt processing stays fast

Open cuiyuxin-gif opened this issue 3 months ago • 18 comments

Environment

  • llama.cpp: master 8144f31 (2026-08-23) + also reproduced on release b10488 (Windows CUDA 13.3 build)
  • OS: Windows 11 26200 + WSL2 Ubuntu 22.04 (both tested, same cliff)
  • GPU: RTX 4080 SUPER 16GB, driver 591.86 (CUDA 13.1), nvcc 13.1, sm_89
  • Model: unsloth/Qwen3.8-27B-GGUF UD-Q3_K_XL (12.2GB); also reproduced with UD-IQ4_XS (13.3GB) and IQ4_XS (14.6GB)
  • Backend: CUDA, single GPU

Symptom

With the model fully resident on GPU (zero "assigned to device CPU" lines, verified in logs), decode (tg) speed collapses non-linearly once the KV position exceeds roughly 80K tokens — from ~33 t/s at 68K position to 1.4 t/s (714 ms/token) at 91K position, or outright timeouts. Prompt processing (pp) stays fast (~1300 t/s) at the same positions. Zero-context decode is normal (~38-39 t/s) on every configuration below.

Reproduction matrix (WSL2, llama-server)

Command shape:

./llama-server -m Qwen3.8-27B-UD-Q3_K_XL.gguf \
    --host 127.0.0.1 --port 8080 -ngl 999 --load-mode none \
    -c <CTX> [-fa on] -ctk <Q> -ctv <Q>

Then send a chat completion with a ~91K-token filler prompt and max_tokens=100.

Config VRAM fit (CPU overrides) pp @91K fill tg @91K position
-c 131072 -fa on -ctk q4_0 -ctv q4_0 fits, 0 CPU lines ~1300 t/s 1.4 t/s
-c 98304 -fa on -ctk q4_0 -ctv q4_0 fits ~1300 t/s 1.4 t/s
-c 98304 -fa on -ctk q5_0 -ctv q5_0 fits fast timed out (>25 min)
-c 98304 (no FA) -ctk q8_0 -ctv q8_0 fits fast timed out
-c 73728 (no FA) -ctk q8_0 -ctv q8_0 fits fast 33.1 t/s @ 68K position ✅

Position sweep with the last config (UD-Q3_K_XL, q8 KV, no FA):

KV position (prompt tokens) decode t/s (server-side timing)
45,574 35.6
60,309 33.9
68,642 33.1
91,077 1.4 (or timeout)

Key observations

  1. The cliff is positional, not a memory-spill issue. All 96K/128K configs above report 0 CPU tensor overrides and normal free VRAM headroom; KV quantization level (q4/q5/q8) and -fa on/off make no difference to the cliff. Only the position matters.
  2. pp is unaffected at the same positions (~1300 t/s for the 91K fill), so this is specific to the decode path.
  3. The drop is far steeper than any plausible O(n) attention-scan cost: 68K→91K position is a 1.34x context increase but a ~24x decode slowdown.
  4. Server logs at the cliff show eval time = 1055.41 ms / 300 tokens (0.95 tokens per second) with graphs reused = 298, i.e. CUDA graph reuse continues normally while per-token latency explodes.
  5. Also reproduced on the same hardware under Windows native (b10488) at large -c, so it is not WSL2-specific.

Suspected area

Decode-path attention over long KV for the hybrid Gated DeltaNet + full-attention layers (Qwen3.8 / qwen35-family). Possibly a fallback/slow kernel engaged past some KV extent threshold. Possibly related family: #27442 (empty generation >16K on Metal for qwen35moe hybrids), #27572 (draft acceptance collapse with multi-ubatch batches).

Logs

Full llama-server logs for the 131072/q4/FA and 73728/q8/no-FA runs available on request (happy to attach — they contain per-token timing lines, tensor placement, and KV buffer sizes).

cuiyuxin-gif avatar Aug 23 '26 19:08 cuiyuxin-gif

Not reproducing here on the official prebuilt CUDA image. Posting the negative result since the cliff is the whole claim.

Environment

  • llama.cpp: ghcr.io/ggml-org/llama.cpp:full-cuda, build c060ca974 (b10603) — official prebuilt image, no local compilation
  • GPU: 2 × RTX 3090 (sm_86, 82 SM), driver 580.173.02, CUDA 13.0, power-limited to 250 W, persistence mode on
  • Host: Ubuntu 26.04, 4 × Xeon E7-8880 v4
  • Model: unsloth/Qwen3.8-27B-GGUF → Qwen3.8-27B-UD-Q4_K_XL.gguf (16.34 GiB)
  • Split: layer split across both cards (no NVLink, SYS between them)

Result

llama-bench -m Qwen3.8-27B-UD-Q4_K_XL.gguf -ngl 999 -fa 1 -p 0 -n 32 \
            -d 0,8192,32768,65536,81920,98304,131072 -r 2
test t/s
tg32 40.92 ± 0.41
tg32 @ d8192 40.37 ± 0.56
tg32 @ d32768 37.40 ± 0.54
tg32 @ d65536 33.97 ± 0.45
tg32 @ d81920 32.49 ± 0.40
tg32 @ d98304 31.13 ± 0.36
tg32 @ d131072 28.68 ± 0.30

Extended to the model's full native context in a second run (-r 1):

test t/s
tg32 @ d163840 24.88
tg32 @ d196608 24.82
tg32 @ d262144 22.02

The two positions where this issue reports the collapse are the interesting ones:

position reported here in #27623 measured on b10603
81,920 1.4 t/s 32.49 t/s
98,304 timed out (>25 min) 31.13 t/s

Decay from 0 → 262K (the model's full native max_position_embeddings) is monotonic and gentle — about 46 % total across the entire range, consistent with attention scanning a longer KV. No cliff, no timeout, at any position tested.

Why I think this is the same root cause as #27444

#27444 was the same model, the same "positional cliff" shape, and closed as a build-environment fault rather than a llama.cpp bug: binaries compiled against CUDA 13.3 headers but linked against libcudart 12, so the cudaDeviceProp layout change made prop.multiProcessorCount read back as 1 instead of the real SM count. ggml stores that as nsm and sizes stream-k FlashAttention grids as max_blocks_per_sm * nsm, so every FA kernel launched with a ~2-block grid. The apparent cliff was fattn.cu switching from the vec kernel (whose split-KV sizing does not depend on nsm) to the MMA kernel (which does).

That mechanism predicts exactly the symptoms reported here: a positional cliff that is insensitive to KV quantization and to -fa on/off, with pp unaffected — pp and decode take different kernel paths.

This report is a self-built Windows/WSL2 CUDA 13.3 stack, which is the same configuration that produced #27444. Worth checking before hunting a kernel bug:

ldd build/bin/libggml-cuda.so* | grep cudart

If that shows libcudart.so.12 against a CUDA 13.x build, it is #27444 again.

Happy to run additional depths or configurations on this hardware if it helps narrow it down.

geoffreybyers avatar Aug 24 '26 17:08 geoffreybyers

Thanks for the thorough analysis — the #27444 mechanism is a great lead, so I ran both checks on the reported environment (WSL2, self-built, nvcc 13.1):

1. Linkage is clean — no 13/12 mismatch:

$ ldd build/bin/libggml-cuda.so | grep -E 'cudart|cublas'
    libcudart.so.13  => /usr/local/cuda-13.1/lib64/libcudart.so.13
    libcublas.so.13  => /usr/local/cuda-13.1/lib64/libcublas.so.13
    libcublasLt.so.13 => /usr/local/cuda-13.1/lib64/libcublasLt.so.13

(0 hits for cudart.so.12 anywhere in the build.)

2. multiProcessorCount reads correctly in the exact runtime context (compiled with the same nvcc 13.1, run with the same LD_LIBRARY_PATH as the server):

GPU0: NVIDIA GeForce RTX 4080 SUPER | SM=80 | major=8 minor=9

80 is the correct SM count for AD103/4080 SUPER — not 1.

One variable your test didn't cover: all your numbers are llama-bench, but the collapse in this report is specific to the llama-server decode path. On the same binary + model + GPU, bench is fine here too:

path result here
llama-bench -p 16384 -n 128 (tg) 39.7 t/s ✅
llama-bench zero-ctx tg 42.5 t/s ✅
llama-server, same 91K-token fill, chat completion 1.4 t/s ❌ (or timeout)

If you get a chance, the decisive test on your rig would be serving rather than benching:

llama-server -m Qwen3.8-27B-UD-Q4_K_XL.gguf \
    --host 127.0.0.1 --port 8080 -ngl 999 --load-mode none \
    -c 98304 -ctk q8_0 -ctv q8_0
# then POST /v1/chat/completions with a ~91K-token filler prompt, max_tokens=100

My suspicion is now the server-side decode path for this hybrid arch (slot/unified-KV interplay with the full-attention layers at large positions) rather than a CUDA fattn kernel — bench and server take different code paths for decode, and pp staying fast at the same positions fits that too. Second difference worth noting: your rig is 2×3090 layer-split (no VRAM pressure), mine is a single 16GB card — though the failing configs report 0 CPU tensor overrides, so the working set is GPU-resident either way.

cuiyuxin-gif avatar Aug 25 '26 03:08 cuiyuxin-gif

I also tried reproducing this on a different CUDA (13.3) architecture and couldn't trigger the cliff.

Environment:

  • RTX 5090, sm_120
  • llama.cpp build f280b2698 (b10615)
  • Qwen3.8-27B-UD-Q4_K_M.gguf
  • all layers offloaded to CUDA
  • Flash Attention enabled

llama-bench stayed smooth through 98K context:

test t/s
tg32 76.48
tg32 @ d32768 70.05
tg32 @ d65536 64.26
tg32 @ d81920 61.69
tg32 @ d98304 59.34

I then tested the llama-server path directly with a ~90K-token chat request (n_ctx = 98304). Prompt processing completed normally, and decode was:

prompt eval time = 38448.50 ms / 90052 tokens (2342.15 tokens/s)
eval time        =   516.41 ms /    32 tokens (60.03 tokens/s)

So on this setup, llama-bench and llama-server give essentially the same decode throughput at ~90–100K context, with no positional cliff.

This seems to further narrow the issue toward something specific to the failing environment/configuration rather than long-context CUDA decode or the server path in general.

Happy to try another configuration if there is a specific variable from the reproducing setup that would be useful to match.

siavashnorouzi avatar Aug 25 '26 05:08 siavashnorouzi

Root cause found: NVIDIA driver regression, not llama.cpp code. Full discriminating matrix, same GPU (RTX 4080 SUPER, sm_89), same model (unsloth Qwen3.8-27B UD-Q4_K_XL unless noted), same fill-to-68K-then-generate methodology:

Code Engine Driver Decode @ 68K position Short-prompt decode
b10562-era 8144f31 (original report) llama-server (WSL2 self-built, CUDA 13.1) pre-swap driver (before 2026-08-2x) ~33 t/s ~38 t/s
same 8144f31, rebuilt today llama-server (identical flags) 591.86 1.4 t/s 33.3 t/s
current master d222767c llama-server (identical flags) 591.86 1.4 t/s (@88K: 0.4) 32.2 t/s
vLLM 0.27.1 + ISTA-DASLab Qwen3.8-27B-3Bit-GSQ vLLM V1 (73728 ctx, fp8 KV) 591.86 1.2 t/s 42.0 t/s

The old code, rebuilt and run unchanged on today's driver, collapses exactly like current master — and vLLM collapses too. So this is not an engine regression: deep-position decode on this card regressed when the driver changed. Also verified not KV-size dependent: identical 68K fill at -c 73728 vs -c 91728 both give 1.4 t/s.

This also explains the non-reproductions above: @geoffreybyers is on driver 580.173.02 (2×3090, sm_86) and @siavashnorouzi on a 5090 — neither on a 59x driver / sm_89. If you two can share your driver versions it would pin the boundary (580.x clean vs 591.x broken?).

For anyone hitting this: try rolling back to a 580.x driver — I'd expect the cliff to disappear. (I can't trivially verify right now because the newer driver is required by other workloads on this machine, but the matrix above isolates the driver as the only changed variable between 33 t/s and 1.4 t/s for the same binary.)

Possibly related NVIDIA-side surface: whatever kernel path long-context attention on sm_89 hits at these sizes regressed between 580.x and 591.x. Not sure it's actionable on the llama.cpp side other than documenting it — but at least the two negative results and my original report are now consistent.

cuiyuxin-gif avatar Aug 26 '26 02:08 cuiyuxin-gif

Update: tested 610.88 on the same card (silent install, reboot, identical test) — still collapsed: 68K position 1.4 t/s (short-prompt 31.2 t/s). So the regression spans the 59x and 610 branches on sm_89. Next attempt will be 580.88 (the CUDA 13.0 minimum driver; the 3090 non-repro above runs 580.173 on Linux). Will report back.

cuiyuxin-gif avatar Aug 26 '26 03:08 cuiyuxin-gif

Correction — my "driver regression" conclusion above was wrong, and I can no longer reproduce the original cliff at all.

Two things happened:

  1. My measurement metric was flawed. The numbers in my matrix were completion_tokens / total request time, which includes prompt processing (~43s for a 68K fill at ~1500 t/s pp). That's why every configuration "collapsed" to ~1.4 t/s: it was prefill time, not decode.

  2. Server-side eval-only timings (the same metric as the original report) are healthy everywhere, including on the original commit 8144f31 rebuilt from scratch in a clean build dir:

Build Config pp @91K fill tg @91K position
8144f31 rebuilt today -c 98304 -fa on -ctk q4_0 -ctv q4_0 --parallel 1 1512 t/s 32.4 t/s
current master d222767c same 1517 t/s 32.4 t/s
current master -c 73728 -ctk q8_0 (no FA), 68K position 1578 t/s 36.1 t/s

Also ruled out along the way (all equivalent with server-side timing): drivers 580.88 / 591.86 / 610.88 (576.88 breaks the CUDA 13 userspace entirely — needs ≥580), WSL 2.7.11 vs 2.7.12, --parallel 1/4, q4/q8 KV, repetitive vs random filler text, and vLLM (its apparent collapse was the same prefill-inclusive metric).

So the decode cliff does not reproduce on any combination available to me now, including the exact original commit. Either something environmental fixed it since 2026-08-23, or the original observation depended on a run-specific condition I can't reconstruct (the original runs did report 0 CPU tensor overrides). With three independent non-reproductions above plus mine on the original commit, I'd support closing as cannot-reproduce unless someone can still trigger it. Apologies for the detour with the driver theory — the VRAM/short-context sanity numbers are still valid, only the deep-position conclusion was wrong.

cuiyuxin-gif avatar Aug 26 '26 06:08 cuiyuxin-gif

Local reproduction on CUDA with Qwen3.8-27B UD-IQ4_XS:

  • GPU: RTX 2000 Ada 16 GB, sm_89
  • CUDA: 13.3
  • llama.cpp: v0.4.1, commit b29c606
  • Build: CUDA + Flash Attention, all 65 layers offloaded
  • Model: unsloth/Qwen3.8-27B-GGUF:UD-IQ4_XS

Using a short prompt and 16 generated tokens:

-c 2048  -ctk f16   -ctv f16   -ngl all  -> 13.3 t/s generation
-c 2048  -ctk q8_0  -ctv q8_0  -ngl all  ->  5.9 t/s generation
-c 12000 -ctk f16   -ctv f16   -ngl all  -> 13.3 t/s generation
-c 12000 -ctk q8_0  -ctv q8_0  -ngl all  ->  5.8 t/s generation

The model remains GPU-resident and the F16 KV path returns to the expected ~13–14 t/s, so this appears specific to the quantized-KV CUDA/Flash-Attention path rather than general Qwen3.8 decode performance. Q4 KV is similarly slow in our tests.

This is on a 16 GB card, so the large-context quantized-KV scratch/allocation behavior may also be relevant. Is this known for qwen35 hybrid models on sm_89, or should this be tracked as a separate regression?

jimdawdy-hub avatar Sep 16 '26 23:09 jimdawdy-hub

Local reproduction on CUDA with Qwen3.8-27B UD-IQ4_XS:

  • GPU: RTX 2000 Ada 16 GB, sm_89
  • CUDA: 13.3
  • llama.cpp: v0.4.1, commit b29c606
  • Build: CUDA + Flash Attention, all 65 layers offloaded
  • Model: unsloth/Qwen3.8-27B-GGUF:UD-IQ4_XS

Using a short prompt and 16 generated tokens:

-c 2048  -ctk f16   -ctv f16   -ngl all  -> 13.3 t/s generation
-c 2048  -ctk q8_0  -ctv q8_0  -ngl all  ->  5.9 t/s generation
-c 12000 -ctk f16   -ctv f16   -ngl all  -> 13.3 t/s generation
-c 12000 -ctk q8_0  -ctv q8_0  -ngl all  ->  5.8 t/s generation

The model remains GPU-resident and the F16 KV path returns to the expected ~13–14 t/s, so this appears specific to the quantized-KV CUDA/Flash-Attention path rather than general Qwen3.8 decode performance. Q4 KV is similarly slow in our tests.

This is on a 16 GB card, so the large-context quantized-KV scratch/allocation behavior may also be relevant. Is this known for qwen35 hybrid models on sm_89, or should this be tracked as a separate regression?

Ran into similar on my 4090 (sm_89 arch, same as your 2000 Ada) with Q4_K_M weights + q8 KV. Main issue I think is fa's q8 -> f16 conversion over the whole KV on every decode (CUDA MMA fa kernel is f16-only). Whipped up a native q8 CUDA kernel with some promising perf improvements. PR forthcoming.

apresence avatar Sep 20 '26 20:09 apresence

On a 3-bit XS model on a qwen3.8 27b, with a RTX3080Ti 12GB VRAM + 32GB RAM + 5800x3d.

I run it at 45-51 token/s. No kidding.

But that is not all, I can do that with 256k context size.

And not in just a simple request.

But I will not reveal how, just to say that it is possible.

dougg0k avatar Sep 21 '26 20:09 dougg0k

Acknowledged with thanks.

On Mon, 21 Sept 2026 at 21:21, Douglas Galdino @.***> wrote:

dougg0k left a comment (ggml-org/llama.cpp#27623) https://github.com/ggml-org/llama.cpp/issues/27623#issuecomment-5766951917

On a 3-bit XS model on a qwen3.8 27b, with a RTX3080Ti 12GB VRAM + 32GB RAM + 5800x3d.

I run it at 45-51 token/s. No kidding.

But that is not all, I can do that with 256k context size.

And not in just a simple request.

But I will not reveal how, just to say that it is possible.

— Reply to this email directly, view it on GitHub https://github.com/ggml-org/llama.cpp/issues/27623?email_source=notifications&email_token=CJHCJ72WSPD5GXDMNUJUC535QGES5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNZWGY4TKMJZGE32M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-5766951917, or unsubscribe https://github.com/notifications/unsubscribe-auth/CJHCJ7YT5EE25OH4FDGLSVT5QGES5AVCNFSNUABFKJSXA33TNF2G64TZHM3DCMRTGU2DOOBUHNEXG43VMU5TKMRSHA3DOMJQGEY2C5QC . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/CJHCJ7572QJA2ZBJ4TJIGH35QGES5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNZWGY4TKMJZGE32M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ and Android https://github.com/notifications/mobile/android/CJHCJ74RTC7UFRXW3D57DNT5QGES5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNZWGY4TKMJZGE32M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ. Download it today! You are receiving this because you are subscribed to this thread.Message ID: @.***>

sssr5hsssdssqdse avatar Sep 21 '26 20:09 sssr5hsssdssqdse

https://github.com/dougg0k Why not say how? Is this a proprietary commercial method?

On a 3-bit XS model on a qwen3.8 27b, with a RTX3080Ti 12GB VRAM + 32GB RAM + 5800x3d.

I run it at 45-51 token/s. No kidding.

But that is not all, I can do that with 256k context size.

And not in just a simple request.

But I will not reveal how, just to say that it is possible.

jimdawdy-hub avatar Sep 21 '26 21:09 jimdawdy-hub

Because I prefer not to. It's not.

dougg0k avatar Sep 21 '26 21:09 dougg0k

Just a correction. I made another breakthrough on this, and shared the results with AI.

At roughly the same generated-token point as the previous run, the difference is already substantial:

Previous run at 3,935 tokens: 62.15 t/s
New run at 3,892 tokens: 71.70 t/s
Increase: about 15.4%
By 6,723 tokens, the cumulative average reaches 74.30 t/s
Relative to the old 45–51 t/s ceiling, that is about 46–65% faster

The short-window measurements are also now repeatedly reaching 80–88 t/s, with a peak shown here of 88.23 t/s.

This might make someone else mad, but again, it's just to say that it is possible.

dougg0k avatar Sep 24 '26 00:09 dougg0k

Wow, trolling on llama.cpp. Now I've seen it all. For qwen 3.8 27b q4_k_m:

  • q8 KV can get you around 170k context on a 4090
  • q4 KV can get you the whole 262k

Some PRs coming for perf enhancements for above plus a few others, also for next flash. Code is written and tested but I'm genuinely bad at finding motivation to write PR prose. Any volunteers? :D

apresence avatar Sep 24 '26 01:09 apresence

Haha. It's not, but ok.

dougg0k avatar Sep 24 '26 01:09 dougg0k

Vulkan/RADV data point (RX 7900 XTX): no >80K decode cliff; quantized KV shows no penalty

Environment

  • llama.cpp: release b11065 base + local tuning patches, Linux (Arch), Mesa 26.2.3 RADV (26.2.3-arch1.1), RX 7900 XTX 24 GB
  • Model: Qwen3.8-27B-GSQ-RCO-IQ3_XXS-mtp.gguf (10.44 GB, community IQ3_XXS quant of Qwen3.8-27B)
  • llama-server -m <model> -c 131072 -ctk q4_0 -ctv q4_0 -ngl 99 -np 1 (+ GGML_VK_SUBALLOCATION_BLOCK_SIZE=4294967296), vanilla — no speculative decoding
  • Method: one /completion per position, sequential; n_predict: 100, ignore_eos: true; decode-only server timings (predicted_tps) — the metric from which the original report was retracted; every prompt prefixed with a unique marker so slot prefix-cache can't deflate prompt_eval_count (it reports the true full position)

Positional sweep

prompt fill position pp t/s decode t/s
short 15 78.4 52.83
~45K 45 068 677.4 45.13
~68K 68 426 580.9 41.98
~80K 80 647 538.7 40.65
~91K 91 842 505.3 39.51

No cliff: the exact span of the original claim (68K→91K, 1.34×) costs −6.1 % decode (41.98 → 39.51), 80.6K→91.8K is −2.8 %, and at 91 842 position decode retains 75 % of the short-prompt rate — versus 1.4 t/s (or timeout) in the OP. pp stays fast at the same positions (505 t/s), matching the issue's pp observation.

KV-quant A/B (short prompt, -c 32768, same rig)

-ctk/-ctv decode t/s
f16 53.67
q4_0 53.12
q8_0 53.17

1 % spread — the ~2.25× q8_0-KV decode penalty reported upthread (sm_89 CUDA) does not occur on RADV; quantized KV is effectively free here.

Interpretation: first non-CUDA, decode-only-metric data point in this thread. Consistent with the OP's own retraction: the positional cliff doesn't reproduce on RDNA3/Vulkan either, and the residual q8_0-KV slowdown looks CUDA-specific. Happy to run bisects, other positions, or the same sweep on HIP if useful.

tczank avatar Sep 24 '26 11:09 tczank

HIP half of the same sweep (RX 7900 XTX, ROCm/HIP build) — same rig/method/model/flags as above, only the backend differs (production HIP build, GGML_HIP=ON; no GGML_VK_TILE_L/GGML_VK_ALLOW_GRAPHICS_QUEUE — Vulkan-only):

prompt fill position pp t/s decode t/s
short 15 90.3 32.55
~45K 45 068 743.3 20.00
~68K 68 426 678.8 16.67
~80K 80 647 647.7 15.22
~91K 91 842 624.8 14.10

KV-quant A/B (short, -c 32768): f16 28.68 / q4_0 32.68 / q8_0 32.90 t/s — same as Vulkan: no q8_0 penalty; on HIP quantized KV is even ~14% faster than f16.

Summary across both AMD backends (same rig, same fills):

position Vulkan decode HIP decode Vulkan pp HIP pp
45 068 45.13 20.00 677 743
91 842 39.51 14.10 505 625
  • No >80K decode cliff on either backend (Vulkan -6.1% / HIP -15.4% across the 68K→91K claim span — smooth, no discontinuity).
  • HIP prefill is consistently +10–24% over Vulkan here (matching earlier local long-context measurements), while vanilla decode favors Vulkan ~1.6–2.8× (MTP-off; production MTP acceptance changes this balance).
  • The CUDA q8_0-KV penalty remains CUDA-only in our data: on AMD it's neutral (Vulkan) or a win (HIP).

So the OP's positional cliff has now failed to reproduce on CUDA (post-retraction), Vulkan, and HIP; the q8_0-KV slowdown looks CUDA-path-specific.

tczank avatar Sep 24 '26 18:09 tczank

Seems like this issue should be closed as it is no longer reproducible? Unless I am missing something.

bananamann avatar Nov 28 '26 18:11 bananamann