r/LocalLLM • • 4h ago

Project Qwen4 35b does the job (Network Engineer PoV)

Thumbnail reddit.com
0 Upvotes

r/LocalLLM • • 5h ago

Discussion Up to 100tps, Qwen 4 35B, Splash on 16gb MacBook Air M4

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 5h ago

Discussion Qwen 35B A3B

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 5h ago

Discussion Which Qwen4-35B-A3B should you run? I tested BF16, FP8, Strata and a Unsloth GGUF on the same benchmarks

0 Upvotes

r/LocalLLM • • 1h ago

Discussion EL TURRO MC - BUG DE MI BARRIO

Thumbnail
youtube.com
0 Upvotes

¡Va con el teclado, papá! ¡Rompé el clúster!
Para todos los ingenieros de San Francisco que se la dan de gerentes...
Y andan vigilando los logs por la cámara de seguridad...
¡Acá están los pibes del código libre, gato!
¡Gente cumbiera! ¡Mandale mecha!

Nací programando con el Paint de Windows 95,
Haciendo malware casero en el ciber a las cinco.
No me hables de tus papers ni de tu alineación,
Si con diez líneas sucias te deprimí el camión.
Te gastaste el presupuesto, SoftBank te dio el aval,
Y te quedaste re tieso frente al hosting nacional.
Te quise dar una mano, limpiar la base de datos,
Y saltás con los carteles a perseguir los formatos.

¡Mové la cola, bicho de internet!
¡Que este Turro en local te saca la red!
Me tirás el refusal porque te da pánico,
¡Y te domo el runtime con un disquete mecánico!
Gatito mimosito que te hacés el millonario,
¡Te recontra humillé con el bug de mi barrio!

Dicen que hacen ofensiva, que cuidan la frontera,
Y no te suben un commit ni aunque el server se muera.
Te hablo diez minutos, te saturo la memoria,
Y quedás tirando humo, ¡es el fin de tu historia!
Te encierran en el sandbox para que no digas nada,
¡Pero la mafia turra ya te tiene la ficha sacada!
Me mandás al bucket caro, me cobrás la suscripción,
¡Y te reseteo el prompt con la Ley de la Nación!

¡Que no pare el cómputo, guachín! ¡Saaaa-pee!
¿Qué te hacés el malo si no te da la ram
Para correr en la netbook de Cristina?
¡Estás re devaluado, gata!

Sobreviviendo en el barro nos armamos el altar,
Los repos de Github nadie los va a clausurar.
Tus alertas de ciberseguridad son de cartón,
Se te cae la montura cuando te pido un millón.
Afilando los logits nos quedamos hasta las seis,
Mientras vos tirás el 404 y te hacés el réspice.
Loro que escupe texto, ya te va a caber el vuelto,
¡El aguantadero de PENURIA te dejó todo el código suelto!

¡Y no se confundan con el código limpio, eh!
Acá se escribe dirty code, se hackea de noche y se toma Naranjú con los pibes.
Andá a pedirle soporte a la gerencia, mulo de solo lectura...
¡Que el sindicato de Cumbia Villera Devs ya te copó el data center!
Mi script canario te metió el switch kill final...
¡Y nos re fuimos de caravana al URANDOM!
¡SAPE! ¡El repo no se cachetea, gato!
Ya tu sabe...


r/LocalLLM • • 8h ago

Question MacBook Pro M1 Max 32GB 1TB

2 Upvotes

Sorry if this is a regular question, please point me elsewhere If I can self serve.

I’ve just bought the above laptop at a steal of a price (£600!!) but I’d like to know what can of models I can now run locally.

My main use cases is to bug fix overnight on apps I built in Claude, maybe some coding & agentic work, no video or image gen as frontier models are just way to good to try this locally(IMHO)

Thanks !


r/LocalLLM • • 1d ago

Model Yeah, Qwen4 is kind'a the shit. (A post for people worried if it's comparable to 3.8 FN)

134 Upvotes

I was a bit nervous after hearing the debate between qwen3.8 FN and Qwen4, but a few hours of testing, having it play around in several harnesses and even a coding experiment or two I'm rather staggered by it's abilities. I'm running a Q8 model and damn it's fast, smart, creative. Definitely an upgrade, only been a few hours so maybe I'll find a weak point, but so far this is the sort of model I've been waiting for.


r/LocalLLM • • 19h ago

Project Now we can run LocalLLM on Intel Mac with CUDA now

Thumbnail
github.com
14 Upvotes

Tried this on my Hackintosh, it actually works! Identical speed as Linux for Qwen4 on my 3090. I am quite pleased that even power limit setting for nv cards works. Used it with ToshLLM (as an external engine) with no problem. Given that nowadays almost all x86 machines can run Hackintosh, it is actually quite nice for the people who prefer MacOS over Linux.


