r/ROCm • • 14h ago

Strata EXL3 (AMD) major improvements! (+30-50% decode on QFN, +15% on HY4 dual gpu, +30/50% prefill, other stuff) (read inside, no AI slop!)

35 Upvotes

Preparing for Qwen 4, I have made BIG improvements to inference speed, quality of life and setup on both Qwen 3.8 Flash Next AND the newly supported HY4-Flash (220B), especially for 2-gpus!

  • for 2 gpus, uses direct P2P between cards, even if one is on Pcie x4 behind Chipset.
  • much optimized HIP kernels under the hood!
  • Ability to use 4096 QSA indexer instead of default 2048 on Qwen. Linear attention spans more tokens, this can really improve the quality on long contexts! costs about 5% performance.
  • faster bootup!
  • no need to build separate pack files for CPU help, repacking now is done at bootup in RAM, fast, transparent and multithreaded.
  • improved compatibility to other RDNA3/4 cards (untested!)
  • added Q8_0 KV cache with Hadamard rotations for HY4 -> more Vram = more experts in cache = faster speed.
  • added support for HY4-flash 3.5bpw. if you have 64Gb ram you can use 3.0bpw, if you have 96Gb you now can use the 3.5bpw, performance about the same. I know Qwen4 Flash will come out and made this obsolete :)
  • simplified setup, now more robust, is capable of self-tuning to use all Vram available, just follow the instructions.
  • added support for AVX2 cpu (older)

Coming next:

-pulling in some kernel optimizations from https://github.com/adelj88/rmtile
-Qwen 4 support. planning also to add 35B with tensor parallel on 2 gpus ;)

Benchmarked on RX 7900 XTX (24GB), Ryzen 9 7950X, 96GB DDR5, Linux.

Qwen Flash Next 4bpw (about Q5_K_M quality!)

Speeds1 GPU2 GPUs
prefill 16k1970 2090 tk/s2290 2430 tk/s
decode CODE, MTP472 tk/s102 tk/s
decode PROSE, MTP463 tk/s89 tk/s

Qwen Flash Next 3bpw (about IQ4_K_XS quality!)

Speeds1 GPU2 GPUs
prefill 16k1990 tk/s2230 2340 tk/s
decode CODE, MTP487 tk/s107 tk/s
decode PROSE, MTP478 tk/s96 tk/s

HY4-Flash 220B (3bpw)

Speeds1 GPU2 GPUs
prefill 16k~940 tk/s~1300 tk/s
decode CODE, DFly233 tk/s63 tk/s
decode PROSE, DFly229 tk/s40 tk/s

how to setup? point your agent to
https://github.com/nasone32/Strata-EXL3-fork/blob/amd-exl3-community/docs/AI_SETUP_EXL3_AMD.md

If you like my repo please give github stars! :)


r/ROCm • • 12h ago

Paiton | Qwen4-35B-A3B | 1 x R9700: 285.7 tok/s @ c1, 668.6 tok/s @ 8, ~9,000 tok/s prefill, up to 500K context (3-bit and 4-bit)

Post image
26 Upvotes

Qwen4 is finally here!
We didn't get early access, so we jumped on it the moment it landed.
Well, more like 12 hours too late, because it was bedtime here :)
Anyhow, here we go for our first Paiton Qwen4 release.

Setup:

  • As usual, a single R9700, default settings, no undervolt/overvolt, etc...
  • Still vLLM 0.29 on ROCm 10 with our Paiton plugin
  • Native HIP kernels and our own drafter.
  • BetterBench 0.6.0 standard profile, temperature 0.7 / top-p 0.95 / top-k 20, fresh server per run, thinking off.
3-bit4-bit
Decode, 1 request (weighted median)285.7 tok/s230.0 tok/s
Decode, 8 requests (total)668.6 tok/s618.8 tok/s
Prefill, 1,528 / 11,813 / 23,560-token prompt9,617 / 9,129 / 8,940 tok/s9,343 / 9,021 / 8,914 tok/s
Context per request (8-bit KV pages)499,712 tokens262,144 tokens
KL vs bf16 (bf16 vs itself: 0.014)0.0590.035

Decode at 1 request by prompt category, from the same bench pass as the 285.7 / 230.0 above (median of 20 runs per category). Tokens per update is how many tokens arrive together in one stream update with the drafter on.

