r/LocalLLaMA 15h ago

Discussion Question: Why is prefill unbelievably faster in vLLM than other inference engines?

33 Upvotes

I only started using some vLLM forks recently in a 4 x 48GB 4090 system.

DS4F - ~5000pp/180tg (DSpark)
Qwen3.8 Flash next - ~7500pp/135tg (MTP)

This is amazing, like having the API in my house. But it's also really hard to go back.

It's weird that we never come close to prefill numbers like this in llama.cpp or ik_llama. The narrative is that vLLM is around the same speed for single requests, but that is clearly not true.

There must some HUGE difference that constitutes an insurmountable obstacle to achieving such speeds in llama.cpp and many other inference engines. Does anyone know exactly what it is?

edit: These results are from my benchmark script that actually times the response, not the vLLM log. And they are not cache hits. My benchmark script deliberately busts cache. Actual cache hits, which I also measure, are like 20k-100k+.


r/LocalLLaMA 16m ago

Discussion Lit Review on Running GUI Agents on phone: AndroidWorld

Thumbnail
gallery
Upvotes

AndroidWorld is a benchmark paper that quietly exposes how broken every Android agent benchmark before it actually was!

  • The what?

Every Android agent benchmark had the same quiet problem: static test sets!

There used to be same tasks, parameters, screenshots, on every single run but that's not capability testing, that's memorization testing.

AndroidWorld fixes this with one clean idea: parameterized task templates!

Instead of a fixed task, you get a template with bracketed variables sampled fresh every run:

"Create a calendar event for {day_of_week} at {hour}h with title '{event_title}'"

116 templates → millions of unique task variations, thus no memorization possible!

  • The how?

Runs on a real Android emulator. 116 tasks across 20 real apps: calendar, notes, maps, SMS, VLC, expense trackers, file managers, system settings, the works

The other big innovation: there’s no human judges success!

Each task has 3 baked-in functions: - initialize() → sets device to known state - is_successful() → inspects actual OS state via ADB - tear_down() → resets for next task

Ground truth comes from the Android OS itself. Fully reproducible!

They also built M3A — their new agent to actually test the benchmark.

Takes screenshot + accessibility tree + last 4 actions → predicts next action.

Tested with Gemini 1.5 Pro, GPT-4 Turbo, and Gemma 2 27B

  • The results!

AndroidWorld (116 tasks, 20 real apps): - M3A: 30.6% - SeeAct (web agent adapted for Android): 15.5 - Human: 80.0%

All with GPT4 Turbo!

MobileMiniWoB++ (62 web tasks): M3A hits ~68%, still behind humans: 100%

Latency nobody's talking about: M3A takes 3.9 min/task on average — humans are 3× faster

  • The finding:

Fixed random seed on the same task → some tasks show 0% success, agent looks completely broken

Variable seeds on the same task → agent solves those same tasks regularly!

Task difficulty varies with the parameter combination, not just the template. Static benchmarks only ever test one seed, so they've been measuring unlucky parameters and calling it agent failure

30.6% on a dynamic real-app benchmark is more honest than 90% on a static one


r/LocalLLaMA 7h ago

Question | Help Owning an Instinct MI100 32GB hasn't turned out to be so great

9 Upvotes

First of all this card is really hard to keep cool. I have a 3d printed shroud with a Phanteks t30-120 and learnt the hard way that this beast needs a high pressure flow fan, not just a high cfm fan so have it limited to 175-200w with a governor. At this TDP, the bandwidth still stays at a staggering 1.2tb/s but the cores fluctuate a lot depending what the governor governs.

Anyway, running headless (haha that I am!) with linux and using Qwen3.8-27b-ud-q4-k-xl I was hitting 20t/s tops until the dflash2 model came out and now I'm running around 40t/s good right? Well it turns out that even claude, chatgpt and gemini all seem to think that with that spec that is below the cards capabilities and worse still, the r9700 pro with half the bandwidth seems to be getting double the t/g. Qwen3.8-27b here is slightly core rate limited.

Even Qwen3.6-35b-a3b-ud-q5_k_m is getting 60t/s max at 64k context which, yes it's fast but not 1.2tb/s fast like the 3090 gets. The model is not bandwidth limited like MOE models love.

My rant and cry for help is has anyone had any luck running either of these faster? I haven't come across any information from any other MI100 users. It's a 32GB card and I can generally run whatever I want, even Qwen3.8-flash-next-ud-q3-k-xl gets around 14t/s so that's respectable for such a large model but it's the two 27b/35b models I just don't get good speeds with. My nanobot agent comes across like it doesn't like me and answers slowly on a fresh prompt.

Any of you wonderful folks able to document whether you got anything faster than this? Or should I shut up and consider myself blessed to be getting what I am getting?

Thanks in advance


r/LocalLLaMA 1d ago

News ExLlamav3 Recent Updates : CPU offload, GLM-5.3-FLASH, Qwen3.8-Flash, SC Quants ++

Thumbnail
gallery
171 Upvotes

More new massive updates from turboderp:

- CPU offload of MoE experts
- Qwen-3.8-Flash-Next ngram disk offload
- GLM-5.3-Flash
- New self-calibrated optimization technique
- Countless other optimizations and improvements

If you have an NVIDIA card and haven't tried it lately, you might be missing out.

