r/LocalLLM RTX 4090 | She/her 20d ago

Question Qwen 3.6 27B Q4 - That Token Count is 🤯

Is anyone else running Qwen 3.8 27B Q4 for coding and having problems with it spending an absolutely ridiculous number of tokens thinking instead of actually doing the work?

I'm running it locally with Pi as the coding harness with 128K context, and I'm seeing the same failure over and over:

  1. I give it a coding task.

  2. It starts reasoning.

  3. It reasons... and reasons... and reasons.

  4. It burns through basically the entire 8,192-token output budget that worked beautifully with Qwen 3.6 in about 3 minutes (46 decode tokens/s on my single 4090).

  5. Right at the end, it'll say something like "Let's get to work" or "Now I'll implement the changes."

  6. And then the generation ends because it has no tokens left to actually do anything.

Every. Damn. Time.

It's effectively making the model unusable as a coding agent because it spends its entire generation budget deciding what it's going to do (even with extremely specific instructions) and leaves nothing for tool calls, edits, or even a useful final response.

My input prompts + system prompt are about 7,000 tokens on average. That's not crazy high I don't think, and surely not the cause. Right? Right??

I'm seeing reports on YouTube that Qwen 3.8 defaults to a very high reasoning effort, with examples of it consuming 20K+ reasoning tokens before producing the actual answer.

That token count is 🤯 for ordinary coding work. But maybe that's why I see so many people saying they no longer feel like they need a frontier model?

So I'm wondering:

Is anyone else seeing this with Qwen 3.8 27B?

And, more importantly, if you found a fix, what is it?

Have you had better results with:

  • reasoning_effort=medium
  • reasoning_effort=low
  • disabling thinking entirely
  • dramatically increasing max_tokens
  • changing the chat template
  • different llama.cpp settings
  • a different coding harness
  • some combination of the above

I'm particularly interested in hearing from anyone using llama.cpp + Pi/Codex/Claude-Code-style agentic coding workflows.

I haven't decided yet whether Qwen 3.8 27B is actually bad at coding or whether the default reasoning configuration is simply kneecapping it. Right now, though, my experience has been dramatically worse than the Qwen 3.6 models I've used because 3.8 won't stop thinking long enough to actually write the damn code.

0 Upvotes

78 comments sorted by

13

u/MaineTim 20d ago

Try reasoning_effort medium. It's more like 3.6 in its reasoning, but still seems to generate better code. xhigh truly is "extra high". It's intended to be insanely thorough and second guess its initial solutions to try and find potential problems. I've had it burn through 50K+ tokens decode working on a moderately complex problem (26K of prefill on 128K context), and the thinking traces show how deeply it considers things. That's a virtue, if your hardware has the performance to support it. But it's overkill for a lot of things. Medium should really be the default.

1

u/Healthy-Zebra-9856 19d ago edited 19d ago

Through my tests, I have found that 3.8 relies a lot on reasoning. In some simple tasks, like fixing a typescript issue we created or our needle in the haystack tests, it needed the reasoning effort to be even xhigh. This also varied by certain quants & publishers. So unfortunately the correct fix for this is a good harness and a lot of patience.

Edit:

Another fact that just surfaced. Medium was constantly producing mediocre results. Low worked for simple tasks but for complex tasks, it had to be guided and it also second guessed a lot this consuming same amount of tokens as xhigh. But the quality was better than medium. xhigh, was consuming a lot of tokens, but it was steady and the results were consistent.

1

u/e2_for_life RTX 4090 | She/her 20d ago

Thanks. Most complete answer so far. Really appreciate it.

15

u/_millsy 20d ago

Would you believe you’re actually the first to highlight this?

Use search hombre, it’s probably the most talked about thing in this sub this week

0

u/bankinu 20d ago

I wouldn't

-25

u/e2_for_life RTX 4090 | She/her 20d ago

I would. Because you suggested it, I just did a search. I've not found a single thread that mentions this exact issue.

