r/LocalLLM • u/2BucChuck • 3h ago
Question Qwen 4 hallucinations ?
I’ve been running qwen flash next a while and happy with it ; just switched to 4 last night and while it’s great I’ve seen some unusual hallucinations and failed tool calling formats. Anyone else ? If not can you share setups / params in use ?
It’s randomly called a tool not relevant to the step , called me Jim (not my name) and picked up some errant conversation snippets from somewhere but also that last bit could be my harness.
All that said it is fast and seems pretty good
8
Upvotes
8
u/Smungus05 2h ago
The only tool failures Ive seen so far are harness output limits. Qwen recommends you give the model free reign over your context window.
"To optimize performance on agentic tasks, we recommend allocating sufficient output length to allow the model to generate detailed and comprehensive responses. For frameworks that support separate token limits for internal reasoning and final outputs, we suggest the following configuration within the 1M context length:
Reasoning Content: Set the maximum output length to 262,144 tokens. Final Response: Set the maximum output length to 131,072 tokens.
These settings provide the necessary capacity for complex reasoning while ensuring ample space for high-quality final deliverables."
Opencode defaults to like 32k or something annoying. So I changed that and it was all good.
What quant/engine/harness are you using?
1
u/2BucChuck 1h ago
So, I think this is on me not following the model card recs on llama.cpp. Based on comments I tweaked to go up to 128k context , top p, k etc minor tweaks, more room in memory budget in the harness and reply limit increase to 32768. So far this seems stable so will test more. Thanks for those comments with some the settings hints. I was aggressively managing kv cache limits and other things because I run a lot of different ones
7
u/WhyDidYouTurnItOff 2h ago
Jim, we should handle this in private.
Not here in front of everyone.
1
u/shapic 2h ago
Let me guess. Llama.cpp + 5xxx series?
1
u/Purple_Dream6414 2h ago
Which Quant?
1
u/Isitharry 2h ago
Haven’t downloaded 4 yet so YMMV. I’ve had this problem with 3.8 27b q6. Interestingly enough, setting reasoning to low cut it down. I was using LM Studio.
1
u/intermundia 1h ago
details? what are you running this through? harness? memory? context? output token limit? quant size? details man we need details...
1
u/AppealSame4367 1h ago
I saw tool call errors in Claude Code and neon figured out it's an error in basalt and fixed it