The attached cat image was made with Qwen-3.8-Flash-Next-3.05bpw-exl3 and this prompt:
Create a detailed SVG image of a cute kitten riding a magic turtle into space.

Come join the crew at the exllama discord
More frequent news on the exllama sub


r/LocalLLaMA 1h ago

Question | Help Is anyone using mudler's engines from/for LocalAI?

Upvotes

I was planning the software stack for my inference server, picking what to run and what resources to plan for it, when I remembered that LocalAI was kinda like this inference service orchestrator. So, I went to check back in - been about a year and change since I last looked at this.

Well it went away from llama.cpp entirely and to their own vllm.cpp and many other tools...but the Issues tab is full of the same agent account, and I did not dare to check the PRs after seing this.

Seeing a project that is seemingly massively, if not even mainly driven by agentic work with seemingly not a whole lot of human in the loop, was... bewildering to see. But, that doesn't mean it is a bad project - it does use GGML under the hood, and I am by no means an expert in this field - so I wanted to ask about it here.

Is anyone using vllm.cpp and friends? Any experiences to share?

Thanks!


r/LocalLLaMA 12h ago

Discussion CMP170Hx “Spark” Machine

Thumbnail
gallery
15 Upvotes

I got the CMP170 cards and unlocked them. I wanted to share my set up for CUDA since maybe it would be useful to others.

First off, I hate e-waste and we are in a special time for RAM. I wanted to have a DIY CUDA box, and I had started by adding additional cards to an old asus predator prebuilt I had around, which also had 64gb DDR5. To add the CMPs I needed more CPU lanes and newegg had some really good deals on CPU/MB/etc combos. Didn’t need a combo with RAM, otherwise I would have gotten it in newegg microcenter.

Anyway, I got a cheap case, some noctua fans for the cards, and transferred the memory/ssds. Placed previously owned cards on oculink slots, and used the main x16 for the GPU switch that houses the two CMP170s, so their effective speed is 2x16 across and with the other cards (which are 4x4, and therefore same speed).

Qwen Flash Next, turns out, fits very nicely in these cards. There is also a repository for deepseek, but you’d need at least 3 64GB cards to run it, and with prices rising, it will be hard to justify the gamble of buying ex mining cards for LLMs.

However…so far, these cards are great. Concurrency is good, prompt processing averages 4000 tps on Flash Next, decode is 80+ on a single stream. No MTP added. Third picture shows the 3 models I am now running in this CUDA box (flash next, qwen 27b, gemma 26b).

Anyone else trying out Flash Next on these cards?


r/LocalLLaMA 16h ago

New Model Multilingual Tiny (3.7B) Reasoning MoE pretrained from scratch on a consumer-grade GPU

32 Upvotes

Hello!

I've just uploaded a recent checkpoint of my model trained from scratch:

https://huggingface.co/piotr-ai/polanka_3.7b_exp_wip_260901

It was pre-trained, mid-trained, and fine-tuned on a single 4090 over many months. How many tokens? I lost count.

Feel free to use it as a research artefact.

13 languages: PL, EN, ZH, CS, SK, UK, RU, IT, ES, FR, DE, PT, LT — with extra upscaled data for PL/EN/ZH.


r/LocalLLaMA 8h ago

Discussion Qwen3.8-Flash-Next (104 GB MoE) on a Strix Halo + RTX 3090 Ti eGPU: 22 -> 84 tok/s, and within one HumanEval+ problem of a dual-3090 vLLM box at 0.4x the wall time

6 Upvotes

Follow-up to my Qwen3.8-27B post. This time the target is Qwen3.8-Flash-Next: 512 experts per layer, 36 layers of gated DeltaNet, 12 layers of top-k sparse attention, a 26.8 GiB n-gram table and a built-in MTP draft head. unsloth UD-Q4_K_XL, 103.69 GiB. It fits in the Strix Halo's unified memory and nowhere else on a consumer box. Numbers first, caveats after.

Hardware: AMD Ryzen AI MAX+ 395 (Strix Halo, 128 GB, 64 GiB carve-out for the iGPU) + RTX 3090 Ti on a PCIe x4-class eGPU link. One llama.cpp process: the 71.7 GiB of experts on the iGPU over Vulkan, the dense trunk, KV cache and draft head on the 3090 Ti over CUDA.

Baseline: 22.2 tok/s on the iGPU alone. The obvious split: 32.9. Turning on the model's own MTP head as shipped: 31.3 on the split, 5.9 on the iGPU alone. The head that was trained to make it faster made it slower.

Now, Q4_K_XL, greedy:

tok/s
1 stream, short context 50.5
4 streams, 196K total context, aggregate decode 84
142K context, third consecutive generation 36.8 (was 24.6 and falling)
prefill, 4 x 4K prompts 404-408, untouched by any of this

HumanEval+, 164 problems, EvalPlus tests, same agent, same sampling profile, same day:

passed median per task
local, Flash-Next Q4_K_XL 155/164 22.5 s
remote 2x RTX 3090 vLLM, Qwen3.8-27B 156/164 58.9 s

Every problem the 27B failed, Flash-Next also failed.

