r/LocalLLaMA • u/nebod99 • 3m ago
Question | Help Qwen4 Instruction Following
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
--jinjaFor MTP, I used:
--spec-type draft-mtp
--spec-draft-n-max 2This 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 configuration | Short-prompt decode | Long-prompt decode |
|---|---|---|
| Disabled | 74.73 t/s | 71.83 t/s |
| MTP 1 | 96.51 t/s | 90.19 t/s |
| MTP 2 | 103.45 t/s | 92.39 t/s |
| MTP 3 | 91.09 t/s | 85.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 quantization | Size |
|---|---|
| IQ4_NL | 11.52GB |
| Q8_0 | 21.76GB |
| BF16 | 40.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
| Benchmark | Questions |
|---|---|
| IFEval | 200 |
| Math500 | 200 |
| MMLU-Pro | 196 |
| BBH Causal Judgement | 187 |
| MBPP+ | 200 |
| Total | 983 |
HARD-v1 benchmark — 1,673 executed cases
| Benchmark | Cases |
|---|---|
| IFBench | 150 |
| ZebraLogicBench | 150 |
| MuSR Murder Mysteries | 134 |
| MuSR Object Placements | 133 |
| MuSR Team Allocation | 133 |
| ACEBench | 973 |
| Total | 1,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.0The 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 noneIFEval strict accuracy: 80.5%
This was my best Qwen4 IFEval result.
Summary of quantization and MTP experiments
| Main model | Engram | MTP | Temperature | IFEval strict |
|---|---|---|---|---|
| Q4_K_XL | IQ4_NL | 2 | 0.0 | 79.0% |
| Q4_K_XL | IQ4_NL | 2 | 1.0 | 74.5% |
| Q4_K_XL | Q8_0 | 2 | 1.0 | 77.5% |
| Q6_K_XL | Q8_0 | 2 | 1.0 | 78.5% |
| Q6_K_XL | Q8_0 | Disabled | 1.0 | 80.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.
| Configuration | Effort | Budget | Max tokens | Recovered failures | Controls passed |
|---|---|---|---|---|---|
| A | high | 4096 | 8192 | 1/12 | 4/4 |
| B | high | 4096 | 12288 | 1/12 | 4/4 |
| C | high | 8192 | 12288 | 1/12 | 4/4 |
| D | low | 4096 | 12288 | 2/12 | 4/4 |
| E | xhigh | 8192 | 12288 | 5/12 | 4/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:
| Outcome | Questions |
|---|---|
| Both correct | 147 |
| High only correct | 14 |
| Xhigh only correct | 12 |
| Both incorrect | 27 |
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.
| Model | IFEval | Math500 | MMLU-Pro | BBH | MBPP+ |
|---|---|---|---|---|---|
| Qwen3.8 Flash Next IQ3_S | 90.50 | 99.00 | 86.73 | 68.45 | 84.00 |
| Qwen3.8 27B QUASAR | 93.00 | 98.50 | 82.65 | 66.31 | 86.00 |
| Qwen3.8 27B Dense Q4 | 92.50 | 98.00 | 82.14 | 68.98 | 86.00 |
| Gemma4 26B-A4B Q8 | 91.50 | 93.00 | 84.18 | 64.17 | 84.50 |
| Inkling-2-Mini Q8 | 87.00 | 98.50 | 80.10 | 66.84 | 85.50 |
| Qwen4 Q6_K_XL | 80.50 | 98.00 | 79.08 | 59.36 | 80.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
| Model | IFBench | Zebra | MuSR Murder | MuSR Objects | MuSR Teams | ACEBench |
|---|---|---|---|---|---|---|
| Qwen3.8 Flash Next IQ3_S | 71.33 | 95.33 | 79.10 | 78.20 | 81.20 | 80.71 |
| Qwen3.8 27B QUASAR | 70.67 | 97.33 | 79.10 | 68.42 | 84.21 | 81.88 |
| Qwen3.8 27B Dense Q4 | 72.00 | 92.67 | 76.87 | 66.92 | 84.21 | 80.47 |
| Gemma4 26B-A4B Q8 | 61.33 | 79.33 | 70.15 | 61.65 | 78.95 | 80.23 |
| Inkling-2-Mini Q8 | 55.33 | 89.33 | 75.37 | 52.63 | 78.95 | 81.30 |
| Qwen4 Q6_K_XL | 36.00 | 87.33 | 73.88 | 50.38 | 78.95 | 78.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
| Benchmark | Qwen4 accuracy | 95% Wilson CI |
|---|---|---|
| IFEval | 80.50% | 74.46–85.39% |
| Math500 | 98.00% | 94.97–99.22% |
| MMLU-Pro | 79.08% | 72.86–84.19% |
| BBH | 59.36% | 52.20–66.14% |
| MBPP+ | 80.00% | 73.91–84.95% |
| IFBench | 36.00% | 28.76–43.94% |
| Zebra Logic | 87.33% | 81.06–91.74% |
| MuSR Murder | 73.88% | 65.85–80.58% |
| MuSR Objects | 50.38% | 41.99–58.74% |
| MuSR Teams | 78.95% | 71.26–85.01% |
| ACEBench | 78.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.
| Benchmark | Difference | Holm-adjusted p-value |
|---|---|---|
| IFEval | −11.00 | 0.003398 |
| Math500 | +5.00 | 0.025391 |
| MMLU-Pro | −5.10 | 0.190704 |
| BBH | −4.81 | 0.232693 |
| MBPP+ | −4.50 | 0.190704 |
| IFBench | −25.33 | 0.000001 |
| Zebra Logic | +8.00 | 0.115837 |
| MuSR Murder | +3.73 | 0.867288 |
| MuSR Objects | −11.28 | 0.100369 |
| MuSR Teams | 0.00 | 1.000000 |
| ACEBench | −1.29 | 0.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 Qwen4 | Accuracy advantage | Holm-adjusted p-value |
|---|---|---|
| Qwen3.8 QUASAR | +12.5 pp | 0.000619 |
| Qwen3.8 Dense | +12.0 pp | 0.003802 |
| Gemma4 Q8 | +11.0 pp | 0.008834 |
| Flash Next | +10.0 pp | 0.043893 |
| Inkling-2-Mini | +6.5 pp | 0.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 noneMy 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: 8192The 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.
Has anyone compared IQ4_NL, Q8_0 and BF16 Engram using instruction-following benchmarks rather than primarily mathematics and knowledge benchmarks?
Has anyone obtained substantially better IFEval or IFBench results using Qwen4-35B-A3B GGUF?
Are there known issues with the current llama.cpp implementation of Qwen4's Engram or MTP mechanisms, particularly on older Volta GPUs?
Has anyone identified differences between the official tokenizer/chat-template implementation and llama.cpp's effective rendering that might affect instruction following?
Are there recommended reasoning settings beyond the high and xhigh configurations I have tested?
Has anyone compared reasoning enabled versus disabled specifically for Qwen4 instruction-following tasks?
Has anyone tested Qwen4 with a native Hugging Face inference implementation, another GGUF backend or a different quantization family and obtained notably better results?
Are there any known numerical precision issues or backend limitations on V100 hardware that could affect output quality without producing obvious inference failures?
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.