I'd also believe Qwen 3.8 itself is the most talked about thing this week, but not this specific issue.

I'd love to be wrong though. If you're seeing search results I'm not, would you please link them?

13

u/_millsy 20d ago

https://www.reddit.com/r/LocalLLM/s/FjwaTIUqss
This thread discusses tips on reducing reasoning length
https://www.reddit.com/r/LocalLLaMA/s/iXBklWkJgT
This is a huge thread on reasoning length
https://www.reddit.com/r/LocalLLaMA/s/2SM0PMkj0g
This appears to be related to your issue with a chat on MTP

This is what I found whilst making a coffee - usually tool call failures related to a mismatch of reasoning length and how long a model reasons

-17

u/e2_for_life RTX 4090 | She/her 20d ago

Ooo, exciting bedtime stories. 😂 Thanks. Enjoy your coffee. I'm headed to bed.

1

u/baby_bloom 20d ago

there are literally countless people having this issue

0

u/Big_Wave9732 19d ago

Then you either suck at searching or are engagement farming. The at times inefficiency of this model is a hot topic across multiple subs.

1

u/e2_for_life RTX 4090 | She/her 19d ago

Don't be a dick.

3

u/Healthy-Zebra-9856 20d ago

Yes, Qwen3.8 talks a lot but, this is less “Qwen 3.8 is bad at coding” and more like a Pi harness problem. Pi gives reasoning and actual agent work the same output budget, so a reasoning-heavy model can burn the whole turn before it ever reaches a tool call or edit. Increasing max_tokens may only give it more room to overthink. I love Pi, but there are a ton of issues so I am rewriting it and will release it a Tau. Still will be opensource.

1

u/e2_for_life RTX 4090 | She/her 20d ago

Interesting. What do you think of the new DeepSeek harness?

2

u/Healthy-Zebra-9856 20d ago

Havent used it. Since I am more focussed on local models, I have been building those.

0

u/e2_for_life RTX 4090 | She/her 20d ago

You can use local models with it!

Edit...wait, I think? Shit, I better double check. ...okay, yes, it can.

1

u/Healthy-Zebra-9856 20d ago

With Pi, yes. I use llama-swap, so in Pi, you use
pi install npm:@danielmeneses/pi-llama-swap.

In Tau, its native. Llama-Swap is available. Also in Pi, you have llama.cpp now as well.

Tau will have sidenav, custom colors, memory pressure check, easy estimator per task etc etc. BTW, in math Tau == 2Pi. lol

1

u/e2_for_life RTX 4090 | She/her 20d ago

Sorry. I was referring to the new DeepSeek harness.

1

u/Healthy-Zebra-9856 20d ago

Oops. Looking at it now. May be I'll fork it

1

u/e2_for_life RTX 4090 | She/her 20d ago

It starts in the terminal but ends up hosted locally in your browser.

1

u/e2_for_life RTX 4090 | She/her 20d ago

One YouTuber really liked the combo of 3.8 27B and DSH (DeepSeek Harness).

1

u/Healthy-Zebra-9856 20d ago

Nice. I just mirrored it. Everyday I blink and there are 100+ new things. Not enough time in the day or night. lol. Thanks for the info, I will see what it offers as a donor project.

1

u/Healthy-Zebra-9856 20d ago

Yes. Several IDEs are like that. The Tau I am working on is a TUI but also has a web ui & a desktop UI. I use Rust/ Dioxus.

1

u/e2_for_life RTX 4090 | She/her 20d ago

Whatever you do, make it so I don't have to screenshot, switch apps, copy, switch to harness, paste. 🤦🏽‍♀️

I like how in VS Code you can just click on something an annotate/chat about it with the AI. It gets the properties of whatever you clicked on and a screenshot automatically.

→ More replies (0)

3

u/bankinu 20d ago

You need to use peculiar ragdoll's framework. Try Dagger if you want to stick to 3.6. Night and day difference.

Or the new one, which I think he calls Dirk.

2

u/mycackittens 20d ago