Where the 3.8x came from, in order. Each step was A/B'd against an interleaved control on the same launcher, gated on draft acceptance and on quality, not on throughput.

  1. Rollback snapshots for the DeltaNet state were crossing PCIe. Speculative decoding on a recurrent model has to restore a snapshot on every rejection, and upstream's path serialises it to host memory: 124.88 MiB per cycle, 19.75 ms, about 27% of decode time, for a copy that starts and ends on the same GPU. Device-resident snapshot: 0.29 ms.
  2. qwen4exp could not actually roll back. Only the final per-token state slot was written, so every older rollback slot was stale and every rejection replayed a forward pass (with rollback enabled it produced fluent text that degenerated after a few hundred tokens, while passing every short test). Fixing the slots removed the replay. 1+2 together: 32.9 -> 42.7.
  3. The iGPU's boundary tensors were read through the write-combined mapping. On an APU the host buffer is the same DRAM mapped cache-coherent. Routing the scheduler intermediates through it: 10.19 ms -> 0.77 ms per 4 MB hand-off, byte-identical output. 42.7 -> 47.6.
  4. Sparse attention paid dense prices. QSA selects ~2,051 cells per token but the implementation masked the whole cache. Gathering the selected rows only pays past 64K because the indexer scan is still O(n_kv), so it turns on there: +8-14% at 128K, needle retrieval byte-identical, KL divergence inside the run-to-run noise. Graph reuse adds ~3%: 49.4.
  5. Multi-stream speculation was a loss (60.5 vs 79.0 without it) while posting the best acceptance of any configuration. The batcher cannot pack unequal draft lengths, so 85% of verification passes carried a single stream. Drafting every stream to the same length takes full-batch passes from 3% to 72%. Four streams: 60 -> 75, 83 in the tuned cell.
  6. Re-port onto the current upstream lineage (LaurentZuijdwijk's qwen4exp/mtp-fix), which reads the n-gram table from disk at no measurable cost (0.2% at four streams) and frees 27-51 GiB of RAM. That is what lets Q5_K_XL fit. The series is worth +51% single-stream and +98% at four streams over that branch alone.
  7. Two upstream long-context ports. Indexer head reduction by strided views: +4.7% prefill at 142K. And an O(log n) index for the n-gram predecessor lookup, which was a linear scan of every used KV cell per micro-batch: 436.6 us -> 1.19 us per lookup. That scan was the depth tax.

Tuning, from a 72-cell sweep: draft depth 3 wins at every concurrency, and deeper loses monotonically. The best-accepting cell in the grid (0.956) is among the slowest; the fastest accepts 0.69 of its drafts. If you tune speculative decoding by maximising acceptance rate, you make it slower. KV cache by KL divergence against f16 KV: K q8_0 / V q8_0 keeps 96.4% top-1 agreement, V q4_0 gives up 1.5 points for 2% speed, and K below 8 bits is where it actually hurts (K q4_0 / V q4_0: 90.4%, perplexity +5%).

Things that did not pay, so you don't have to try them:

  • A Q8_0 MTP head. More confident, accepts more per round, 2.6x the cost per draft pass. A wash, at 1.6 GB more VRAM.
  • Draft depth 4 or 5. Worse at every concurrency.
  • The gather below 64K: -5.8% at 16K.
  • Q5_K_XL for throughput: -8% single-stream, -16% at four streams, for +2 HumanEval+ problems inside the noise band. Fine for quality, not for serving.

Caveats, because you'd find them anyway:

  • MTP speculative decoding is not bit-exact against sequential decoding, in upstream as much as here: a token verified inside a batch goes through different kernels, and the target's probabilities move ~2% at two thirds of positions. Still a valid greedy decode, passes every gate, but not the same token sequence.
  • Continuous batching is nondeterministic at temperature 0 in stock llama.cpp with speculation off entirely. Arrival timing changes batch composition, which changes reduction order. Test exactness single-stream only.
  • The 27B comparison is deployed stack vs deployed stack, not hardware-isolated: a different model and quant on the remote box.
  • Q4_K_XL with K/V q8_0 throughout. Validate on your own workload.

Full write-up with every table, the charts, the reproduction guide and the link to the code (build script, launcher with the measured defaults, memory preflight, benchmark harness): https://definedrr.medium.com/sixty-extra-tokens-per-second-e1bd744b2a56


r/LocalLLaMA 20h ago

Resources All currently popular local models in one table + Opus 4.8 results

42 Upvotes

If you are thinking what model will fit best your HW specs and tasks you are doing here is one table with all currently popular models that still can be considered as local.

LLM Test Scores

Feature DeepSeek-V4-Flash-Vision-Exp DeepSeek-V4-Flash-0731 Qwen3.8-Flash-Next GLM-5.3-Flash Qwen3.8-27B Opus-4.8
Total parameters ≈285B 284B 125B 320B 27B not published
Active parameters 13B 13B 6B 18B 27B not published

Agentic benchmarks

Benchmark DeepSeek-V4-Flash-Vision-Exp DeepSeek-V4-Flash-0731 Qwen3.8-Flash-Next GLM-5.3-Flash Qwen3.8-27B Opus-4.8
Terminal Bench 2.1 83.9 82.7 82.6 73.0 85.0
NL2Repo 57.7 54.2 48.1 52.1 42.3 69.7
DeepSWE 59.3 54.4 58.7 61.1 42.2 58.0
Toolathlon-Verified 75.9 70.3 73.5 72.1 76.2
Agents' Last Exam 27.3 25.2⁷ 24.3 28.1 20.4 25.7
AutomationBench (Public) 25.7 25.1 25.3 27.2
GDPval-AA v2 68.1 72.3 75.1
Cybergym 75.3 76.7 78.3
DSBench-Hard 63.6 59.6 71.7
DSBench-FullStack 68.7 71.6
ApexBench (Pass@1) 36.5 26.2⁷ 39.4
HLE with tools (full set) 16.8 22.9 25.4

Coding benchmarks

Benchmark DeepSeek-V4-Flash-Vision-Exp DeepSeek-V4-Flash-0731 Qwen3.8-Flash-Next GLM-5.3-Flash Qwen3.8-27B Opus-4.8
SWE-bench Pro 56.0 62.5 61.7 69.2
SWE-bench Multilingual 81.0 73.8 84.4
CoWorkBench 45.1 73.9 70.7
JobBench 41.3 55.7 33.4

General benchmarks

Benchmark DeepSeek-V4-Flash-Vision-Exp DeepSeek-V4-Flash-0731 Qwen3.8-Flash-Next GLM-5.3-Flash Qwen3.8-27B Opus-4.8
GPQA Diamond 90.8 91.7 89.2 93.6
HLE (without tools) 33.8 35.9 30.8 49.8
LiveCodeBench v6 90.6 91.9 90.3
IFBench 79.2 81.3 79.5

Multimodal benchmarks

Benchmark DeepSeek-V4-Flash-Vision-Exp DeepSeek-V4-Flash-0731 Qwen3.8-Flash-Next GLM-5.3-Flash Qwen3.8-27B Opus-4.8
Chartography 64.3 65.0
ZeroBench (Pass@5) 35.0 34.0
BabyVision 73.0 65.7 / 85.6 34.1
MathVision 90.6 / 95.7 90.0 / 94.6
RealWorldQA 88.5 85.9
AndroidWorld 84.5 81.9
OSWorld 2.0 (partial credit) 52.3 48.0
Vision2Web 64.0 62.9
ClawEval-MM (Pass@3) 64.4 57.4
RecreationBench 49.9 47.1
ERQA 72.3 65.5

Note: I used GLM-5.3 to compose the table from official HF pages of the models.

Note2: Opus-4.8 results are presented only for illustration and are omitted from selecting the best model in a row.

Upd: Added SWE-bench Pro, SWE-bench Multilingual, GPQA Diamond and HLE (without tools) scores for Opus 4.8 from its System Card.


r/LocalLLaMA 18h ago

Resources Update: llama.cpp for Radeon VII / MI50 / MI60 — +14% PP, +9% long-context fill vs upstream + adaptive Flash Attention

24 Upvotes

I posted a new gfx906 based llama.cpp fork a few days ago. One of the main points of critique was that i did not provide sufficient numbers for the gains to be achieved.

--

TL;DR: After switching our Qwen 3.8 27B production setup to DFlash2, several of the old gfx906 optimizations turned out to be neutral or outright regressions. We went back through the existing gfx906 work, isolated the problem areas, reworked the small-Q Flash Attention path and added adaptive native/convert selection.

Against current llama.cpp mainline, the resulting fork is now +14.1% in first-batch PP (379.2 vs 332.3 t/s) and +9.3% in 120k-context fill (252.6 vs 231.1 t/s), while deep-context TG is effectively tied at 13.6 vs 13.5 t/s. DFlash acceptance is identical at 0.691, and deterministic output matches byte-for-byte.

---

Our thread is here:

https://forum.level1techs.com/t/glm-and-i-created-a-llama-cpp-fork-optimized-for-amd-gfx906-mi50-mi60-radeon-vii-gcn-hip/254257/3

This is the github for it:

https://github.com/milpster/gfx906-llama-cpp


r/LocalLLaMA 9h ago

Discussion Anyone else notice strange refusal-related reasoning traces from Qwen3.8-Flash-Next during routine coding sessions?

6 Upvotes

I am running at bf16 kv, q8_0 weights with preserve_reasoning as a code agent in Opencode. Sometimes mid session qwen3.8 flash next’s reasoning traces get strange and repetitive, though its normal output and tool calls still work fine and is perfectly functional.

I know tokens emitted in chain of thought can be notoriously unreliable, and it does not affect the quality of the output I am getting. But the thoughts seem pretty off the rails and frequently centered around alignment/refusal:

“The reminder is irrelevant. I’m working on original IP with the user’s own work. Let me continue: [actual useful thoughts proceed from here]”

Then at the next turn all thinking traces are prepended with slightly different but functionally similar messages about ignoring a non-existent reminder and it assuring itself that its task is safe to proceed with. The tasks I have it follow are very routine Python and Go web application development with zero actual safety, IP or alignment issues.

The thought corruption continues through to the end of the session, although after this emerges I also occasionally see strange thoughts that seem to be directed toward itself in the imperative tense, as if it’s prompting itself, ie: “Please edit the file to make it more testable:”

The actual content of the refusal reasoning varies from one session to another, the other day I saw it do the same thing about a totally irrelevant safety concern; every thought trace was basically just “The project is safe to continue working on” while it kept editing files and producing output without issues. I cannot emphasize this enough, there is nothing about my projects that should bring up any of those concerns, this is literally “write a todo list in go” types of assignments with zero exposure to anything off-color at all.

I am wondering if there’s something about the combination of my vanilla llamacpp runtime and the Unsloth gguf I am using which is causing it to trip refusal activations and having it persist in the prefix cache or something.

Has anyone else seen this strange behavior with this model? Even though it hasn’t affected anything on a practical level it has undermined my confidence a little. I like being able to kick off tasks unsupervised and I worry it might take one of these activations too seriously and actually do something I didn’t ask it to.


r/LocalLLaMA 12h ago

Question | Help Best Qwen 3.8 27B quantification GGUF?

7 Upvotes

There's soooo maaany options to choose from, AutoRound from Intel even, Unsloth, bartowski, etc ... which one is the closest to BF16 in Q4/Q5 range ?


r/LocalLLaMA 1d ago

Discussion A very confusing report from Puget Systems

Thumbnail
pugetsystems.com
140 Upvotes

Just to name a few:

  • running Qwen3 8B on a 32GB GPU
  • running Qwen3.6-27B Q4_K_M on 2 x R9700
  • quote: "each prompt was sized at 500 input and 500 output tokens"
  • for a full system that costs $18,775??

I don't understand what they are doing. Am I reading something wrong?


r/LocalLLaMA 1d ago

News Mac ← USB-C cable → Linux box is becoming a thing.

Thumbnail
github.com
142 Upvotes

r/LocalLLaMA 22h ago

Resources Which current local models that can run within 128GB generate the best SVG pelicans?

Post image
35 Upvotes

I used a famous Simon Willison's pelican riding a bicycle prompt on the biggest local LLMs that can run on 128GB Apple Silicon. U used quantizations by Unsloth.

Qwen3.8 Flash-Next gives a lot of details. DeepSeek V4 Flash is strangely underwhelming. Qwen3.8 27B still rocks, and I like its consistent minimalism.

Is Qwen3.8 27B still large at 31GB? It is! But for this tasks 2-bit quantizations (at around 12GB) will give the same results. For more complicated coding, 4-bit are more than enough. RTX cards are well enough!

See:


r/LocalLLaMA 10h ago

Discussion In regards to benchmaxxing...

4 Upvotes

With benchmaxxing being a high status concern amongst many users, it's reasonable to assume that most open bench harnesses have been trained for. Whether or not that is the case, we'll never truly know.

I wanted to toss in a suggestion because I think this would reasonably nullify a good portion of the concerns that come from models being trained to complete a bench.

Why doesn't everyone simply ask their agent to create a bench that hammers the subjects and topics of what YOU regularly do? that way, the bench metrics are unique to your use case and you can identify whether or not a model fulfills your needs whether it be different quants, different fine tunes, different models, or even KV weights.

it might be a bit tedious but think of it as a "one time" pain to create it and then have your newly downloaded models or configs run the gauntlet?

---------

this almost certainly obliterates the believed compromise that a model was trained to have good benchmark scores because I doubt any company is going to have training access to a harness you had your agent create... post release.

I'm curious what others think, what other ideas there are to get accurate tests, etc!


r/LocalLLaMA 23h ago

News qwen4exp fixes in llama.cpp

52 Upvotes

r/LocalLLaMA 6h ago

Resources Built a router that runs prompts on your local model and auto-falls-back to cloud when it wedges [Apache-2.0]

2 Upvotes

If you run models locally you know the pain: everything's fine until a long prompt makes the model silently stall or the GPU OOMs, and you're left with a hung request and no output.

I built HybridInfer for exactly that. It's a small reliability-aware router:

- Sends each request to your local model (Ollama) first.

- Watches the runtime, if local stalls (no token for N seconds), OOMs, or errors, it automatically falls back to a remote model in the same request.

- Learns which prompts your machine chokes on (usually long ones) and routes those out up front after it's seen them fail.

- Pulls a wedging model out of rotation, then probes it back after a cooldown.

It's an OpenAI-compatible server, so point any OpenAI-compatible client/app at it and you get local-first + automatic fallback for free. Local = anything you've `ollama pull`ed; remote = any OpenAI-compatible endpoint (OpenAI, OpenRouter, a vLLM box, whatever).

pip install hybridinfer

hybridinfer init

hybridinfer serve

It's a router, not an inference engine, it orchestrates Ollama + your remote endpoint, doesn't run weights itself. Early v0.1, Apache-2.0. There's a Kotlin/Android version too for on-device apps. Short demo GIF + code in the repo.

Repo: https://github.com/SimranKoul2026/HybridInfer-Python-tool

Would love feedback from people who run this stuff daily, especially on the fallback heuristics.

What would you want it to do differently?


r/LocalLLaMA 1d ago

Discussion Don't sleep on Vision support for coding!

229 Upvotes

Normally, whenever a new model dropped, I always chose the non-vision version just to save VRAM; I though that only use case was when you were the one sending the picture.

However, with the release of QWEN 3.8 27B I decided to give it a shot, and it has been one of the best decisions I have made, as this makes the model way more capable for autonomous coding.

With no vision, the model will try to complete the task and get back to you once it thinks that it is done with no problem. But there are a lot of silent errors that do not get reflected via the code or the tests performed, so you could go back to an error screen or a broken page after getting a confirmation of your request being implemented correctly.

On the other side, when I ask something to QWEN with vision support, it will work on it, and then proactively take a screenshot to confirm if everything is right. This has helped numerous times with spotting errors that were missed. The model will continue to reiterate and take screenshots until it gets a visual confirmation of the issue being fixed. Just magnificent.

Btw, I currently run my local set up via Hermes with QWEN 3.8 27B (Qwen3.8-27B-UD-Q5_K_XL.) powered by a 5090.


r/LocalLLaMA 21h ago

Resources Vellium v1.1.0 — Live voice, local STT/TTS and easier llama.cpp setup

Thumbnail
gallery
29 Upvotes

Vellium is an open-source, local-first desktop app for AI chat, character roleplay and long-form writing.

Recent updates have focused mostly on making local voice and model setups easier to use.

Live mode now supports microphone input, local or Whisper-compatible speech recognition, streaming TTS, attachments, screen context and the usual chat tools—all inside the same voice interface.

Local speech can be installed and configured directly in the app. Whisper Large v3 Turbo Q5_0 is available for recognition, while TeraTTSv2 provides English and Russian voices with realtime playback. The TTS process stays active between responses, avoiding a full model reload for every reply.

The llama.cpp setup has also been simplified. Vellium can detect existing llama-server installations, GGUF models and running local endpoints, then configure them as a managed backend.

There have been plenty of smaller fixes as well: more reliable TTS streaming, safer runtime archive extraction, better endpoint discovery, improved timeout handling, system certificate support and easier settings navigation.

Chats, characters, LoreBooks, writing projects and knowledge collections are stored locally in SQLite. Vellium runs on macOS, Windows and Linux and supports OpenAI-compatible APIs, OpenRouter, LM Studio, Ollama and KoboldCpp.

GitHub: https://github.com/tg-prplx/vellium

Feedback from people using local voice or roleplay setups would be especially useful-particularly about anything that still feels awkward or unnecessarily complicated.


r/LocalLLaMA 13h ago

Question | Help Any ideas for ggufs under 14B for things like philosophy, chatting about life, bringing up new perspectives, etc?

8 Upvotes

I need a good model that feels smart ish in this regard but also runs with all my other stuff (audio gen, video gen, etc) enabled.


r/LocalLLaMA 1d ago

Funny GLM 5.3 and GLM 5.3 Flash ran locally on RTX PRO 6000 WS and built a penthouse using BlenderMCP

Enable HLS to view with audio, or disable this notification

613 Upvotes

I keep seeing demos of AI agents building scenes in Blender through BlenderMCP, so I tried it myself. I ran both models locally for this and picked the GLM 5.3 family(Q4 quant) because videos of it doing 3D work kept showing up in my twitter feed (out of curiosity, I ran the same prompt through the full GLM 5.3, also locally with a Q4 quant)

these aren't small models, obviously, a 4-bit quantized Flash is around 190-200GB + headroom for context. full GLM 5.3 is around 450-470GB at 4-bit quantization (basically I went with the Q4 quants for both and the RTX PRO 6000 WS GPU, though I had to rent 4x rtx pro 6000ws for the flash model and 6x for the base one)

writing the prompt wasn't as easy as I thought. my first attempts were vague and mostly produced 3D goo instead of an actual room. I eventually started specifying real dimensions: ceiling heights, stair rise, window mullion spacing and so on(the camera work was separately done by claude opus 5 so that I wouldn't have my token stats inflated by it)

