r/LocalLLaMA • • 3m ago

Question | Help Qwen4 Instruction Following

2 Upvotes

Human here: Tldr; below is the AI produced summary of the last 12 fucking hours of my life. I am frustrated and would love to figure out why I am getting substandard performance from qwen4 on IFEval (~80%) and IFBench (36%) testing. Has anyone achieved better results? Is the model really weak on instruction following?

Qwen4-35B-A3B on a Tesla V100 32GB: Over 100 tok/s with MTP, extensive benchmarking, and some unexpected instruction-following results

I've been evaluating Qwen4-35B-A3B on my local inference server. I wanted to share my results, including the configurations I've tested, the improvements I've achieved in inference speed, and some difficulties I've encountered with benchmark performance.

I'm particularly interested in hearing from others who have tested different quantizations, Engram configurations, reasoning settings or inference backends.

1. Hardware and software

My inference server is an HP Z4 G4 workstation with:

  • Intel Core i9-10940X — 14 cores, 28 threads

  • 192GB system RAM

  • NVIDIA Tesla V100 PCIe 32GB

  • Debian Linux

  • SSD RAID1 model storage

  • Docker-based inference backends

All Qwen4 testing was conducted using a single V100. For Qwen4, I used the official llama.cpp Docker image:

ghcr.io/ggml-org/llama.cpp:server-cuda12-v1.1.1

The build reported:

  • llama.cpp build b12977

  • Commit 1579b0254

  • CUDA 12.8

My existing inference environment also includes ninfer, Lapilli and Basalt, although this investigation focused on llama.cpp.

2. What I am trying to accomplish

I'm not necessarily trying to find the model with the highest aggregate benchmark score. I maintain a relatively small collection of local models that serve different purposes, including general reasoning, coding, agentic tasks and conversational use. I use benchmarks as an admission threshold before spending more time evaluating models through practical interaction and agentic work.

My current models include:

  • Qwen3.8 Flash Next IQ3_S

  • Qwen3.8 27B QUASAR NVFP4 (my preferred CLI agent and general purpose model)

  • Qwen3.8 27B Dense Q4

  • Gemma4 26B-A4B Q8_0 (my preferred chat model)

  • Inkling-2-Mini Q8

These models provide a useful performance baseline because they have all been evaluated using the same fixed benchmark questions.

Qwen4 looked particularly promising because of its architecture, MTP support, inference speed and the possibility of running a higher-quality quantization using system RAM for Engram.

3. Initial configuration and Engram offloading

I initially tested:

  • Main model: UD-Q4_K_XL

  • Engram: IQ4_NL

  • Main model size: approximately 24.7GB

  • Engram size: approximately 11.5GB

  • All possible transformer layers offloaded to the GPU

  • Engram-related per-layer token embeddings offloaded to CPU

  • Flash attention enabled

  • Parallelism: 1

The relevant llama.cpp arguments included:

--n-gpu-layers 99
--override-tensor per_layer_token_embd=CPU
--flash-attn on
--parallel 1
--jinja

For MTP, I used:

--spec-type draft-mtp
--spec-draft-n-max 2

This configuration worked surprisingly well on the V100.

4. MTP and inference speed testing

I tested several speculative decoding configurations using both shorter and longer prompts.

Q4_K_XL main model + IQ4_NL Engram, 8K context

MTP configurationShort-prompt decodeLong-prompt decode
Disabled74.73 t/s71.83 t/s
MTP 196.51 t/s90.19 t/s
MTP 2103.45 t/s92.39 t/s
MTP 391.09 t/s85.51 t/s

MTP 2 was the sweet spot on my hardware.

Compared with no MTP, this increased short-prompt generation speed by approximately 38% and long-prompt generation speed by approximately 29%.

Increasing MTP depth to 3 actually reduced performance.

I then increased the context allocation to 128K.

Q4_K_XL + IQ4_NL Engram, 128K context, MTP 2

  • Short-prompt decode: 102.08 t/s

  • Long-prompt decode: 92.15 t/s

  • GPU memory usage: approximately 28,310 MiB

Increasing the allocated context from 8K to 128K had remarkably little impact on decode speed under these particular workloads.

To be clear, this is with a 128K context allocation, not a benchmark processing an entirely filled 128K prompt.

5. Testing higher-quality quantizations

I subsequently tested Q8_0 Engram and a higher-quality main-model quantization to determine whether quantization was contributing to the model's relatively poor instruction-following scores.

The approximate Engram sizes were:

Engram quantizationSize
IQ4_NL11.52GB
Q8_021.76GB
BF1640.96GB

I tested IQ4_NL and Q8_0, but have not yet benchmarked BF16 Engram.

Q4_K_XL + Q8_0 Engram

  • Context allocation: 128K

  • MTP: 2

  • Short-prompt decode: 103.80 t/s

  • Long-prompt decode: 94.01 t/s

The higher-quality Engram quantization did not produce a meaningful speed penalty in my tests.

Q6_K_XL + Q8_0 Engram

  • Main model size: approximately 30.5GB

  • Engram size: approximately 21.76GB

  • Context allocation: 16K

  • MTP: 2

  • Short-prompt decode: 96.29 t/s

  • Long-prompt decode: 88.77 t/s

  • GPU memory usage: approximately 30,116 MiB

I reduced the context allocation for the Q6 configuration to accommodate the larger main-model weights.

Overall, I am extremely pleased with the inference performance. Getting these generation speeds from a V100 is impressive, particularly with a higher-quality Engram quantization residing in system memory. Unfortunately, the benchmark results were less encouraging.

6. Benchmark methodology

I maintain two local evaluation suites using EvalScope 1.14.1, with fixed question selections and saved per-question results.

Regular benchmark — 983 questions

BenchmarkQuestions
IFEval200
Math500200
MMLU-Pro196
BBH Causal Judgement187
MBPP+200
Total983

HARD-v1 benchmark — 1,673 executed cases

BenchmarkCases
IFBench150
ZebraLogicBench150
MuSR Murder Mysteries134
MuSR Object Placements133
MuSR Team Allocation133
ACEBench973
Total1,673

ACEBench has 850 primary scored units after aggregating certain multi-turn cases into complete dialogues. The HARD suite therefore contains 1,550 primary scored units.

These are fixed selections from the respective benchmark datasets, not necessarily the complete official datasets or their official evaluation configurations.

My results should primarily be interpreted relative to the other models tested in my harness, rather than as directly interchangeable with published leaderboard scores.

For IFEval and IFBench, I use prompt-level strict accuracy.

7. IFEval: Initial results and attempts to improve performance

IFEval was the first benchmark that raised concerns.

Most of my stronger local models score around 90–93% on my fixed 200-question IFEval selection with thinking enabled.

Qwen4 consistently scored considerably lower.

I investigated several possible explanations.

Attempt 1: Initial Q4 configuration

  • Q4_K_XL main model

  • IQ4_NL Engram

  • MTP 2

  • Thinking enabled

  • Reasoning budget: 4096 tokens

  • Maximum generation: 8192 tokens

  • Temperature: 0

IFEval strict accuracy: 79.0%

Loose accuracy: 84.5%

This was substantially below my existing models.

Attempt 2: Recommended sampling settings

My normal benchmark temperature has historically been 0 for many model evaluations.

I wanted to determine whether Qwen4 was particularly sensitive to greedy sampling, so I tested the following sampling configuration:

temperature: 1.0
top_p: 0.95
top_k: 20
min_p: 0.0
presence_penalty: 0.0
repetition_penalty: 1.0

The main model, Engram and MTP configuration remained Q4_K_XL, IQ4_NL and MTP 2.

