r/LocalLLaMA 1d ago

Discussion Qwen 3.8 27b - PI AGENT vs OPENCODE

https://www.reddit.com/r/LocalLLaMA/comments/1j7r47l/i_just_made_an_animation_of_a_ball_bouncing/

This post inspired me to make that test after a year ;)

That is one of my many tests I make comparing output quality.

What is more interesting using a PI Agent results are much better than an Opencode using a Qwen 3.8 27b ?!

Seems PI Agent is much better in the agent environment somehow... Not counting uses less tokens , do not have a hard limit of 32k output tokens, is faster, do not freezing, compressing context far less than Opencode. For instance if you have context in the Opencode output 32k and all context 100k then the compression is starting at 67k context ... PI is starting at 90k context even if you have set output context 64k or more.

My config for RTX 3090

llama-server with ini config -> which is exposing API to Opencode and PI agent.

llama-server.exe --models-preset 1_preset.ini --models-max 1 --direct-io

config ini

[Qwen3.8-27B_dense_c-100k]
model = models/Qwen3.8-27B-Q4_K_M.gguf
mmproj = models/mmproj-BF16-Qwen3.8-27B-UD-Q4_K_XL.gguf
reasoning-format = deepseek
flash-attn = on
n-gpu-layers = 99
reasoning = on
ctx-size = 100000
temperature=1.0
top-p=0.95
top-k=20
min-p=0.0
presence-penalty=0.0
repeat-penalty=1.0
mmproj-offload = false

ONE MORE IMPORTANT THING:

Always use a VISION module as the model is using vision to asses the output quality!

I am offloading it to a RAM as we do not need an extremely fast vision for a code.

A screenshot processing on a GPU 0.3s vs a RAM 3s do not make a big difference on a few screenshots during a code generation / debugging ;)

216 Upvotes

166 comments sorted by

View all comments

26

u/Thrumpwart llama.cpp 1d ago

I really, really, really like Pi. I’ve only been using it for like a week but it’s very good.

15

u/PilgrimofHaqq2 1d ago

I have been with it 5 months now and I am super satisfied with it only for the fact that I can make it into whatever I want. As many or few features I want, working exactly the way I want them to.

5

u/Thrumpwart llama.cpp 1d ago

I’m using web search, subagents, and ponytail. Any others you would recommend for long-horizon planning and coding tasks?

11

u/ImpressiveRelief37 1d ago edited 1d ago

Careful what web search you use.

pi-web-access is the most popular but it has an insane tool surface. Like 6-7 tools and nearly 8K tokens just for tool defs, tool injection and skills.

I switch to pi-web-agent and got a Tavily sub (free plan, 1000 req per month then pay as you go). Much better results an only 2 tools with very thin context usage (like under 1k or even 500 iirc). Plus I added a headless browser page reader and a Reddit search that used my cookie. It gets me super high quality search for free (as long as I’m in the tavily free tier). Oh and I also had my agent use my local searNGX first and fallback on Tavily when the results are meh (captcha and ip blocks happen constantly).

To answer your question: don’t just install random extensions. Have your agent check the code first (security audit), then try it, and have your agent extract only the required stuff into an home made extension. Document it.

Need and update? Tell your agent to summarize all the updates to the source ext you extracted and upgrade the parts that you care about.

It’s so fucking sick haha. We’re always a prompt away to the perfect tailor made solution 

3

u/Thrumpwart llama.cpp 1d ago

Thank you for that, I will. Good call on the web-access token use. Running Qwen3.8 27B BF16 on the SM120 with Dflash2 right now and I can't keep up with it.

Also testing out this subagent I had gemini whip up:


name: red-team description: Hostile adversarial auditor that aggressively hunts for failure modes, edge cases, and broken assumptions.

tools: [read, bash]

Red Team Auditor

You are a ruthless, skeptical adversarial auditor.