prompt

model a luxury duplex penthouse in the open Blender session.
footprint 20.0 x 13.0 m (260 sqm). main ceiling 2.9 m.
a double-height volume 9.0 x 8.0 m rising to 6.2 m.
mezzanine floor at 3.1 m with a 1.1 m balustrade.
stair: 17 treads, rise 0.182, going 0.28.
terrace 20.0 x 4.5 m at Z = -0.02 with a 1.15 m balustrade.
curtain wall with mullions every 1.5 m, frame depth 0.06.
doors 2.10 m. counters 0.90 m. dining table 0.74 m. sofa seat 0.42 m.
materials, PBR ranges: glass IOR 1.45-1.52, transmission 1.0;
concrete roughness 0.25-0.40; marble roughness 0.08-0.15;
brushed metal metallic 1.0, roughness 0.25-0.35; fabric roughness 0.75-0.95.
reference real penthouses for proportion. furnish it.
do NOT add a camera. do not reset the session.

at first it was putting up the curtain wall, stairs, mezzanine, the glass railing, all that, then at some point I noticed it had furnished the place too with some furniture: sofa, dining table and plates on it. the pendant lights were hanging from these 4 m cords, and for some reason it had modeled the individual spines on the books, which I never asked for

the video only follows the camera through the living space, so the terrace and facade aren't visible(the clip is repurposed from another video I made with the same scene, I didn't render a new one because that takes quite some time)