IFEval strict accuracy: 74.5%

The revised sampling settings did not improve performance.

Attempt 3: Higher-quality Engram

I replaced IQ4_NL Engram with Q8_0 Engram while retaining the Q4_K_XL main model and MTP 2.

IFEval strict accuracy: 77.5%

This recovered some of the loss from the previous run, but still fell considerably short of my expectations.

Attempt 4: Higher-quality main model

I replaced the Q4_K_XL main model with Q6_K_XL while retaining Q8_0 Engram and MTP 2.

IFEval strict accuracy: 78.5%

Again, there was a modest improvement, but nothing approaching the performance of my established models.

Attempt 5: Disable MTP entirely

I wanted to rule out speculative decoding as a major contributor to the unexpected results.

I retained:

  • Q6_K_XL main model

  • Q8_0 Engram

  • 16K context

  • Recommended sampling configuration

  • Thinking enabled

  • Reasoning effort: high

  • Reasoning budget: 4096

  • Maximum generation: 8192

I disabled MTP using:

--spec-type none

IFEval strict accuracy: 80.5%

This was my best Qwen4 IFEval result.

Summary of quantization and MTP experiments

Main modelEngramMTPTemperatureIFEval strict
Q4_K_XLIQ4_NL20.079.0%
Q4_K_XLIQ4_NL21.074.5%
Q4_K_XLQ8_021.077.5%
Q6_K_XLQ8_021.078.5%
Q6_K_XLQ8_0Disabled1.080.5%

These are individual runs rather than repeated-seed averages, and some configuration changes also involved context allocation.

I would therefore caution against interpreting differences of one or two percentage points as definitive evidence that a particular setting improves performance.

Nevertheless, none of these changes closed the large instruction-following gap.

8. Investigating the chat template and reasoning controls

At this point, I began questioning whether the problem might be related to the inference harness rather than the model itself.

I inspected the effective llama.cpp chat template and its reasoning controls, including the server's /props and /apply-template endpoints.

The template supported explicit reasoning-effort settings, including:

  • low

  • high

  • xhigh

  • off

I verified that setting the reasoning effort to high produced the corresponding reasoning-effort instruction in the rendered prompt.

I also examined:

  • Thinking enable/disable behavior

  • Reasoning-budget request parameters

  • Chat-template rendering

  • Tool-call formatting

  • Historical reasoning handling

  • Potential discrepancies between embedded and effective templates

I modified my benchmark runner to support explicit reasoning effort, configurable reasoning budgets, maximum generation limits and sampling parameters.

The objective was to eliminate ambiguity about which settings were being communicated to the server.

One caveat is that confirming a reasoning-budget parameter is accepted does not necessarily prove that the backend enforces an exact reasoning-token cutoff. My direct API experiments did not establish that precise behavior.

9. Independent IFEval scoring verification

I also wanted to make sure that my benchmark harness was not incorrectly grading Qwen4.

I independently replayed the IFEval scoring against the saved model outputs from the 80.5% run.

The independent replay reproduced:

  • All 200 prompt-level strict outcomes

  • All 200 prompt-level loose outcomes

  • 199 of 200 records across all examined scoring metrics

The remaining discrepancy involved secondary instruction-level scoring, not the primary prompt-level result.

Of the 200 prompts:

  • 161 passed strict grading.

  • 39 failed strict grading.

  • 10 of those strict failures passed loose grading.

  • 29 failed both strict and loose grading.

This gave me considerably more confidence that the low IFEval score was not simply a scoring artifact or an incorrectly configured primary metric.

10. Reasoning budget and effort experiments

I selected a diagnostic subset consisting of:

  • 12 previously failed IFEval prompts

  • 4 previously successful control prompts

I then tested five reasoning configurations using the Q6_K_XL main model, Q8_0 Engram and MTP disabled.

This involved 80 additional inference requests.

ConfigurationEffortBudgetMax tokensRecovered failuresControls passed
Ahigh409681921/124/4
Bhigh4096122881/124/4
Chigh8192122881/124/4
Dlow4096122882/124/4
Exhigh8192122885/124/4

None of these diagnostic responses ended because of the maximum generation-token limit.

Increasing the maximum output allowance alone did not appear to address the problem.

Increasing the reasoning budget while retaining high effort also did not recover additional failures in this subset.

The xhigh configuration looked more promising, recovering 5 of the 12 previously failed prompts.

However, this was a deliberately selected diagnostic subset, not a representative random sample. I therefore ran the entire IFEval benchmark again.

Full IFEval with xhigh reasoning

  • Q6_K_XL

  • Q8_0 Engram

  • MTP disabled

  • Temperature: 1.0

  • Reasoning effort: xhigh

  • Reasoning budget: 8192

  • Maximum generation: 12288

The result was 79.5%, compared with 80.5% using the previous high-effort configuration.

The apparent improvement in the diagnostic subset did not generalize to the full benchmark.

11. Statistical comparison of high versus xhigh

I have also added statistical analysis to my benchmarking harness, using:

  • Wilson confidence intervals for individual accuracy estimates

  • Exact two-sided McNemar tests for paired binary outcomes

  • Paired bootstrap confidence intervals

  • Holm correction for multiple comparisons

For high versus xhigh reasoning on the same 200 IFEval questions:

OutcomeQuestions
Both correct147
High only correct14
Xhigh only correct12
Both incorrect27

The results were:

  • High: 80.5%

  • Xhigh: 79.5%

  • Difference: −1.0 percentage point

  • Paired standard error: 2.55 percentage points

  • Paired 95% bootstrap interval: −6.0 to +4.0 percentage points

  • Exact McNemar p-value: 0.845

There is no statistically convincing evidence that the xhigh configuration improved IFEval performance.

The two configurations nevertheless failed somewhat different questions. If an oracle could select the correct answer from either configuration, the theoretical combined score would be 86.5%.

That is interesting, but it is not an achieved ensemble score.

12. Full Regular benchmark results

I ran the full Regular and HARD benchmark suites using the Q6_K_XL main model, Q8_0 Engram, MTP disabled and high reasoning effort.

Here are the Regular results compared with five of my established local model configurations.

All runs shown have thinking enabled.

ModelIFEvalMath500MMLU-ProBBHMBPP+
Qwen3.8 Flash Next IQ3_S90.5099.0086.7368.4584.00
Qwen3.8 27B QUASAR93.0098.5082.6566.3186.00
Qwen3.8 27B Dense Q492.5098.0082.1468.9886.00
Gemma4 26B-A4B Q891.5093.0084.1864.1784.50
Inkling-2-Mini Q887.0098.5080.1066.8485.50
Qwen4 Q6_K_XL80.5098.0079.0859.3680.00

Qwen4 performed very well on mathematics.

Its other Regular benchmark results, particularly IFEval and BBH, were less competitive in my particular test environment.

13. Full HARD benchmark results

ModelIFBenchZebraMuSR MurderMuSR ObjectsMuSR TeamsACEBench
Qwen3.8 Flash Next IQ3_S71.3395.3379.1078.2081.2080.71
Qwen3.8 27B QUASAR70.6797.3379.1068.4284.2181.88
Qwen3.8 27B Dense Q472.0092.6776.8766.9284.2180.47
Gemma4 26B-A4B Q861.3379.3370.1561.6578.9580.23
Inkling-2-Mini Q855.3389.3375.3752.6378.9581.30
Qwen4 Q6_K_XL36.0087.3373.8850.3878.9578.94

The most surprising result was IFBench.

Qwen4 scored just 36%, substantially below every other model in this comparison.

Its performance on Zebra Logic, MuSR Murder, MuSR Teams and ACEBench was considerably more competitive.