Category3-bit tok/s4-bit tok/sTokens per update, 3-bit / 4-bit
json433.9305.53.89 / 3.25
math365.7282.74.51 / 3.43
file_edit321.4235.43.66 / 2.93
code315.8254.83.94 / 3.17
summarization282.9216.03.04 / 2.46
chat248.8229.72.77 / 2.58
reasoning217.2202.92.47 / 2.29
prose146.9147.11.85 / 1.83
Weighted (code 0.3, reasoning 0.2, prose 0.15, json 0.15, file_edit 0.1, summarization 0.1)285.7230.0

The drafter keeps the model's output distribution, but replies can differ token by token from a run without it.
So we ran task scores with it on and off (thinking on for these):

  • GSM8K: 94.2 vs 94.1 % (3-bit), 93.3 vs 94.0 % (4-bit)
  • HumanEval: 98.8 vs 97.0 %, 95.7 vs 95.7 %
  • MMLU-Pro (paired subset): 84.5 vs 84.5 %, 84.2 vs 83.8 %

No difference is significant; every 95 % interval contains zero.

Let's also list a few things we did for this one:

  • Trained our block drafter further on our MI355X box, on replies the model itself generated on our own prompt sets. It proposes 5 tokens per step on 3-bit (3 above 4 requests) and 3 on 4-bit. Its output head runs in 2 bits now (+7.8 % at 1 request).
  • Native HIP prefill for the GDN layers and the experts: +25 % at a 23,560-token prompt.
  • 8-bit (fp8) KV pages by default: 499,712 tokens per request on 3-bit, 262,144 on 4-bit. We checked them against 16-bit pages at 32K and 128K tokens.
  • int8 LM head, and a GDN state path the drafter's checks read without extra copies (+9 % at 8 requests).
  • The compile caches ship in the image, so a first start takes about 3.5 minutes instead of 5 to 6.
  • Two bugs caught by our KL gates before release: a state-slot mixup when several prompts share a prefill step, and a stale table inside the GPU graphs that shifted the n-gram embedding on short prompts. Both fixed.

Run it:

git clone https://github.com/Eliovp-BV/paiton-vllm-plugin.git
cd paiton-vllm-plugin
bash models/Qwen4-35B-A3B/run-qwen4-35b.sh                  # 3-bit
bash models/Qwen4-35B-A3B/run-qwen4-35b.sh --weights 4bit   # 4-bit

OpenAI API on port 8000, model qwen4.
Thinking is off by default; send "chat_template_kwargs": {"enable_thinking": true} or start with --thinking on.
Text only for now, prefix caching off.

And don't worry, we have a lot planned:

Numbers from your own R9700 (or other host setups) are very welcome.


r/ROCm • • 22h ago

SmallTide v0.3.1: Running Qwen4-35B-A3B-NVFP4 (256K ctx + Vision) on 16 GB RDNA 4 (RX 9070 XT / 9060 XT) with zero paging loss, why I'm building a custom engine + full quality/VRAM benchmarks

16 Upvotes

SmallTide now supports Qwen4-35B-A3B in addition to Inkling-2-Mini, with native HIP kernels embedded for **AMD RDNA 4 (**gfx1201 / gfx1200 — RX 9070 XT / 9070 / 9060 XT / R9700) on Windows and Linux.

First, when you don't need this

If you have 32 GB+ of VRAM (e.g. Radeon AI PRO R9700), existing engines already fit the whole model in VRAM and run fine, there isn't much difference between well-tuned engines since everyone hits the memory-bandwidth limit.

Worth trying if any of these apply to you

  • You want to run NVFP4-level quantization (RadixArk/Qwen4-35B-A3B-NVFP4, ~16.9 GiB of experts + dense/KV/drafter = ~23.2 GiB total) on a 16–24 GB GPU (like an RX 9070 XT or RX 9060 XT).
  • At that size it doesn't fit in 16 GB, so you assume your only options are streaming and living with the slowdown, or giving up quality for a much smaller quant that fits entirely.
  • Or another app (browser, desktop compositor, IDE, etc.) needs a little VRAM, pushing the model just over the edge into OOM or slow system-RAM spillover. In cases like these, SmallTide is far more flexible than existing engines. With Adaptive Expert Loading (3-tier VRAM -> Pinned Host RAM -> NVMe with async promotion, an inline GPU Rescue Ring, and Elastic 32K -> 256K KV), it keeps speed up while keeping quality loss to a minimum. Because streaming optimizations touch every layer of the engine — routing, paged KV, pinned DMA overlapped with shared MLP, speculative draft/verify — it's beyond what can be applied to existing engines as a PR.