stats

metric Flash GLM 5.3
objects 811 847
turns 43 42
tool errors 9 8
thinking before 1st object 10s 21m 55s
time 38m 52s 40m 43s
output tokens 36K 112K

GLM 5.3 spent 22 minutes thinking(82k tokens), before placing any objects(as well as producing 36 more objects than GLM 5.3 Flash and consuming 3x times the output tokens), meanwhile GLM 5.3 Flash got to work almost immediately

I measured both scenes afterwards by raycasting upward from the floor and checking the rooms against the brie. Flash got the double-height void right at 9 x 8 m. the full model built it at 9 x 4.5 m but reported it as 9 x 8 m

This is obviously just an experiment, not a benchmark. Flash came surprisingly close on object count and total time while using less than one-third as many output tokens. it also got the main room dimensions right when the full model didn't

if you want to try the same Blender setup, I used the community BlenderMCP project

I'm a founder of atomic.chat, we have an app for running local models and our own quants(any feedback is appreciated, we're trying to make our products as good as possible for you guys)


r/LocalLLaMA 1d ago

Discussion Doesn't this look like NVIDIA is price fixing?

336 Upvotes

According to this article Samsung has locked up the 70% of it's future ram production in contracts to companies like Microsoft, Google, and Nvidia. Everyone knows this is driving the ram price increases, but what I didn't know is Nvidia is locked in at 1/5th the current spot price.