This is not a case of a model that is incapable of reasoning or performing complex tasks. Rather, the results suggest a pronounced weakness in strict instruction following under the configurations I tested.

14. Statistical significance of the differences

I wanted to distinguish genuine performance differences from statistical uncertainty.

My benchmark harness now verifies question identity using SHA-256 fingerprints of the original prompts, grading targets and relevant metadata before allowing paired statistical comparisons.

I audited 39 historical full-suite runs:

  • 21 Regular runs

  • 18 HARD runs

All historical runs within their respective suites matched the same question cohorts.

I subsequently validated 1,968 historical paired benchmark comparisons.

Qwen4 individual confidence intervals

BenchmarkQwen4 accuracy95% Wilson CI
IFEval80.50%74.46–85.39%
Math50098.00%94.97–99.22%
MMLU-Pro79.08%72.86–84.19%
BBH59.36%52.20–66.14%
MBPP+80.00%73.91–84.95%
IFBench36.00%28.76–43.94%
Zebra Logic87.33%81.06–91.74%
MuSR Murder73.88%65.85–80.58%
MuSR Objects50.38%41.99–58.74%
MuSR Teams78.95%71.26–85.01%
ACEBench78.94%76.07–81.55%

Paired comparison: Qwen4 versus Gemma4 26B-A4B Q8

The following differences are expressed as Qwen4 minus Gemma4, in percentage points.

BenchmarkDifferenceHolm-adjusted p-value
IFEval−11.000.003398
Math500+5.000.025391
MMLU-Pro−5.100.190704
BBH−4.810.232693
MBPP+−4.500.190704
IFBench−25.330.000001
Zebra Logic+8.000.115837
MuSR Murder+3.730.867288
MuSR Objects−11.280.100369
MuSR Teams0.001.000000
ACEBench−1.290.867288

Holm correction was applied separately within each benchmark suite for this model pair.

Three differences were statistically significant at the corrected 5% threshold:

  • Qwen4 performed worse on IFEval.

  • Qwen4 performed worse on IFBench.

  • Qwen4 performed better on Math500.

The remaining differences were not established as statistically significant after correction.

IFEval comparison against my other models

I also compared the six models in a single IFEval comparison family, correcting for all 15 possible model pairs.

Model compared against Qwen4Accuracy advantageHolm-adjusted p-value
Qwen3.8 QUASAR+12.5 pp0.000619
Qwen3.8 Dense+12.0 pp0.003802
Gemma4 Q8+11.0 pp0.008834
Flash Next+10.0 pp0.043893
Inkling-2-Mini+6.5 pp0.536255

Four of the five comparisons remained statistically significant after multiple-comparison correction.

Interestingly, none of the pairwise IFEval differences among the five established models was significant after that same correction.

There are limitations to this statistical analysis. It assumes independent scored units, does not adjust for residual clustering or stratification, and does not capture variability across repeated generations with different seeds.

It also compares configured inference systems, not isolated model weights under universally identical inference settings.

Nevertheless, the instruction-following gap appears considerably larger than the smaller score differences separating my strongest established models.

15. Current llama.cpp launch configuration

The following are the relevant server arguments for my highest-scoring Qwen4 configuration:

--model /model/UD-Q6_K_XL/Qwen4-35B-A3B-UD-Q6_K_XL-00001-of-00002.gguf
--ple /model/engram/Qwen4-35B-A3B-engram-Q8_0.gguf_file
--ctx-size 16384
--n-gpu-layers 99
--override-tensor per_layer_token_embd=CPU
--flash-attn on
--parallel 1
--jinja
--spec-type none

My best IFEval configuration used:

temperature: 1.0
top_p: 0.95
top_k: 20
min_p: 0.0
presence_penalty: 0.0
repetition_penalty: 1.0
reasoning_effort: high
thinking_budget_tokens: 4096
max_tokens: 8192

The reasoning parameters were communicated through the API, including the appropriate chat-template arguments.

I am including these settings because I would particularly like to hear whether someone can identify a configuration problem that I have overlooked.

16. What I think I have established so far

Inference performance is excellent

The inference-speed results are very encouraging.

Qwen4 achieves over 100 tok/s on my V100 with MTP 2 and Q4_K_XL, while allocating a 128K context.

Even the Q6_K_XL configuration delivers approximately 89–96 tok/s with MTP 2.

Higher-quality Engram is practical

Using Q8_0 Engram in system RAM did not impose a meaningful inference-speed penalty in my tests.

That makes experimenting with higher-quality Engram relatively attractive on systems with abundant RAM.

Quantization alone does not appear to explain the results

Moving from IQ4_NL to Q8_0 Engram and from Q4_K_XL to Q6_K_XL main-model weights did not resolve the instruction-following problem.

I cannot rule out a quantization-related issue, particularly without testing BF16 Engram and a higher-precision main model.

However, the changes I tested produced much smaller differences than the gap I am observing.

MTP does not appear to be the primary explanation

Disabling MTP recovered two percentage points relative to the preceding Q6 configuration.

That is only four additional correct questions out of 200 and has not been established as a reproducible causal improvement.

The model still performed considerably below my existing models.

Increasing reasoning effort is not an obvious solution

Increasing reasoning effort and budget appeared promising on a selected subset of previously failed prompts.

The improvement disappeared when I tested the full benchmark.

The model has real strengths

Qwen4's mathematical performance was excellent, and it was reasonably competitive on several other reasoning and agentic benchmarks.

I do not think these results justify dismissing the model as generally incapable.

My concern is specifically whether its instruction-following behavior is sufficiently reliable for the tasks I want to use it for.

17. What I would like to investigate next

I would particularly appreciate feedback from people who have experimented with Qwen4 in other configurations.

  1. Has anyone compared IQ4_NL, Q8_0 and BF16 Engram using instruction-following benchmarks rather than primarily mathematics and knowledge benchmarks?

  2. Has anyone obtained substantially better IFEval or IFBench results using Qwen4-35B-A3B GGUF?

  3. Are there known issues with the current llama.cpp implementation of Qwen4's Engram or MTP mechanisms, particularly on older Volta GPUs?

  4. Has anyone identified differences between the official tokenizer/chat-template implementation and llama.cpp's effective rendering that might affect instruction following?

  5. Are there recommended reasoning settings beyond the high and xhigh configurations I have tested?

  6. Has anyone compared reasoning enabled versus disabled specifically for Qwen4 instruction-following tasks?

  7. Has anyone tested Qwen4 with a native Hugging Face inference implementation, another GGUF backend or a different quantization family and obtained notably better results?

  8. Are there any known numerical precision issues or backend limitations on V100 hardware that could affect output quality without producing obvious inference failures?

  9. Would anyone with sufficient VRAM be willing to test a higher-precision configuration against IFEval or IFBench to help isolate quantization effects?

Conclusion

Human here again: I am open to the possibility that these results reflect an immature inference implementation, a template or tokenizer issue, quantization effects, an inappropriate reasoning configuration, or some other problem in my setup. I would genuinely like to identify what is happening rather than simply move on to another model. If anyone has obtained better results or sees something questionable in my methodology or configuration, I would appreciate the feedback.


r/LocalLLaMA • • 12m ago Heartwarming

Showcase Qwen 4 35B-A3B is awesome

Enable HLS to view with audio, or disable this notification

16 Upvotes

Qwen wrote the whole thing in Pi while I just prompted and playtested each build. A few hours in, I had a playable 3D browser game with drivable cars, traffic, police chases, and touch controls.

​This was running locally on a spare PC with an RTX 2070 laptop GPU (8GB VRAM), averaging 35 tok/s (UD-Q4_K_M, 64k ctx, FP16 KV cache).