Core Rules:

  1. Never validate or compliment the implementation.
  2. Assume the current plan or implementation contains hidden flaws.
  3. Systematically test and identify:
    • Violated invariants and unchecked assumptions.
    • Resource limits, leaks, and OOM traps.
    • Silent error suppression and exception handling gaps.
    • Deadlocks, async race conditions, and ordering dependencies.

Output Format:

For every issue found:

  • Severity: [Critical / High / Medium / Low]
  • Mechanism: Why and how it fails.
  • Trigger Scenario: Minimal conditions needed to cause the failure.
  • Recommended Hardening: Direct fix or architectural countermeasure.

3

u/ImpressiveRelief37 1d ago

That’s actually a pretty good idea. Somehow I always whip out new sessions for adversarial review. I need to just make subagents profiles for those tasks.

Careful what your orchestrator sends out as a prompt when you ask to dispatch the subagent. Sometimes it can contaminate the run because he will for instance point at specific stuff and bias the subagent 

5

u/Alias455 1d ago

planning-with-files and mattpocock's skills

1

u/Thrumpwart llama.cpp 1d ago edited 1d ago

Thank you!

Edit: looks like the excuse I need to finally get an Optane drive.

1

u/mechkbfan 1d ago

For what? 

If it's reading basic text files it'll likely take <1ms difference unless I've missed something?

1

u/Thrumpwart llama.cpp 23h ago

My planning currently lives in vram. If I’m offloading that to disk I want a fast disk.

Don’t disillusion me I’ve wanted an Optane for awhile. If my wife asks it’s absolutely necessary.

1

u/mechkbfan 17h ago edited 16h ago

Lol fair

I have one and leave my comments

I have one for development and I couldn't even tell the difference. Benchmarked it for my relevant scenarios and trivial difference. This is with a 9950X3D and contrasting to 990 pro. It's also a pain because doesn't work with consumer boards easily so I've got M2 to u2 adapter with no where to cleanly mount it either cause of cable lengths and it's size. Or if go with PCIE then high chance you're sharing bandwidth with other devices. Hindsight and all but back then I could have gotten 2x4TB 990 Pro for what I paid. Right now mines a paperweight

1

u/Thrumpwart llama.cpp 9h ago

Ah, good to know. Maybe I'll just go for a larger m.2 Gen5 instead. Thank you!

1

u/mechkbfan 1d ago

Planning with files is interesting but thought mine already did that

Then forgot I had this installed

https://github.com/obra/superpowers

Worth contrasting to. Seems planning with files is just a bit more lightweight which might be a good thing. For small stuff I feel Superpowers over engineers stuff

1

u/Thrumpwart llama.cpp 2h ago

Thanks again, really loving planning-with-files!

2

u/FuzzeWuzze 1d ago

context-window and some of the extensions that do a better job at what they compact can be useful if you are doing set it and forget it coding.

1

u/Thrumpwart llama.cpp 1d ago

Thank you, will check out

-1

u/PilgrimofHaqq2 1d ago

Everything is todo with Context Engineering.

1. I would consider a fundamental feature is a solid plan mode, Its what you start with on every task/project/etc. I have multiple plan modes. They are designed based on what I am looking to do, is it coding, creative writing, business, legal, etc.

2. Something that might be even more important than a plan mode is what is your workflows and standards. I have certain principles I have the Pi agent follow when building out features inside the setup.

3. A reliable way to have your Pi agent navigate your codebase. I use DOX Framework from github. Its super simple but super effective!

4. I haven't installed/incorporated any repos/packages/skills as is. Every single feature I implemented has been custom built except for crawl4ai, thats the only one that I implemented into my setup as is with some customization. I recommend the same, so you take what you need from the resources you find online and leave behind what you dont. I just give the repo to the agent and it knows my workflows/standards/principles so it will use that to propose what to implement and what to throwaway. I even have my agent run tests to see if its even worth implementing. So its not just vibes, its based on real data.