Measured Speeds on AMD RDNA 4 (16 GB, HIP, bench/bench.py, DFlash 2)

  • RX 9070 XT 16 GB (qwen4, Windows 10, 16 GB system RAM, monitor on GPU, 256K ctx):

    • prose: 61.5 tok/s · code: 91.0 tok/s · edit: 216.3 tok/s · HTML games (angry-birds / mario): 147.6 / 156.3 tok/s
    • Prefill / TTFT: 215–631 ms short prompts, ~1.2K tok/s on 8K prompts
  • RX 9070 XT 16 GB (inkling2, headless):

    • prose: 87.0 tok/s · code: 91.0 tok/s · edit: 109.1 tok/s · thinking: 115.2 tok/s · HTML games: 114.4–126.2 tok/s
  • RX 9060 XT 16 GB (inkling2, community Windows 11 monitor): 48.4–70.9 tok/s (97.3–98.3% VRAM hit rate)

Quality vs. Real VRAM Scaling (Qwen4-35B-A3B, v0.3.1)

Measured via exact full-vocabulary (248,320) f64 KL divergence, Top-1 / Top-5 agreement, and Perplexity over 1,558 teacher-forced tokens across 4 domains (Rust code, math, prose, JSON). VRAM/RAM caps were emulated against the full 36.9 GiB reference: Reference = official Qwen/Qwen4-35B-A3B-FP8 (100% VRAM resident FP8 experts + native BF16 dense & lm_head, 36.92 GiB)

ConfigReal VRAMVRAM ExpertsTop-1Top-5KL MeanPPLSkipped Wt
Ref: FP8 + BF16 dense (100% VRAM)36.92 GiB10,240/10,240100.00%100.00%0.000003.2650.00%
FP8 + FP8 dense (100% VRAM)34.62 GiB10,240/10,24093.58%99.74%0.027853.2600.00%
NVFP4 + BF16 dense (100% VRAM)25.29 GiB10,240/10,24093.52%100.00%0.041203.2560.00%
NVFP4 + FP8 dense (100% VRAM)23.19 GiB10,240/10,24092.30%99.61%0.046383.2670.00%
16 GB Headless (15.5G, 6G RAM)15.47 GiB6,928/10,24092.30%99.61%0.046383.2670.00%
16 GB Safe (15.0G, 6G RAM)15.00 GiB6,632/10,24092.30%99.61%0.046383.2670.00%
16 GB Mid (14.5G, 6G RAM)14.54 GiB6,337/10,24091.91%99.68%0.051913.2620.44%
16 GB Monitor (14.3G, 7G RAM)14.27 GiB6,100/10,24092.30%99.61%0.046383.2670.00%
16 GB Monitor (14.2G, 6G RAM)14.23 GiB6,100/10,24091.01%99.68%0.071673.2911.36%
13.6 GiB (6G RAM)13.60 GiB5,760/10,24090.24%99.23%0.110253.3892.91%
13.1 GiB (6G RAM)13.11 GiB5,457/10,24087.93%98.78%0.161203.5414.70%

Full breakdown & --kl-eval reproduction commands: https://github.com/raspy135/SmallTide/blob/main/docs/qwen4-vram-quality-scaling.md