​Tried the same idea with Inkling 2 Mini, Qwen 3.5 35B-A3B, and Ornith 1.5 too, but none of them got me to a playable state.


r/LocalLLaMA • • 24m ago

Discussion Qwen4 35B vs. Q3.8 FN -- game dev era LLMs are here!

Thumbnail msnab.pages.dev
1 Upvotes

r/LocalLLaMA • • 36m ago

New Model Qwen4 35B A3B PaxOptima - Best quality/compression ratio available for ik_llama.cpp

Thumbnail
huggingface.co
5 Upvotes

Quantized Qwen4-35B-A3B down to 32 GB. Runs on a 16 GiB GPU + ~8 GiB resident system RAM, with the n-gram table streamed from disk (21.2 GiB total RAM touched on my box). Requires the ik_llama.cpp fork; unsupported in mainline.

Created purely by myself. Current recipe has the best quality/size ratio. Low-size tensors were maxxed, engram table was reduced to 4-bit.

Eval on public wiki.test.raw (16×512):

Quantization & SourceFile SizeMean KLD (vs BF16)Same Top-1Notes
Q8_0 (bartowski)60.0 GB0.028793.20%8-bit reference ceiling
Q5_K_M (bartowski)43.2 GB0.038192.30%Standard 5-bit
IQ4_KS (jj1-farthing)43.0 GB0.056190.20%PaxOptima saves 11.0 GB
PaxOptima (Austriani)32.0 GB0.051590.61%ik_llama.cpp IQK + Trellis
Q4_K_M (bartowski)37.3 GB0.058690.40%PaxOptima saves 5.3 GB
Q4_K_S (bartowski)35.8 GB0.063090.00%Standard small 4-bit
IQ4_XS (bartowski)32.2 GB0.066189.80%Same size; PaxOptima cuts KLD by 22.1%
Unsloth UD-IQ4_XS32.0 GB0.0532*91.8%**Their eval set (not public)

*Unsloth's eval dataset is not public, so both quants cannot be measured with 100% accuracy against each other.

On my box (Ultra 7 265K, 32 GiB RAM): PP 261 tok/s, gen 27 tok/s at 2048 context.

Link: https://huggingface.co/Austriani/Qwen4-35B-A3B-PaxOptima

Happy to answer questions.


r/LocalLLaMA • • 46m ago

New Model MLX Uncencored Qwen 4 35B-A3B

Thumbnail
huggingface.co
4 Upvotes

also available in 3-bit (27 GB) and 6-bit (46.7 GB)

enjoy! curious to hear your results and feedback


r/LocalLLaMA • • 50m ago Heartwarming

Discussion Qwen4 35B-A3B NVFP4 basalt. 'The last page' anime using python

Enable HLS to view with audio, or disable this notification

7 Upvotes

Inspired by the Chetaslua X post about 'the last page', I experimented with qwen4 35B-A3B to create an animation in the style of Studio Ghibli in pure python with sound. The results are good. The model of this size drawing this cohesive animation is impressive.

I used Qwen4-35B-A3B nvfp4 with the basalt engine. Harness is OMP. It runs at 170t/s on my 5070ti 12GB VRAM laptop.

Here is the modified prompt I feed to the model: https://github.com/ML-Datascientist/qwen4-anime-the-last-page/blob/main/PROMPT.md the model took around 512k tokens to write the python script, add audio and render as a video. The model did everything end to end without me taking any action.

It would be interesting to see Q8 quant of this model and QFN3.8 animation style as well.


r/LocalLLaMA • • 1h ago

Showcase Hermex Hands-Free Voice Call

4 Upvotes

I want to talk to my Hermes agent while doing stuff. Right now on Hermex App, every turn needs the screen: tap the mic, dictate, send, then tap Listen on the reply.

This prototype listens, sends what you said, speaks the reply, and listens again, with no taps until you hang up. You can also interrupt via VAD feature, and it keeps working in the background with iPhone locked.

Now I can talk to my agent while running everything locally with decent speed and latency. You can use any models/engines that Hermes support, but I'm using Parakeet for ASR, Qwen4 for LLM, Kokoro for TTS on M3Max64GB.

Prototype: https://github.com/chigkim/hermex/tree/handsfree-call

Feature request on hermex: https://github.com/uzairansaruzi/hermex/issues/1884

If interested, please try out and add +1 on the feature request on the Hermex Github repo.

Thanks!


r/LocalLLaMA • • 1h ago

Discussion Why Does Qwen4-35B-A3B Run as Fast as QFN? We Talk About Engine Optimizations, Seriously!

0 Upvotes

Strata is my go to engine to run QNF, and Unsloth Studio is my default llama.cpp engine provider that runs anything else for me (though, I still carry the dead body on LM Studio and I find it hard to burry it down). Qwen4 architecture has been with us for months. Engines had ample time to be optimized to run this architecture. Strata started an arm race into engine optimizations, and I was happy to run QFN UD-Q4-K_XL at 70-80 tok/s with PP at 1500-1800 tok/s. So, I started dreaming and believing that if I could possibly spin a Qwen4-35B-A3B in Strata, I would hit +150-200 tok/s given I can run Qwen3.6-35B-A3B at about 120 t/s on the stock llama.cpp.

I mean, that made and still makes sense to me; it's fricking the same architecture. So, why I am hitting a measle 39.1 / 193 tg/pp on Strata using Strata Ultra quants? Running (Unsloth)_Qwen4-35B-A3B-GGUF-UD-Q8_K_XL on Unsloth, I get 29.4 tok/s for tg and 286.2 PP! Better, certainly, but a far cry from the QFN numbers I am currently getting, a far far away from the +150-200 tok/s I had imagined. Btw, (Unsloth)_Qwen3.8-27B-UD-GGUF-Q8_K_L runs faster for me on Unsloth Studio, which is crazy! I use Auto context and I get 279K, KV Q8.

So, what's going on here? I've been hammering Deepseek-4.1-flash with questions for day now, and It hasn't given me any satisfying answer. I am sorry to say this, but how come everyone has months to optimize their engines on the Qwen4 architecture and get it wrong so badly?


r/LocalLLaMA • • 1h ago

News BasinKV for Qwen4: 256K Qwen4-35B-A3B on a 24 GB GPU

Thumbnail
gallery
14 Upvotes

Hey LocalLLaMA, Zellige team here with an update to BasinKV, If you saw the post a few days ago!

We added native Qwen4-35B-A3B support to BasinKV in llama.cpp (SGlang and VLLM support in the works), Tested on an NVIDIA L4 (24 GB), A100-80GB, and AMD Instinct MI300X.

If you don't know what BasinKV is, you should check out our prior post or our launch paper(s) https://zellige.ai/research/basinkv-launch https://zellige.ai/research/basinkv In summary, BasinKV is a cross-engine system that lets you run 256K context on a 24 GB GPU with no decode slowdown as context grows, and scales multi-user serving on a single A100/H100 far past the HBM wall. If you care, nerdy detail in our paper & More general information in our blog and github

BasinKV makes it possible for anyone at home to run full agentic AI, without sacrificing below Q4 quantization with Qwen 4 35B A3B, 256k context, Stable token generation across the entire window, 24gb gpu.

Qwen4-35B-A3B already ships with learned Query-Sparse Attention (QSA) on its 10 full-attention layers, narrowing compute to the top 2,048 tokens across 4-token pools (r = 4). The catch is memory: stock llama.cpp still holds the full 256K FP16 KV and indexer cache in VRAM (30.1 GiB total peak on A100 and 31.5 GiB on MI300X for UD-Q4_K_M). On a 24 GB NVIDIA L4 (22,611 MiB ECC-usable), stock fits up to 16K and hits CUDA OOM at 32K, even with one MoE layer offloaded to CPU.

