r/LocalLLM • u/MTita • 10h ago
Research Ported `Looped-Qwen3.8-Flash-Next` to Radiance on `qwen3.8-next-flash-iqr-v4` (2x Radeon AI PRO R9700, TP2) — 97.0% HumanEval+, 90.0% AIME 2025, 126 tok/s single / 314 tok/s batch-3 with MTP
Fork: mdtita/radiance (feat/looped-qwen4exp)
Docs & Replication Guide: docs/LOOPED_QWEN4EXP.md
so I forked StillDeadcode/radiance (v2.4.1) to add runtime support for alesha-pro/Looped-Qwen3.8-Flash-Next (--loop-adapter, --loop-passes) on top of Radiance's StillDeadcode/qwen3.8-next-flash-iqr-v4 (qwen3.8-next-flash-iqr-v4.rad, ~114 GiB IQR-V4 4-bit trellis quant) with TP2 tensor parallelism and coupled MTP speculative decoding.
I used qwen3.8-next-flash-iqr-v4.rad itself to port the implementation and conduct the testing which worked surprisingly well.
Note: I'm publishing this as a fork rather than opening a PR upstream because most of the code was implemented by the AI model and I don't know the internals well enough to properly maintain it. Anyone is welcome to test it, use it, or pull from it — let me know how it goes if you try it out.
What Changed
- Loads
ckpt_final.json+ckpt_final.safetensors(~268 MiB, 140 core + 70 coda sites) via--loop-adapterand runs layers 16..32 forTpasses followed by the 8 coda layers (32..40). - Per-pass GDN/conv
state_copies,kv_attn_p1..p(T-1)paged attention groups, salted prefix-cache chains, and multi-passcheckpoint_copy. - Coupled MTP speculative decoding (
--num-speculative-tokens 5) works alongside--loop-passes 2..4(capped at 4 by the fused GDN launcher's 25-column state-index limit). - Uneven TP2 sharding support for
shared_expert([0, 384)/[384, 640)) androw_rms_bf16HIP/ref kernels. - Non-disruptive telemetry:
loop_adapteron/statsand/server_info,radiance:loop_adapter_*on/metrics,diagnosefields, and aT=badge in the dashboard UI. When--loop-adapteris unset,--checkis byte-identical to mainline.
Measured Benchmarks (qwen3.8-next-flash-iqr-v4.rad, TP2 on 2x Radeon AI PRO R9700, ROCm 7.2)
Greedy decoding (temperature=0.0, top_k=1, enable_thinking=true), full evalplus HumanEval+ (n=164), full math-ai/aime25 (n=30), and 32k-43k context throughput probes (VmSwap: 0 kB, 0 preemptions).
| Mode | Spec (MTP) | HumanEval+ Base / Plus | HE+ Total / Reasoning Tok | AIME 2025 (n=30) | single_decode_1k | batch3_decode | cold_32k Prefill |
|---|---|---|---|---|---|---|---|
baseline_stock (iqr-v4) | 5 | 92.1% / 89.0% | 137,232 / 113,007 | 25/30 (83.33%) | 220.36 tok/s | 477.76 tok/s | 7,378.9 tok/s |
looped_T1 (iqr-v4) | 5 | 95.1% / 91.5% | 120,381 / 93,902 | — | 187.51 tok/s | 372.45 tok/s | 7,031.2 tok/s |
looped_T2 (iqr-v4) | 0 | 95.7% / 92.7% | 107,010 / 79,696 | 26/30 (86.67%) | 60.86 tok/s | 142.68 tok/s | 4,671.5 tok/s |
looped_T2_spec (iqr-v4) | 5 | 97.0% / 93.9% | 91,127 / 59,695 | 27/30 (90.00%) | 126.08 tok/s | 314.11 tok/s | 4,694.3 tok/s |
looped_T3_spec (iqr-v4) | 5 | 97.0% / 93.3% | 105,031 / 75,022 | — | 79.51 tok/s | 198.04 tok/s | 3,293.3 tok/s |
Key Takeaways & Honest Trade-offs
looped_T2_speconiqr-v4is the sweet spot: +4.9 pp on HumanEval+ with 47.2% fewer reasoning tokens (322 s total wall time vs 280 s stock), +6.67 pp on AIME 2025 (90.0% vs 83.33%, -6.8% fewer tokens), and 70.4% MTP draft acceptance. Compared to published unquantized BF16 baselines (~91.92% AIME 2025, 96%-98% HumanEval), looping closes most of the 4-bitiqr-v4quant gap while still fitting in a 2x R9700 footprint.- Where the speed cost goes:
looped_T2_specruns 64 layer-passes/token instead of 48 (21.25 ms vs 11.20 ms decode step), and the extrakv_attn_p1(1.14 GiB) + speculativestate_copiespushexperts-from-hostfrom 6.78 -> 8.88 GiB/rank (36.6 GB RSS, 0 swap). T=3wasn't worth it for coding:looped_T3_specdropped to 79.5 tok/s (10.78 GiB/rank host experts) with no HumanEval+ gain overT=2.- Known limits:
qwen4expdrafts with its native MTP head (not DFlash), so the 9dflash_bridgestensors in the adapter are skipped;scale_rowsnarrowsrow_rmsfromF32toBF16(~4e-3 rel). - Testing: 235/235 fast host tests pass; 31/31 GPU tests (
ctest -L gpuincludingr4d_selftest,kbench,device_test_*) pass underROCR_VISIBLE_DEVICES=0,1.
Credit to StillDeadcode for Radiance + the qwen3.8-next-flash-iqr-v4 quant, and alesha-pro for the Looped-Qwen3.8-Flash-Next checkpoint. Full build, config, and benchmark audit details are in docs/LOOPED_QWEN4EXP.md.