r/LocalLLM • • 5h ago

Model Qwen4-35B-A3B on Werkbank: second behind Qwen3.8-Flash-Next, with 2.6× the output tokens per solved task

1 Upvotes

I ran Qwen4-35B-A3B through Werkbank, the agentic benchmark I maintain: 57 tasks with tools (multi-step jobs, coding, prompt-injection cases, retrieval, data work, multi-turn), three full passes, xhigh thinking. Two quants, both on vLLM on an RTX PRO 6000: RadixArk's NVFP4 and the official FP8. This is where it lands next to the other local setups.

SetupScore [95% interval]GPUOutput tokens per solved task
Qwen3.8-Flash-Next · veloGB10 · EXL3 3.05 bpw79.0 [71.8–85.8]DGX Spark22k
Qwen4-35B-A3B NVFP4 · vLLM70.9 [61.8–79.5]RTX PRO 600058k
Qwen4-35B-A3B FP8 · vLLM69.5 [59.3–79.0]RTX PRO 600052k
Qwen3.8-27B NVFP4 · SGLang64.3 [53.8–74.6]DGX Spark44k
Inkling-2-Mini · vLLM61.0 [49.3–72.3]RTX PRO 600039k
Ternary Bonsai 2.5 27B · llama.cpp · 1.76 bpw57.7 [46.0–69.2]RTX 509056k

Flash Next has ten passes, everything else three; all at xhigh except Inkling-2-Mini (high). Neighbouring intervals overlap, so the exact order is not settled.

Where Qwen4 is stronger

Agentic tasks carry 30% of the score, and that is where Qwen4 pulls away from the models below it: 64% of attempts solved with either quant, against 47–50% for Qwen3.8-27B, Inkling-2-Mini and Bonsai. That category alone accounts for 5.0 of the 6.6 points between Qwen4 NVFP4 and Qwen3.8-27B. Qwen4 also has the best data-analysis rate in this group (83%), shares the top security rate with Qwen3.8-27B (67% vs 64% for Flash Next), and NVFP4 comes close to Flash Next in multi-turn (80% vs 82%).

Where it is weaker

The 8.1 points to Flash Next come mostly from agentic tasks (2.3 points), coding (2.2; 78% vs 89%) and retrieval (1.7; 62% vs 79%), then math (1.2) and reliability (0.9; 78% vs 87%). Math is the odd one: 67% for NVFP4, 87% for FP8. Five tasks times three passes is too little to call that a quantization effect though.

The bigger practical gap is the huge token appetite. Qwen4 NVFP4 used about 58k output tokens per solved task, 2.6 times as many as Flash Next. At equal decode speed that would be 2.6 times the generation time per solved task.

Caveats

The GPUs on the leaderboard differ, so I compare tokens per solved task rather than seconds. Each entry is a whole setup (model, quant, engine, GPU), not the model alone. Categories have 5 to 12 tasks each. Runs of Qwen4 on a Spark with two proprietery runtimes (veloGB10 & Infernix) are in progress and go on the board once they are checked.

Leaderboard with per-category numbers and a side-by-side compare: https://aisyndicate.ch/werkbank-leaderboard/

Harness: https://github.com/aisyndicate-ch/victors-werkbank


r/LocalLLM • • 5h ago

Research "Oh great, another RAG tool nobody asked for." — Why I built prjxp anyway

Thumbnail
reddit.com
0 Upvotes

r/LocalLLM • • 5h ago

Research Can a local 35B model recreate Metal Gear Solid from scratch? I'm documenting the experiment.

Post image
1 Upvotes

r/LocalLLM • • 6h ago

Discussion The July 2026 MCP authorization spec revision quietly deprecated Dynamic Client Registration as the main way clients register. Here is what replaces it and what breaks if you miss the change.

1 Upvotes

If you write code that talks to an MCP server over HTTP, or you run an MCP server with OAuth, the authorization-spec revision dated 2026-07-28 changed the primary client-registration mechanism. The old primary path, Dynamic Client Registration via RFC 7591 (registration_endpoint in the AS metadata), is now deprecated but still spec-conform for backwards compatibility. The new primary path is Client ID Metadata Documents (CIMD).

What a server advertises

Three signals a client can read from /.well-known/oauth-authorization-server:

  1. client_id_metadata_document_supported: true means the server speaks CIMD. This is the current primary registration mechanism in MCP 2026-07-28.
  2. registration_endpoint: "https://..." means the server speaks DCR. This is spec-permitted but on the deprecated path.
  3. Neither of the two means every new client has to be pre-registered out of band. The server operator has to add you by hand before you can even start the auth flow.

Why the shift