Highlights for ROCm / RDNA 4 users in v0.3.1

  • Zero paging loss on 16 GB: Fast Tier-1 Pinned RAM DMA rescues are always executed while only slow NVMe reads are threshold-gated. From 15.0–15.5 GiB headless (even on a 16 GB system RAM PC), output logits match the 23.19 GiB 100%-resident NVFP4 model identically (92.30% Top-1, 0.04638 KL, 3.267 PPL). With 24–32 GB+ host RAM (7–11 GB pinned pool), it holds zero paging loss down to 12 GB VRAM (10.2 GiB).
  • OS VRAM-Pressure Shrink & Regrow (Windows WDDM + Linux amdgpu**):** Monitors real OS VRAM headroom (DXGI/D3DKMTQueryStatistics on Windows, /sys/class/drm/.../mem_info_vram_used on Linux), voluntarily yields cold tail experts to Pinned RAM when another app takes VRAM, and regrows back up to your configured cap once it closes.
  • Zero SDK setup: Pre-built gfx1201 / gfx1200 .hsaco kernels are embedded directly inside smalltide-cli (loads only the driver's amdhip64_7.dll on Windows; native Linux + turnkey Docker/Podman containers also included).

Repo & v0.3.1 release (MIT): https://github.com/raspy135/SmallTide

Would love to hear feedback or Linux ROCm / RX 9070 XT / RX 9060 XT test results if anyone gives v0.3.1 a spin!


r/ROCm • • 12h ago

Avalon is now running QWEN4-35B-A3B: Gen 147 t/s Prefill: 5245 t/s (RX 7900 XT on "aging" computer)

Post image
11 Upvotes

r/ROCm • • 18h ago

Why is ROCm 7.x still the reference while ROCm 10.x seems really stable ?

10 Upvotes

Hello everyone,

I'm currently using ROCm 10.x with no specific issue with llama.cpp on Radeon 7900 XTX and radiance on 2 x R9600 Pro, but I still see nearly all recommended setups on ROCm 7.x

Is there a specific reason for this ?

Thanks !


r/ROCm • • 11h ago

Paiton Qwen4-35B-A3B (4-bit) on a Single Radeon AI PRO R9700, 245.8 tok/s Decode, 644.8 tok/s C8, ~9,000 tok/s Prefill (BetterBench)

7 Upvotes

Just pulled Paiton's brand-new qwen4-35b-a3b-rocm10-vllm029-20261205-r1 release and ran the full BetterBench 0.6.1 standard profile on a single AMD Radeon AI PRO R9700 capped at 250 W with a +91 MHz VRAM OC.

Rig & Config

  • Host: Xeon Gold 6314U, 128 GB DDR4-3200 ECC, Ubuntu 26.04.1 LTS (Linux 7.0.0), ROCm 10.2
  • GPU (single card): 1× AMD Radeon AI PRO R9700 (32 GB, PCIe 4.0 x16) — 250 W power cap, 1350 MHz VRAM (OD_MCLK, +91 MHz)
  • Command: run-qwen4-35b.sh --weights 4bit (default fp8 KV pages, 262,144 max context, 419,629-token KV pool, max_num_seqs=8, thinking off)

Single R9700, 4-bit, Sampled temp=0.7

MetricElioVP Reference (300 W stock)My R9700 (250 W + VRAM OC)Delta
Weighted Decode (med)230.0 tok/s245.8 tok/s+6.9%
TTFT p50 (single-stream)66 ms62 ms-6.1%
Update p99—12.4 ms—
Prefill 8K (med)—8,995 tok/s—
Prefill 32K (med)8,813 tok/s8,829 tok/s+0.2%
Prefill 64K (med)8,747 tok/s8,706 tok/s-0.5%
Concurrency C1 / C2—218.9 / 353.8 tok/s—
Concurrency C4475.4 tok/s499.7 tok/s+5.1%
Concurrency C8618.8 tok/s644.8 tok/s+4.2%

Single-Stream Decode by Category (Median tok/s, 1× R9700)

CategoryTTFT p50Update p50 / p99Tok / UpdateDecode (med)
chat63.2 ms11.8 / 12.4 ms2.61246.7 tok/s
code62.9 ms11.8 / 12.4 ms3.12264.8 tok/s
file_edit62.7 ms12.0 / 12.6 ms2.94262.3 tok/s
json62.0 ms11.8 / 12.4 ms3.23328.7 tok/s
math61.1 ms11.8 / 12.5 ms3.40294.5 tok/s
prose58.9 ms11.7 / 12.2 ms1.86157.5 tok/s
reasoning61.0 ms11.8 / 12.4 ms2.27210.1 tok/s
summarization61.3 ms11.9 / 12.6 ms2.58251.7 tok/s
Weighted Combined62 ms12.4 ms (p99)—245.8 tok/s

Cold Prefill Sweep (Median tok/s, 1× R9700 @ 250 W + OC)

Target DepthPrompt Tokens (med)TTFT p50Prefill (med)
~2K1,518165 ms9,182 tok/s
~8K5,934659 ms8,995 tok/s
~16K11,8041.33 s8,922 tok/s
~32K23,5682.67 s8,829 tok/s
~64K47,1345.42 s8,706 tok/s

Key Takeaways

  1. Single-card 4-bit speed: On one R9700 capped at 250 W, Qwen4-35B-A3B 4-bit hits 245.8 tok/s weighted single-stream decode (code at 264.8, math at 294.5, json at 328.7 tok/s) with a rock-steady 12.4 ms p99 update latency and 644.8 tok/s aggregate at 8 concurrent requests.
  2. 250 W + VRAM OC: Shaving 50 W off the power limit while bumping VRAM +91 MHz (1350 MHz) beat the 300 W stock reference by +6.9% single-stream decode (245.8 vs. 230.0), +5.1% at C4 (499.7 vs. 475.4), and +4.2% at C8 (644.8 vs. 618.8).
  3. Prefill stays nearly flat all the way to 64K: Cold prefill holds 8,706–9,182 tok/s from 2K to 64K (~5.4 seconds for a 47K-token prompt), with essentially zero penalty from the 250 W cap (8,706 vs. 8,747 at 64K).
  4. Current caveats to keep in mind: Prefix caching is off in this first release (planned for an upcoming update alongside RAM/NVMe session hibernation and 1M context), and it's text-only for now.
  5. Dual-R9700 potential: Since it only needs one R9700 and ~20 GB of host RAM per instance, running two instances in DP=2 on a dual-R9700 / 128 GB box should easily push past 1,200+ tok/s aggregate at C8.

Massive props to u/ElioVP for getting ~246–329 tok/s and ~9,000 tok/s prefill out of a 4-bit 35B MoE on a single 250 W RDNA4 card!

------

Update: Tested Dual R9700 (DP=2) + Extended Concurrency Sweep (C2–C20)

I also tested 2× R9700 in DP=2 (one Qwen4-35B-A3B 4-bit container per card behind a session-affinity SSE proxy + llama-swap with concurrencyLimit: 32) and ran BetterBench all the way out to C20 on both 1× R9700 and 2× R9700 DP=2 (both cards at 250 W + 1350 MHz VRAM OC):

Concurrency1× Aggregate1× Per-Req / TTFT p502× DP=2 Aggregate2× DP=2 Per-Req / TTFT p50DP=2 Speedup
C2353.8 tok/s231.7 tok/s / 114 ms416.8 tok/s264.7 tok/s / 65 ms+17.8% (1.8× faster TTFT)
C4499.7 tok/s164.7 tok/s / 124 ms621.6 tok/s222.1 tok/s / 120 ms+24.4% (+35% per-req)
C8644.8 tok/s113.2 tok/s / 140 ms843.7 tok/s163.3 tok/s / 130 ms+30.8% (+44% per-req)
C12651.6 tok/s113.8 tok/s / 1,559 ms1,020.2 tok/s133.6 tok/s / 140 ms+56.6% (11× faster TTFT)
C16638.8 tok/s110.2 tok/s / 3,071 ms1,093.4 tok/s113.7 tok/s / 146 ms+71.2% (21× faster TTFT)
C20658.0 tok/s113.9 tok/s / 5,014 ms1,046.2 tok/s114.8 tok/s / 690 ms+59.0% (7.3× faster TTFT)

Quick takeaways:

  • 1× R9700 saturates its max_num_seqs=8 slots at C8 (~645–658 tok/s); above C8, extra requests queue and TTFT climbs sharply (1.56 s at C12, 3.07 s at C16, 5.01 s at C20).
  • 2× R9700 (DP=2) adds zero single-stream overhead (242.4 tok/s weighted decode, 62 ms TTFT, 9,013 / 8,736 tok/s prefill at 8K/64K), keeps both C2 streams at full single-user speed (264.7 tok/s, 65 ms TTFT), breaks 1,000 tok/s at C12 (1,020.2 tok/s), and peaks at 1,093.4 tok/s at C16 with 146 ms TTFT (16 simultaneous streams all running at 113.7 tok/s each).
  • At C20, DP=2 starts queueing behind its 16 active slots (690 ms TTFT vs. 5,014 ms on 1 card), confirming C16 as the exact sweet spot for dual R9700s. (Tip: if routing DP=2 through llama-swap*, bump* concurrencyLimit: 32 in config.yaml since llama-swap defaults to 10.)

r/ROCm • • 3h ago

14 drop-in ROCm/HIP patches for llama.cpp on AMD RDNA 2 (RX 6900 XT / gfx1030): Wave32 FlashAttention, v_dot8_u32_u4, Qwen3.5 fusions, and benchmarks vs. Mesa RADV

Thumbnail
reddit.com
3 Upvotes

r/ROCm • • 3h ago

Qwen4-35B-A3B on one Radeon AI PRO R9700: 365 toks writing code, 625 toks editing files, 200K context. (radiance 2.5.0 plus six patches)

Post image
2 Upvotes

r/ROCm • • 11h ago

Got Qwen4-35B-A3B to build a Three.js driving scene unattended in ~5 hours on two AMD GPUs and Pi loops

1 Upvotes

r/ROCm • • 7h ago

RTX on AMD

Post image
0 Upvotes

Yes you read that right so in short im working on this compatibilty layer called ghost long story short nvidia on amd but broader part of their stsck fi you want to know past achievemnts of ghost then look at my profile today i managed to get RTX Real Time 2.0 working in isaac sim noe im working on textures and NGX eg dlss and so on to get working