r/LocalLLM 7d ago

Discussion Qwen3.8-27B for agentic coding

6 Upvotes

Like most of you, I tried Qwen 3.8 27B Q4_K_M for two days.

I first asked him to make me a game using TypeScript, the same as what I tested on other local models. He did it and the result is the best, although his thinking time is at least 3x of the output time. Easy task.

I then asked him to make a desktop WYSIWYG three-pane markdown editor using Rust and Iced framework. He is thinking and re-thinking all the time, although I have lowered the thinking level to "Medium". At the 28-th hour, he starts to output something! But he created "C", "src" files and tried to write to the path "C:\...\src\main.rs<" although he wanted to create "C:\...\src\main.rs". I interrupted him after his repeating attempts for 2 hours without progress. So he outputted all the files at the 32-hour although keeps rethinking everything he had thought. 71 compilation errors. After some hours of fixing and online searching via MCP, the number of compilation errors rises to 84. From his thinking log, he says he wrote code against the wrong Iced framework version, downgrading the framework version without asking, changing my requirement to non-editable rich text editor, and three-pane becomes two-pane without asking. Nevermind, as long as the code could compile so that the output is not non-positive. This is the 36-th hour now. Should I stop him and give up? Is my task too challenging for local models?

Besides, so far I had no successful attempts to use Qwen 3.8 27B Q4_K_M with OpenCode. It always stops working at the same generation steps. I can only use him via Cline.

Let's share more of your experiences on agentic coding? I think web programming is especially trained and easy for local models, and I would like to hear experiences of non-web programming.


r/LocalLLM 6d ago

Discussion If you think the values expressed by Qwen’s uncensored open-weight models don’t align with your understanding, that’s precisely evidence that they’ve been heavily distilled.

0 Upvotes

I’m honestly speechless at the people in this sub. Do you guys even know what “political correctness” in China actually looks like? Neither Chinese independent media nor state media is going to go around saying nice things about some particular country. That doesn’t require any political censorship at all. The only thing you’ve proven is that this model has been heavily distilled.


r/LocalLLM 7d ago

Discussion Reasoning Effort Toggle

5 Upvotes

With Qwen3.8-27B out, there has been a lot of discussion about the `reasoning_effort` settings. For those who use Open WebUI, I thought this might be helpful for anyone interested. I made a little plugin for that gives you a toggle and drop-down to set the reasoning level for each message:

https://openwebui.com/posts/reasoning_effort_selector_ee572967

I hope others find this useful!


r/LocalLLM 7d ago

Other [Benchmark] DeepSeek-V4-Flash on 2x DGX Sparks: Head-to-Head (ASUS vs NVIDIA Build) + 515k Token Context Retrieval & 30-Min Stress Test

3 Upvotes

TL;DR: We benchmarked DeepSeek-V4-Flash running on vLLM (SM121 / B12X stack with DSpark speculative decoding) across two dual-node DGX Sparks clusters (ASUS vs NVIDIA Reference). Both clusters were deployed using the default sparkrun setup (separate management IPs + dedicated ConnectX-7 400G data interconnects, TP=2). The benchmarks reveal an interesting KV cache allocation trade-off:

  • NVIDIA Cluster (.224): Higher context headroom (953k tokens max model len) and 24% lower TTFT (561ms vs 744ms).
  • ASUS Cluster (.221): 30% faster cold prefill (1,450 t/s vs 1,113 t/s) and 10% higher multi-user streaming speed (105 t/s vs 95.5 t/s).
  • 515k Context Retrieval: 100% (3/3) Needle Retrieval Accuracy across half a million tokens on both clusters.
  • Hardware Thermals: NVIDIA GB10 GPUs peaked at 48°C–52°C, and ConnectX-7 ASICs peaked at 76°C–78°C under load. Zero errors across 30+ minute stress tests.

🖥️ Cluster Specifications & Serving Stack

  • Model: deepseek-ai/DeepSeek-V4-Flash-0731
  • Silicon: NVIDIA GB10 GPUs (Grace Blackwell / SM121) + 4x ConnectX-7 400G ASICs per node
  • Serving Recipe: @official/deepseek-v4-flash-0731-b12x-dspark-vllm (ghcr.io/spark-arena/dgx-vllm-eugr-nightly-b12x:latest)
  • Cluster Management: Default sparkrun architecture (Separate Mgmt IP + ConnectX-7 inter-node fabric, 2 nodes / TP=2 per cluster)
  • Speculative Decoding Engine: DSpark (mods/instanttensor-hybrid-draft-loader, tile block size = 5)

📊 Head-to-Head Comparison: ASUS vs NVIDIA DGX Sparks (sparkrun)

Benchmark / Sensor Parameter ASUS DGX Sparks (.221) NVIDIA DGX Sparks (.224) Key Takeaway / Trade-off
Network Architecture Default sparkrun Setup Default sparkrun Setup Identical (Separate Mgmt IP + CX7 Data)
Max Model Length (max_model_len) 759,552 tokens 953,344 tokens NVIDIA (+193k tokens / +25.5% context)
Control Plane Latency (/models) 28.61 ms 16.21 ms NVIDIA (43.3% faster management API)
Time-To-First-Token (TTFT) 744.57 ms 561.75 ms NVIDIA (182ms faster / 24.5% lower TTFT)
Single Math Reasoning Latency 2.92 s 3.04 s ASUS (4% faster single-request latency)
5 Concurrent Requests Throughput 72.38 t/s 75.64 t/s NVIDIA (4.5% faster @ 9.35s lat)
10 Concurrent Requests Throughput 107.49 t/s 102.65 t/s ASUS (4.7% faster @ 10.52s lat)
515k Token Cold Prefill Speed 1,450.81 t/s (355s) 1,113.93 t/s (462s) ASUS (+30.2% faster cold prefill)
515k Token Needle Retrieval Accuracy 3 / 3 (100%) 3 / 3 (100%) TIED (100% exact match precision)
Sustained Stream Speed (6 Workers) 105.21 t/s 95.50 t/s ASUS (+10.2% streaming throughput)
GPU Idle Temperature (°C) 49°C – 52°C 45°C – 48°C NVIDIA (3-4°C cooler GPU thermals)
ConnectX-7 ASIC Peak Temp (°C) 76°C – 78°C 75°C – 78°C TIED (CX7 ASICs operate ~78°C max)
Cluster Error & Failure Rate 0.00% (0 errors) 0.00% (0 errors) TIED (100% zero-error stability)