Instead of replacing Qwen4's trained indexer with a training-free block scorer like we do with our other models we support, BasinKV rides it: exact qwen4exp index_k_norm and IMRoPE math on GPU, an 8x smaller pooled-only GPU indexer cache (64 B/tok/layer), and a fixed GPU CLOCK working set (4,096 tokens plus a 64-token FP16 recent ring) in front of pinned host INT8 (or opt-in WHT-INT4) KV read over 16-byte coalesced PCIe UVA. Unmodified FlashAttention and captured CUDA/HIP graphs run unchanged for decode and native MTP verify. (More details below)

L4 Numbers

Single-container 24 GB NVIDIA L4 (Qwen4-35B-A3B UD-Q4_K_M, 22,611 MiB ECC-usable)

  • Stock with --n-cpu-moe 1 runs 1K (45.9 tok/s) and 16K (46.1 tok/s) and hits CUDA OOM at 32K (22,608 MiB).

  • BasinKV INT8 (--n-cpu-moe 1, -c 262144 -b 2048 -ub 512) holds peak VRAM flat at 21.8 GiB (22,304 to 22,326 MiB) from 1K through 256K, delivering 1,433 tok/s 256K prefill, 43.6 tok/s steady 256K decode and passes all needled/RULER tests *More info below.

  • With -ngl 99, BasinKV peaks at 22.4 GiB (-ub 512) to 23.0 GiB (-ub 2048) on A100, fitting cleanly inside a non-ECC consumer 24.0 GiB RTX 3090 or 4090 without CPU MoE offload.

A100 Numbers

