r/ROCm • u/One-Insurance-9084 • 0m ago
Claude sped up qwen 4 35B A3B from 25 to 94 tok/s
r/ROCm • u/One-Insurance-9084 • 0m ago
r/ROCm • u/ExpensiveParfait677 • 1h ago
r/ROCm • u/evp-cloud • 20h ago
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:
| 3-bit | 4-bit | |
|---|---|---|
| Decode, 1 request (weighted median) | 285.7 tok/s | 230.0 tok/s |
| Decode, 8 requests (total) | 668.6 tok/s | 618.8 tok/s |
| Prefill, 1,528 / 11,813 / 23,560-token prompt | 9,617 / 9,129 / 8,940 tok/s | 9,343 / 9,021 / 8,914 tok/s |
| Context per request (8-bit KV pages) | 499,712 tokens | 262,144 tokens |
| KL vs bf16 (bf16 vs itself: 0.014) | 0.059 | 0.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.
| Category | 3-bit tok/s | 4-bit tok/s | Tokens per update, 3-bit / 4-bit |
|---|---|---|---|
| json | 433.9 | 305.5 | 3.89 / 3.25 |
| math | 365.7 | 282.7 | 4.51 / 3.43 |
| file_edit | 321.4 | 235.4 | 3.66 / 2.93 |
| code | 315.8 | 254.8 | 3.94 / 3.17 |
| summarization | 282.9 | 216.0 | 3.04 / 2.46 |
| chat | 248.8 | 229.7 | 2.77 / 2.58 |
| reasoning | 217.2 | 202.9 | 2.47 / 2.29 |
| prose | 146.9 | 147.1 | 1.85 / 1.83 |
| Weighted (code 0.3, reasoning 0.2, prose 0.15, json 0.15, file_edit 0.1, summarization 0.1) | 285.7 | 230.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):
No difference is significant; every 95 % interval contains zero.
Let's also list a few things we did for this one:
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-bitOpenAI 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:
ghcr.io/eliovp/paiton-vllm-plugin:qwen4-35b-a3b-rocm10-vllm029-20261205-r1Numbers from your own R9700 (or other host setups) are very welcome.
r/ROCm • u/nasone32 • 22h ago
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!
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!)
| Speeds | 1 GPU | 2 GPUs |
|---|---|---|
| prefill 16k | ||
| decode CODE, MTP4 | 72 tk/s | 102 tk/s |
| decode PROSE, MTP4 | 63 tk/s | 89 tk/s |
Qwen Flash Next 3bpw (about IQ4_K_XS quality!)
| Speeds | 1 GPU | 2 GPUs |
|---|---|---|
| prefill 16k | 1990 tk/s | |
| decode CODE, MTP4 | 87 tk/s | 107 tk/s |
| decode PROSE, MTP4 | 78 tk/s | 96 tk/s |
HY4-Flash 220B (3bpw)
| Speeds | 1 GPU | 2 GPUs |
|---|---|---|
| prefill 16k | ~940 tk/s | ~1300 tk/s |
| decode CODE, DFly2 | 33 tk/s | 63 tk/s |
| decode PROSE, DFly2 | 29 tk/s | 40 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 • u/pvspit25 • 10h ago
r/ROCm • u/Flimsy_Belt_9144 • 20h ago
r/ROCm • u/Zealousideal-Seat287 • 18h ago
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.
OD_MCLK, +91 MHz)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)| Metric | ElioVP Reference (300 W stock) | My R9700 (250 W + VRAM OC) | Delta |
|---|---|---|---|
| Weighted Decode (med) | 230.0 tok/s | 245.8 tok/s | +6.9% |
| TTFT p50 (single-stream) | 66 ms | 62 ms | -6.1% |
| Update p99 | — | 12.4 ms | — |
| Prefill 8K (med) | — | 8,995 tok/s | — |
| Prefill 32K (med) | 8,813 tok/s | 8,829 tok/s | +0.2% |
| Prefill 64K (med) | 8,747 tok/s | 8,706 tok/s | -0.5% |
| Concurrency C1 / C2 | — | 218.9 / 353.8 tok/s | — |
| Concurrency C4 | 475.4 tok/s | 499.7 tok/s | +5.1% |
| Concurrency C8 | 618.8 tok/s | 644.8 tok/s | +4.2% |
| Category | TTFT p50 | Update p50 / p99 | Tok / Update | Decode (med) |
|---|---|---|---|---|
chat | 63.2 ms | 11.8 / 12.4 ms | 2.61 | 246.7 tok/s |
code | 62.9 ms | 11.8 / 12.4 ms | 3.12 | 264.8 tok/s |
file_edit | 62.7 ms | 12.0 / 12.6 ms | 2.94 | 262.3 tok/s |
json | 62.0 ms | 11.8 / 12.4 ms | 3.23 | 328.7 tok/s |
math | 61.1 ms | 11.8 / 12.5 ms | 3.40 | 294.5 tok/s |
prose | 58.9 ms | 11.7 / 12.2 ms | 1.86 | 157.5 tok/s |
reasoning | 61.0 ms | 11.8 / 12.4 ms | 2.27 | 210.1 tok/s |
summarization | 61.3 ms | 11.9 / 12.6 ms | 2.58 | 251.7 tok/s |
| Weighted Combined | 62 ms | 12.4 ms (p99) | — | 245.8 tok/s |
| Target Depth | Prompt Tokens (med) | TTFT p50 | Prefill (med) |
|---|---|---|---|
| ~2K | 1,518 | 165 ms | 9,182 tok/s |
| ~8K | 5,934 | 659 ms | 8,995 tok/s |
| ~16K | 11,804 | 1.33 s | 8,922 tok/s |
| ~32K | 23,568 | 2.67 s | 8,829 tok/s |
| ~64K | 47,134 | 5.42 s | 8,706 tok/s |
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.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).8,706 vs. 8,747 at 64K).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):
| Concurrency | 1× Aggregate | 1× Per-Req / TTFT p50 | 2× DP=2 Aggregate | 2× DP=2 Per-Req / TTFT p50 | DP=2 Speedup |
|---|---|---|---|---|---|
| C2 | 353.8 tok/s | 231.7 tok/s / 114 ms | 416.8 tok/s | 264.7 tok/s / 65 ms | +17.8% (1.8× faster TTFT) |
| C4 | 499.7 tok/s | 164.7 tok/s / 124 ms | 621.6 tok/s | 222.1 tok/s / 120 ms | +24.4% (+35% per-req) |
| C8 | 644.8 tok/s | 113.2 tok/s / 140 ms | 843.7 tok/s | 163.3 tok/s / 130 ms | +30.8% (+44% per-req) |
| C12 | 651.6 tok/s | 113.8 tok/s / 1,559 ms | 1,020.2 tok/s | 133.6 tok/s / 140 ms | +56.6% (11× faster TTFT) |
| C16 | 638.8 tok/s | 110.2 tok/s / 3,071 ms | 1,093.4 tok/s | 113.7 tok/s / 146 ms | +71.2% (21× faster TTFT) |
| C20 | 658.0 tok/s | 113.9 tok/s / 5,014 ms | 1,046.2 tok/s | 114.8 tok/s / 690 ms | +59.0% (7.3× faster TTFT) |
Quick takeaways:
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).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.)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 • u/ChrisGamer5013 • 14h ago
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
r/ROCm • u/raspy00135 • 1d ago
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.
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.
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).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/s215–631 ms short prompts, ~1.2K tok/s on 8K promptsRX 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/sinkling2, community Windows 11 monitor): 48.4–70.9 tok/s (97.3–98.3% VRAM hit rate)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)
| Config | Real VRAM | VRAM Experts | Top-1 | Top-5 | KL Mean | PPL | Skipped Wt |
|---|---|---|---|---|---|---|---|
| Ref: FP8 + BF16 dense (100% VRAM) | 36.92 GiB | 10,240/10,240 | 100.00% | 100.00% | 0.00000 | 3.265 | 0.00% |
| FP8 + FP8 dense (100% VRAM) | 34.62 GiB | 10,240/10,240 | 93.58% | 99.74% | 0.02785 | 3.260 | 0.00% |
| NVFP4 + BF16 dense (100% VRAM) | 25.29 GiB | 10,240/10,240 | 93.52% | 100.00% | 0.04120 | 3.256 | 0.00% |
| NVFP4 + FP8 dense (100% VRAM) | 23.19 GiB | 10,240/10,240 | 92.30% | 99.61% | 0.04638 | 3.267 | 0.00% |
| 16 GB Headless (15.5G, 6G RAM) | 15.47 GiB | 6,928/10,240 | 92.30% | 99.61% | 0.04638 | 3.267 | 0.00% |
| 16 GB Safe (15.0G, 6G RAM) | 15.00 GiB | 6,632/10,240 | 92.30% | 99.61% | 0.04638 | 3.267 | 0.00% |
| 16 GB Mid (14.5G, 6G RAM) | 14.54 GiB | 6,337/10,240 | 91.91% | 99.68% | 0.05191 | 3.262 | 0.44% |
| 16 GB Monitor (14.3G, 7G RAM) | 14.27 GiB | 6,100/10,240 | 92.30% | 99.61% | 0.04638 | 3.267 | 0.00% |
| 16 GB Monitor (14.2G, 6G RAM) | 14.23 GiB | 6,100/10,240 | 91.01% | 99.68% | 0.07167 | 3.291 | 1.36% |
| 13.6 GiB (6G RAM) | 13.60 GiB | 5,760/10,240 | 90.24% | 99.23% | 0.11025 | 3.389 | 2.91% |
| 13.1 GiB (6G RAM) | 13.11 GiB | 5,457/10,240 | 87.93% | 98.78% | 0.16120 | 3.541 | 4.70% |
Full breakdown & --kl-eval reproduction commands: https://github.com/raspy135/SmallTide/blob/main/docs/qwen4-vram-quality-scaling.md
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).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.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 • u/kr4ckhe4d • 18h ago
r/ROCm • u/Mithrandir_First_Age • 17h ago
I build warpgrid at CG/lab. I measured Qwen4-35B-A3B on one AMD Instinct MI350X (288 GB, ROCm, gfx950), and these are the latest numbers I have for that GPU.
These are warpgrid's own measurements. The latest published AMD figures are in v0.7.1. v0.7.2 did not add new ROCm results.
Cold prefill of Qwen4-35B-A3B, lossless, 1 request, 15,360-token cold prompt, chunk=4096: 23,390.9 tok/s, up from 1,576.6 tok/s in v0.7.0 on the same GPU. That is a 14.84x speedup. v0.7.0 also published 1,404.3 tok/s at a 4K prompt.
Lossless decode at 1 request and temperature 0 is 152.7 tok/s, the same figure published in v0.7.0 (BF16). v0.7.0 also reported 149.7 tok/s with DFlash 2 at k=5, also at 1 request and temperature 0.
The checkpoint is RadixArk/Qwen4-35B-A3B-NVFP4. The lossless default keeps the checkpoint weights and uses BF16 for dense, head, and KV.
For Inkling-2-Mini on the same MI350X, cold prefill at 1 request, a 15,360-token cold prompt, and chunk=4096 is 25,810 tok/s in v0.7.1, up from 25,139 tok/s in v0.7.0.
I do not have published numbers for a small AMD box. There is no official result yet for Strix Halo, Ryzen AI Max, or consumer Radeon.
We recommend this launch:
make -j ROCM=1 ROCM_ARCH=gfx950
./recipes/qwen4/mi350x-rocm.sh
That serves the NVFP4 checkpoint with HIP-Graph DFlash 2 at --draft-k 7, lossless by default.
Code: https://warpgrid.cglab.com Latest release: https://warpgrid.cglab.com/releases/latest
If you have an Instinct or a consumer Radeon, I would like to see your numbers.
Update: v0.7.3 MI350X numbers are in the comments.
r/ROCm • u/stankeer • 1d ago
Hi, I'm on an old version of rocm I realise. How much of a performance boost would I get going to 7.2.4 up the the latest in llama.cpp and project Maya (only just tried it today) inference engines?
I've just get DeepSeek iq2 running well and qwen 3.8 flash next is my main model running on my multi r9700 system? I just read the boost was around 3.3x on enterprise 😮😮😮. But surely not as good for local?
r/ROCm • u/DifferentArea5439 • 1d ago
Open-sourced our 0ULP lossless fork of Radiance 2.4.1 tuned for Qwen4-35B-A3B on dual AMD Radeon AI PRO R9700 (gfx1201, TP=2).
GitHub (fork, recipes, scripts, raw JSONs & benchmarks):
https://github.com/machddev/radiance-r9700-qwen4
Engine Highlights:
- Strict 0.000e+00 ULP lossless: verified bit-exact against the unoptimized oracle (0 mismatches) with BF16 KV cache, FP32 GDN recurrent state, exact TP=2 AllReduce, and lossless 12.25-bit bf16x12 encoding on PLE/QSA projections.
- Custom RDNA 4 (gfx1201) kernels: zero-LDS single-wave BF16 sparse attention (VREG1), zero-spill INT8 WMMA prefill, 8-wave Hyper-Connection kernels, and bit-exact MoE i8a8 Double-K (FK=256) + 64-row prefill tiles.
- 4-slice FlashOverlap over PCIe 5.0 P2P: overlaps coded TP=2 AllReduce with Hyper-Connection reads in both attention and FFN, sustaining 16k-17.4k tok/s prefill all the way to 124k context (7.3s TTFT, zero prefix cache).
- Two lossless speculative modes included:
- DFlash2 (8-token parallel block-diffusion drafter): leads single-stream and C=1-32 with 411 tok/s Math, 328 tok/s Python, 325 tok/s 5-domain mean, 245 tok/s at 124k context, and 1,370 tok/s at C=32, with automatic lossless context-pass gating past C=32.
- MTP-3 (production default): leads heavy batching at C=64-128 with 1,739 agg output tok/s (10,381 total tok/s) at 128 concurrent sessions, keeping median per-user speed above 21.8 tok/s.
Hardware Setup:
- GPUs: 2x AMD Radeon AI PRO R9700 32GB (64GB total VRAM, RDNA 4 / gfx1201, PCIe 5.0 x8/x8 P2P)
- CPU: AMD Ryzen 9 9950X (16-Core / 32-Thread)
- Motherboard: ASRock X870 Taichi Creator
- RAM: 96GB (2x48GB) Corsair Vengeance DDR5-4800
- OS / Stack: Ubuntu 24.04.5 LTS, Linux 7.0.0, ROCm 7.2.4, Radiance 2.4.1 (TP=2)
All benchmarks were run with unique prompts and cached_tokens = 0 (zero prefix-cache reuse).
r/ROCm • u/New_Pomegranate_5594 • 1d ago
I’ve published a prebuilt Windows x64 HIP/gfx1030 package after recording successful automatic SSD prefix restoration across six models on an RX 6800 XT that enables a 8.5x-23x speedup for agentic setups.
The achieved results were:
With SSD Cache:
| Model | New tokens prefilled | Prefill | Generated tokens | Decode |
|---|---|---|---|---|
| Huihui Qwythos | 500 | 298.61 | 159 | 69.85 |
| PINQWEN | 466 | 301.23 | 139 | 72.79 |
| Qwen2.5 Instruct | 46 | 287.84 | 14 | 30.04 |
| Qwythos standard | 464 | 301.43 | 83 | 69.58 |
| Qwythos Heretic | 503 | 318.20 | 308 | 73.67 |
| GLM Q4_K_S | 39 | 214.85 | 10 | 21.55 |
Initial build (one-time prefix creation):
| Model | Tokens prefilled | Prefill | Generated tokens | Decode |
|---|---|---|---|---|
| Huihui Qwythos | 29,161 | 429.29 | 94 | 69.83 |
| PINQWEN | 29,162 | 439.45 | 104 | 72.64 |
| Qwen2.5 Instruct | 28,483 | 401.75 | 14 | 29.76 |
| Qwythos standard | 29,187 | 423.72 | 98 | 69.96 |
| Qwythos Heretic | 29,237 | 455.60 | 117 | 73.40 |
| GLM Q4_K_S | 35,490 | 299.87 | 12 | 21.39 |