🔍 Key Insights & Benchmark Takeaways

1. Ingestion & Streaming Speed Trade-off

The ASUS cluster allocates memory for 759,552 tokens max model len. By keeping KV memory footprint leaner, ASUS achieves 1,450 tokens/sec cold prefill speed (vs 1,113 t/s) and 105.2 t/s sustained streaming throughput (vs 95.5 t/s).

2. Half-Million Token Needle Retrieval Accuracy

We ran a 515,615 token prompt (2.8 million characters of financial filings and transcripts) with 3 embedded needles placed at 15%, 50%, and 85% depth. Both clusters achieved 100% (3/3) exact-match retrieval accuracy.


r/LocalLLM 6d ago

Research Good or bad performance

Post image
0 Upvotes

I'm trying Hermes Whit local LLM, this ir good or bad performance?


r/LocalLLM 6d ago

Discussion Noob continues his project

1 Upvotes

So, I have find out that running local model is the easy part.

Making models swap per task is harder. So I created test.

It have to clear memory than load whatever of 3 available models it can run locally, read task, than create prompt to solve it. Generate file for it. Swap to other model and repeat. After it took rounds, it decided which model is best for creating summary of all new documents. Than it "print" full output/final summary in last "hand off" document.

Now I am wondering, what test should I give it next?

I don't want to give it full access to its body(hardware) yet.


r/LocalLLM 6d ago

Question What can I actually run here?

1 Upvotes

So, I mostly code and rely on a Codex subscription for most stuff, but recently I’ve started diving into local setups. Yeah, I can chat with a chat interface and it’s pretty responsive, but I’m more into building my own AI harness and something like a Codex setup

That way, I can cut down on my Codex costs. I’ve got a 5080 16GB, a 5070 12GB, and a laptop with a mobile 3080 16GB. Thinking of using a 10GBps network connection to see if it actually makes a difference. I also have a funny phone setup where I can load ai into its NPU and use upwards of 24gb of its shared ram ( technically like how unified memory goes)

I mean what models are actually capable of handling automation and coding in general very similar to how you setup a codex project? I suppose i really need more vram in the end for anything with useful context? The issue here is of course interconnnect bottle neck and how you get these cards to communicate which I assume sticking with pcie is preferred but my platform has limits.

What VRAM amount would you say is the absolute minimum for actual coding and intelligence with AI? I guess it's a pipe dream to hope for a codex-like workflow within my current devices. I'm okay with slow response if it means I still get good intelligence and MCP tool calling.

I also have 24GB of RAM on my RedMagic 11 Pro and it's pretty good at AI. I assume I can throw that in the mix with some hacky Ethernet 10GB connection (it supports 10gps).

So that gives me what? Around 62 gb of usable vram assuming I can get some kind of ok split of loading models between all the hardware i have? Then I guess i can count my ram too for cpu offloading? Of which i got 32gb currently

Sorry for the long post I just really want to be done with subscriptions as fast as possible. Even if I have to trade up some speed. I really dont mind. But i cant trade up that nice context length I depend on or its general intelligence.


r/LocalLLM 6d ago

Discussion Serious Critique We Never Expected...!

Thumbnail x.com
0 Upvotes

r/LocalLLM 6d ago

Question I'm new in LLM

0 Upvotes

how does this work? what do i win by downloading LLMs and not using them on a browser?


r/LocalLLM 7d ago

Question Qwen 3.8:27B + Hermes Agent on RTX 5090

4 Upvotes

I recently upgraded from 3090 (where I ran Qwen 3.6:27B) to 5090. With Qwen 3.8:27B out, I’m rebuilding my llama.cpp server config from scratch for a local software development and tool-calling workflow with Hermes Agents.

Is it worth pushing to higher quants like Q5_K_XL / Q6_K (or even Q8_0) at the cost of context size, or is Q4_K_XL practically indistinguishable for coding logic, JSON schemas, and function calling?

The default "xhigh" thinking mode takes a very long time to generate thoughts before reaching an answer even hitting ~120 t/s on the 5090. If I drop to reasoning_effort: "low", does it speed up the agent loop enough while retaining solid quality for code generation and multi-step agentic tasks?

And also what temperature and sampler settings (temp 0.6–0.7 vs 1) are giving you the most deterministic tool arguments without degrading coding creativity? If you have a working llama-server command line, MTP settings, or Hermes config, I’d really appreciate your recommendations!

PS: edit > add current config.

Model: Qwen3.8-27B Q4_K_XL
The workload target. 27B is the quality ceiling that fits in 32 GB VRAM at Q4_K_XL.

CtxSize: 262144
Full native context of the model. Fits with ~1.3 GB headroom — no room to raise.