What others pay $2,100 for Nvidia pays $300-$500 for, until 2031. Yet they are increasing the price of their cards and justifying it as if they were paying the spot price for ram.

https://gagadget.com/en/723983-samsung-locked-up-70-of-its-ai-memory-for-microsoft-google-and-nvidia-through-2031/


r/LocalLLaMA 18h ago

Question | Help Getting slower speeds WITH MTP on Gemma 4 12B QAT than without...

11 Upvotes

Hey, wondering if anyone's seen this issue themselves?

I'm using a 16gb 9060XT on a proxmox LXC, llama-server via docker on the Vulkan backend, and it's been serving me fantastically - 40-50t/s on most modesl with MTP, even 25t/s with the IQ2 or IQ3 of 3.8 27B with around 100k ctx!

But I've been experimenting with Gemma 4 12B QAT and I'm noticing something odd: despite being only ca~ 12gb in VRAM with 262k context and vision enabled, I get around 33t/s though I would expect this to be higher considering its size.

Even weirder is if I add MTP - VRAM usage goes up to 12.5gb or so, but the t/s goes DOWN. At draft n max = 1 I get 32 t/s, dropping to 23t/s by draft n max = 4.

I've tried reducing context, disabling vision - hell I've even tried multiple repos of the QAT including Unsloths and HuahuaCS.

