r/ROCm • u/BhatSahab • 1h ago
r/ROCm • u/Ok_pettech • 10h ago
How to Install PyTorch with CUDA Support Step-by-Step Guide
interconnectd.comSetting up PyTorch with CUDA support often breaks over mismatched GPU drivers, toolkit versions, or environment paths. A single version conflict can leave PyTorch stuck on the CPU.
This step-by-step guide walks through checking your NVIDIA driver and CUDA compatibility, installing PyTorch with GPU acceleration cleanly, and verifying that torch.cuda.is_available() works as expected. It cuts out the guesswork so you can start training and testing models faster.
Check out the full walkthrough here: https://interconnectd.com/forum/thread/248/pytorch-on-amd-gpus-complete-rocm-setup-tuning-guide/
What OS and GPU setup are you working with, and are you hitting any specific CUDA errors right now?
r/ROCm • u/CarGold87 • 1d ago
Inkling-2-Mini at the full 1M context on one RX 7900 XTX (Windows, ROCm): 9/9 retrieval, 37 min prefill, ~10 tok/s decode, and how it compares to llama.cpp
TL;DR: I optimised a native engine (based on Strata's strata-ink2) that runs Inkling-2-Mini (looped 26B MoE, 1M context) on a single 24 GB RX 7900 XTX with 32 GB RAM, on Windows. It is the real 1,048,576-token context, int8 KV cache, Unsloth UD-Q8_K_XL weights, nothing truncated or skipped. A 1M prompt takes ~37 min to read, then it decodes at ~10 tok/s. llama.cpp on the same box does ~1 tok/s with the experts on the CPU and can't do 1M at all.
Setup
RX 7900 XTX 24 GB, 32 GB RAM, Windows 11, ROCm/HIP (gfx1100) from AMD's TheRock wheels. No WSL.
Weights: Unsloth UD-Q8_K_XL, converted losslessly (the NVFP4 experts stay bit-exact). KV cache: int8. No layer or loop skipping, no eviction, no summarising.
About 15 GiB of experts sit in pinned host RAM and the hot ones are cached in VRAM. At 1M the KV cache alone is ~17 GB, so only ~9 % of the experts fit in VRAM.
Numbers (same machine, logs are in the repo)
| llama.cpp | this engine, first HIP port | this engine now | |
|---|---|---|---|
| Prefill, 32K prompt | 452 tok/s | 1,677 tok/s | ~3,090 tok/s |
| Prefill, 256K prompt | not measured | 272 s | 119 s |
| Prefill, 1M prompt | does not fit | 52 min | 37 min |
| Decode, 16K context | ~1 tok/s | 73 tok/s | 81 tok/s |
| Decode, 256K context | not measured | 18 tok/s | ~52 tok/s |
| Decode, 1M context | does not fit | ~7 tok/s | ~10.5 tok/s |
1M retrieval: 9/9 exact matches (8 planted facts at different depths plus a multi-hop question). Accuracy against a llama.cpp CPU reference: mean KL ~0.0023 over 4x512 tokens (llama.cpp's own HIP backend: 0.0030-0.0033).
What made it faster
A fused relative-bias flash attention for the int8 KV (WMMA). Rewriting it so that P stays in registers gave another ~1.5x on the attention kernel.
Split-key decode attention: reads the KV at ~530 GB/s instead of ~260.
fp16-output projection GEMMs (about 10 -> 90 TFLOP/s in isolation).
One skinny gate GEMM was running at 1.7 TFLOP/s; splitting it along K fixed that.
A guard for Windows silently moving a big buffer out of a full card into system RAM (it cost +31 ms per token once).
Save/load of the KV state to disk, because a 1M prefill should not happen twice.
What did not work: a register prefetch in the attention kernel (it spilled), speculative decoding with the model's own draft head (a verify costs ~3 decode steps and gives ~2.3 tokens, so it is slower), and smarter expert-cache policies (at a few percent cache even an oracle policy saves only ~40 % of the traffic).
Caveats, please read
One machine, and mostly one run per number. At 256K the decode is sometimes ~2x slower in a fresh process (about 1 start in 6) and I have not found out why. The table shows the fast state.
The llama.cpp column is a single configuration (
llama-batched-bench, experts on the CPU, flash attention on). Its own expert cache could do better. At 1M it builds the relative attention bias as a dense tensor (~51 GB per layer), so it simply does not fit.The 1M test is synthetic exact-match retrieval, not a general long-context quality benchmark.
The newest attention kernel is checked up to 256K; the 1M run used the previous one.
HIP only. Not built for CUDA or SYCL.
Upstream Strata itself was not measured on this machine.
Links
Measurements, scripts and notes: https://github.com/Canahmetozguven/inkling-rocm
Engine changes (merged with current upstream): https://github.com/Canahmetozguven/Strata/tree/port-upstream-feat-inkling2
Upstream issue asking how to send it: https://github.com/Niko1221/Strata/issues/6685
r/ROCm • u/CivilDatabase7508 • 1d ago
gfx906 (Radeon VII / MI50): a llama.cpp matvec patch (+10% on Gemma 4 26B) and flash decoding for long contexts
I run a Radeon VII next to an RX 9060 XT at home and wanted Inkling 2 Mini to be fast on it. That turned into two HIP kernels for single-token decode on gfx906, cleaned up here: https://github.com/HerRei/gfx906-decode-kernels (MIT)
**What's in it**
- A matvec patch for current upstream llama.cpp (one file, 162 lines) for Q4_0, Q4_1 and IQ4_NL. On my Radeon VII each product takes 14 to 18% less time (median over 49 shapes). Whole models: Gemma 4 26B-A4B QAT Q4_0 goes from 91.9 to 101.5 tok/s, Qwen 3.8 27B Q4_0 from 30.1 to 31.1. Prompt processing and perplexity don't change. Q8_0 and K-quants are not covered.
- Flash decoding for a q8_0 cache with 3 query heads per KV head (Inkling 2's shape): at 64k keys one layer takes 453 instead of 787 us.
- The setup that runs Inkling 2 Mini at about 48 tok/s on the VII + 9060 XT, including a workaround for Fedora's rocBLAS "no kernel image is available" error with two different AMD GPUs.
**How it was made**
The code was written with Claude Code. What I care about is that it was checked: test-backend-ops against the CPU reference (683 matmul and 341 fused cases for the patch), perplexity with one-token batches (6.031 vs 6.034), and every number measured on the card. The failures are in the write-up too: the first version made Qwen 5% slower, and 64-thread workgroups hit a ~57 us floor at about 2048 workgroups, which 128-thread workgroups don't.
Similar ideas already exist in iacopPBK's llama.cpp-gfx906, exabit's mx-llama.cpp and Martin1701's MI50 fork; the README says what overlaps.
Only tested on a Radeon VII with Fedora 44 and ROCm 7.1. If you have an MI50 or MI60, `GGML_CUDA_GCN_MMV=0` vs `1` with llama-bench is a one-line comparison, and I'd like to see the numbers.
r/ROCm • u/PhysicsDisastrous462 • 1d ago
Hierarchos-Native v0.2.6 is finally out! C1 WMMA performance update
so, i've got another release out! v0.2.6 is now published, and this one ended up being a pretty big performance improvement over v0.2.5.
for a bit of context, v0.2.5 introduced the P3 update to the Full FP16 WMMA path. that improved the final accumulator merge by summing all eight partials in FP32 before rounding once to FP16. i wanted to keep that work intact and see if i could get more performance out of the kernel without changing the actual math.
that's where C1 came in.
the main change is in how operand data gets loaded and staged into shared memory. previously, each thread was doing four global loads and shared-memory stores in sequence, with each store following its corresponding load. C1 changes that ordering: it issues the four 32-bit global loads first, then does the shared-memory stores.
it's a fairly small change when you look at the code, but it gives the GPU more opportunity to overlap the memory operations instead of waiting on each load/store pair. the arithmetic and accumulation order haven't changed.
and importantly, P3 hasn't been removed. C1 is used when the workload meets the required geometry checks, while P3 is still there as the fallback for everything that doesn't qualify. i didn't want a performance optimization to accidentally turn into a regression on shapes it wasn't designed for.
the performance results were honestly a lot better than i expected:
these are measured against the v0.2.5 P3 kernel, using GPU timestamps and 24 paired measurement blocks per workload.
2048×768×2048— 1.7074× faster512×2048×768— 1.3286× faster512×768×768— 2.0920× faster128×8192×768— 1.3782× faster
that's roughly a 70.7%, 32.9%, 109.2%, and 37.8% improvement respectively. all four workloads passed independently, and even the lower bounds of their corrected 95% confidence intervals stayed above 1.31×.
i also wanted to make absolutely sure that the performance wasn't coming at the expense of numerical consistency.
across eight seeds and five configurations, the new production path produced 120/120 bit-identical outputs compared with the preserved v0.2.5 results. the production tile16 numerical gate also passed 37/37 on every seed, with the maximum absolute error staying at 0.03125, exactly within the existing hard limit.
so, at least for the workloads i've qualified, this is a pretty nice situation: substantially faster, without changing the outputs.
there's a bit more going on with the dispatch selection too.
C1 isn't just enabled for anything that happens to be large enough. the host checks full tile coverage, even packed-pair strides, the actual operand buffer capacities, and the relevant 32-bit index bounds before selecting it. if a shape doesn't meet those requirements, it uses P3 instead.
i tested this with the packaged binaries as well. a rows=64 workload selected C1 and produced 8 cooperative C1 dispatches. a rows=80 workload, despite being above the existing profitability floor at around 20.97 million MACs, didn't meet the tile coverage requirements and correctly fell back to P3 for 4 dispatches. with WMMA disabled, there were zero cooperative dispatches.
the packaged logits checks also completed successfully. the C1 route had a maximum absolute difference of 0.00079345 and an RMS difference of 0.00012127; the P3 fallback had the same maximum absolute difference, with an RMS difference of 0.00012087.
the portable Windows package is included again.
it's a Windows x64 portable package with seven executables, built with a statically linked MSVC runtime. you shouldn't need to install Rust, Cargo, Python, PyTorch, Visual Studio, or the MSVC redistributable just to run it.
you will still need a compatible Vulkan-capable GPU driver and the Vulkan runtime loader, and model weights aren't included.
WMMA is still opt-in globally, so the default remains off. to use this path, you need to explicitly select --wmma-mode full-fp16. C1 is now the preferred implementation inside Full FP16 when the workload qualifies, with P3 handling the fallback cases. the Mixed precision path is separate and hasn't been replaced.
there are still some limitations worth mentioning. i've only qualified this on my AMD Radeon Graphics adapter, PCI ID 1002:15bf (RDNA3 / Phoenix), running Windows 11 with driver 32.0.32015.14001. i haven't tested a second GPU, non-AMD hardware, or independent clean-machine acceptance yet. the binaries are also still unsigned.
there's a small reporting issue too: precision-info still reports full_fp16_qualified=false on this newer driver because its driver allowlist hasn't caught up with the qualification profile. the actual v0.2.6 qualification results are documented separately. i also haven't exercised the native V4.1 trainer and hierarchos-infer end-to-end yet.
anyway, i'm really happy with how this release turned out. i went into this wanting to see if there was still meaningful performance left in the Full FP16 path without messing with the numerical behavior that took so long to get right. seeing all four workloads improve this much, while keeping the outputs bit-identical, was a pretty great result.
a lot of time went into testing this one, and i'm glad i can finally get it out there instead of continuing to sit on it!
Release: https://github.com/necat101/Hierarchos-Native/releases/tag/v0.2.6
Source: https://github.com/necat101/Hierarchos-Native
thank you to everyone who's been following the project, testing things, reporting issues, or just keeping an eye on development. it genuinely means a lot!!
also, sorry for the AI posts lately. i've been trying to save as much time as possible to work on the project itself, especially with live events getting tough. i really do appreciate everyone who's stuck around while i've been working on this. thank you so much everyone!! :3
r/ROCm • u/Middle_Yesterday_448 • 1d ago
Trellis 2
Does anyone manage to get trellis 2 working on rx9070xt on comfyui ? I try many things the only thing that work for me as a mesh only was huanyuan 3d on comfyui and cant get textures or colors
r/ROCm • u/BevinMaster • 1d ago
Inkling-2-Mini on RDNA2 (I ran inkling on X at Y T/s)
galleryLexiSuite T20 -1m context, 2600 prefill, and 110 decode w/ 7900xtx on stuck inkling. New bespoke RCO 8q quant made with lexisuite released.
Thinking Machines released Inkling-2-Mini on Nov 20. It's an awkward model to run at home: a looped mixture of experts (24 layers, the middle 12 run three times, 128 experts per layer, 8 per token), and the stock conversion comes out at 27.8 GB at 8 bits, which doesn't fit a 24 GB card.
Bespoke model made with Lexipanel/engine - https://huggingface.co/Wa1k3r/Inkling-2-Mini-8Q-RCO-GPTQ benchmarking done on stock model.
I've been building my own inference stack in Rust (LexiEngine, part of LexiSuite), and today's testing image runs it like this on a single Radeon RX 7900 XTX:
| Prompt length | Prompt speed | Generation | With the model's draft head |
|---:|---:|---:|---:|
| 4,096 | 2,451 tok/s | 66.2 tok/s | 110.7 tok/s |
| 16,384 | 2,328 tok/s | 65.2 tok/s | 109.5 tok/s |
| 261,632 | 1,178 tok/s | 49.7 tok/s | 61.7 tok/s |
| 523,264 | 769 tok/s | 40.3 tok/s | 47.0 tok/s |
4-bit KV cache, greedy, one run each, whole model on the card, nothing in system RAM.
**How it fits:** the vendor ships the experts in a 4-bit float format (NVFP4). The engine reads them as published instead of decoding and re-quantizing, and keeps the rest at 8 bits: 17.6 GB of weights, 5.0 GB of cache at 524k.
**Draft head:** the model ships a small head that proposes several tokens at once; the main model checks them. Greedy output was identical to plain decoding in every run. How much it helps depends on the text (after a 16k prompt): English prose 85 tok/s, Rust code 102, JSON 128, against about 56 plain in the same runs.
**Does it actually use the context?** Ten facts planted from 1% to 99% of the prompt, asked back: 10 of 10 at 261k tokens and 10 of 10 at 523k.
**llama.cpp for reference** (b12600, same weights and card, 4-bit KV, measured Nov 20 with a small loader patch that's published): 425 tok/s prompt / 25.4 tok/s generation at 4k, 397 / 25.0 at 16k. It did not finish a 261k-token prompt in 55 minutes, so I have no long-context numbers for it.
**What it doesn't do, so nobody wastes a download:**
- Text only. Image input for this model isn't implemented yet.
- 1M context doesn't fit on 24 GB (the cache alone needs 9.85 GB).
- The model file is not a stock llama.cpp GGUF; Ollama / LM Studio won't load it.
- Developed and measured on one card (7900 XTX, Vulkan). Other cards are less tested.
- It's a development/testing build, not a production release.
**Files:**
- Model (18.3 GB, draft head inside, attention matrices fitted with GPTQ): https://huggingface.co/Wa1k3r/Inkling-2-Mini-8Q-RCO-GPTQ
- LexiSuite USB image (352 MB, boots to a browser panel, no models inside): https://lexipanel.com/download/
- Benchmarks, method and caveats: https://github.com/W61k3r/LexiSuite-Releases/wiki/Benchmarks
- Runtime notes and the llama.cpp patch: https://github.com/W61k3r/LexiSuite-Releases/wiki/LexiEngine-Inkling-2
Happy to run other prompts or depths if someone wants a specific number.
r/ROCm • u/PhysicsDisastrous462 • 2d ago
Hierarchos-Native v0.2.5 is finally out! P3 WMMA update
so, after quite a bit of work since the v0.2.0 release, i've finally managed to get v0.2.5 published!
for anyone who followed the previous release, v0.2.0 was where i first introduced the opt-in RDNA3 WMMA implementation. since then i've been working on improving the Full FP16 path, specifically its numerical accuracy and performance, without having to sacrifice the execution structure that was already working.
the biggest change in this release is something i've been calling P3.
previously, the Full FP16 WMMA kernel merged its eight accumulator-bank partials using multiple intermediate FP16 additions. this meant that the result was rounded to FP16 several times along the way. P3 changes that final merge so all eight partials are summed in FP32, with just one final rounding to FP16.
the actual two-wave workgroup structure, K-slice stream, bank assignment, staging, cooperative multiplication and barriers are all preserved. i wanted to improve the accuracy of the final result without having to redesign the kernel all over again.
some of the results from the new qualification:
37/37 numerical gates passed across all eight qualification seeds.
32/32 preserved K=96 outputs were bit-identical to the previously qualified P3 GPU results.
REF64F16 maximum error improved from
0.03035259to0.02593803.31 of 32 cases improved, with zero cases getting worse.
The maximum tile16 distance is
0.03125, meeting the existing hard numerical limit.
i also ran another full performance sweep. this time using 24 paired measurement blocks per workload, GPU timestamps, and corrected 95% confidence intervals.
the measured improvements against the preserved Main kernel baseline were:
2048×768×2048— 1.0243×512×2048×768— 1.1246×512×768×768— 1.1163×128×8192×768— 1.2722×
all four protected workloads passed independently, including the lower bounds of their confidence intervals. the largest measured improvement was around 27%.
just to clarify, these are per-dispatch GPU GEMM measurements, not end-to-end training speedups. i don't want to imply that an entire training run is suddenly 27% faster when that isn't what was measured.
there were some other changes too.
i tightened up the production dispatch admission so the profitability predicate is checked against each actual batch, rather than relying only on the maximum batch size supplied when creating the projection. the existing 16,000,000 MAC profitability floor has not changed.
i also went through the actual portable binaries and verified that they dispatch the P3 kernel when an eligible workload is supplied. the packaged trainer produced 8 cooperative P3 dispatches, and the packaged logits executable produced another 3. disabling WMMA resulted in zero cooperative dispatches, as expected.
the numerical comparison for the packaged logits test covered 262,144 finite elements, with a maximum absolute difference of 0.000738330 and RMS difference of 0.000122237.
the new release is available as a portable Windows x64 package too.
i've included seven executables, and the package was built with a statically linked MSVC runtime. there's no need to install Rust, Cargo, Python, PyTorch, Visual Studio, or the MSVC redistributable just to run it.
you will still need a compatible Vulkan-capable GPU driver and the Vulkan runtime loader. model weights aren't included.
one thing i want to make clear is that WMMA is still opt-in globally. the default is still off, and you have to explicitly select full-fp16 to use the P3 path. P3 is simply the default implementation within that mode. the Mixed precision path is separate and hasn't been replaced.
the hardware qualification was performed on my AMD Radeon Graphics adapter, PCI ID 1002:15bf (RDNA3 / Phoenix). i haven't qualified this on every RDNA3 GPU, RDNA3.5, RDNA4, Intel or NVIDIA hardware, so please don't assume universal compatibility.
there are still things i haven't been able to test, including independent clean-machine/second-device acceptance, GUI interaction, Windows 10 acceptance, and code signing. the executables are currently unsigned.
anyway, i'm really happy to finally have this one out. v0.2.0 was the first public release of the WMMA implementation, and v0.2.5 is a pretty substantial improvement to that foundation. a lot of time went into checking that the numerical improvements were real, that the performance was actually measurable, and that the distributed binaries were doing what they were supposed to do.
Release: https://github.com/necat101/Hierarchos-Native/releases/tag/v0.2.5
Source: https://github.com/necat101/Hierarchos-Native
thank you to everyone who's been following the project, testing things, reporting issues, or just keeping an eye on development. it genuinely means a lot! thank you so much everyone!! :3 also, sorry for the AI posts lately, I've been trying to save as much time as possible to work on the project itself due to live events getting tough! this one is completely human written! :3
r/ROCm • u/1ncehost • 2d ago
Hy4 Flash added to int8-vllm: 4x MI100 C8 tg128 222.4 tok/s, pp512 1,655 tok/s
reddit.comr/ROCm • u/NiftyOracleIndia • 2d ago
Trained a 1.18B code model from scratch on 8× MI325X: 151B tokens at ~35% MFU (numbers, lessons, and a tokenizer whitespace hack)
Quick progress report on CodeSymb-1B, a 1.18B-parameter code model trained from scratch on a Supermicro H14 8U with 8× AMD Instinct MI325X (JumpStart program). All numbers below come from the run's own logs (9,933 metric records, one every 20 steps).
Results
- 151.28B tokens trained from scratch (loss 5.33 → 1.065)
- 488–508K tokens/s median by phase, 34.6% median MFU (35.5% best), BF16
- 89.7 h of training inside a ~111 h window (81%)
- Stack: Ubuntu 24.04, ROCm/HIP 6.3, PyTorch 2.9.1+rocm6.3, DDP + torch.compile — PyTorch's built-in kernels, tuned with TunableOp
What mattered most on MI325X
TunableOp is the single biggest lever. Without it: 300–408K tok/s. With tuned GEMMs: ~505K. First tuning took ~26 min; saving the per-GPU result files and reusing them cut startup to ~20 s. Save these files next to your checkpoints.
256 GB HBM3e changes the batch math. 48 sequences × 2,048 tokens per GPU fit with no gradient accumulation (786K tokens per step).
The host CPUs can run your whole data pipeline beside training. On 2× EPYC 9575F we pretokenized 260B tokens (30.8 h), deduplicated 247M documents (14 min) and built a 22.5B-token SFT set (6.2 h) while training stayed at 488–496K tok/s.
Make stops lossless. A stop file triggers a full save (weights, optimizer, data position); full checkpoints every 30 min, milestones every 10B tokens. Every restart was cheap, including a clean stop 54 min before the Nov 20 maintenance cutoff.
A data fix worth sharing: our SentencePiece tokenizer (NFKC, no byte fallback) silently deleted newlines and indentation — fatal for Python. Instead of retraining the tokenizer, we mapped 7 token IDs that never occurred in the data to newline/tab/space runs. Same vocabulary, same model; at 130.7B tokens we switched to 189.5B never-seen, deduplicated tokens with formatting kept.
Honest notes: median throughput after one mid-run restart was 2–4% lower than before it, and we haven't isolated why (GPUs were running near their ~1,000 W limit). The base model is not instruction-tuned or evaluated yet.
What's next: pretraining to 300B, then SFT (22.48B tokens, 4,096 context, reasoning + grounded RAG answers with citations), GRPO + DPO, and HumanEval/MBPP evals — about 5 days of compute once access resumes.
Full benchmark report (PDF):
CodeSymb_MI325X_Benchmark_Report.pdf
Model card and checkpoints:
NiftyOracleAI/CodeSymb-1B-MI325X
Thanks to Supermicro and the JumpStart team for the access, and to AMD for the MI325X stack. Happy to answer questions on the ROCm setup — ask away.
r/ROCm • u/Common_Ninja_289 • 3d ago
Looking for someone to run the first real training runs of a new framework on ROCm (ResNet-20, then OLMo-150M)
I maintain flodl, a deep learning framework in Rust on top of libtorch. It recently gained ROCm support: it builds against the ROCm libtorch, links, and detects AMD cards. It has never trained on one, because I don't own any AMD GPU.
If you have a supported card, Linux with Docker, and about an hour, the issue below has the exact commands:
- ResNet-20 on CIFAR-10, 200 epochs (14 minutes on an RTX 5060 Ti, for scale)
- OLMo-150M pretraining, one pass over 20M tokens (wants 8 GB of VRAM or more)
Supported: ROCm 7.0 and 7.1, gfx908 to gfx1201, so RDNA 2 to RDNA 4 including Strix APUs, and MI100 to MI350. Vega 10 and Vega 20 are not covered.
If you have two or more cards, there is a multi-GPU variant, which would be the first RCCL run of this framework anywhere.
It is likely that it will break somewhere, but this is the point. Report on the issue, or here, and I will investigate.
https://github.com/flodl-labs/flodl/issues/80
Update, 21 Nov: it works. Two people ran it within a day, on three cards, and flodl now trains on AMD.
| Card | Arch | ROCm | ResNet-20 accuracy | OLMo-150M |
|---|---|---|---|---|
| Strix Halo iGPU | gfx1151 | 10.2 | 91.96% | completes |
| Radeon AI PRO R9700 | gfx1201 | 10.2 | 91.78% | completes |
| RX 7900 XTX | gfx1100 | 7.0 and 10.2 | 91.59% / 91.79% | fails, under investigation |
| RTX 5060 Ti (reference) | 91.46% |
Something useful beyond this project, from the first report: with the same libtorch 2.10, ROCm 7.0 and 7.1 segfault on gfx1151 and run about 5x slower than 10.2 on gfx1201. The full version matrix (7.0 to 10.2, both cards) is in the issue.
Thanks to dhekimian and DhruvDh, whose reports are in the issue. Still looking for: other cards, anyone who can reproduce the OLMo failure on gfx1100, and anyone with two AMD cards for a first multi-GPU run.
PART 2: 2x RX 7900 XTX + Qwen3.8-Flash-Next — EXL3, hipfire, Avalon, the rdna3 fork's NaN found, and every config quality-tested (spoiler: above ~3 bits it's a plateau)
A week ago I posted engine speeds for Flash-Next on my 2x 7900 XTX box. I got several interesting responses for more things to try, and software moves so fast in this space that several updates also came out, so here are the updates.
(Thanks especially to u/nasone32 (EXL3 fork), u/zeno_g2 (hipfire and others), u/sergitto11 (the #879/ROCm lead), u/xyzzing (the optimization ledger), and everyone who posted their own numbers.)
Same box: Ryzen 7 5800X, 64 GB DDR4, 2x RX 7900 XTX at PCIe 4.0 x8, now on ROCm 10.1. The speed bench is unchanged: 112 / 3.5k / 34k-token prompts, 512 out, temp 1.0 / top-p 0.95 / top-k 20, thinking on, MTP on, medians.
Critical note: quality is always checked, not just speed
Every engine and quant below also ran my private coding-agent benchmark: real bugs mined from ~10 years of my own git history, with hidden tests (results public at lab.kylebaker.io). I compare configs problem by problem on the same problems, not leaderboard averages, and use a sign test on the problems where they disagree. Since late September that's ~8,000 scored local runs and ~2,100 agent-hours. this is super slow and painful; my computer is pretty much running agentic coding benchmarks 24/7 trying to test all the models and engines and occassionally harness expierments.
Also critical: I'm not benchmaxing.
My speeds use the model's recommended sampling (temp 1.0, thinking on), not greedy, which flatters speed. The table is a fixed-prompt bench; the wall-time comparisons come from real multi-turn agent runs on hard bugs.
What that shows:
Above ~2.5–3 bits, Flash-Next quants are a plateau on agentic coding.
GSQ-RCO IQ3_XXS (76 GB), IQ3_S, UD-IQ4_XS, UD-Q4_K_XL (111 GB) and EXL3 4.05 are all within noise of each other.
Two runs of the same config disagree on about as many problems as two different quants do.
The only quant with a measurable loss is IQ1_M.
I thought about running q8 on the cloud to verify this, but it would cost me somewhere between $30 and $120... not worth it to me, unfortunately, as it's purely a theoretical question. (A full run on my bench suite tends to require roughly 5M generated tokens.)
"Does Strata trade quality for speed?": I see no sign of it. Strata's IQ3_XXS is my strongest Flash-Next config, ahead of every llama.cpp Flash-Next config I've run.
The two quality-trading flags u/nasone32 mentioned (
STRATA_ROUTE_PRIOR,STRATA_ROUTE_TAIL_SKIP) are off on gfx1100. ROUTE_PRIOR is opt-in, and the rdna3 fork explicitly sets TAIL_SKIP=0.But TAIL_SKIP is on by default on CUDA and on RDNA4 (gfx1200/1201) builds, so check yours if you compare quality on those.
Note that the RDNA3 fork of strata DOES seem to trade some quality for speed in my testing! but strata's iq3xxs and iq3s have both performed within noise ("slightly better", but within noise) of UD q4 k xl flash next on llama.
On 97 problems both ran, Strata (GSQ IQ3_XXS) solved 82 and llama.cpp (UD-Q2_K_XL) 79, with 10 vs 7 problems solved only by one side: noise.
On the one file I ran on both engines (UD-IQ4_XS), Strata solved 6 of 6 and llama.cpp 5 of 6. Small, but pointing the same way.
Results
| engine (2x XTX unless noted) | quant | decode t/s (112 / 3.5k / 34k) | prompt t/s (3.5k / 34k) | quality vs upstream (paired) |
|---|---|---|---|---|
| Strata 0.2.13.1 | GSQ IQ3_XXS | 79 / 100 / 84 | 1,440 / 2,496 | baseline |
| Strata-rdna3 fork, NaN-free variant | GSQ IQ3_XXS | ~95–125 (119–127 in agent runs) | 2,418 / 3,346 | probably 2–5 pts weaker on the hardest problems (still testing) |
| EXL3 fork, 4.05 bpw | EXL3 | 26 / 31 / 29 | 686 / 1,122 | tie (188 vs 193 of 222; fork 183) |
| EXL3 fork, 3.05 bpw | EXL3 | 49 / 50 / 50 | 876 / 1,349 | 19 vs 21 of 26 (noise) |
| Avalon 1200934a7, 1 card | Avalon IQ3_KS | 87 / 90 / 90 | 1,051 / 2,385 | not run at scale |
Avalon 1200934a7, 2 cards, LLAMA_STAGES=0 + split | Avalon IQ3_KS | 64 / 75 / 64 | 1,741 / 2,434 | not run at scale |
Notes
rdna3 fork NaN (#879), found. The lead that ROCm's runtime caused it didn't hold on my box: same NaN rate on ROCm 7.2.4 and 10.1. Bisecting with a replay of the requests that NaN'd pinned it to the fork's refill settings (Willing-Cover2914's reinstall fixing it is consistent with that).
With the 10 refill settings removed: zero NaNs across ~300 real agent runs.
It matches the the same refill machinery as the fork's issues #3 and #14.
I'm narrowing it to the exact key(s) now and will send the fork a PR soon.
Claude's write-up: lab.kylebaker.io/blog/hunting-a-nan-in-strata-rdna3
The fork vs upstream on quality.
Over 222 paired problems, upstream solved 193 and the fork 183.
I re-ran the 30 problems where they disagreed, fresh on both engines in the same week: upstream 22, fork 16.
Combined, about a 2% chance that's luck. So the rdna3 fork looks a few points weaker on the hardest problems.
While it looks dramatically faster, a weaker model writes more tokens... net: it's still ~16% less wall time per run. More paired runs are queued to pin down the size of the gap. But, again, at this point it's within 98% certainty that it's a few points weaker than upstream strata.
EXL3 (u/nasone32).
While in theory the 4.05 bpw EXL3 flash next quant should be even better than a traditional q4 quant... in my bench, it within-noise-ties IQ3_XXS on quality. IT does write ~28% fewer tokens, which suggests it may be stronger, but on 64 GB it can't keep 4.05 fully resident, so it runs at ~2.3x the wall time
This one was particularly interesting to me, as I was wondering if this would 'break the plateau', in theory this should be the 'strongest' flash next quant I can realistically run on my machine. Alas--given that I didn't actually see any real-world improvement, I can't say the 2.3x slower runtime (on my box) is worth it.
Likewise, ran the 3~bpw EXL3, still significantly slower than strata (though much faster than the 4.05bpw). Still all within noise on strength/solves on my benchmark. - Tip for agent use: set
--conversation-cache-mib. It defaults to 0, and with sub-agents alternating conversations the engine re-read the whole ~150k-token prompt on every switch: ~30 s each, versus ~2 s with a 16 GB cache. That fixed a multi-hour time-out.hipfire (u/zeno_g2). On the dense 27B it's shockingly good:
on one XTX, about 2x llama.cpp's speed: decode 94–98 vs 45–63 t/s, prompt reads ~2.1k vs ~0.9k;
no quality loss I can detect: 15 vs 17 of 23 paired, in about half the wall time; 60 more problems are running now.
Flash-Next on hipfire didn't work out on 64 GB: its 2-bit build only runs on one card, at ~15 t/s. Sad.
Haven't tried radiance or caminus yet.
Avalon.
Current main fixed the prompt-ring regression and the 32k out-of-memory I reported.
Two cards with
LLAMA_STAGES=0+ manual split is the setup that works for me.I'm re-checking default pipeline stages on the latest main, since issue #55 reports it working well on the same hardware.
The rdna3 fork's kernel switches, patched onto upstream Strata. The rdna3 fork's speed has two parts: tensor parallel across both cards and a table of gfx1100 kernel switches, mostly for reading prompts. I turned on 15 of those switches on upstream Strata 0.2.13.1:
Bench prompt reads roughly doubled: 2,549 / 4,886 t/s at 3.5k / 34k tokens, vs 1,440 / 2,499 plain. Decode unchanged.
Real agent runs: no wall-time gain. Prompt reading is a small share of an agent run, and cached prefixes mean only the new tokens get read.
Quality: 18 vs 21 solved on the same problems. Slightly worse, but within noise.
Strata 0.2.14+ now ships its own prompt kernels by default, so this is mostly moot; I'm testing 0.2.16 now (speed plus a quality pairing).
of note, contradicting claude's earlier assumption:
Our own first bisect round shows that with all the fork's tuning switches off and tensor parallel kept, decode dropped 23%. That's roughly back to upstream strata speed. That means most of the rdna3's fork's speed comes from its tuning switches, not from tensor parallel.
7900 XTX vs 3090?
I think dual 7900xtx is comparable to dual 3090 right now, which is kind of wild. Can anyone sanity check me on this? I bought my xtx's at about half the price of what 3090s were going for on facebook marketplace a few months ago (about $700~ vs. the about $1300~ 3090s were going for)
Against the best public dual-3090 Flash-Next recipe, on its own terms (greedy, thinking off): 2x XTX with the rdna3 fork matches or beats it on code and file edits (up to +31%), is 2–9% behind on prose, and reads long prompts at the same speed.
Watch out for greedy numbers: greedy flatters code by ~1.6x on this setup. Converted to normal sampling, I estimate the dual 3090 at ~90 t/s code and ~105–112 prose, against the fork's 104–111 and 95–109. Roughly a tie, with the XTX ahead on code.
How fast this moved
Two months ago, before strata, Flash-Next on this box meant llama.cpp on one card with experts streaming from RAM: ~15–20 t/s decode. Upstream Strata does 80–100 t/s (about 5x, no quality cost); the fork 105–125 (6–8x, a few points weaker on the hardest problems). For reference, llama.cpp on both cards does 31–36 t/s on the same bench today.
At this point RAM is my bottleneck; I'd be more likely to spend $700 floating around on more ram than another gpu.
Still testing more things, always: Strata 0.2.16 (all-own kernels, speed plus a quality pairing), the fork PR, more fork-vs-upstream paired runs, and Ternary-Bonsai-27B (5.9 GB, 1.58-bit) as a reference. If you're running radiance or caminus on RDNA3, I'd love numbers.
edit:
Strata 0.2.16 passed its speed and sanity check. Both fresh starts were clean against a same-session 0.2.13.1 baseline:
┌─────────────────────────┬───────────────────────┬─────────────┐
│ 2 XTX, IQ3_XXS, 262k │ prompt read │ decode │
├─────────────────────────┼───────────────────────┼─────────────┤
│ 112-token prompts │ +14% (282 vs 248 t/s) │ +4% │
├─────────────────────────┼───────────────────────┼─────────────┤
│ 3.5k │ +20% (1,724 vs 1,432) │ +8% │
├─────────────────────────┼───────────────────────┼─────────────┤
│ 34k │ +11% (2,777 vs 2,498) │ −3% (noise) │
├─────────────────────────┼───────────────────────┼─────────────┤
│ 256 / 512-token prompts │ +22% / +32% │ ±, noisy │
└─────────────────────────┴───────────────────────┴─────────────┘Correctness: both known-answer checks were right on every start, with no garbage.
Memory: it fits about 1,000 more experts in VRAM than 0.2.13.1 (18.8 vs 17.3 GiB of expert cache).
Quality pairing: its 26-problem pairing (three items) started automatically and is running now, with its 5-minute check armed.
Avalon stuff is more complicated, I still consider that project a WIP for my machine but am happily contributing my findings upstream as I find them and have high hopes for it going forward.
edit 2: Avalon, and a summary table
┌─────────────────────────────────┬───────────────────────────────┬─────────────────────────┬─────────────────────────────────────────────┐
│ engine (two XTX unless noted) │ decode t/s (112 / 3.5k / 34k) │ prompt t/s (3.5k / 34k) │ quality │
├─────────────────────────────────┼───────────────────────────────┼─────────────────────────┼─────────────────────────────────────────────┤
│ upstream Strata 0.2.13.1 │ 74–79 / 75–100 / 77–84 │ ~1,440 / ~2,500 │ the reference │
├─────────────────────────────────┼───────────────────────────────┼─────────────────────────┼─────────────────────────────────────────────┤
│ Strata 0.2.16 │ 77 / 81 / 75 │ 1,724 / 2,777 │ being checked now (first item 11/12) │
├─────────────────────────────────┼───────────────────────────────┼─────────────────────────┼─────────────────────────────────────────────┤
│ Avalon, one card │ 86 / 92 / 91 │ 974 / 2,768 │ untested │
├─────────────────────────────────┼───────────────────────────────┼─────────────────────────┼─────────────────────────────────────────────┤
│ Avalon, two cards, #55 settings │ 87 / 103 / 98 │ 1,718 / 2,772 │ untested │
├─────────────────────────────────┼───────────────────────────────┼─────────────────────────┼─────────────────────────────────────────────┤
│ rdna3 fork, REFILL_SDMA off │ 120–128 / 105–111 / 98–107 │ ~2,530 / 3,100–3,470 │ probably 2–5 pts weaker (workaround config) │
└─────────────────────────────────┴───────────────────────────────┴─────────────────────────┴─────────────────────────────────────────────┘avalon is running better, still doing tests. Hopeful that Avalon would maintain the quality of strata upstream while getting some of the speed the rdna3 fork of strata brings.
Another concern: does the newest strata, which gains some speed, do so at the expense of quality? that will take, yet again, a lot of tests.
sometimes I wish this space would calm down, I never get to the end of testing, there's always more improvements. Hard to complain about it.
edit 3:
tldr, avalon shows no quality loss like the rdna3 fork of strata, and 0.2.16 also looks like it got a speed boost with no quality loss. hipfire, further testing to validate is also still holding at showing no quality loss.
(Very promising initial results! Not statistically significant--there is likely some variation, but it may only be detectable with far more testing or on a more granular set of tests. This just means that quality may be better or worse, but it isn't a huge move in either direction--if I had any given engine trying to fix a bug, I wouldn't notice it being any worse, I'd say, at this stage.)
Results completed yesterday and today:
┌───────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┐
│ test │ result │
├───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ Avalon quality (one card, │ singles 22/24, against Strata 21 (0.2.13.1) and 22 (0.2.16). Composites: 7/12 and 8/9 │
│ its IQ3_KS file, 26 │ bugs fixed, against Strata averages of 6.2 and 6.9. No sign of a quality cost. │
│ problems) │ │
├───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ Strata 0.2.16 quality │ singles 22/24, matching 0.2.13.1. Composites 5/12 and 3/9 (one run spun up 6 sub-agents │
│ (same 26) │ and hit the cap). No quality cost seen. │
├───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ hipfire vs llama.cpp, │ L3: 17 vs 18 of 33 paired (noise) at half the wall time (7.2 vs 14.7 h). L2: only 4 │
│ Qwen3.8-27B, round 2 │ paired so far │
├───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ Task-driver plugin, pilot │ 12 of 27 bugs fixed, against ~15.8 in earlier runs; all 3 composites hit the 4 h cap, at │
│ (27B Q4, laptop) │ ~2x the tokens. The model marked about half its tasks done while their bugs still │
│ │ failed. The plain arm, the real comparison, was interrupted before it finished. │
└───────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────┘r/ROCm • u/Acceptable_Seat_7562 • 3d ago
NEED HELP for TTS model, i have RX 6600 8gb VRAM
what should i do? as far as i have researched i can't use QWEN 3 TTS or any good one. anyone please tell me what should i do?
r/ROCm • u/Parking_Anxiety8139 • 4d ago
Strix Halo 2x Nightlies build
so i was benchmarking my own inference code for strix halo https://github.com/Legendofzaday/halodiffuse against comfyui and found out that rocm nightlies v2 wheels are twice as fast as the stable wheels on sd3.5 large turbo this was the case:
halodiffuse: 4.6s
comfyui nightly v2 wheels: 5.6s
comfyui stable: 11.8s
cold start times have also improved a lot:
halodiffuse: 9.1s
comfyui nightly v2 wheels: 22.6s
comfyui stable wheels: 31.2s
r/ROCm • u/wikitopian • 4d ago
Curation vs Compaction for agentic work on budget hardware
r/ROCm • u/TJSnider1984 • 5d ago
AMD ROCm 10.2 Released With Latest Optimizations, Expanded Ryzen Laptop Support
r/ROCm • u/Mobile_Living_3331 • 4d ago
Just Purchased RX 7900 XTX 24 GB
reddit.comAny suggestions related to models are welcome.
r/ROCm • u/zorglorbthedestroyer • 4d ago
DL research on AI 395/495 in PyTorch?
I'm not sure if this is the right place to ask this, since it seems like a lot of people are trying to run local LLMs, but can't hurt to ask.
Has anyone had any experience doing DL research using PyTorch on one of these AI 395/495 dev boxes (any brand)? AMD puts out their own version and they're are a number of vendors with their own versions. I'm wondering how stable it is. These are dramatically cheaper than the DGX Sparks, but I don't want to pull out what little hair I have left on top of my head trying to get it to run.
I would develop in Linux or WSL (don't care which). But I think I read you can't even do training under windows (not that I would do any serious research in Windows) so that suggests the drivers are still pretty immature and I should probably just pony up the $2000-3000 extra for a spark.
Thanks. If there's a better place to ask, please let me know.
r/ROCm • u/ZikporxAI • 5d ago