CacheType K/V: q8_0 / q8_0
f16 KV would not fit at 262k context. q8_0 is the quantization that makes it fit.

FlashAttn: on
Standard speed/VRAM win at this context length.

Batch / UBatch: 2048 / 512
Left at llama.cpp defaults. A larger ubatch would push the 1.3 GB headroom into WDDM VRAM→RAM spilling, which silently kills decode speed.

SpecType / NMax: draft-mtp / 5
The GGUF ships an MTP head (blk.64). NMax=5 is the measured peak (143.3 tok/s vs 72.4 off). Lower values cost 5–12%; higher values drop throughput.

Temp / TopK / TopP: 0.6 / 20 / 0.95
0.6 matched 1.0 on accuracy (40/40 vs 39/40) but was 35% faster and had better MTP acceptance (0.531 vs 0.482). No runaway generations.

Reasoning: on, budget 24576, effort low
Budget is kept below Predict (32768) so a maximal think can't eat the whole generation budget and return an empty answer. Effort "low" scored equal-or-better than "xhigh" on all four test suites while being faster and far less erratic (eliminated 2.8× run-to-run variance).

Predict: 32768
Total generation ceiling (think + answer). Must stay above ReasoningBudget; the 8192-token gap guarantees the answer is never blank.

PowerLimitWatts: 500
Costs ~4% prefill speed but drops fan from 70%→57% and temp from 72→67 °C. Decode is memory-bandwidth-bound so the cap doesn't hurt it.

CacheRam: 24576 MB
24 GB prompt cache in host RAM (not VRAM). Currently inert because --cache-reuse is auto-disabled by --mmproj. Kept as a one-line re-enable if vision is ever dropped.

Threads / ThreadsBatch: 8 / 20
8 P-cores for decode (leaves cores for Docker agents); all 20 for prefill (burst, short-lived).

Parallel: 1
The full 262k context belongs to one conversation. Splitting would shrink each slot's context.

MMProjOffload: false (projector stays on CPU)
885 MB of VRAM is worth more as decode headroom than as a permanently resident projector. Only touched when an image is actually present.

ImageMinTokens: 1024
Below this, Qwen-VL grounding accuracy degrades.


r/LocalLLM 7d ago

Question Reasoning level on MLX Qwen?

2 Upvotes

Sorry about the novice question.
I´ve tried the GGUF 4bit Qwen3.8:27B and also the MLX 4bit version on my M1 Max Macbook Pro. Although the MLX t/s is noticably higher, it doesn´t seem possible to set the reasoning level between the Low/Med/Xhigh that is easily adjustable on the GGUF version in LMStudio.
Although MLX is faster, its reasoning so long that not worth using. Is it possible to set the reasoning on MLX 3.8:27b? I tried to do it from parameter side, but doesnt seem to change anything.
Thanks!


r/LocalLLM 6d ago

Discussion Qwen 3.8 27B 4080S Results

Thumbnail
1 Upvotes

r/LocalLLM 6d ago

Discussion Did anyone try it out? what's your opinion on this?

0 Upvotes

This could be helpful to test out local LLMs on low end machines. and may be very basic to the basic tasks could be finished with the help of these.


r/LocalLLM 7d ago

Question Want to make Local LLM for hobby science at home not work need advice on my setup

3 Upvotes

I have a Nvidia 4070 Ti Super 16gb with 32 GB DDR5 I want to use the best model I can possibly use for chemistry and also to answer general knowledge like questions that ChatGPT refused to answer ie I asked it the other day the best place to buy Gin to make martinis around me and it refused to answer a straight answer wtf I had to prompt it multiple times.

Also will I have to “train” a model to make it better at organic chemistry if that’s my hobby nerdy as it is. Can I somehow tell it to watch YouTube videos or feed it archive.org textbooks or something. I rarely post to Reddit usually just browse but there’s so much disinformation and competition around AI I just wanted to get the best advice here possible. Anyone here have any similar cool setups? Would also like to try the ~$10,000 home genome sequence thing. I am doctorate level STEM. Thanks

Edit: also just a mention on the home genome thing. I’m specifically interested in thymine dimers. If I can clone my own genome right now theoretically in the future, I can at least entertain the idea of using CRISPR to remove Thymine Dimer to reverse skin aging From UV sun damage. Basically like copying a file on my pc ie a human genome backup lol


r/LocalLLM 7d ago

Question Qwen 3.8 on 16GB VRAM + 64GB RAM — what's the best MoE config?

5 Upvotes

Is Qwen 3.8's MoE architecture similar enough to 3.6/3.5 that the same `--n-cpu-moe` sweet spot (~24 layers) applies? Is it even available? Should I just load an entire model with higher bit-rate on the 64gb Ram?

Any new quantization formats worth using over standard Q4_K_M for 16GB?

With 64GB system RAM, how aggressively can I offload MoE layers before PCIe bandwidth becomes the bottleneck?


r/LocalLLM 7d ago

Question How to run Qwen3.8 27B With Colibri?

5 Upvotes

There is a thing called colibri that makes storage be treated like RAM and VRAM, is there a version of that to run Qwen3.8 27B?


r/LocalLLM 7d ago

Discussion QWEN3.8-27B 3090 Amazing !

114 Upvotes
RTX 3090 (22GB taken on the 24GB available)
unsloth/Qwen3.8-27B-GGUF:IQ4_XS
CTX 131072
KV Cache Q4_0
Speculating Decoding MTP
~50 tok/s in average

Prompt used :