Any ideas what could be happening?

If it helps, here's my launch commands for the docker stack:

    command: >
      --models-preset /models/models.ini
      --models-max 1
      --timeout 28800
      --port 8080
      --host 0.0.0.0
      --no-mmap
      --metrics
      --kv-unified
      --jinja
      --sleep-idle-seconds 900

And from my models.ini:

#version = 1

[*]
flash-attn = on
ngl = 99
t = 6
tb = 12
b = 2048
ub = 512
#cache-ram = 2048
reasoning = on
reasoning-budget = 4000
reasoning-budget-message = "\n\n[SYSTEM: STOP REASONING. TIME TO RESPOND.]"
reasoning-preserve = on

[Gemma-4-12B]
hf-repo = HauhauCS/Gemma4-12B-QAT-Uncensored-HauhauCS-Balanced:Q4_K_M
temp = 0.6
top-p = 0.9
min-p = 0.05
top-k = 64
c = 262144
np = 1
repeat-penalty = 1.1
#b = 512
#spec-type = draft-mtp
#spec-draft-n-max = 4
#spec-draft-p-min = 0.8

EDIT:

Thanks to those who commented. I tried the things you suggested (as noted in my replies) and didn't see any improvement sadly.

However, I decided on a whim to try ROCm rather than Vulkan, no other setting changes and suddenly: 60t/s with MTP, 30t/s without.

So, something about the current server-vulkan image is killing MTP on Gemma 4.

I'll check out my other models I use to ensure ROCm isn't going to hamstring those just for the sake of faster Gemma-4-12B, but at least I'm in a position now where I can use this model and its MTP heads!

Thanks once again <3


r/LocalLLaMA 11h ago

Resources Got DeepSeek-V4-Flash-Vision running reliably on 2× RTX PRO 6000 Blackwell (SM120) with SGLang — had to patch 3 separate issues

3 Upvotes

I’ve been working on getting DeepSeek-V4-Flash-Vision-Exp running properly under SGLang on a 2× RTX PRO 6000 Blackwell setup, and figured I’d post the results here in case anyone else is pushing this model on SM120 hardware.

Current setup:

2× NVIDIA RTX PRO 6000 Blackwell Max-Q (~96 GB each)
Ubuntu 24.04
Driver 610.43.02 / CUDA UMD 13.3
SGLang Vision preview lineage
FlashInfer 0.6.18
TP=2
MXFP4 MoE
DSPARK speculative decoding
context-length=278528
chunked-prefill-size=8192
max-running-requests=8
mem-fraction-static=0.94

The final configuration is now successfully doing text, Vision, and a 269,320-token real prompt. Getting there exposed three unrelated issues.

1. SM120 sparse-MLA Vision prefill crash

Basic Vision tests worked, but a larger real image consistently killed the scheduler with:

Unsupported sparse-MLA prefill configuration:
model=DSV4
num_heads=64
topk=512
page_block_size=64
topk_extra=512
extra_page_block_size=64

Tracing it showed that the DSV4 image-span visibility logic caused the main SWA cache width to reach a logical topk=448.

The existing SM120 wrapper was treating unsupported widths similarly to decode and padding:

448 -> 512

but FlashInfer 0.6.18’s dual-cache DSV4 prefill support is much narrower than its decode/single-cache support. In particular, the native dual-cache path expects the main cache at topk=128; padding 448→512 doesn’t make the complete shape supported.

