Skip to main content

Oh-My-Pi (omp) supplemented with local models

Tags:
Reading time: 6 minutes Suggest a change

One of the few affordances I have left for hobby projects these days is building my own bespoke agent harnesses (see: shoggoth, yog), but on my work laptop, I use Oh-My-Pi. When I first started this job, I was brand new to omp, Claude Code, basically everything the rest of the world had been skilling up on while I was laid off and learning bottom-up rather than top-down by building Shoggoth. I plugged omp into the Anthropic subscription my employer provided me with, turned off anything that sounded like a waste of tokens, and didn't dig much deeper than that for several weeks.

Fast forward to today, and my setup is fastidiously customized to me and the way that I work. Even though things are set up just the way that I like them, it stands to reason that other people may like some of the patterns, plugins, etc. that I take advantage of while working, so I'm going to share them here on the blog. For starters, I'm going to talk about how I have reconfigured my harness setup to take advantage of a few local models I'm running with LM Studio (the desktop app, not their "bionic" harness) by taking advantage of the Macbook M5's generous VRAM and bus size/speed.

I won't get into the particulars of setting up your own local models with an OpenAI-compatible API -- there are plenty of ways to do that, and guides for each -- but I will talk about the models I'm using and where they slot into my process.

Embeddings Jump to heading

I use a highly-customized version of QMD (Query Markdown Documents), a vector-based document search ingestion and search system, for having agents save and search for notes. Out of the box, QMD runs a low-powered CPU-bound model to generate the vector embeddings for text -- which is how it establishes semantic relationships within and between documents -- but you're able to use its node API in order to provide your own. I've been using baai/bge-m3, which takes up just over a gigabyte of VRAM while resident and has no issues keeping up with the demands I put on it. It's able to accept more input and produce longer output, so it doesn't need to break documents up into as many chunks in order to ingest them.

omp doesn't use embeddings models directly, and has no role associated with them, but agents can use CLI/MCP tools to incorporate QMD (or other embeddings workloads) into their behavior.

Decisions Jump to heading

For situations where a quick decision needs to be rendered or something needs to be evaluated (judged) based on specified criteria, I'm using liquidai/d1-omni-2b locally with a custom decision tool that lets my agent pass a prompt to the decider. It scores well against jev -- especially for its small size -- and can run 4 parallel decisions on my laptop, taking up about 2.5 gigabytes of VRAM while resident. Since switching it on, I haven't noticed any speed decrease while burning through a task.

omp doesn't use this directly, either. It recognizes decision models, but only to filter them out of selections when choosing chat models for roles/tasks. That said, it's not a lot of plumbing to wire up a simple MCP tool for your agents to use like I did. If I'm able to open source it (which is up to my employer), I will. I use this to judge agent output in workflows or for routing decisions.

Reranking Jump to heading

To score and reorganize a list of text items (documents) according to criteria, I'm using baai/bge-reranker-v2-m3. This has to be hosted outside of LM Studio, unfortunately, but it's another simple lift here to put together a Cohere-compatible rerank API endpoint serving a local model. If I can open source this along with the custom tools I'm using, I will. What I built also provides an HTTP SSE MCP endpoint for calling the reranker. Agents and my own workflows, plugins, skills, etc. are able to use this in order to filter out noise from search results and such, which helps keep the agent's context clear.

Li'l bitty agents Jump to heading

omp has a number of roles that it uses for tiny tasks like committing, rendering "widgets" (UI bits like taglines, etc.), memory storage/retrieval, and many other minor actions that provide a better quality experience to the agentic development process. These are pointed at a weak model from your provider by default (e.g. haiku), but they are a fantastic use case for a small, quick local LLM. I've settled on ornith-ai/ornith-1.5-9b for my day-to-day. I've got another I use for overnight tasks, but we'll get to that in just a bit.

Ornith 1.5 is quick enough and capable enough to describe tool executions, rename sessions according to the work in flight, check for table captions, and a whole host of other little odds and ends that the harness assigns to it. It's certainly not as fast as Haiku -- I'm getting around 20-24tps on average -- but the harness never blocks the main agent's turn so in most cases, you won't even notice the difference. It's not great for any real "main agent" work like editing code or doing research, but for that, I've got another model I've been experimenting with: prism-ml/ternary-bonsai-2-27b-gguf.

Ternary Bonsai 2 27B is astonishingly capable for its tiny size, and operates at a "decent enough" speed for overnight runs (9-13tps). It squeezes a 27B parameter model into an 8.56 GB model and uses SSD storage trickery for its KV cache. I don't use this for anything I need a response from soon, but I've let it ride overnight on some reasonably complex tasks and found come morning that it actually didn't shit the bed. I still carefully check over its results more so than I would with e.g. Opus, of course, but I have been truly surprised by what it's been able to pull off if you just let it sloth-crawl its way through.

That's it Jump to heading

I've got plenty more to share about my harness and how I work with agents, the patterns and workflows I'm experimenting with, and all of that jive, but I think this is a good starting point. I'll leave it there for now. Hopefully some of these pique your interest and you can take advantage of them in your setup, too.