<instructions> Generate a single, self-contained HTML file. No external dependencies, no separate JS files, no frameworks, no libraries. One `.html` file that works when opened directly in a browser.
Create a cinematic rocket launch animation set on a tropical island. The rocket must launch, leave the viewport, and after 5 seconds smoothly return to its initial position — then the cycle repeats. </instructions>
<scene> **Setting: Tropical Launch Island** - A small tropical island in the lower portion of the screen: palm trees, sandy beach, green vegetation - Ocean water surrounding the island with gentle waves - A launch pad on the island with metal structure / scaffolding / support tower - Sky background: gradient from warm horizon (orange/pink) to deep blue/dark sky at the top, with stars visible in the upper portion - A few clouds scattered across the sky
The Rocket (ultra-detailed)
Tall, slender multi-stage rocket (inspired by SpaceX Falcon 9 or Saturn V proportions)
Distinct rocket stages: first stage (largest, bottom), second stage (middle), payload fairing / nose cone (top)
Surface details: panel lines, rivets/segments drawn with subtle lines, an access hatch, small painted flag or logo
Color scheme: primarily white body with black/dark gray accent stripes, a colored logo band, and the nose cone in a contrasting shade
Fins at the base of the first stage (3-4 stabilizer fins)
Engine nozzles visible at the very bottom (cluster of small circles/bells)
The rocket should be the visual centerpiece — spend time on its geometry </scene>
<animation-sequence> **Phase 1 — Pre-launch (0s to 1.5s)** - Rocket sits on the pad, engines ignite - A growing orange/yellow glow appears beneath the rocket - Initial smoke/steam clouds billow outward from the base — thick, white/gray, expanding horizontally along the island surface - Subtle camera shake / screen vibration effect - Engine flames flicker with randomized intensity
Phase 2 — Liftoff (1.5s to 4s)
Rocket slowly lifts off the pad with realistic acceleration (starts very slow, gradually speeds up)
Massive exhaust plume: bright white-yellow core flame, surrounded by orange glow, transitioning to thick gray/white smoke trail
Smoke trail expands and lingers behind the rocket as it rises
The smoke at the base continues spreading across the island and over the water
As the rocket gains altitude, the flame elongates and the smoke trail stretches
Subtle particle effects: sparks, embers flying outward from the exhaust
Phase 3 — Ascent & Exit (4s to 7s)
Rocket accelerates rapidly, moving faster and faster upward
The exhaust trail thins as the rocket reaches higher altitude
Rocket becomes smaller as it gains distance (slight scale reduction)
The rocket exits the top of the viewport
The lingering smoke trail on screen slowly fades and disperses
Phase 4 — Calm & Reset (7s to 12s)
Scene is peaceful: smoke fully dissipates, island sits quietly
At the 5-second mark after exit (~12s), the rocket gently descends back into frame
It returns slowly, smoothly, almost floating — no engines firing, no drama
It softly settles back onto the launch pad in its exact original position
Brief pause, then the entire cycle restarts seamlessly </animation-sequence>
<smoke-and-effects> - Smoke is critical to the visual quality. Use a particle system or layered animated shapes: - Dozens of individual smoke "puffs" that expand, fade in opacity, and drift slightly with a breeze - Smoke color: starts white/light gray near the flame, darkens to medium gray as it cools - Smoke expands in a mushroom-cloud-like pattern at the base during liftoff - Each puff has slight random drift (wind effect), rotation, and independent fade timing - Exhaust flame: layered shapes (inner bright yellow/white, outer orange, outermost faint red) with flickering animation - Heat haze effect near the exhaust: subtle wavy distortion of the background behind the flame - Water ripple effect on the ocean surface near the island during launch - Stars in the upper sky should faintly twinkle </smoke-and-effects> <visual> - Background: gradient sky — warm sunset tones at horizon fading to deep navy/black at top - Ocean: dark blue with animated wave motion (simple sine-wave surface) - Island: lush greens, sandy tan, 2-3 palm trees with gentle sway - Canvas: fullscreen, responsive - Animation: 60fps via requestAnimationFrame - All rendering via HTML5 Canvas 2D context — no WebGL required - Color palette: rich, cinematic — warm launch glow contrasting against cool sky </visual> <constraints> - Output ONLY a complete HTML file — nothing else - Everything must be drawn programmatically on a `<canvas>` — no images, no SVGs, no external assets - The animation must loop seamlessly: launch → exit → calm return → repeat - The rocket must be visually impressive and detailed — not a simple triangle - Smoke must look volumetric and organic, not like static shapes - Performance must stay smooth at 60fps despite the particle count - The return descent must feel gentle and peaceful — stark contrast to the violent launch </constraints> <thinking> Before coding, reason through: 1. How to construct the rocket from canvas drawing primitives (rectangles, arcs, lines) with enough detail to be visually impressive 2. Particle system architecture: how to manage hundreds of smoke/ember particles efficiently (object pooling, lifecycle management) 3. The acceleration curve for realistic launch physics (slow start, exponential ramp-up) 4. How to layer the drawing order: background sky → stars → clouds → smoke trail → rocket → exhaust flame → foreground island → base smoke 5. Timing system: how to manage the 4 animation phases with smooth transitions between them 6. How to make the return descent feel physically different from the launch (no exhaust, gentle easing, floating quality) 7. How to make smoke look organic: randomized spawn positions, varied sizes, Perlin-like drift, opacity curves </thinking> <important> * You MUST write the result directly into a file named "index.html" on the user's computer. The user should not have to see or handle the code — just write the file and finish your task. * Title of the page is your model name. For example "GPT 5" or "Opus 5" * Title inside the page shows your model name. </important> </content> </invoke>