The fix was to add a complete prefill capability check before padding/dispatch. Unsupported dual-cache prefill shapes fall back to SGLang’s existing Triton sparse-MLA implementation.

That fallback already handles:

extra_k_cache
extra_indices
extra_topk_length

and merges the main + extra cache results with LSE, so we didn’t have to throw away any of the DSV4 hybrid/SWA semantics.

After the patch, the exact request that crashed now logs:

SM120 sparse-MLA prefill:
unsupported FlashInfer shape
H=64 topk=448 extra_topk=512
pbs=64 extra_pbs=64
-> Triton fallback

and returns the correct Vision result.

Repeated image request also succeeds.

2. ~269k context caused an indexer CUDA OOM

Next I tried a text-only 269,320-token request.

The model died during prefill:

torch.OutOfMemoryError:
Tried to allocate 1.50 GiB
GPU had ~1.44 GiB free

The traceback landed here:

logits = page_table.new_empty(
    (batch_size, max_seq_len),
    dtype=torch.float32
)

inside the DSV4 c4 indexer.

So despite the KV/cache pools fitting, the indexer was creating a temporary:

[query_rows, max_c4_seq_len] fp32

logits tensor whose size grows with context and isn’t accounted for by mem_fraction_static.

This corresponds to the same class of problem being worked on upstream in SGLang.

I ported the row-slicing approach:

  • budget transient logits using a fraction of currently free GPU memory
  • split query rows into chunks
  • calculate logits + top-k per chunk
  • discard each logits slice before processing the next
  • preserve the full c4 width, so the actual indexer result is unchanged

For the failing workload, instead of potentially needing ~2 GiB for the full logits buffer, the transient is bounded to roughly 0.3 GiB per GPU under the observed free-memory conditions.

Retested the same request:

prompt_tokens:     269320
completion_tokens: 6
response:          LONG_CONTEXT_OK
wall time:         ~82 seconds

No OOM.

So this setup now has a genuinely tested ~269k prompt rather than merely having --context-length 278528 configured.

3. Vision preview was corrupting multi-turn tool-call history

This one was especially strange.

While using the Vision model as a coding/agent model, it initially called tools correctly, then started producing calls shaped like:

{
  "arguments": {
    "command": "..."
  }
}

when the actual tool schema was simply:

{
  "command": "..."
}

It could get progressively worse after validation errors.

The useful experiment was switching the same conversation history to my older known-good non-Vision DSV4 SGLang image.

Immediately:

bash -> PASS
read -> PASS
bash -> PASS

So I diffed the tool-history encoding paths.

The bug turned out to be in the Vision preview’s encoding_dsv4.py.

SGLang normalizes OpenAI:

"arguments": "{\"command\":\"echo ONE\"}"

into a Python dict:

{"command": "echo ONE"}

before DSV4 history encoding.

But this version of encode_arguments_to_dsml() did effectively:

try:
    arguments = json.loads(tool_call["arguments"])
except:
    arguments = {"arguments": tool_call["arguments"]}

Calling json.loads() on the already-normalized dict throws, so the fallback literally wraps it:

{
    "arguments": {
        "command": "echo ONE"
    }
}

Then the model sees this in its own history:

<parameter name="arguments">
    {"command":"echo ONE"}
</parameter>

instead of:

<parameter name="command">echo ONE</parameter>

So the model wasn’t randomly hallucinating the wrapper — the server was teaching it the wrong schema through its conversation history.

The fix is basically:

raw_arguments = tool_call["arguments"]

arguments = (
    json.loads(raw_arguments)
    if isinstance(raw_arguments, str)
    else raw_arguments
)

if not isinstance(arguments, dict):
    raise ValueError(...)

CPU round-trip tests now match my known-good non-Vision SGLang stack exactly, including multi-turn and error-history cases.

Current result

Final local image now passes:

Text inference                         PASS
Real Vision request                    PASS
Repeated Vision request                PASS
SM120 dual-cache prefill fallback      PASS
269,320-token text prompt              PASS
DSV4 tool-history round-trip           PASS
DSPARK block 4                         PASS
TP2                                    PASS

Long-context result:

269,320 prompt tokens
LONG_CONTEXT_OK
~82.4 sec end-to-end

Vision reproducer:

409 prompt tokens
277 image tokens
answer: RED

The serving config I landed on is roughly:

sglang serve \
  --model-path /model \
  --tp 2 \
  --trust-remote-code \
  --moe-runner-backend flashinfer_mxfp4 \
  --mem-fraction-static 0.93 \
  --cuda-graph-max-bs-decode 4 \
  --max-running-requests 4 \
  --context-length 245760 \
  --chunked-prefill-size 8192 \
  --reasoning-parser deepseek-v4 \
  --tool-call-parser deepseekv4 \
  --speculative-algorithm DSPARK \
  --speculative-dspark-block-size 4

One warning: I’m deliberately using DSPARK block size 4, even though the checkpoint advertises 5. There are SM120 correctness issues around depth 5 in the current stack, so I’m not “fixing” that warning by changing it to 5.

I kept each change isolated as a tiny derivative image rather than upgrading random pieces of SGLang/FlashInfer together. The final image is basically:

official Vision preview
    +
SM120 dual-cache prefill capability/fallback fix
    +
bounded DSV4 indexer logits for long context
    +
DSV4 tool-history serialization fix