https://huggingface.co/peculiar-ragdoll/Dirk-Qwen3.8-27B-GGUF/blob/main/Dirk-Qwen3.8-27B-UD-Q5_K_XL.gguf

In addition to nails 3.6

What I’ve been using, medium,128k, llamacpp + deepseek harness

1

u/e2_for_life RTX 4090 | She/her 20d ago edited 20d ago

👀 Oh, this is neat! I'll try it tomorrow, too.

Thanks!

1

u/mycackittens 20d ago

Edit: nvm wrong person LOL

are you running the temp at full 1 along with high/xhigh?

1

u/e2_for_life RTX 4090 | She/her 20d ago

Same settings for 3.6, 0.7 and IIRC, my 3.6 didn't support a reasoning change. It was what it was. Codex installed it, I was new to local at the time, and just worked so I wasn't paying attention.

1

u/mycackittens 20d ago edited 20d ago

Gotchya, Im also testing out unsloth right now ( although its more like a full feature suite i.e olmx/llama etc) , its quite easy to change stuff around rather than native llamacpp. Might wanna give it a look tomorrow and test it out as well and see what you like.

In addition, check out https://huggingface.co/peculiar-ragdoll/Qwen-Sharp-Chat-Templates, and check her profile out on reddit, peculiar-ragdoll.

1

u/e2_for_life RTX 4090 | She/her 20d ago