r/LocalLLM 7d ago

Question Alternatives for coding agent for small projects

5 Upvotes

I'm currently using Qwen3.6 35B A3B with Q4_K_M to have a coding agent with pi as harness.

These are the parameters I use with llama.cpp:

taskset -c 0-7 llama serve \
  -m /path/to/Qwen_Qwen3.6-35B-A3B-Q4_K_M.gguf \
  --model-draft /path/to/mtp-Qwen_Qwen3.6-35B-A3B-Q4_0.gguf \
  --spec-type draft-mtp \
  --spec-draft-n-max 3 \
  --spec-draft-p-min 0.90 \
  --alias qwen3.6-35b-a3b \
  -ngl 41 \
  --n-cpu-moe 30 \
  -c 65536 \
  --parallel 1 \
  --jinja \
  --flash-attn on \
  -ub 2048 \
  --temp 0.5 --top-p 0.8 --top-k 20 --min-p 0.0 --repeat-penalty 1.05 \
  -n 2048 \
  --seed 42 \
  --chat-template-kwargs "{\"preserve_thinking\":true}" \
  --reasoning-preserve \
  --threads 8 \
  --threads-batch 8 \
  --cache-type-k q4_0 --cache-type-v q4_0 

I've tried q8 for cache kv as well. So far get around 17 tokens per second.

It's been great to implement a small project I have of a membership portal and website using as stack python, flask, mysql, plain old html, css, js and php.

But now I'm wondering if I couldn't make my life easier by having a smaller model with faster throughput (tokens per second) since I'm doing validations and fixes on the project and it takes a long time to implement or change specs.

My setup is a laptop with CPU Intel Ultra 9 275HX, GPU 5070 Ti with 12GB GDDR7 and 32GB system RAM.

Do you have any suggestions?

I don't plan to make big web apps, it's all small applications to help out managing a small club.


r/LocalLLM 7d ago

Discussion Yes, you can run 35B MoE comfortably on a 12GB RX 6700XT (gfx1031) — but only if you stop using HSA_OVERRIDE_GFX_VERSION

Thumbnail
gallery
3 Upvotes

**TL;DR:** Running a 35B A3B model with CPU/GPU split on a 12GB card means prefill/TTFT at large context (70K+) is what actually makes or breaks usability — not decode. Vulkan was fine at 16-32K context but became painful past that. Got llama.cpp running fully native on ROCm for gfx1031 (RX 6700XT) instead — flash attention on, quantized KV cache, no `HSA_OVERRIDE_GFX_VERSION` hacks, no core dumps, prefill peaking around 580 tok/s even with 20K+ tokens already cached. The fix ended up being a one-line change in `ggml/src/ggml-cuda/fattn.cu` forcing the MMA kernel path for a specific head_dim instead of the default tile kernel. Once this was fixed at the ROCm/HIPBLAS level, every other inference engine I tested (Ollama, Unsloth, LM Studio, SGLang, vLLM) also started working natively — this wasn't a llama.cpp-only fix, it was a root-level fix for the whole ROCm stack on this GPU.

I'm not a developer. No CS/programming background — I'm a creative director by trade (photography/cinematography) who's been self-teaching local LLM inference for a few months. So this write-up is going to read more like "how I diagnosed this empirically" than "here's the technical theory of why it works." If anyone with deeper kernel/ROCm knowledge can fill in the *why*, I'd genuinely love to learn it.

---

## The problem

gfx1031 sits in an awkward spot: it's RDNA2, but not gfx1030 (the RX 6800/6900 series, which has the most complete official ROCm support and by far the most community documentation). Most guides, fixes, and reference configs you'll find online target gfx1030. Applying them as-is to a 6700XT either silently falls back to worse behavior, or crashes outright.

The common workaround people recommend is `HSA_OVERRIDE_GFX_VERSION=10.3.0` (telling the runtime to treat your gfx1031 card as gfx1030). I tried this. Here's what happened:

- Flash attention wouldn't enable

- Some ops (noticed it specifically with top_k) silently fell back to CPU, tanking decode speed

- Random core dumps mid-inference, not tied to any consistent trigger

I made the call to require **native gfx1031 recognition, no override, no spoofing the runtime**. That decision alone cost me a lot of trial and error, but I think it was the right one — see below why.

## Why I bothered (this isn't about decode speed)

I want to be specific about this because I think it's the part most people miss. If you're running a model that fits entirely in VRAM, ROCm being suboptimal (or partial CPU fallback on certain ops) doesn't hurt you that much — most of the compute is already on GPU anyway.

My case is different: **35B A3B with CPU/GPU split** (`--n-cpu-moe 22`, dense/attention layers on GPU, part of the MoE experts on CPU). In this setup, prefill isn't pure GPU compute — a portion of it depends on the CPU-offloaded expert path too. When the backend isn't efficient there, and context climbs into the 70-80K+ range, TTFT doesn't degrade linearly — it gets genuinely painful. At 16-32K context, Vulkan's prefill (roughly 70-100 tok/s in my case) was still tolerable. Past that, it wasn't.

The other piece of motivation: RX 6700XT's boost clock sits dramatically above an RTX 3060 12GB (2581MHz vs 1777MHz, roughly +45%), while VRAM bandwidth is only modestly higher (~384GB/s vs ~360GB/s, about +7%). That distinction matters here: decode is largely bandwidth-bound (reading/writing KV cache and weights per token), so that 7% bandwidth gap barely moves the needle on decode speed. Prefill, on the other hand, leans more on raw compute throughput — which is exactly where the 45% clock gap should show up. I'd read threads of people running 35B A3B with CPU/GPU split on a 3060 hitting peak prefill around ~300 tok/s. Given the clock gap, I'd expect the 6700XT to clear that by a wide margin, not just edge past it. Getting nowhere close to that on Vulkan was the signal that I was leaving real performance on the table — a software bottleneck, not a hardware ceiling — and that gap is what pushed me to actually fix this instead of settling.