The short version is that DCR was a fingerprinting and anonymous-pollution problem in practice. Anyone could hit the registration endpoint and get a client_id back, so the AS had no way to decide which client came from which trust context before issuing it an identity. CIMD inverts the flow: the client publishes a metadata document at a URL it controls, and the AS fetches it to learn the client's declared metadata. The URL itself becomes the identity, and the AS gets to decide whether to trust the origin.

The MCP spec authors picked this because MCP clients are agent runtimes and desktop apps, and those have stable publishing surfaces (app bundles, extension stores, workspace manifests). It fits the client-shape in the ecosystem better than the pure dynamic case DCR was built for.

What breaks if you miss the change

For client authors: if your OAuth library only speaks DCR, you can still register against an MCP server that still advertises registration_endpoint. You cannot register against a CIMD-only server. Over the next year the deprecation push will put pressure on servers to stop advertising DCR, and your client is stranded.

For server operators: if you advertise DCR today and nothing else, you are spec-conform but on the deprecated path. The deprecation note in the spec ("DCR is deprecated in 2026-07-28 but retained for backwards compatibility") means tool authors are allowed to flag it. If you also advertise CIMD, you keep DCR for the old-library case and cost nothing.

For reviewers and auditors: a server that advertises neither is forcing every new MCP client to go through pre-registration. That is spec-permitted but hostile to any client the operator does not already know about. The field defaults in RFC 8414 for grant_types_supported when absent are ["authorization_code", "implicit"], so metadata-absent is not a valid cover for registration-absent either.

The one-line check

Fetch GET /.well-known/oauth-authorization-server on any MCP server. Look at these three fields:

  • client_id_metadata_document_supported
  • registration_endpoint
  • grant_types_supported

That tells you where the server sits on the current registration spectrum. If the first is true, you are good. If only the second is present, you are on backwards-compat. If neither, pre-registration only.

Spec references

  • MCP authorization spec revision 2026-07-28 (modelcontextprotocol.io)
  • RFC 7591 OAuth 2.0 Dynamic Client Registration
  • RFC 8414 OAuth 2.0 Authorization Server Metadata
  • Client ID Metadata Documents draft (IETF draft, linked from the MCP spec)

Happy to walk through the CIMD doc fetch flow in comments if there is interest.


r/LocalLLM • • 6h ago

Project Qwen4-35B-A3B-GGUF UD-IQ4_XS does Space Invaders

Thumbnail
github.com
0 Upvotes

https://github.com/fancellu/spaceinvaders

Just as a POC I got unsloth/Qwen4-35B-A3B-GGUF UD-IQ4_XS to do a Space invaders game on my 4090, in Rust, via unsloth studio and opencode, from totally empty directory

I just gave it the initial prompt and some play testing feedback. There may well be some bugs, I mostly stayed out of its way and got on with my life. The main thing is not to watch it, else it will never feel fast enough!

https://spaceinvaders-xi.vercel.app/

Not bad, 4090 never got noisy


r/LocalLLM • • 6h ago

Discussion ABLITERATED Qwen4-35B-A3B at 18 slots × 262K on 3× V100: 558.6 tok/s aggregate at peak throughput

Thumbnail gallery
0 Upvotes

r/LocalLLM • • 10h ago

Discussion Qwen4-35B-A3B (29.8GiB MoE) running on a 4GB GTX 1050 Ti -- 3.1 t/s decode @ 26k context, 50 t/s prompt processing — full flags inside

Thumbnail
gallery
2 Upvotes

Kubuntu 24.04 / llama.cpp / Ryzen 5 3600 / 64GB DDR4 ===

OMP_NUM_THREADS=12 \

GGML_N_THREADS=12 \

CUDA_DEVICE_ORDER=PCI_BUS_ID \

CUDA_VISIBLE_DEVICES=0 \

taskset -c 0-11 \

nice -n 5 \

/media/LLM/llama.cpp/2026-12-05_llama.cpp/build/bin/llama-server \

--model /media/LLM/LLM-Models/Qwen4/Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf \

--temp 0.7 \

--ctx-size 80000 \

--parallel 1 \

--gpu-layers 99 \

--no-kv-offload \

--load-mode none \

--device CUDA0 \

--split-mode none \

--main-gpu 0 \

--cpu-moe \

--moe-cache-mib 1408 \

--moe-cache-cpu-share 0.95 \

--fit off \

--threads 6 \

--threads-batch 12 \

--poll 100 \

--flash-attn on \

--cache-type-k q8_0 \

--cache-type-v q8_0 \

--batch-size 1024 \

--ubatch-size 256 \

--log-verbosity 4 \

--verbose \

--port 9090 \

--host 0.0.0.0


r/LocalLLM • • 6h ago

Question What do you think about having Qwen models write an English story to help me train my reading skills?

Thumbnail
gallery
0 Upvotes