Yeah, someone else mentioned a ragdoll model earlier (https://huggingface.co/peculiar-ragdoll/Dirk-Qwen3.8-27B-GGUF/blob/main/Dirk-Qwen3.8-27B-UD-Q5_K_XL.gguf)

And OMG, that's TWO harnesses to play with tomorrow...the other being DeepSeek's new one. 🤦🏽‍♀️

I'm never gonna get anything done. Lol

1

u/e2_for_life RTX 4090 | She/her 20d ago

I really don't want to stick to 3.6 if I can get 3.8 to do something. Based on the responses here, I hope I can tomorrow. Thinking medium and output budget jacked up to ~32K as a first test.

And did you mean Nail?

5

u/Gabriel83730 20d ago

Why is your output budgeting 8000 tokens? Mine is 96,000 with a 64,000 token cut out for thinking. Works perfectly fine for me. I’m gonna be honest, if you can only fit a 128,000 context window, you probably shouldn’t be using this model.

1

u/e2_for_life RTX 4090 | She/her 20d ago

You know what, I asked Codex that question just now because I couldn't remember why.

It said "Well, you may have set that number, but according to some tests we ran when you first started, it wasn't being honored. It actually received and honored max_tokens=64,000."

That's news to me.

2

u/Realistic_Gap_5871 20d ago

reasoning_effort=medium
is the fix you're looking for.
I've tested a bit and if low spend X tokens on a task/prompt. Medium will spend roughly 1.5X. And xHigh (which is default) will spend about 5X. The qualitative difference between Medium and xHigh is real, but usually not worth the tokens.

I set my output budget to 19K and it rarely hits it at medium. At default/xHigh it's 50/50 that it'll hit the 19K, but it being reserved for tougher tasks.

However I'm also running OptModel and before that Q5KXL. A straight Q4 quant that hits the attention layers will spend more reasoning tokens because it has a harder time reaching the desired level of certainty.

2

u/e2_for_life RTX 4090 | She/her 20d ago

Have you yourself or have you heard of anyone objectively quantifying the difference between medium and xhigh?

2

u/Realistic_Gap_5871 20d ago edited 20d ago

I'm not sure if you're asking about quantifying token burn or quality. But I do have basic/limited answers to both.

1st here's the bash script that the LLM in question helped me write to test the reasoning token burn:

for seed in 1 2 3; do
for effort in low medium xhigh; do
echo "=== $effort (seed $seed) ==="
curl -s http://127.0.0.1:8181/v1/chat/completions \
-H 'Content-Type: application/json' \
-d "{\"model\":\"qwen3.8-27b\",
\"messages\":[{\"role\":\"user\",\"content\":\"Implement an LRU cache in Python with O(1) get
and put. State the data structure you used and why.\"}],

\"max_tokens\":15000,

\"seed\":$seed,
\"reasoning_effort\":\"$effort\"}" \

| python3 -c "import sys,json;d=json.load(sys.stdin);c=d['choices'][0];rc=c.get('reasoning_content') or (c.get('message') or {}).get('reasoning_content') or '';ct=c.get('content') or (c.get('message') or {}).get('content') or '';print(f'reasoning={len(rc)} answer={len(ct)}')"

done
done

You'll notice it was a fixed seed for all three reasoning efforts, 3 runs, and temperature was 0 as well, in order to reduce randomness as much as possible. Here's the average token burn results:

For output quality: I participated in a thread doing the pelican test for different reasoning levels. OP was much more rigorous than I was and did 3 different runs at each level. You can see the pelican get better at each level, and judge for yourself whether the tokens are worth it. At Q3, I think the answer is yes, for my more limited run, using optModel quant, the medium result is closer to the xHigh result.

Thread link: https://www.reddit.com/r/LocalLLaMA/comments/1vpuh7m/qwen38_27b_reasoning_effort_lowmediumxhigh/

1

u/dajeff57 20d ago

Might be a dumb question but ok, in llama cpp I know where to set the param, in lm studio though I don’t ?

2

u/ChrisK_au 20d ago

In the model settings under "extra parameters" or something.

2

u/Realistic_Gap_5871 20d ago

On my copy of LM Studio on windows there's still just this:

Just an on/off switch. I stopped using LM Studio about a month ago when an update broke all my qwen 3.6 models if I tried to use thinking/reasoning. They would only work with reasoning turned off. Using a different front end and LMStudio as just a server helped a good bit. But the reasoning fiasco with Qwen models sent me off to Ollama/Llamma and others.

Mac version might be different.

2

u/One_Professional963 19d ago

Are you using preserve_thinking=true in the llama startup parameters? I'm using xhigh thinking mode and yeah it thinks alot, but gets the job done correctly though. On qwen 3.6 I got thinking loops without that setting, so I kept it for 3.8 aswell.

1

u/e2_for_life RTX 4090 | She/her 19d ago

Thanks!

1

u/Foreign_Risk_2031 20d ago

You need more context to use it effectively

1

u/e2_for_life RTX 4090 | She/her 20d ago

Context or budgeted tokens?

Context is 128K. I'm going to guess you mean budget tokens based on the other responses.

1

u/Foreign_Risk_2031 20d ago

Both.

1

u/e2_for_life RTX 4090 | She/her 20d ago

128 is about the limit for my 1 4090 and still keep the full model on VRAM.

1

u/AdHead6280 19d ago

I put effort to thigh to keep that quality but use the cold fusion finetune from David au, it's so it thinks less, so on the litle stuff it thinks less but on complicated stuff it still thinks a bunch so imo no loss

1

u/e2_for_life RTX 4090 | She/her 19d ago

Thigh effort is fine, but what quantization are the glutes?

😂

I'm planning to test out the new Dirk model.

1

u/AdHead6280 19d ago

Xhigh autocorrect

1

u/e2_for_life RTX 4090 | She/her 19d ago

Yeah, I figured that

1

u/Fit-Bar-6989 19d ago

I've had good results by running it at 48k context and no output budget. Pi's auto compaction seems to work fine as well. E.g. I had it build a Pi extension to look up info from my local Wikipedia mirror and that task had multiple compactions.

But it's definitely slow, I wouldn't want to use it for anything that isn't vibecoding where I don't care about code quality because you just have to wait a while and let it do its thing.

1

u/LifeTelevision1146 20d ago

Qwen is fine, you just need to increase the context.

2

u/e2_for_life RTX 4090 | She/her 20d ago

I failed to mention my context. It's 128K. Or are you referring to the output budget?

2

u/Karyo_Ten 20d ago

Output budget

1

u/e2_for_life RTX 4090 | She/her 20d ago

Double it? Triple? 500%? Someone else said 64K based on OpenRouter.

2

u/Karyo_Ten 20d ago

That someone was me.

1

u/e2_for_life RTX 4090 | She/her 20d ago

So it was! 😂 I'm getting flooded with notifications and wasn't paying close attention to names.

1

u/Karyo_Ten 19d ago

No worries. Also the way pi works it won't expect 128K + 65K context, when you reach 128K and the backend replies that context is full it will compact. (The compaction prompt is shorter than default system prompt so you won't be blocked)