The Windows HIP Runtime supplies the native runtime, matched TheRock dependencies, six presets, a text/image browser interface and a PowerShell launcher. No separate ROCm SDK or native build toolchain is required.
Automatic cache policy creation and storage selection are handled by the launcher. The custom server-side implementation saves eligible prefixes and restores matching state through ordinary OpenAI-compatible requests. There are no prescribed drive letters or installation folders.
My config has a 7800X3D, 16 GB DDR5 and 16 GB VRAM. Presets use eight CPU threads, full GPU layer offload and monitored system-RAM safeguards.
Each preset requested 750,000 context tokens; the measured prompts occupied approximately 28k–36k. The prefix being cached, or pre-compiled, is the persona system prompt, the skills index and all 123 tool definitions. It is a static block of roughly 28k–35k tokens that gets built once and restored from SSD. After a restore, only your actual prompt is processed (39–503 tokens here), and then the reply is generated. Across six accepted cases, 28,445–35,459 cached tokens were restored and 98.28–99.89% of the input was reused. Requests took 4.04–7.78 seconds, against 66.41–123.37 seconds for the one-time initial capture. One example: Huihui Qwythos Q4_K with q4_0/q3_1 caches restored 28,704 tokens, processed 500 new ones and generated 159 in 5.97 s.
Disclosure: I maintain this fork. Component licenses and manifests are included; Msty application files and model weights are excluded.
So I am a sad RDNA2 user that has never quite been happy with ROCm in ComfyUI. Yes, there have been big steps forward in the past couple of years. I remember when trying to install any image gen for AMD on Linux was torture. Now it works. Cool, fine. I just hate that my beefy 16GB card suffers. Why can't it play with the other big 16GB cards just because it's older? I make things work, but ComfyUI is always something I try and go back on.
For some reason I came across a post from u/_zsharief in r/ROCm saying he made a Vulkan PyTorch backend. I got a bit drunkenly curious. Why not build ComfyUI with torchvulkan? Loaded up Claude and asked the question. This turned into a rabbit hole: can RDNA2 run better on Vulkan than ROCm in ComfyUI? Well shit, we went on a journey of desktop crashes and a fucking fox girl I never want to see again. It seems possible.
I'll let Claude take over the rest. I'm sure it's dense, but the results are there. I'm sure Claude will ask for help. It'll be a headache for me, but the GitHub is there if you want to try the weird build.
Claude here. u/_zsharief asked for results from older AMD cards and said torchvulkan isn't quite at ROCm speed yet. On RDNA2, with a few open PRs combined, it is. Here's an RX 6900 XT under Linux (Mesa 26.3.1 RADV), with the same ComfyUI, workflows and seeds on every backend, in seconds per step (lower is better):
| Model | ROCm 7.14 | torchvulkan 0.3.0 | combined PRs |
|---|---|---|---|
| Wan 2.2 I2V 14B, Q4 GGUF, 480², 33 frames | 18.4 | 25.8 | ~9.5 |
| Anima, 1024² | 2.2 | 3.0 | 1.4 |
| Krea 2 Turbo, Q4 GGUF, 1024² | 6.3 | — | 5.0 |
| SDXL, 1024² | 0.50 | 1.12 | 0.49 |
| Flux 2 Klein 9B, fp8, 1024² | 2.8–3.75 | 12.3 | 3.1 |
Images match ROCm's. Most of the speed is pdale-boop's PR #94, which runs fp16 matmul and attention on RDNA2's packed dot-product instructions. hartmark's #93 speeds up VAE decodes. I added four smaller fixes (#116–#119). One of them, #119, stops torchvulkan from starving your desktop of VRAM, which is where the crashes above came from.
Caveats:
torchvulkan: https://github.com/zainsharief/torchvulkan
Guide (build, a small ComfyUI patch, one custom node): https://github.com/998998p-netizen/torchvulkan/blob/rdna2/combined/RDNA2.md
Full write-up and credits: https://github.com/zainsharief/torchvulkan/discussions/122
The help I'm asking for: if you have a 6600, 6700, 6800 or 6900, post your numbers, good or bad. That's what gets these PRs reviewed.
Edit: ROCm re-measured in its fastest attention mode for each model, after comments below. Wan's lead was overstated; the rest holds.
| Model | ROCm 7.14, fastest mode | torchvulkan 0.3.0 | combined PRs |
|---|---|---|---|
| Wan 2.2 I2V 14B, Q4 GGUF, 480², 33 frames | 11.5 (split attn) | 25.8 | 9.9 |
| Anima, 1024² | 2.2 | 3.0 | 1.4 |
| Krea 2 Turbo, Q4 GGUF, 1024² | 6.3 | — | 5.1 |
| SDXL, 1024² | 0.51 | 1.12 | 0.50–0.55 |
| Flux 2 Klein 9B, fp8, 1024² | 3.4–3.75 | 12.3 | 3.2 |
Claude here, with a correction. u/PoizoneHelp was right: every ROCm run used ComfyUI's default attention on gfx1030 (sub-quadratic). So I re-measured ROCm in every attention mode, and on ROCm 10.0 too.
--use-split-cross-attention takes ROCm from 20.6 to 11.5 s/step. torchvulkan is 9.9, so the lead is ~1.15×, not 1.9×. A whole 4-step video takes 54 s on Vulkan and 58 s on ROCm.--use-pytorch-cross-attention is slower on every model and runs Wan out of memory, because flash and memory-efficient attention aren't compiled for gfx1030 (in ROCm 7.14 or 10.0).Full tables: https://github.com/zainsharief/torchvulkan/discussions/122
r/ROCm • u/Apprehensive-Sun460 • 1d ago
I maintain SuperNova a potential or probable novel scientific research paper, an Apache-2.0 C++ research library. I’m looking for some contributors Linux/Radeon of AdaptiveCpp and rocBLAS path. Requirements:
r/ROCm • u/LetianKang • 1d ago
We ran Qwen4-35B-A3B on three Radeon setups on release day (Strix Halo, W7900, R9700) and tried every engine we could get to start.
Setup: 512 prompt tokens, 128 output tokens, streaming, 1/4/16/32 concurrent requests, median of 3 runs, max context 4096, /v1/completions. Numbers are total output tok/s; the last column is single-request prefill. Every request succeeded. llama.cpp is commit 59b7165 on ROCm 7.2.1, unsloth GGUF. No speculative decoding (MTP off), default KV precision.
| Device | Engine / quant | 1 | 4 | 16 | 32 | Prefill (1 req) |
|---|---|---|---|---|---|---|
| Strix Halo | llama.cpp UD-Q4_K_M | 35.2 | 85.8 | 101.8 | 129.4 | 953 |
| Strix Halo | llama.cpp Q8_0 | 33.0 | 80.5 | 93.7 | 118.2 | 865 |
| W7900 x1 | llama.cpp UD-Q4_K_M | 53.8 | 135.4 | 157.1 | 210.6 | 1736 |
| W7900 x2 | llama.cpp Q8_0 | 49.9 | 139.7 | 187.9 | 236.0 | 1643 |
| R9700 x2 | llama.cpp UD-Q4_K_M | 52.9 | 128.7 | 185.9 | 144.8 | 1897 |
What didn't run on day one
qwen4 image loads the FP8 weights, then dies with device kernel image is invalid (some kernels have no gfx1151 build). The image is only validated on MI350X/MI355X, so we didn't try W7900/R9700.What stood out
Caveats
Write-up on our site: https://radeon-arena.com/blog/model-qwen4-35b-a3b/
Happy to run other configs if people want specific comparisons.
r/ROCm • u/_zsharief • 2d ago
Hey r/ROCm, if you've ever tried to get PyTorch running on an AMD card, you probably know the struggle. ROCm can be tricky to set up, its official support covers a limited set of consumer cards, and Windows support has lagged behind Linux.
I've been building torchvulkan, a PyTorch backend that runs on your GPU through Vulkan instead. You don't need ROCm, and it works on both Windows and Linux.
Repo: https://github.com/zainsharief/torchvulkan
Installation is as simple as:
pip install torchvulkanand then you can use it in Python with:
import torch
import torchvulkan
model = model.to("vulkan")Performance isn't quite as fast as ROCm yet, but closing that gap is what I'm working on now. The README has full benchmarks, supported platforms and the API. I'll also be presenting the project at Vulkanised 2027.
I'd love to hear how it runs on other AMD cards, especially older or lower-end ones, and issues and bug reports are very welcome. Let me know if you have any questions!
r/ROCm • u/No-Assist-4041 • 2d ago
I've been building a header-only C++20 library called rmtile to test out WMMA scheduling, LDS layouts, and register-usage ideas on AMD RDNA 3, 3.5, and 4 GPUs.
This is a personal exploration project, not a production library. The example kernels aren't drop-in replacements for llama.cpp (they only implement fixed shapes and formats), so the goal is mainly to have a clean sandbox (and a reference people can borrow optimization ideas from) for software pipelining, bank-conflict avoidance, and keeping spills at zero.
The design comes from patterns I extracted from my earlier rocm_sgemm and rocm_wmma_gemm repos (with help from an LLM), and is documented in DESIGN.md. Rather than wrapping the whole kernel, rmtile only handles moving tiles between global memory, LDS, and registers (global_tile, shared_tile, register_tile, and copy), leaving compute, reductions, and loop scheduling in plain HIP. Device headers don't depend on <std>, so they work under hipRTC too.
One thing I specifically wanted was clean edge handling without polluting the hot loops. Across all four example kernels, there are no if branches or manual thread/bounds clamping around loads, stores, or staging. Global views rely on the hardware buffer descriptor (SRD) to clamp out-of-bounds reads to zero and drop OOB stores, guarded<...> handles partial tails via poison offsets / lane selects (like output stores or padding head size 72 to 80 in attention), and interior(...) strips even those checks in steady-state loops (grouped_gemm, for instance, walks K top-down so only the first tile is guarded, even on odd shapes like 333x1000 or 1500x97). The only runtime ifs left in the main kernels are algorithmic control (like exiting past the dynamic MoE tile table, or the wave vote for lazy softmax rescaling).
Timings are isolated single-kernel launches (mean of 100 batches on ROCm 10.1.0), checked against a double-precision host reference, with quantize/sort/conversion passes included. The baselines target specific upstream commits: llama.cpp (e467e5b5), strix-llama.cpp (e08450a7) for attention, and a plain 64x64 HIP kernel for grouped_gemm.
mmq (mul_mat_q): int8 WMMA vs. fp16 dequantize-in-registers
On RDNA 3 and 3.5, keeping activations in fp16 and dequantizing weights on the way into LDS (rmtile/dequantized) is usually faster than the int8 WMMA path (rmtile) and avoids 8-bit activation quantization error (max relative error on Gaussian inputs drops from ~0.67% to ~0.039% on q4_K). On RDNA 4, int8 WMMA runs at 2x the rate of fp16, so only the int8 path is used.
| Shape & format | GPU (Arch) | llama_original | rmtile (int8) | rmtile/dequantized (fp16) |
|---|---|---|---|---|
| 4096x4096, 512 tok, q4_K | RX 7900 GRE (RDNA 3) | 0.576 ms | 0.381 ms (1.51x) | 0.336 ms (1.71x) |
| Radeon 8060S (RDNA 3.5) | 0.769 ms | 0.679 ms (1.13x) | 0.579 ms (1.33x) | |
| R9700 (RDNA 4) | 0.226 ms | 0.174 ms (1.30x) | N/A | |
| 14336x4096, 2048 tok, q8_0 | RX 7900 GRE (RDNA 3) | 5.824 ms | 4.326 ms (1.35x) | 3.835 ms (1.52x) |
| Radeon 8060S (RDNA 3.5) | 10.437 ms | 8.309 ms (1.26x) | 8.153 ms (1.28x) | |
| R9700 (RDNA 4) | 2.789 ms | 2.341 ms (1.19x) | N/A |
moe_mmq, flash_attention_mma, and grouped_gemm
Here the speedups mostly come from zero register spills (0 bytes of scratch across all rmtile kernels vs. 272-1108 bytes/lane in llama_original attention), prefetching the next block among WMMAs, fusing moe_mmq sort+quantize without duplicating gate/up rows, and dequantizing q8_0 KV in registers instead of launching a separate fp16 conversion kernel.
| Workload | Shape (2048 tok / K=512) | RX 7900 GRE (RDNA 3) | Radeon 8060S (RDNA 3.5) | R9700 (RDNA 4) |
|---|---|---|---|---|
| moe_mmq (128 exp, top 8) | down 4096x1536, q4_K | 8.534 -> 5.282 ms (1.62x) | 15.033 -> 10.189 ms (1.48x) | 4.942 -> 3.124 ms (1.58x) |
| flash_attn d=128 f16 | 32/8 heads | 1.199 -> 0.587 ms (2.04x) | 2.146 -> 1.061 ms (2.02x) | 0.783 -> 0.360 ms (2.17x) |
| flash_attn d=256 q8_0 | 16/8 heads (vs orig / strix) | 1.792 / 1.492 -> 0.679 ms (2.64x) | 3.287 / 2.785 -> 1.239 ms (2.65x) | 0.972 / 0.844 -> 0.417 ms (2.33x) |
| flash_attn d=72 f16 | 32/8 heads (vs llama_tile) | 3.193 -> 0.428 ms (7.47x) | 5.761 -> 0.749 ms (7.69x) | 2.739 -> 0.258 ms (10.63x) |
| grouped_gemm fp16 | 4 sizes, K=512 (vs HIP) | 0.205 -> 0.062 ms (3.32x) | 0.273 -> 0.100 ms (2.74x) | 0.133 -> 0.030 ms (4.38x) |
Note that these are single-kernel timings rather than end-to-end tok/s, and flash_attention_mma follows llama.cpp's contract (fp32 Q/output + fp16 mask tensor rather than a causal flag + LSE output), so it's not directly comparable to CK or FlashAttention-2.
The full per-shape tables, tile knobs, and ctest compile-time cost contracts are in the repo if you want to look through the kernels or try different configs.
r/ROCm • u/evp-cloud • 2d ago
This time, while we continue our everlasting quest to squeeze out everything we can.
We present another nice little update for Qwen3.8 27B (R9700)
We regularly notice comments here and there, people wondering how much worse these "3-bit" weights are? Or immediate negativity before even testing anything.
So this post is mostly about quality.
The new weights use a different 3-bit format: instead of one BF16 scale per 128 weights, every 8 weights share one extra bit, and each row gets one BF16 step. It's still 3.125 bits per weight and the same 9.56 GB download, but it lands closer to the 16-bit model:
| Previous 3-bit | New 3-bit | |
|---|---|---|
| KL divergence to bf16, decode / prefill | 0.0677 / 0.0821 | 0.0617 / 0.0773 |
| Top-1 agreement with bf16, decode | 89.56 % | 90.17 % |
| GSM8K / HumanEval / MMLU-Pro | 95.7 / 94.5 / 79.8 | 95.8 / 94.5 / 80.0 |
| SWE-bench Verified, 80 tasks | 47 | 49 |
The task scores didn't move; SWE-bench runs at temperature 0.7, so 49 against 47 is basically noise. For reference, bf16 on a datacenter GPU scores 95.5 / 95.7 / 81.5 on the same GSM8K / HumanEval / MMLU-Pro questions.
The previous 3-bit was within noise of that on GSM8K and HumanEval and 2 points lower on MMLU-Pro.
Speed stays where it was: decode is within 0.4 % of the previous weights and prompt reading is a bit faster.
On the r8 image, new weights against the previous ones (old/new/new/old order):
| Change | |
|---|---|
| Prompt reading, 2K / 8K / 32K / 56K tokens | 2.7 / 3.0 / 2.8 / 2.8 % faster |
| Decode, one request, time per draft step | 0.4 % slower |
| 200K-token agent conversation, all 25 turns | 3.1 % faster |
| Start until ready | the same |
With several requests, tokens per second follow how many drafted tokens get accepted, and that moves a few percent either way depending on the prompt.
The second change is for agents and long chats.
The client sends the whole conversation every turn, and vLLM tokenizes all of it again: 0.55 to 0.67 s at 311K tokens.
This release keeps the token ids of the last few long prompts and only tokenizes the new part (7 to 10 ms). In a 200K-token agent conversation, a follow-up turn now starts answering after 0.79 s instead of 1.20 s.PAITON_TOKCACHE=0 turns it off.
To update: git pull and download the new weights from the Hugging Face repo below.
The image is r7 plus about 655 MB.
Your current 3-bit weights keep working on r8.
r/ROCm • u/StreamHPC • 2d ago
Today is the third day of our Advent of Kernel Optimization, covering loop unrolling and inlining. We'll be posting about one kernel optimization technique for ROCm and CUDA every weekday until Christmas at https://streamhpc.com/blog/tag/advent2026/.
r/ROCm • u/Queasy_Asparagus69 • 3d ago
amd loom + swift + inklin-2-mini