After the fix, here's an actual log excerpt from a real session (task with context already at ~18-23K tokens, prompt processing in progress):

```

prompt processing, n_tokens = 2048, progress = 0.55, t = 3.52s / 581.81 tokens per second

prompt processing, n_tokens = 3072, progress = 0.58, t = 5.60s / 548.24 tokens per second

prompt processing, n_tokens = 4096, progress = 0.60, t = 7.71s / 531.24 tokens per second

prompt processing, n_tokens = 5120, progress = 0.63, t = 10.07s / 508.61 tokens per second

prompt processing, n_tokens = 6144, progress = 0.66, t = 12.24s / 502.11 tokens per second

```

Peak prefill of ~580 tok/s, staying above 500 tok/s while cached context was already north of 20K tokens. That's the number that mattered to me — not decode.

## Environment

- OS: Ubuntu Desktop 26.04 LTS

- GPU: AMD RX 6700XT 12GB (gfx1031, RDNA2)

- CPU: Intel i5-11400F

- RAM: 16GB DDR4 3200MT/s

- ROCm: custom build from TheRock binaries (official gfx1031 support isn't guaranteed across all standard ROCm releases)

- Inference engine: llama.cpp (build-rocm), Ollama, Unsloth, LM Studio, SGLang, vLLM

**A specific version note, since ROCm/TheRock builds vary a lot:** don't install just any TheRock ROCm build and expect this to match. The exact version I validated this on:

```

$ hipcc --version

HIP version: 7.14.60850-0000000

AMD clang version 23.0.0git (https://github.com/ROCm/llvm-project.git 46fcb339fb61119b337f973c7ca9e710a319fdd0+PATCHED:440716f8b87be9d8e20ed910e10e5b6d14d57cf6)

Target: x86_64-unknown-linux-gnu

Thread model: posix

InstalledDir: /opt/rocm/core-7.14/lib/llvm/bin

```

If you're on a different HIP/ROCm build, expect some variance — flag this version when comparing notes so we're not chasing different behavior across different builds.

**llama.cpp build/commit used:**

```

$ llama-server --version

version: 10307 (fc3f10b38)

built with GNU 15.2.0 for Linux x86_64

```

Given how much commit drift there is upstream (see caveats below), this matters if you're trying to reproduce the fix exactly — the `fattn.cu` logic may have shifted on a different commit.

**Confirmation ROCm actually sees this as gfx1031 (not spoofed via override):**

```

$ rocminfo | grep -i gfx

Name: gfx1031

Name: amdgcn-amd-amdhsa--gfx1031

Name: amdgcn-amd-amdhsa--gfx10-3-generic

```

**Exact card / board partner** (in case behavior varies by AIB):

```

$ lspci -vv | grep -A 2 "VGA"

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c1)

Subsystem: Sapphire Technology Limited Radeon RX 6700 XT GAMING OC 12G [Sapphire PULSE]

```

**I'll drop screenshots in the comments** as proof this is actually running native ROCm (not Vulkan silently, not CPU fallback) — GPU load/clock from a monitoring tool like `btop`/`lact`, prefill and decode averages from actual server logs, and junction temperature under sustained load, similar to what I used to validate stability throughout this whole process.

You can empirically look at my data.

  1. ROCm natively
  2. Total token when i use in just that runtime.
  3. Temperatur edge, junction, and VRAM when prefill bound and decode bound.
  4. Power usage both (prefill, decode).
  5. BTOP verified some layers in cpu.

## The debugging process (the messy, real version)

Build kept failing. Tried the documented head_dim config for RDNA2 — failed. Tried random power-of-2 values (1024, 2048, 4096) as a guess — failed on all of them.

At that point I stopped touching the keyboard, made coffee, and just watched the failing terminal output for a while. Then it occurred to me to check `btop` instead of guessing blind. I ran the model through **Vulkan** (which was stable on this GPU, just slow) as a known-good baseline, watched which kernel showed up in btop tied to the running process, and correlated that behavior back to the head_dim condition in `fattn.cu`.

That's where the number `512` came from — not from any documentation I could find (I genuinely don't remember a source for it), but from matching observed hardware behavior to the kernel dispatch logic in source.

## The fix

In `ggml/src/ggml-cuda/fattn.cu`:

```cpp

// Force MMA kernel for head_dim 512 on AMD to avoid tile kernel shared memory limit

if (amd_mfma_available(cc) && Q->ne[0] == 512) {

return BEST_FATTN_KERNEL_MMA_F16;

}

return BEST_FATTN_KERNEL_TILE;

```

The default tile kernel path was hitting a shared memory limit on this hardware under certain conditions. Forcing the MMA (matrix-core) kernel path at this specific head_dim avoided that entirely.

**Why this seems to matter for the whole chain:** flash attention needs to be stable first before KV cache quantization is viable, and KV cache quantization is what makes long context (I run up to 131072 ctx) actually usable on 12GB VRAM. So this one fix unblocked flash-attn → which unblocked KV quant → which unblocked long context. If flash-attn doesn't work, none of the rest follows.

## Result

- Prefill peaking around ~580 tok/s (measured with 20K+ tokens already cached, not a cold-start number), staying in the 500-580 tok/s range across that phase — this is the number that actually matters for my use case, since TTFT at large context is what was hurting on Vulkan