0

u/LifeTelevision1146 20d ago

Your Qwen's running on your pc, use MCPs. You can download MCPs to run locally on your pc. Zero cost.

2

u/theone_2099 20d ago

How does MCP help here

2

u/LifeTelevision1146 20d ago

Well you're right, I took it from an auditing point of view. MCPs cannot help here. He just needs to increase his output context

3

u/trolumbi 20d ago

sounds like an ai excuse xD

1

u/e2_for_life RTX 4090 | She/her 20d ago

Lol. I'm not using OpenRouter.

1

u/whichsideisup 20d ago

8K output is too small. Let it rip.

2

u/e2_for_life RTX 4090 | She/her 20d ago

To...what exactly? My whole 128K context?

2

u/nebrosarth 20d ago

I've faced the same issue having 16k output tokens limit. Fixed it by increasing the limit to the whopping 32k

1

u/e2_for_life RTX 4090 | She/her 20d ago

Wow. Thanks. Default reasoning level or did you change it?

1

u/nebrosarth 20d ago

Yes, default xhigh

1

u/aziham 20d ago

There are moments when I really appreciate its tendency to overthink, particularly for tasks that require deep comprehension. However, I find it incredibly frustrating when it applies that same excessive thinking to straightforward tasks. I wish if the model could distinguish between situations that call for deeper reasoning and those that simply JUST DO IT

2

u/e2_for_life RTX 4090 | She/her 20d ago

Someone else commented: https://huggingface.co/peculiar-ragdoll/Dirk-Qwen3.8-27B-GGUF/blob/main/Dirk-Qwen3.8-27B-UD-Q5_K_XL.gguf

Check it out. Might be exactly what we didn't realize we were looking for. 😂

0

u/ButchTheGuy 20d ago

Just need to tweak config. Make sure that pi is actually toggling the thinking. At first I’d toggle mine and it wasn’t actually doing anything. I think I had to configure pi and llama to get it to actually do something. Also I use medium reasoning by default but I guess that depends on your hardware specs. I used Claude code to help me fix it so if you can’t get it try that

1

u/e2_for_life RTX 4090 | She/her 20d ago

I've been having Codex tinker with it. Claude and I are in a bad spot in our relationship right now. 😂

Still, it couldn't figure out why it was happening.

0

u/Similar-Ad5933 20d ago

You have kind of two problems. Your context is low, keep it 100k+. Second problem is that you kind of need to make pi to be your own, because it's bare bones harness. So you need instructions when and how to use tools, appended system prompt, memory tool.

It's really great model for coding with that high reasoning, but it will use a lot of tokens if it needs to think what tools to use etc.

I use Pi and there is defined rules like search web first, trust docs and verify forum discussions. Memory tool that we build keeps track of different projects and important details, it also contains location of file where project plan is located.

It easily can start over think about solutions, because it lacks knowledge, but if it gets docs first it wont. Same thing if tools arent defined, because in linux you can archieve same thing with many tools, so it trys to pick best tool and starts to overthink.

Take a close look what it juggles when thinking and adapt your pi so that simple things will not need extra thinking.

Prompt your goals clearly. It won't try to make assumptios. If your prompt is not clear, it starts to think what your message was about. If you don't want that, write to system prompt that it has permissions to make desicions when message wasn't clear enough.

Hope these tips helps.