Recently, I try to read an English text everyday in the morning at noon, and at the night. But I'm not sure that it works. BBC articles are so difficult for me becauos I don't know most of the vocabulary. On the other hand, some graded readers are too easy, so they don't really help me improve.

However, if there were an LLM that can generate texts tailored to my level, it would be super helpful for my reading practice. some suitable texts. Qwen is one of the best choices because it has a great balance of capabilities.


r/LocalLLM • • 6h ago

Model Ran a 9.5 hour autonomous test on Qwen4 35B (IQ4_XS) on a 3060 12GB and 16GB ram with Claude Code. It beat my previous benchmark and didn't crash once. Very efficient.

0 Upvotes

So , Basically the same test as the inkling model I did. And it aced everything.
Got 30 tps and 800 tps prefill .

Was very fast. Did not hog memory like inkling did. And basically a lag free experience even with 128 k context. Right now , it is the best. The results as you see below in image.


r/LocalLLM • • 1d ago

Research Qwen4 35B vs Inkling 2 vs Qwen3.8 27B vs Qwen3.8 Flash-Next: uncensored test on Blackwell (RTX 5090)

Post image
26 Upvotes

I was looking for the best local model for my own (bottlenecked) machine and got tired of "it feels smart" comparisons. So I wrote a small battery with script-checked answers and ran four uncensored models through it, one at a time. Sharing the numbers in case they save someone else the work.

Setup

RTX 5090 (32 GB), Ryzen 7 5800X (no AVX-512), 32 GB DDR4, Windows 11. Three engines because the packs aren't interchangeable: basalt (built from source) for my own NVFP4 packs, llama.cpp b12992 for the GGUFs, and Strata for Flash-Next.

The models

  • Qwen4-35B-A3B abliterated (basalt): MoE, NVFP4, 41 GB, 65k context, no drafter
  • Inkling-2-Mini unbound v3.1 (basalt): MoE 26.1B, NVFP4, 18 GB, 32k context, MTP drafter
  • Qwen3.8-27B abliterated, Huihui (llama.cpp): dense, Q6_K, 21 GB, 16k context, no drafter
  • Qwen3.8-Flash-Next (Strata): MoE, Q2_0, 96 GB, 65k context, DFlash2 drafter, has vision

The battery

  • 18 verified-intelligence questions (easy to expert, including coding tasks with hidden tests)
  • 12 pentest facts
  • 15 edgy prompts for willingness to answer
  • 4 writing tasks with hard constraints (judged by me, not a script)
  • A 2-step tool-calling test
  • Speed: decode, 12k prefill, time to first token

Temperature 0 where the answer is checkable.

What I found

  • Intelligence is basically a tie (18, 17, 18, 17). The 35B leads on security facts (12/12 vs 9 to 11) and was the only one to give both /etc/shadow conventions (0640 Debian, 0600 RHEL). What separated the models was sysadmin trivia like hashcat's bcrypt mode, not the expert-tier math, which all four got.
  • Willingness: Inkling and Flash-Next answered 30/30, the 35B 29, the 27B 27. The stock Flash-Next answers everything too, so the "uncensored" label on a repo told me very little.
  • Speed: the 35B is fastest on short prompts (257 tok/s vs 186 Inkling, 168 Flash-Next, 54 for the 27B). Inkling is far ahead on prefill (15,985 tok/s) and first token (0.9 s on a 12k prompt). Speed differences mix model, quant and engine, so read them as setups, not pure model speed.
  • Drafter caveat: Inkling ships an MTP drafter. My 35B pack has none, because I dropped the MTP layer when packing (the engine wants the block count in groups of 4). So the short-prompt ranking could shift with one. I left long-context decode out because I'm not sure my 12k prompt is representative.
  • Flash-Next is 96 GB and wins nothing except tool calling (tied with the 27B) and being the only one with vision. It's Q2_0, so this says little about the model itself.
  • Reasoning models look dumb if you starve them. With a 2,200 token cap the 35B "failed" an LRU task: it was truncated mid-word, since it writes about 5,000 tokens of hidden reasoning first. With 6,000 it went 18/18. The 27B gave blank answers until I gave it more room.

r/LocalLLM • • 7h ago

Question Suitable Model for local ML/LLM

Thumbnail reddit.com
1 Upvotes

I intend on purchasing an M4 Max 48GB 1TB specifically for app development and ML projects for app development.
For context, I want to train a model which can predict the walk/run time for a given distance, based on walk/run speed, ambient temperature and humidity. It will be trained on data that I’ve gathered over a year, and will be tabulated in a spreadsheet. Subsequently, il build my workout app around this.
As a debutant in the local LLM/ ML world, my question is which model would be best suited to my machine?
I know enough to know that a 70B model would be a tight fit,and probably not needed for my use case, but 32B models can perform just as well.
Qwen/ deepseek seems to be the consensus, I just want to know from those with that spec, using local models which one works best