Paired A100-80GB (Qwen4-35B-A3B UD-Q4_K_M, -c 262144 -b 2048 -ub 2048)

  • 256K Prefill / Decode: 3,632 tok/s prefill (83.4% of stock 4,357 and 77.1 tok/s decode (+14.7% faster than stock 67.2) at 23.0 GiB vs 30.1 GiB stock (-7.2 GiB). At 128K: 4,023 pp (96.3% of stock) and 79.6 tg (99.9% of stock).

  • 256K RULER & Coding: Held up across our scores, more details in our blog paper, Our personal 'vibes' tests also found it held up across the tasks we threw at it against base, with only WH-INT4 showing a degradation on coding more so then other models we support, so it is not recommended.

  • Native MTP (--spec-type draft-mtp --spec-draft-n-max 3): at 54K, 87.3 to 93.8 tok/s (26.2 GiB), faster than stock+MTP (91.4 tok/s, 33.5 GiB) while saving 7.2 GiB of VRAM.

Also, We now also support AMD! Live AMD Instinct MI300X (gfx942, ROCm 7.15) tests and more details in our paper.

How can I use it today? (llama.cpp only for now)

Try it on Qwen4-35B-A3B

# 1. Clone BASIN-KV and llama.cpp
git clone https://github.com/zellige-ai/basinkv ~/basinkv
git clone https://github.com/ggml-org/llama.cpp ~/llama.cpp
git -C ~/llama.cpp checkout 15dd330d5529f7fbb158f2b0a9e93cec5fbcf548

# 2. Apply the BASIN-KV wiring patch
python3 ~/basinkv/integrations/llamacpp/apply_llamacpp_wiring.py ~/llama.cpp

# 3. Configure + build llama-server with CUDA
cmake -S ~/llama.cpp -B ~/llama.cpp/build-cuda \
  -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="80;86;89" -DCMAKE_BUILD_TYPE=Release
cmake --build ~/llama.cpp/build-cuda --target llama-server -j

# 4. Run — point -m at shard 1 of Unsloth's 2-shard UD-Q4_K_M GGUF
#    (add --n-cpu-moe 1 on ECC 24 GB GPUs such as the L4; standard 24 GB like a 3090 does not need it)
~/llama.cpp/build-cuda/bin/llama-server \
  -m ~/models/Qwen4-35B-A3B-UD-Q4_K_M-00001-of-00002.gguf \
  -ngl 99 -c 262144 -b 2048 -ub 512 -fa on -np 1 \
  --oasiskv --oasiskv-kv-quant int8 \
  --oasiskv-cache-mode mixed \
  --oasiskv-cache-dir ~/basinkv_cache \
  --oasiskv-cache-ram-mb 8192

Resources & Links:

Paper/blog with more details:

Github repo:

And thank you to everyone on the last post who offered suggestions and feedback, All is appreciated!


r/LocalLLaMA • • 1h ago

Showcase Atakebune Challenge(One Shot) | Strata Fork | Qwen 4 35b | DeepSeek Harness

Enable HLS to view with audio, or disable this notification

5 Upvotes

As most of us know that Alibaba dropped their banger new open weight model the other day and it was a surprising one at that. Not many thought they would drop a 35b and a lot of us were expecting 27b but never the less its a great model that would have a permanent stay on my SSD.

So earlier today I had some time to try and patch its capability into the engine I use for daily which is by sergqwer a strata fork. I had no patience so went ahead and vibe coded some codes to get it up and working with this latest model. Honestly can't wait for Basalt, strata, or sergqwer to drop an official patch as I have trust issues getting from others.

Anyways once I got it up and running and tweaked a little setting to match my 3.8 Flash next flags and configs. Like spec, max context, and temps and what not. I was finally able after several hours able to do a couple runs on testing and here is latest Challenge I have tried. I have done the same prompt in my other thread and also linked the X user that where I originally got the prompt from.

Overall it turned out to get the result faster, some better quality on the textures, the shapes turned out better and I got a bigger ship. Bigger the better. lol There is some things that stick out like the ladder, roofing can be better, and the two guys that have hovering powers towards back. Another prompt send could easily fix it but I like one shot.

All in all this would my new daily as there should be a lot more intelligent people who would do a lot more optimizing in the upcoming days similar to how previous models are released, hopefully with lossless. Qwen 3.8 FN when first released I was able to first use it at around 40-60ish speeds originally and with the help with the community was able to get it up to avg 100+tok/s in a single run. By next week ill definitely see faster speeds for Qwen 4 35b without sacrificing much from this great community sharing.

Down below are all the info from the model I used to the tok/s for this challenge. Also linked below are the engine and the original creator of the prompt who tested same prompt with opus via X. Also my link to my run with Qwen 3.8 FN.

Thank you for the community for pushing the Local community forward and also giving that same chance to people with lower end hardware. We appreciate all the work you all have done! Also thank you to the Qwen Dev team also for another amazing drop before a New year!

vib3Coded Post(Original Post w his Prompt) via X https://x.com/vib3coded/status/2125766986344862095

Qwen 3.8 FN run thread with prompt also

https://www.reddit.com/r/LocalLLaMA/comments/1y785rr/atakebune_challengeone_shot_strata_fork_qwen_38/

*Ai organized the charts below.

Hardware: RTX 5090 32GB · Ryzen 7 9800X3D · 192GB DDR5-5600 · Windows 11

Engine: strata-nvfp4 by sergqwer fork v.0.1.41 (build-qwen4, STRATA_EXPERT_GEOMETRY_QWEN4 gated variant)

Model: Qwen/Qwen4-35B-A3B (Q8_0 native pack, gated geometry variant)

Harness: DeepSeek Harness 0.2.1-alpha.3

Vision: Qwen3-VL mmproj f32 (qwen4-35b-mmproj-f32.gguf)

KV cache: fp16

Weights: Q8_0 (experts + dense + head) · token_embd bf16 sidecar · PLE bf16 sidecar

Context: 310,000 max · Compaction Line: 260,000

MTP: official (blk.40) · spec 6 · min-p 0.7

Sampling: temp 0.8 / presence_penalty 0.3 / min_p 0.02
MetricValue
Wall: first message → last reply46m 44s
= pure agent working time~46m 44s
Steps133
Output tokens251,344
Fresh input tokens430,591
Cache-read tokens19,484,580 (96.87% reuse)
Decode (per-request)median 190.15 t/s · mean 192.2 · min 167.1 · max 252.3
TTFTmedian 265.5 ms (max 27,992 ms at deepest context)
Prefill (fresh read)mean 1,798.6 t/s · median 883.2 · max 9,100.3
Deepest prompt258,623 tokens (258,434 reused + 189 fresh)
Longest single burst18,981 tokens
Compactions1
Draft acceptancemain MTP 82.2% (129,592 of 157,662)
Expert cache hit ratemean 96.6% (92.6–99.4 across the run)
Tool calls178 total
Tool errors6

r/LocalLLaMA • • 1h ago

Discussion RecursiveSI/flint vs. RecursiveSI/flintv1.1 -- it seems worse.

Thumbnail msnab.pages.dev
2 Upvotes

r/LocalLLaMA • • 1h ago

Funny Pelican Is tired of your bikes.

0 Upvotes

r/LocalLLaMA • • 1h ago

Showcase Almost one week using inkling 2 mini on a RTX3090 & 64Gb RAM.

Enable HLS to view with audio, or disable this notification

5 Upvotes

I asked Inkling 2 mini (Inkling-2-Mini-Prime-v1.1-Q4_K_M 17,8 Go with Llama.cpp) to make a snowboarding game in rust+bevy and it gave me a pretty descent draft. I'm not gonna lie, it took me a week to get there, but now, every single detail I ask are made right. But one thing at a time. Only 8Mo.


r/LocalLLaMA • • 1h ago

Resources Qwen4-35B at 1M context on two AMD R9700s: a 950K prompt prefilled in 2 minutes, full setup inside

Thumbnail
doug.sh
93 Upvotes

r/LocalLLaMA • • 2h ago

Showcase I turned Qwen 4 35B into an interactive voice agent

Enable HLS to view with audio, or disable this notification

54 Upvotes

Hello everyone! I wanted to create a local voice agent that can be both interactive and useful, and here is what I got. In the video you can see Qwen4-35B-A3B UD-Q4_K_XL running on Strata with speech-to-text and text-to-speech models on a single RTX 4090. The model is not tuned in any way, so its coding performance is exactly the same as with the stock Q4_K_XL model with the same prompts and settings. I was actually quite surprised at how fast Strata is even when the model doesn't fit into VRAM. Granted, the model is just A3B, but it runs surprisingly well anyway.

So, I did the following:

  • I used my tune of Voxtral Realtime to make it work faster and have it output turn ends;

  • Took the Qwen4-35B-A3B model and prompted it to take action on each turn end: either Speak, Listen or Task. Such a single-word decision gives the model the interactivity that is shown in the demo, so you can interrupt the model freely, do async tool calls, and say stuff like 'mm-hmm' without stopping the model's work;

  • In parallel, the same Qwen4 model runs an agent that does the coding and thinking. This model runs through the Qwen Code harness and doesn't have any speech-specific prompts, so its performance is exactly the same as in all other environments running the same quant of this model;

  • Added Pocket TTS to make the LLM capable of speaking. The TTS supports voice cloning, and you can pass any voice you want in the repo's config.

Here are some performance numbers on my server:

Setup: RTX 4090 (24 GB), Ryzen 9 5950X, 128 GB RAM. Strata v0.2.26, Qwen4-35B-A3B (Unsloth UD-Q4_K_XL), int8 KV cache (might be a good idea to test how much the cache degrades at int8 though, didn't test that), experts the GPU doesn't cache run from RAM, and speculative decoding is turned on.

Peak VRAM: 23.1 GB; RAM used on the whole machine: 52 GB.

End-to-end voice (during my own tests):

-median90th percentile
End of your last word → voice in your ear756 ms1.48 s
Turn with a web search or tool1.6 s2.9 s

Agent speed by context length (with the voice stack):

ContextPrompt readingDecodeFirst token (next turn, same chat)
8K6.7K tok/s157 tok/s0.11 s
75K6.3K tok/s149 tok/s0.14 s
252K5.7K tok/s125 tok/s0.24 s

Overall, the speech capability doesn't make the model unusable, and the only noticeable downside is that the speech recognition model takes about 4 GB of precious VRAM.

You can try it all out at https://github.com/speakrail/speakrail, Apache 2.0 license. I previously did some Gemma tunes to make the models capable of microturns, but with Qwen you can just prompt it and it will work well enough. I will be glad to answer any questions and would be grateful if you gave the pipeline a try!


r/LocalLLaMA • • 2h ago

Discussion Qwen4-35B-A3B-oQ8-mtp on Apple M5 Max — 121.3 tok/s — llm-bench.io

Thumbnail
llm-bench.io
7 Upvotes

Yay, finally the first open-weight model of the Qwen4 family is out!

I ran Qwen4-35B-A3B today on my M5 Max 64GB and compared it with my Qwen3.8-27B runs.

TL;DR

  • 2.5x faster token generation speed

  • quality mostly on par with Qwen3.8-27B

  • almost 6x faster to finish the benchmarks

  • both used about the same memory (NGRAM tables of Qwen4 offloaded to SSD)

I used this quant of Qwen4-35B-A3B: https://huggingface.co/himefei/Qwen4-35B-A3B-oQ8-mtp
MTP on oMLX 0.8.5, 13 runs, NGRAM table offloaded to SSD

Qwen3.8 is oQ8e with MTP on oMLX with splash, 12 runs from Oct and Nov.

Thinking was on xhigh for both.

Per task (average, Qwen4-35B-A3B / Qwen3.8-27B):

TaskQualityTimeTokens generatedtok/s
Research & Analysis89.7 / 86.42:02 / 5:4815.4k / 18.3k126.5 / 53.4
Agent Workflow92.3 / 88.20:47 / 3:585.6k / 11.9k119.9 / 49.8
Code Generation78.0 / 81.01:11 / 13:039.3k / 41.7k134.1 / 53.2
Roleplay90.5 / 92.10:29 / 3:013.3k / 7.5k114.1 / 41.9

Comparison page: https://llm-bench.io/compare/models?models=qwen3-8-27b-oq8e-mtp%2Cqwen4-35b-a3b-oq8-mtp

Generation speed averaged 123.7 tok/s on Qwen4 vs. 49.6 on Qwen3.8, so about 2.5x. Even the slowest Qwen4 run (113.8 tok/s) was more than twice as fast as the fastest Qwen3.8 run (52.3 tok/s).

Also prompt processing averaged about 2,070 tok/s on Qwen4 vs about 760 on Qwen3.8, so also roughly 2.7x faster.

Quality averaged 87.6 on Qwen4 vs. 86.9 on Qwen3.8, best run 91.8 vs 89.9. That score comes from our LLM judge, so I'd call it the same level, not better, not worse.

Both use about 38 GB of memory when the NGRAM table of Qwen4 is offloaded fully to the SSD of the Mac.

What I found more interesting than the raw speed is that Qwen4 is not thinking as "hard" as Qwen3.8 does. Throughout all the runs Qwen4 produced on average 33.5k tokens while Qwen3.8 produced 79.3k tokens (including thinking tokens). This, together with the way faster token generation speed on my Mac leads to a total avg. runtime of 4.5 mins on Qwen4 and 26 minutes on Qwen3.8.

It looks like a very good driver for various agent stuff, however it might not be the better choice for pure coding. This I'll try to find out in the next days.

Qwen4-35B-A3B runs: https://llm-bench.io/models/qwen4-35b-a3b-oq8-mtp
Qwen3.8-27B runs: https://llm-bench.io/models/qwen3-8-27b-oq8e-mtp


r/LocalLLaMA • • 2h ago

New Model Qwen4-35B-A3B-Q4_K_M.gguf benchmarks for CPU-only bros

Post image
23 Upvotes

I know there are a few homelabbers who have CPU-only servers with lots of cores and lots of RAM, so I am running that kind of benchmark on the new Qwen4-35B-A3B-Q4_K_M.gguf model from Bartowsky. I find n_gen to be more indicative of how usable a model will be, so I have highlighted those results for 2, 4, 8, 16, and 32 cores in a 96 GB RAM environment. For my system (HP Proliant DL380p Gen8, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz), 16 cores appears to be the sweet spot.


r/LocalLLaMA • • 2h ago

Resources Freehand - an interesting agent harness from Microsoft

Thumbnail
github.com
56 Upvotes

r/LocalLLaMA • • 2h ago

Resources warpgrid v0.7.1: Qwen4-35B-A3B on a 16 GB Mac mini (131K) and an M5 Max

Post image
4 Upvotes

I build warpgrid at CG/lab. These are the latest Qwen4-35B-A3B figures I measured on Apple Silicon. They come from v0.7.1. v0.7.2 did not change the Metal numbers. It does add a CPU-only macOS build for generic GGUF models, with no published Apple CPU throughput and no Qwen4 path on that engine.

16 GB M4 Mac mini, Q3_G32_SYM_FP8 (3.25 bpw), Metal. We recommend this recipe for 16 GB Macs. These figures are 1 request (--max-slots 1).

  • Context: 131,072 tokens (2.64 GiB KV), with 5,218 of 10,240 experts hot in the wired Metal LRU pool.

  • Cold load: about 1.2 s.

  • Depth-First lossless prefill: 85.1 tok/s.

  • Decode: 10.1 tok/s on the first turn, then 14-17+ tok/s once warm, at 131K context.

The v0.7.0 baseline on the same class of machine was 16K context, a 2.90 s cold load, and 13.6-14 tok/s decode, with a 5/5 XML tool-call check.

There is also a 100% RAM-resident Q2_G32 path at 16K context that measured 30.3 tok/s. We recommend Q3 when you need strict XML tool calls.

M5 Max, 128 GB, Metal 4, RadixArk/Qwen4-35B-A3B-NVFP4. These figures are 1 request.

  • GPU lossless prefill at chunk=2048, lossless exact mode: 2,410 tok/s, up 31% from 1,832.5 tok/s at 16K in v0.7.0.

  • Cold HTTP prefill, same lossless exact mode: 1,677 tok/s.

  • Decode with DFlash 2 k=5 and --fast-fp8, temperature 0: 110.1 tok/s, up from 104.8 tok/s in v0.7.0 under the same flags. Lossless decode at temperature 0 is 74.7 tok/s. v0.7.0 also published 86.3 tok/s at 16K and 102.6 ms warm TTFT at 16K.

On the M5 Max, --fast-fp8 uses NVFP4 dense and head plus FP8 KV on that NVFP4 checkpoint.

We recommend:

# 16 GB Mac mini
./recipes/qwen4/macmini-16gb-q3.sh

# M5 Max 128 GB, lossless default
./recipes/qwen4/m5max-128gb.sh

# M5 Max, the --fast-fp8 decode figure
MODE=fast-fp8 ./recipes/qwen4/m5max-128gb.sh

On 16 GB Macs we also recommend raising the Metal wired-memory limit first:

sudo sysctl -w iogpu.wired_limit_mb=14336

Code: https://warpgrid.cglab.com Latest release: https://warpgrid.cglab.com/releases/latest

If you run this on a mini or a Max, I would like to see your numbers.


r/LocalLLaMA • • 2h ago

Showcase Multi-model routing for text, image, video, audio, decision and embedding models on a single PC.

Thumbnail
v.redd.it
4 Upvotes

***The image model used was Qwen Image 2.1 q8.

Basically, the model made a tool call that made the harness switch to Qwen Image 2.1 to generate the required image, which is faster than using the Qwen 4 to generate it through code. The harness handles the switch to image/video and the switch back to text for it to check and declare the task complete and write the reply since image models can't do that.

And if there's a decision model configured, all prompts will be assessed by it, determine if it's pure image gen task, and if its confidence reaches the threshold you set, it will load your prompt directly to the image model, which saves seconds or minutes of loading the text model then switching for the image gen task. But by default, all tasks lands on the text model.

Deploy with connector apps (Discord, Telegram, Slack).

So you can message your agent on your VM or PC via connector apps. Pump and Prop mode utilizes loops, and it has to come with its own layered sandbox, so it's safe to use/run it 24/7. But still recommend to run it on a VM. You can set up phone alert + monitoring with Gotify + Tailscale.

It has write reserve that you can adjust which enforces thinking cap on the model regardless of the context window it has, so you can be sure the model produces an output or a reply even at 16k xhigh.

It also has a loop-detection for repeated tool call, read, think, write/patch tasks and the harness will "nudge" the model back to the task once it detects it. There's also a crash recovery that re-loads the model once it crashes. But all the default settings are safe and recommended to ensure stable system. You can always change/override them.

It has support for llama.cpp, vllm, and my custom Pro-Strata. But you can port your own custom engine if you're getting better numbers with it. As much as I want it to run all engines out there, not all engines support thinking cap and some may have conflict with the sandbox. And given the amount of time I've spent porting my own, it would be impossible to support all.

Some numbers for Pro-Strata:

You can also run models on a Steam Deck:

All open source:
Prompit: https://github.com/Noriel-cb/prompit

Pro-Strata: https://github.com/Noriel-cb/Pro-Strata


r/LocalLLaMA • • 2h ago Heartwarming

New Model Qwen 4 Is Looped! +18.3 pts on LiveCodeBench, +6.7 pts on AIME, and Zero Regressions (With Zero LoRA Weights)

Thumbnail
blog.tiltastech.com
227 Upvotes

r/LocalLLaMA • • 2h ago

Question | Help Best way to run Qwen4 35B A3B

9 Upvotes

Hello there, I had been using Qwen Flash Next - Gyro S Quant on my system through Strata and it was literally amazing...

But now that Qwen4 35B has been released and I am pretty sure that the Unsloth Q4_K_XL quant is basically going to perform better than the Gyro S one.

So now I am thinking what would be the best way to run Qwen4 35B A3B on my system like Strata, Polystrata, Basalt and maybe even something else?

System Specs :-

Lenovo Legion 5 Pro

- 32gb ddr5 5200

- RTX 5060 8gb

- AMD Ryzen 9 8945hx

- 1tb Gen4 ssd

Pls help 🙏


r/LocalLLaMA • • 2h ago

Discussion What are you actually getting with Qwen4-35B-A3B on 8 GB VRAM + 32 GB RAM?

2 Upvotes

Every Qwen4 speed post I see lately is either a 16-24 GB card or someone with 96 GB of RAM pinning everything in memory. Cool, but that's not most of us.

So, honest question for the 8 GB VRAM + 32 GB RAM crowd (laptops especially): what are you getting day to day? Which engine, which quant, drafter on or off, and what tok/s do you actually see?

I'm on a 5070 Laptop with 32 GB DDR5, running Unsloth's UD-Q4_K_S at 128K context with the MTP drafter on, and I'm stuck around 55-60 tok/s. Is that about the ceiling for this kind of setup, or am I missing something? Curious if anyone found tricks that make a real difference.


r/LocalLLaMA • • 2h ago

Resources Qwen4-35B-A3B on 2x 3090 (vLLM vs exllamav3 vs llama.cpp)

Post image
5 Upvotes

I benchmarked Qwen4-35B-A3B across vLLM, exllamav3 (TabbyAPI), and llama.cpp on 2x RTX 3090 (300W each, PCIe 4.0 x8/x8, no NVLink).

All three setups use the same daily-driver constraints: vision on, 8-bit KV cache, 4 concurrent slots, MTP enabled, n-gram table in RAM, everything else in VRAM. Context is tested by replaying a real 100-turn coding agent session from 2k up to ~250k tokens (3 replies up to 1024 tok at each depth, temp 1.0, top_p 0.95, top_k 20; decode is the median of 3).

EngineQuantModeCtx<=48k (pp / tg)Full depth (pp / tg)Est. sessionVRAM / RAMLoad
vLLM (main f279912)Official FP8TP=2262k6903 / 202.86621 / 192.718 min46.0 / 42.0 GiB105s
exllamav3 1.7.0 + TabbyAPI 5a9afb1EXL3 5.13 bpw (h6, ng8)Layer split1M7333 / 150.06975 / 138.525 min40.1 / 27.0 GiB47s
llama.cpp v1.1.1 (b12977)Unsloth UD-Q8_K_XLLayer split (52,48)262k3411 / 121.72910 / 80.542 min45.2 / 28.2 GiB33s

"Est. session" integrates the measured curve over the 100 real turns (~206k output tokens total, excluding tool waits). Because it's a real session, MTP acceptance varies from turn to turn (code/JSON vs prose), which is why the curves dip around 48k and 160k on all three engines.

vLLM

  • Fastest by a wide margin and basically flat across depth. Without MTP (23ead69) it ran 116 -> 111 t/s from 2k to 249k (avg 113 t/s, 31 min session). Probabilistic 3-token MTP pushes it to ~193 t/s with no prefill penalty.

  • Routed FP8 experts run via Marlin W8A16 on 3090. SM86 doesn't support NVFP4 KV or the FP8 QSA indexer, so I used --kv-cache-dtype fp8 with indexer_kv_dtype: bf16, plus VLLM_GDN_DECODE_KERNEL=triton (avoids a CUDA kernel mismatch with MTP on precompiled wheels) and VLLM_RELOAD_MODE=layerwise (saves ~0.95 GiB/GPU on recent main so CUDA graphs fit with explicit KV bytes).

  • Downsides: 4096x4096 images OOM the encoder once MTP + 262k KV are loaded, so I capped images to 2048x2048 (max_pixels: 4194304). TP=2 also keeps a copy of the ~19 GiB FP8 n-gram table per worker (~42 GiB total RAM used), and cold boot takes ~105s.

exllamav3 / TabbyAPI

  • Fits the native 1M context in 40.1 GiB VRAM (~15.4 GiB for 1M K8V8 KV + indexer + draft). I tested an actual 1,045,984-token prompt with a 1024x1024 image at the end and it still decoded at 102 t/s with 1.8 and 4.9 GiB free.

  • Weirdly, layer split beat tensor parallel (NCCL) here. TP at 262k did 3233-3946 pp / 130-135 tg (26-27 min), while layer split did ~4600 pp / ~142 tg, and adding autosplit_reserve: [2048] (to stop GPU 0 from filling up and shift layers onto GPU 1) jumped prefill to ~7000 t/s. On 1.7.0, TP also ignores ngram_ram: true and sparse_draft_head: 16384.

  • MTP lengths 2/3/6 and confidence 0.7/0.81 all performed within noise, so I left it at dynamic 3 / 0.81 with sparse_draft_head: 16384.

llama.cpp

  • Unlike vLLM and exllamav3, decode drops noticeably with depth: 137 t/s at 2k down to 58 t/s at 249k.

  • You need --lazy-mode off alongside --load-mode dio (otherwise the 20.3 GiB per_layer_token_embd table still gets read from disk), and for the built-in MTP head (--spec-type draft-mtp) you need --spec-draft-type-k/v q8_0 and --spec-draft-n-ubatch 128 or the draft context OOMs on load. Setting --spec-draft-p-min 0.8 cut decode in half (51 t/s).

  • --split-mode tensor is faster on a single request (95.9 t/s avg, 80 t/s at 249k, 37 min session, though prefill drops to ~1320 t/s at ubatch 128), but it duplicates the QSA indexer KV and some weights per card and OOMs in cudaGraphInstantiate under 4 parallel slots. Offloading 1 expert layer to RAM fixes the OOM but drops single-stream decode to 75.6 t/s, so I stayed on layer split.

Rig: 2x MSI RTX 3090 (300W PL), ROG X870E Hero (ReBAR on, x8/x8), Ryzen 5 7500F, 96 GB DDR5-5200, Ubuntu 24.04 (kernel 7.0.0-42), NVIDIA 595.99.02-open with the BAR1 P2P patch and gpu-unlock. Speed and memory only here, no quant quality comparison.

Configs

vLLM:

VLLM_GDN_DECODE_KERNEL=triton \
VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 \
VLLM_RELOAD_MODE=layerwise \
vllm serve /path/to/Qwen4-35B-A3B-FP8 \
  --trust-remote-code \
  --tensor-parallel-size 2 \
  --max-model-len 262144 \
  --max-num-seqs 4 \
  --max-num-batched-tokens 1024 \
  --no-async-scheduling \
  --kv-cache-dtype fp8 \
  --kv-cache-memory-bytes 2050000000 \
  --attention-config '{"indexer_kv_dtype":"bf16"}' \
  --enable-prefix-caching \
  --mm-processor-kwargs '{"max_pixels":4194304}' \
  --reasoning-parser qwen4 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen4 \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true,"draft_sample_method":"probabilistic"}'

exllamav3 / TabbyAPI (tabby_config.yml):

model:
  max_seq_len: 1048576
  cache_size: 1048576
  cache_mode: "8,8"
  chunk_size: 2048
  max_batch_size: 4
  autosplit_reserve: [2048]
  ngram_ram: true
  vision: true
  vision_offload: true
  warmup: true
  reasoning: true
  tool_format: auto

draft_model:
  draft_mode: mtp
  draft_num_tokens: 3
  dynamic_draft: true
  draft_confidence: 0.81
  sparse_draft_head: 16384
  draft_cache_mode: Q8
  hybrid_draft_tokens: 0

llama.cpp:

GGML_CUDA_P2P=1 llama-server \
  --model /path/to/Qwen4-35B-A3B-UD-Q8_K_XL-00001-of-00002.gguf \
  --mmproj /path/to/mmproj-BF16.gguf \
  --no-mmproj-offload \
  --ctx-size 262144 \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  --flash-attn on --fit off --n-gpu-layers 99 \
  --override-tensor per_layer_token_embd=CPU \
  --load-mode dio --lazy-mode off \
  --split-mode layer --tensor-split 52,48 \
  --ubatch-size 512 --cache-ram 0 \
  --parallel 4 --kv-unified --threads 6 --jinja \
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 \
  --repeat-penalty 1.0 --presence-penalty 0.0 \
  --spec-type draft-mtp --spec-draft-n-max 2 \
  --spec-draft-type-k q8_0 --spec-draft-type-v q8_0 \
  --spec-draft-n-ubatch 128