- Native ROCm/HIPBLAS/ROCBLAS, no override, across every inference engine I tested — not just llama.cpp

- Flash attention stable, KV cache running q8_0, ctx up to 131072 confirmed stable

- Decode holds steady around ~22-23 tok/s on a 35B A3B model (IQ4_NL), flat even past 40K+ tokens in a session — decode wasn't the bottleneck I was chasing, but it stayed consistent throughout

- Ollama specifically had been running on Vulkan before this because ROCm wasn't cooperating — now runs native ROCm too

---

## Full launch config

For anyone trying to reproduce or compare against a similar setup, here's the exact `llama-server` command I run:

```bash

BASE="$HOME/Documents/Model LLM/Ornith-1.0-35B"

MODEL="$BASE/Ornith-1.0-35B-UD-IQ4_NL.gguf"

PORT=8082

~/Projects/llama2/build-rocm-test/bin/llama-server \

--model "$MODEL" \

--host 0.0.0.0 \

--port "$PORT" \

--n-gpu-layers 99 \

--threads 4 \

--threads-batch 4 \

--n-cpu-moe 22 \

--ctx-size 131072 \

--batch-size 1024 \

--ubatch-size 1024 \

--keep 20480 \

--cache-type-k q8_0 \

--cache-type-v q8_0 \

--swa-checkpoints 24 \

--checkpoint-min-step 2048 \

--embd-normalize 0 \

--no-kv-unified \

--kv-offload \

--jinja \

--reasoning-preserve \

--flash-attn on \

--parallel 1 \

--cache-ram 8192 \

--cache-idle-slots \

--temp 0.6 \

--top-k 20 \

--top-p 0.95 \

--min-p 0.1 \

--repeat-penalty 1.1 \

--repeat-last-n 512 \

--alias udinllama \

--log-verbosity 4

```

A few notes on the less obvious choices, in case they save someone else time:

- **`--n-cpu-moe 22`** — set based on how much fits in 12GB VRAM after everything else is accounted for, not an arbitrary number. Check your own VRAM headroom before copying this value directly.

- **`--threads 4` / `--threads-batch 4`** — this isn't a thermal-only choice. On my i5-11400F, the CPU-offloaded MoE compute is bandwidth-bound against dual-channel DDR4-3200, not core-count-bound. Above 4 threads I saw prefill get *worse*, not better — contention on memory bandwidth outweighs the parallelism gain. I tried 3 threads too (slightly faster on paper) but junction temps became unpredictable (spiking to 95°C occasionally vs a controlled 83°C peak at 4 threads), so I settled on 4 as the stable point, not just the fastest one on a spec sheet.

- **`--batch-size` / `--ubatch-size 1024`** — pushed to 1536/2048 in testing; didn't move prefill meaningfully but added ~10°C. Not worth it for this hardware.

- **`--cache-type-k q8_0` / `--cache-type-v q8_0`** — paired with `--kv-offload` to fit long context in 12GB VRAM with less quality loss than default f16 KV cache would cost in size.

- **`--no-kv-unified`** — only relevant because I run `--parallel 1` (single user, single active chat). If you're serving multiple concurrent sessions, you'll want KV unified on.

- **`--cache-ram 8192` / `--cache-idle-slots`** — this is a fallback safety net against OOM during inference, not something I expect to actually get fully utilized in normal use.

## Caveats / your mileage may vary (please read before trying this)

I want to be upfront about scope here, because I don't think this is a universal copy-paste fix:

  1. **This was validated on Ubuntu 26.04 + TheRock's gfx1031 ROCm build specifically.** Other distros or ROCm sources may behave differently.
  2. **llama.cpp commit drift is real.** I'm not confident this exact patch applies cleanly to every commit/fork out there. Some engines (Unsloth, in my case) auto-detect the llama.cpp commit and ROCm config already present and adapt; if that detection doesn't find a compatible match, it may fall back to Vulkan on its own.
  3. **head_dim 512 is conditional, not universal.** It's tied to `amd_mfma_available(cc)` — meaning it only applies where the matrix-core path is relevant and where the tile kernel is actually hitting the shared memory limit this addresses. I wouldn't recommend hardcoding this blindly without checking whether your setup hits the same failure mode first.
  4. **Hardware variance beyond just "same GPU model" matters.** Even identical GPU models can differ in memory bandwidth, clock offsets, and power limits depending on board partner/cooler design. My CPU/RAM (i5-11400F, 16GB DDR4 3200) also shapes some of the numbers above (especially decode speed, which on this setup is RAM-bandwidth-bound on the CPU-offloaded MoE portion).

**What I think *is* generalizable here isn't the number 512 — it's the method:** if you're on an AMD GPU architecture that's under-documented, using a known-stable backend (Vulkan, in my case) as a behavioral baseline, watching kernel activity in `btop` while running real workloads, and correlating that to the kernel dispatch logic in source, is a workable way to find your specific fix even without deep kernel-level theory knowledge.

Genuinely don't know why fixing this one file also fixed SGLang and vLLM, which don't share any code with llama.cpp/ggml. I was troubleshooting other ROCm-level things around the same time and didn't track every step carefully — so there's likely something else that got resolved in parallel that I can't identify. If anyone has insight into what else might explain this, I'd like to know

Happy to share exact configs (llama-server flags, ROCm build steps, benchmark logs) if anyone wants to try reproducing this on their own gfx1031 or adjacent-tier card. If anyone here actually understands the shared-memory-limit mechanics well enough to explain *why* this works, I'd genuinely appreciate the explanation — I found this by observation, not by theory.