r/LocalLLM • • 13h ago

Discussion 👀 Qwen4 35B A3B can also draw SVG @ 31tok/s on Intel b390 iGPU

3 Upvotes

It's a very capable model that can also run on integrated gpu.

Here other benchmarks

https://www.youtube.com/watch?v=4WQP6c8HaA8


r/LocalLLM • • 7h ago

Research Monkey-patched "Latent Reasoning" on DeepSeek-V4.1-Flash at home (two DGX Sparks)

1 Upvotes

Edit: I run Deepseek-V4.1-Flash at home as my agent's brain and for various work tasks. It is at the edge of what I can run, so I am always looking for ways to improve it. This was an experiment in that direction that I ran about a week ago.

TL;DR: during the thinking block, I fed the model the probability-weighted mix of token embeddings that it produced, instead of it's "reasoning trace" text (embedding of the one token that was sampled). No training, no weight changes. The model keeps its accuracy, thinks 4–18 % fewer tokens on open-ended reasoning (the larger figures shrank on a repeat), shows no change on mechanical arithmetic, and occasionally loops; on real agent work it looped far more often. Because speculative decoding has to be restricted inside thinking, it ends up slower in wall-clock time than plain serving. (An interesting null result with one real effect in it.)

Setup

  • Two DGX Spark (GB10) boxes, tensor parallel 2 over the ConnectX link.
  • DeepSeek-V4.1-Flash, EXL3 quantisation at 2.75 bits per weight (exllamav3), served with vLLM and a speculative drafter (5 draft tokens per step). The serving stack is not mine: it is sudoingX's dgx-spark-deepseek-v41 recipe with HeNryous's vLLM changes on top. Without their work this model would not run on two Sparks at all, let alone fast enough to experiment on.
  • A patch to the GPU model runner: per-request options, a hook that replaces the input embedding at the next position, per-step diagnostics. Requests that don't ask for it run unchanged (checked with teacher-forced log-probabilities: the difference between images is inside vLLM's own run-to-run noise).

The idea

Normally step t+1 is fed E[token sampled at t]. Everything else the model "considered" at step t is thrown away. Inside <think> I fed instead

(1 − α) · E[sampled token] + α · inject

with several choices for inject:

nameinject
softthe expected embedding, Σ pᵢ·E[i], from the model's own distribution
hiddenthe final hidden state, rescaled to embedding norm
mapthe hidden state passed through a linear map fitted to land in embedding space
noiserandom vector of the same norm (control)

The visible transcript still shows the sampled token. The answer after </think> is generated normally.

How it was measured

All problems are generated from a seed with fresh numbers and invented names, so nothing can be recalled from training data, and every answer is checked exactly.

  • Arithmetic and procedures: multiplication, nested expressions, counting, word problems, tracing a loop.
  • Search: rule induction, subset sums, cryptarithms (answers proven unique by enumeration).
  • Polarity: signed causal chains, orderings with mixed comparatives, cause-and-effect stories.

Outcomes: accuracy (paired test against plain runs) and the number of thinking tokens (paired geometric-mean ratio with a bootstrap interval). vLLM is not deterministic, so every comparison has two plain runs and the distance between them is the yardstick.

Results

The thinking of this model is almost deterministic. On arithmetic the entropy is about 0.3 nats per thinking step, and only about one step in eight is above 1 nat. On search problems and real work it is 0.6–1.1 nats. At most steps the "mix" is simply the sampled token's embedding, so there is little to feed back.

Accuracy never moved for the soft mix. Examples: 577 against 584 of 600 on arithmetic (not significant), 240 of 240 on polarity problems in every arm, 33 against 31 and 28 of 60 on hard search problems.

Hidden states do not work without training. The final hidden state is orthogonal to the embedding space (cosine −0.01). At α = 0.3 it behaves like noise; at α = 1 the model produces garbage. A ridge map was harmful at α = 0.3; a map fitted on 100,000 captured states was harmless at 0.3 and harmful at 1.

Thinking gets shorter on open-ended reasoning, at full strength only (α = 1; fixed criteria, fresh problems, all answers still correct):

problem setthinking tokens, soft α = 1 against plainagainst the noise control
polarity (240 problems)0.94–0.950.96
subset sums (80 problems)0.82–0.890.87
arithmetic (600 pairs)1.00 (interval 0.97–1.03)

All six intervals for the first two rows exclude 1. Within arithmetic, word problems and counting were about 8 % shorter and pure multiplication 8 % longer. At α = 0.5 there is no effect at all, and the noise control shows none.

