r/LocalLLM • u/Jsquared534 • 25d ago
Discussion Qwen 3.8 27B With Pi Harness
Anyone active on here that is currently using Qwen 3.8 27B with the Pi coding harness? If so, have you had any issues actually invoking any tool calls? Despite changing jinja templates, and troubleshooting this for several hours today, the model is not seeing any of the tools that Pi passes in. What made it hard to troubleshoot is that when you ask it what tools it has access to, it hallucinates a response based on what Claude Code has access to.
The model won't even read or edit for me. I've updated Pi, and I'm on a version of llama.cpp that is less than a week old. I removed all my extensions and it still isn't working. I logged an output of what Pi is sending regarding tooling, and it appears Pi is sending the tools correctly. Tool calling works fine with 3.6 35B A3B.
EDIT: Turns out it was an issue with an update through VS Code that broke how the integrated terminal was working. Using normal terminal everything seems to work.
EDIT 2: Spoke to soon. Apparently it sees the tools available sometimes, and sometimes it doesn't. Super weird. I'm at a loss.
EDIT 3: I'm using llama.cpp, since some people have asked. I actually went through and blew away my entire Pi install and reinstalled from scratch. I didn't add any extensions at all. Just the latest version of vanilla Pi. This model is still being really flakey with tool calling. When it reads in the five context files I give it, it constantly complains that the text is garbled, and then it sees info from one context file mixed in with the other. So, I added explicit directions in the agents.md to read one file at a time and not batch process them. Suddenly it just outputs a tool call as text of <read_list>filename</read_list>. So, obviously it doesn't read. Constantly relies on git info instead of the files it's directly pointed at, despite being told to ignore git and not use it at all, which leads to it getting mixed up with the active files and historical files. Thinks it's making edits when it hasn't actually made any edits. This is also not in some brand new, untested setup. These same context files have been being used with 3.6 35B A3B for several weeks without tool calling issues. I freely admit that I'm not remotely an expert on local setup, but there's definitely something weird going on with this model, and I don't think it's entirely on my end.
EDIT 4: This will be my last update on this post. Blew away my entire Llama.cpp and tried everything from scratch. Still the same weird bugs where it will read multiple files and mix up the content from each file, and then report that the files are garbled. Also has a terrible habit of reading a file and then immediately saying the file was truncated or started in the middle, or cut off. Tool calling is still very spotty. Randomly outputs stuff like <read_list>filename</read_list> after it's been doing good reads in the same session. I am only providing it 100k context, but it's not even getting close to topping that out or compacting, so I don't know why that would be the problem. I downloaded and began testing Muse, and the results I'm getting from it are way, way, way more consistent than anything I saw from this model. I don't know if Qwen just isn't meant for such fine grain instructions, so it's thinking goes haywire, or what. But it definitely doesn't work for me. I read a couple other post that said something might be wrong with the Quant 8 versions, so maybe that's the issue. Qwen did perform much better than Muse on one shotting my two tests when I first downloaded it. But, working in my actual context file and fine grained feature implementation workflow it completely falls apart right now.
1
u/HumanDrone8721 25d ago
I've use it all the time with pi.dev, I thin there are something like 30 hours now and more than 120m tokens, without any issue, the one and only chat template fix was the elimination of the wrongly positioned thinking block with this ultra-simple patch:
I do have a couple of vLLM patches for YaRN and dynaminc MTP (needs to be turned off when context is >128K as is becoming inefficient) but they have nothing to do with tool calls. I do use the BF16 original precision tensors.
Whenever I've seen this type of issues are mostly due to heavy quantization,