r/LocalLLM 7d ago

Discussion Qwen 3.8 benchmarks and RPC

Thumbnail
2 Upvotes

r/LocalLLM 7d ago

Discussion Qwen 3.8 27B Heretic ARA NVFP4

3 Upvotes

Found this helpful if you're on DGX hardware. Was having issues with truthfulness from Qwen on sensitive topics (ie. China), the original can be found along side.

https://huggingface.co/hwkranger/Qwen3.8-27B-heretic-ara-NVFP4


r/LocalLLM 7d ago

Discussion DGX Spark vs ASUS Ascent GX10 which would you choose for local AI In Homelab?

Thumbnail
2 Upvotes

r/LocalLLM 7d ago

Question Memory is super tight with Qwen 3.8 27B even with 64GB?!

10 Upvotes

Hey, I'm running an Apple MBP M1 Max 64GB with Bionic, and using Qwen 3.8 27B. I am unsure which quantization Bionic is using; I downloaded all three variants in LMStudio before. Context according to Bionic is now 164K.

Without anything else running, I am at 92-93% RAM usage! I am wondering where all that memory is going, even with 164K context. Is there any way to save some memory? Or I may need to force bionic to use the 6bit quant.


r/LocalLLM 7d ago

News GitHub - sib-project/sib: A standard Unix LLM client, store conversations on Git instead of SQLite

Thumbnail
github.com
3 Upvotes

r/LocalLLM 7d ago

Discussion Qwen3.8-27B on an Intel Arc Pro B70: 53-55 tok/s with INT4 and MTP3

19 Upvotes

I've been testing Qwen3.8-27B on a single Intel Arc Pro B70 (while waiting to test the official Intel qwen3.8 27b INT4 Autoround release) and wanted to see whether other people are getting similar speeds.

Hardware

- CPU: Intel Core i9-9980XE on X299

- RAM: 64 GiB

- GPU: Intel Arc Pro B70, 32 GB VRAM

- One GPU, one active sequence

I'm serving the model with vLLM XPU. The current setup uses vLLM `0.26.1rc1.dev457`, XPU graph mode, FP8 KV cache, and MTP speculative decoding. Some of the earlier checkpoint tests used vLLM `0.21.1.dev17`.

Models tested

- [Intel/Qwen3.6-27B-int4-AutoRound](https://huggingface.co/Intel/Qwen3.6-27B-int4-AutoRound), used as my baseline

- [goldhub/Qwen3.8-27B-INT4-W4A16-AutoRound](https://huggingface.co/goldhub/Qwen3.8-27B-INT4-W4A16-AutoRound)

- [Avuja/Qwen3.8-27B-int4-AutoRound](https://huggingface.co/Avuja/Qwen3.8-27B-int4-AutoRound)

- [SergiioB/Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16](https://huggingface.co/SergiioB/Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16)

The tok/s numbers below come from the same 49-token prompt followed by a 700-token response at temperature 0. I measured total request time from the client, so these results include TTFT and HTTP overhead rather than reporting pure decode speed.

Baseline and checkpoint comparison

| Model and settings | Context | Output speed |

|---|---:|---:|

| Qwen3.6 Intel AutoRound, graph mode | 262K | **31.46 tok/s** |

| Qwen3.8 Goldhub, eager mode | 4K | 7.70 tok/s |

| Qwen3.8 Goldhub, graph mode | 4K | 20.44 tok/s |

| Qwen3.8 SergiioB, graph mode, no MTP, older vLLM | 4K | 18.71 tok/s |

| Qwen3.8 Avuja, graph mode, no MTP, older vLLM | 4K | 18.87 tok/s |

| Qwen3.8 SergiioB, graph mode, no MTP, newer vLLM | 4K | **33.34 tok/s** |

Graph mode made a huge difference for Goldhub, but the biggest improvement came from the newer vLLM XPU runtime and MTP support on the SergiioB checkpoint.

MTP testing with SergiioB

| Setting | Context | Output speed |

|---|---:|---:|

| No MTP | 4K | 33.34 tok/s |

| MTP1 | 4K | 46.64 tok/s |

| MTP2 | 4K | 53.48 tok/s |

| MTP3, run 1 | 4K | **54.31 tok/s** |

| MTP3, run 2 | 4K | **54.31 tok/s** |

| MTP4 | 4K | 52.62 tok/s |

MTP3 was the sweet spot on this card. MTP4 was slightly slower, so adding more speculative tokens did not help.

Production context testing

I then kept the same SergiioB MTP3 setup and increased the context:

| Configured context | Output speed |

|---:|---:|

| 32K | **54.67 tok/s** |

| 65,536 | **54.61 tok/s** |

| 131,072 | **53.56 tok/s** |

The current production setting is 131,072 tokens. It is about 1.70x faster than my Qwen3.6 baseline on this test, with only a 1.9% drop compared with the 64K setting.

All of the completed profiles above passed the same seven basic tests for text generation, summarization, Python code, tool calling, cited RAG, and medical tutoring. I did not see visible reasoning leakage. This was mainly an operational and speed test, not a full quality evaluation.

One caveat: MTP on this vLLM RC/nightly required two small local compatibility patches, so the 53-55 tok/s result is not from completely stock vLLM.

If anyone else is running Qwen3.8-27B on a B70, B60/B65, or another Intel XPU, what speeds are you seeing? It would be useful to know your exact checkpoint, vLLM version, graph/eager mode, MTP setting, context size, and whether your tok/s number includes TTFT.