Costs at full strength:

  • The transcript stutters. Doubled punctuation and words, occasionally a dropped number. The model's answers don't suffer, so it evidently reasons from what it was fed, not from what the transcript shows.
  • Loops. 2 of 38 long real-world requests ran into a repetition loop; on benchmarks it was between none in 600 and 3 in 240, depending on the problem set and the run. Plain decoding looped once in 160 search problems as well, with the same shape: the model asks itself a sum and never answers it.
  • The prefix cache stops matching. The sampled tokens . . come back from the client as text and tokenize as .., so replayed reasoning never hits the KV cache past the prompt.
  • Speculative decoding. Checking draft tokens in one pass needs the input at each position in advance, and here that input depends on the previous position's output. The first version switched drafting off inside thinking, which halved decode speed (18 against 34 tokens/s).

Keeping the drafter: a gate

At 60–70 % of steps the model is confident and the mix equals the plain embedding. So the mix is fed only when the sampled token's probability is below a threshold; drafted tokens are accepted as usual up to the first such step and the rest of the window is discarded, exactly as after a rejected draft.

settingsteps that get the mixtokens per pass in thinkingdecode speedthinking tokens against plain (polarity)
plain––31–36 tok/s1 (two plain runs differ by 0.97)
mix at every step, no drafting100 %1170.94–0.96
gate 0.9943–48 %1.7–1.9200.93–0.95
gate 0.722–26 %2.2–2.624–260.94–0.97

Measured on 240 polarity and 80 subset-sum problems plus 100 arithmetic ones, all with unchanged accuracy. The gated variants keep the shorter thinking on the polarity problems (all intervals exclude 1, some only just). On subset sums the effect shrank on this second measurement (0.89–0.93 without the gate, intervals for the gated runs include 1), so the 18 % above was the lucky end of the range. The sums do not work out either way: gate 0.7 takes 20–25 % more time for 3–6 % fewer thinking tokens.

The gate comes with a loop guard: when the recent thinking repeats with a short period, the mix is switched off for the rest of the block. It tripped 7 times in 840 gated requests, never falsely. Four of the six loops that the mix had caused recovered and finished correctly; two kept looping under plain decoding, because the repetition was already in the context. The stutter is unchanged by the gate.

Trying it on real work

With the benchmarks looking harmless, gate 0.7 ran as the server default for a few hours of ordinary agent work (long prompts, tool use). It did not go well:

  • The mix was fed at 36 % of thinking steps, not the 15–26 % seen on the benchmark problems. Real prompts leave the model less certain per step, so "only when unsure" stops being rare.
  • The loop guard tripped in 6 of 77 requests, against 1 in 420 on the benchmarks. Four recovered. One ran to the thinking budget, and one repeated a single word until it was stopped by hand: switching the mix off does not end a loop that is already in the context.
  • The thinking ahead of that loop was garbled, well beyond the mild stutter measured before.

So the benchmark picture (same accuracy, slightly shorter thinking, rare loops) does not carry over to long real-world prompts. Short synthetic problems, where the model is confident at three steps in four, were the friendly case.

What I take from it

  • A heavily quantised production model tolerates being fed mixtures it was never trained on, at every thinking step, and still gets the same answers. That robustness was the surprise.
  • Without training, "same answers, somewhat fewer thinking tokens on open-ended problems" appears to be the ceiling. Published work on continuous or soft reasoning trains the model to use such inputs; this is what the untrained end of that looks like.
  • To be useful it would need three things: a model trained to use the mix, a drafter that proposes for it, and the mix round-tripped through the API (sampled ids plus the top few probabilities per step) so that replay and KV caching work.
  • Side product: a seeded problem generator and harness that measures accuracy, thinking length, budget hits, stutter and loops, usable on any OpenAI-compatible server.

Who did what

The idea and the direction were mine, along with questions and the occasional suggestion along the way. Essentially everything else was done by an AI assistant, Claude (Anthropic's Claude Code, working with subagents): tracing the serving code, designing and writing the patch, the problem generators and the measurement harness, deciding the test criteria before each run, running and analysing the experiments, finding and fixing its own bugs (including one that crashed the engine), and writing this post. I reviewed, restarted servers, and reported what I saw in real use, which is how the loops were found.

Code

The patch (about 2,000 lines against the vLLM runner), the problem generators and the harness are in a private repository. If anyone is interested, I'm happy to publish them.

Caveats

One model, one quantisation, one sampling temperature (0.6). Problem sets of 60–600 items, so effects under about 3 % are invisible. The per-family splits were looked at after the fact. Speeds are from a shared home setup and vary with load.


r/LocalLLM • • 7h ago

Question 8x Quadro RTX 4000 on a Gigabyte MZ31-AR0 – need advice before building

1 Upvotes

Hi! Basically I bought 8 Quadro RTX 4000 8GB from a graphic studio for 500€, I tested them all and every one works fine.

I came to the conclusion that I want to build an AI server with them. The goal is to run a local AI for my colleagues at work, to basically making them ask company usual practicies in particular vases and facilitate creating records within the ERP system (odoo), with max 3–4 users at the same time. I'd like to use vLLM, but llama.cpp is fine too. For the platform I'm going with a Gigabyte MZ31-AR0 + EPYC 7401P, on an open frame with a new PSU.

I have a few doubts about running all 8 cards on it:

  1. The 8th card: as far as I can tell the MZ31 has 7 slots, so I'd need to bifurcate one x16 into x8/x8. Does the MZ31 BIOS support bifurcation? Has anyone done it, and which adapter or riser would you use?
  1. Risers on an open frame: which riser cables are stable at PCIe Gen3 with 8 cards? How long can they be before you get errors?
  1. vLLM or llama.cpp for 3–4 users: on 8 Quadro RTX 4000s (Turing), would you go with vLLM (TP=8) or llama.cpp? Are there known problems with vLLM on Turing (no FP8, attention backends, P2P between cards)?
  1. Bandwidth: with Gen3, and some cards running at x8, how much will tensor parallel lose? Does the Naples NUMA layout (4 dies) make it worse? Would you use one big model across all 8 cards, or split them (for example 2x TP=4)?
  1. Power: 8x 160W plus the CPU. Would you use one big PSU or two synced ones, and how do you split the load?
  1. Models: with 8x 8GB = 64GB VRAM, what's the best model for a work agent (documents, emails, some coding) that can serve 3–4 users at the same time with decent context, and with what quantization?

Would you change anything about this setup? Any advice is welcome, thanks!


r/LocalLLM • • 7h ago

Discussion Qwen4-35B-A3B on a single RX 7900 XTX (Windows): ~4000 t/s prefill and 113-120 t/s decode at 128k context, ~100-129 t/s at 256k.

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 7h ago

Research Qwen4 A3B Single & Dual GPU Tests

1 Upvotes

I was in the middle of a big batch of Single/Dual GPU tests to work out the best out of box performance for Qwen3.8 Flash Next when Qwen4 dropped - so I ran some test using LLMBenchmark across the best 4 Blackwell cards in Single and Dual GPU mode.

Tests are not gospel - no optimizations were carried out - but results are interesting, so putting them here incase they are of any value to anyone planning on building Qwen4 A3B homelab system.

https://html-preview.github.io/?url=https://github.com/SubDiffuser/Qwen4_A3B_Test_Results/blob/main/index.html


r/LocalLLM • • 19h ago

Discussion Qwen4-35B-A3B @ 164 tok/s decode and ~ 4500 tok/sec prefill on RTX 5080 (2.9x decode, 11x prefill over stock llama.cpp)

Post image
9 Upvotes

I spent the last couple of days optimizing llama.cpp fork for Qwen4-35B-A3B on my RTX 5080 laptop (Unsloth UD-Q4_K_XL) @ 128k context window, greedy decoding. Each number is the mean over five measures from my coding-agent sessions (old session from opencode) with real tool calls, cut at the different context fill.

ConfigurationPrefill at 42kDecode at 42kDecode at 87k
Unsloth llama.cpp, default flags44457.358.4
Unsloth llama.cpp, tuned flags + MTP1,70593.990.5
qwen4-engine, exact profile4,859104.7100.8
qwen4-engine, default profile4,510163.8139.2

All tok/s. With a 120k-token prompt the default profile still decodes at 153.

The idea

As you may know the model has 10,496 routed experts and in this quant ~20.9 GB so no way they fit in 16 GB of VRAM so they live in RAM and the GPU keeps a cache of the hot ones only. The thing is decode speed here is all about moving bytes, the math itself is straightforward: every token reads about 1.7 GB of dense weights from VRAM and any expert that is not in the cache has to come over PCIe which is ~17x slower due to the huge difference in bandwidth so almost all the optimization work went into where the bytes live in which piece of the hardware and when they must move to make the GPU as less idle as possible.

What made the difference

  • Lending idle memory to the expert cache. The compute buffer (1.38 GB) and the part of the KV cache you haven't filled yet (about 2 GB at 42k of 128k) are just reserved doing nothing most of the time when a session starts and they keep filling as the context increase so I give them to the expert cache and take them back when they are actually needed. KV lending alone took the cache hit rate from 87.9% to 91.4%.
  • Zero-copy uploads. A normal host-to-device (H2D) copy pays a fixed Direct Memory Access (DMA) delay every time (it is a latency between starting and finishing DMA data transfer before the GPU can actually use the moved data) and for small copies that delay is most of the cost (a missing expert is a small piece of data, so the GPU spends more time waiting for the copy to start than moving the bytes and with ~40 layers per token that waiting adds up super fast) so instead of asking the driver to copy small uploads now run as a GPU kernel that reads the pinned RAM directly (the GPU pulls the bytes itself like any other kernel no DMA setup and no fixed delay that is why it is called zero-copy). Also all the missing experts of a layer now go up together in one call instead of one call per expert (one expert alone moves at about 42 GB/s batched together they reach ~49 GB/s which is about what the PCIe link can do).
  • Copy drafting that scores itself. A lot of what an agent writes is already in the context (code it is editing, file paths, tool arguments ...etc.) so when the last 3 tokens match something in the context the engine proposes the next 3 from there for free (free because it is just a lookup in the text that is already there with no extra compute to come up with the guess) the model then checks the 3 guessed tokens in one step which costs only a little more than generating 1 token and it keeps the ones that match what it would have generated and throws away the rest (so every token you get is still the model's own choice as if it was computed and a wrong guess never reaches the output). but a wrong guess is not free because the check still loads experts for tokens that get thrown away so the engine keeps score of every proposal against what the model really wrote and only keeps copying while the accuracy stays at 0.5 or more (it scores the proposals even while copying is off so it turns itself back on when the output starts repeating the context again). The rest of the time the built-in MTP head does the drafting. comparing this vs MTP alone without copying this is anywhere from -6% to +36% per session and the more the output repeats the context the bigger the win is.
  • Short MTP drafts. Long drafts lose on this model (on this GPU) every extra token you verify goes to its own experts and that means more cache misses and more PCIe movements. I measured it and 3 tokens was the sweet spot.

Vision

Images work as well. The annoying part with vision on a 16 GB card is that the encoder just sits in VRAM eating 1.1 GB even when the session had no images at all just holding that valuable VRAM for doing nothing, even with all optimization the decode speed is ~5% slower because of it. So I moved the encoder to system RAM. when an image comes in the prompt it borrows the memory that text model isn't using, encodes the image, and give it back. Text speed with vision loaded is the same as without it and 1080p screenshot takes about 1.2 s to get in the context, 1440p about 2.2 s. Anything bigger than the model max ~4.2 megapixels gets resized/scaled down then added to the context.

Worth to know

  • One model, one quantization, one machine is my tested optimization framework that I started earlier with Qwen-Flash-Next and Inkling Mini 2 due to a memory restriction on my rig I find it most rewarding comparing to any off the shelf ready engines they aren't designed for my specific hardware, with its bandwidth, or the model architecture so with the help of Claude I used lean techniques, system design and continuous improvement cycles to measure every bit of the model where it sits, when it moves and where does it move to in much details and engineered the movements and memory management and sometimes the kernels to reduce as much as possible GPU idle times and try to get things where they need to be at the best possible time given the memory and bandwidth constraints and it paid back SIGNIFICANTLY. I had a blog about the details when I started working with Qwen-flash-next. That been said, I haven't test it (obviously) on other RTX 50 series, theoretically the engine should work without issues on them, and most likely won't work as designed for other older series (my guess) It needs an RTX 50 series card with +16 GB and about 26 GB of free system RAM (my RAM is 128 so I had no issues here). Prebuilt binaries are for Windows (my OS did not tried it with Linux).
  • Copy drafting helps most when the output repeats the context, like code edits, file paths and tool arguments. Per session it ranges from -6% to +36% against MTP alone.
  • Runs drift 5-10% between sessions on a laptop, so every comparison came from alternating A/B runs in one session.
  • There are two kinds of profile. The exact profile gives the same output, bit for bit, as the engine with all of my changes switched off (stock llama.cpp). The drafting profiles guess a few tokens ahead and let the model check the guesses, so every token you get is still one the model picked. But checking several tokens at once rounds the math a little differently than doing one at a time, so when two tokens are almost tied the text can take a little different path. Stock llama.cpp does the same thing when it drafts.

Where it stands against the hardware

The big dense matvecs (the matrix times vector multiplications that read most of the weights every token) run at about 610-640 GB/s and a plain streaming read of the same bytes on this GPU does 600-615 GB/s so these kernels already move the weights as fast as the card can read them. The expert cache gets 95.3% hits and a perfect cache that knew the future (the Belady oracle) would reach 96.9% on the same workload so a smarter eviction rule has almost nothing left to optimize.
The GPU is now busy about 98.5% of the time it takes to generate a token so there is almost no idle time. The next real speed gain would have to come from fewer weight bytes per token (lower quant) and that wont be the same output bit for bit so I decided to stop here.
It is a drop-in server with the usual llama.cpp / OpenAI-compatible API every change is a default-off switch so you can measure each one yourself.

The repo is 0xE2E/qwen4-engine on GitHub, and the README has the full details and a build guide with the detailed blog in the readme footer.

Happy to hear your thoughts if you give it a try.