Skip to content
Open-source models are sufficient, but they haven't reached the point of replacing closed-source ones

Open-source models are good enough, but replacing closed-source ones is still a stretch

I moved an internal tool from a closed-source API to a locally deployed open-source model, ran it for a while, and then moved a good portion of it back.

Not because the results were bad. Quite the opposite—it performed better than I expected on structured tasks. The reason I moved back was simple: I did the math wrong. The money saved on API calls came back in the form of machines, operations, and debugging time—and I ended up paying a little extra.

What models like DeepSeek V4 genuinely changed is the answer to “can open-source models do the work”—from “barely” to “yes.” But it didn’t change another question: there’s still a gap between doing the work and doing it well.

Long context is not the same as understanding

Million-token context is the most easily misread parameter of this generation of models.

I ran a fairly typical test: dumped all of a project’s documentation in at once and asked about an interface contract that spanned three documents. It answered quickly, with a beautiful format, but cited a deprecated version. Two of the three documents described the same field with old and new meanings, and it picked the wrong one—without a hint of hesitation in its tone.

A bigger window solves “no need to split,” not “how to allocate attention.” These two things are often conflated. Stuffing all the material in only saves the work of retrieval and assembly; the quality of understanding still depends on whether the model can hold onto constraints across a long sequence.

I later changed a habit: no matter how big the window, I require it to point out which passage the answer came from. This requirement doesn’t improve its comprehension, but it exposes errors earlier. When it cited the wrong version, I could see it at a glance instead of waiting for a downstream system to throw an error.

The real value of long context, I think, is reducing state fragmentation. In multi-turn tasks, the scariest thing isn’t a wrong answer at some step—it’s a split in the middle that cuts out a key constraint, so all subsequent reasoning is built on a broken premise. Dumping everything in at once alleviates this problem, but alleviation isn’t a solution, because if both old and new versions of information exist in the context, the model still has to choose one itself.

The cost side is also often underestimated. The longer the context, the longer the wait for the first token, the more VRAM a single request occupies, and once concurrency picks up, queuing begins. I eventually capped the default window at around 200K, falling back to summarization or retrieval beyond that. Not because the model can’t handle it, but because the bill won’t allow it.

My way of evaluating long context has changed too. I no longer ask “can it summarize this long document,” but give it three contradictory documents and ask whether it can point out where the conflict is. Summarization ability has long been sufficient; what’s lacking is maintaining judgment amid noise.

So I’m now fairly conservative with long context: I treat it as a tool to reduce slicing, not an excuse to reduce organizing. The summaries that should be done, the citation points that should be marked, the subtasks that should be split—none of it is skipped. Window is capacity, not capability.

Sparse activation saves compute, not VRAM

The MoE math is easy to get wrong.

The public claim is that the total parameter scale is large, but only a portion is activated per forward pass, with active parameters on the order of 32B. This design does bring down inference compute—the cost per token is far lower than a dense model of the same scale. But what it brings down is not VRAM: the weights still have to be fully loaded, and the KV cache still grows with context length.

The first time I estimated machines based on “32B can run,” I concluded a single machine would suffice. In practice, opening the context to several hundred thousand tokens led straight to OOM. Only later did I realize that in long-context scenarios, what takes up the most space is often not the model itself but the cache.

There are only three routes, each with a cost:

  • Accept a shorter context and split tasks smaller—the cost is increased engineering complexity
  • Add GPUs—the cost is money, and once parallelism goes up, communication and fault tolerance both get harder
  • Quantize—the cost is a slight drop in stability under long context, and how much it drops you have to measure yourself

Multi-GPU also has hidden costs. Tensor parallelism can distribute weights and cache, expert parallelism can alleviate the load imbalance caused by sparse activation, but both introduce communication overhead; the more GPUs, the uglier the tail latency of a single request. Small teams most easily overlook this: throughput goes up, but the experience gets worse.

The hardware constraint is also very real. Consumer-grade GPUs can run quantized versions, but throughput is ugly; renting GPUs is billed by the hour, and idle time burns money too. The economics of self-hosting only hold when utilization is high enough—the same as buying a server to run a website.

There’s another layer of cost that isn’t on the machine: versions. Self-hosting means you have to keep up with model upgrades, dependency upgrades, and driver upgrades yourself, and after upgrading you have to rerun the regression suite. The API took this work away; self-hosting hands it right back.

The trade-off between length and concurrency is also a trap. When long-context requests pile up, throughput drops faster than expected, and queueing time masks the cheapness of a single inference. This math can only be measured with real traffic, not by looking at a single benchmark.

I ultimately chose to split tasks, because my scenario could be split to begin with. This isn’t a universal answer—it’s just that for me, splitting tasks is cheaper than adding machines.

There’s also a counterintuitive conclusion: when concurrency is low, self-hosting doesn’t necessarily save money. The cost of an idle GPU is fixed, while the API is billed by usage. When call volume is already small, the money saved may not even cover electricity and operations time. This math has to be calculated by peak and utilization, not by average.

In agent scenarios, the failure point isn’t “wrong answer”

Multi-step tasks are the part I care about most, and also where this batch of open-source models has improved most noticeably. It can run a dozen steps in a row without drifting, and its ability to locate problems across files is much better than the previous generation.

But the failure modes are very consistent, and not as easy to spot as a “wrong answer.”

It skips steps. When it should analyze first and then give a patch, it gives the patch directly, and it looks quite reasonable. It treats non-existent files as real dependencies—a path mentioned once in the context is assumed to exist thereafter. It also quietly changes early assumptions in long workflows: a variable’s meaning defined at step three becomes something else by step fifteen, and it doesn’t feel the contradiction itself.

These three types of problems can only be alleviated with prompt engineering, not solved. What actually helps is external structure. I later added three things to my pipeline: a step limit, structured state at each step, and rerunning tests rather than the entire task after a failure. With these three added, the success rate went up, and so did latency and cost. This is an explicit trade, not a free improvement.

If I had to prioritize these failure types, I’d fix state first, then tools, then prompts. If state is wrong, everything after is wrong; if tools are wrong, errors get written into real systems; if prompts are wrong, the worst case is poor expression.

The way multi-step tasks are evaluated also needs to change. Looking only at whether the final output is correct misses a lot of information. I now split an execution into four stages—retrieval, analysis, execution, verification—and check separately whether it missed intermediate artifacts, fabricated dependencies, or claimed unverified results as verified in the final step.

With many tool calls, there’s another side effect: context balloons faster than you’d think. One search returns thousands of words, one log query returns hundreds of lines, and after a dozen or so the window is full. I now require tools to return structured summaries, with raw content written to disk, and the model only takes the fields it needs. This change sounds unremarkable, but it turned many long tasks from “loses memory halfway through” into “can still be reviewed after finishing.”

The cost is that this way of judging is very time-consuming. Every time I switch to a new task, I have to redesign the state fields and validators, and reusability is worse than I imagined. I now accept this: a general-purpose agent is still far from me; making one task solid is more useful than making ten half-finished ones.

Interestingly, a model with higher single-step accuracy is not necessarily more reliable in multi-step tasks. Long chains test state retention and error recovery, and these two things are determined more by the outer structure. This is also why I increasingly care less about “a slightly higher benchmark score.”

Where I still use closed-source models

Creative writing, tone control, and open-ended strategic judgment—I still use closed-source for these three.

It’s not laziness. V4’s output leans structured, logic-first, and when writing long pieces it has a persistent “explanatory feel”: every paragraph is explaining what it’s arguing, which is tiring to read. Ask it to imitate a certain tone, and the first two sentences are fine, but by the third it starts to drift.

I tried having it revise my writing, and the result was that it made the sentences neater and also emptier. It abstracts concrete things into concepts and turns hesitation into judgment. Both of these are fatal for something meant to be published.

This isn’t a defect; it’s a difference in training objectives. Reasoning and code can be verified; a feel for language cannot. A model getting stronger on verifiable tasks and getting stronger on non-verifiable tasks were never the same thing.

The real advantage of open source isn’t cheapness—it’s controllability. Having the weights in your own hands means you can prune, privatize, keep sensitive data on the internal network, and add auditing outside the model. These are tangible value for people building products; they just don’t show up on benchmark leaderboards.

If you only count money, self-hosting isn’t cost-effective for most small teams. APIs bill by usage, self-hosting bills by peak, and when call volume is low, the money saved isn’t even enough to cover electricity and ops time. What really makes it worthwhile is two other things: data doesn’t leave the internal network, and behavior can be audited. The former is a compliance requirement, the latter an ops need. The tools I build involve internal documents, and sending content to an external API itself requires a round of approval—that cost isn’t on the bill, but it’s there.

The iteration speed of open-source models is also why I keep them. Once weights are public, the community produces quantized versions, inference optimizations, and task-specific fine-tunes within weeks. With closed-source models, capability improvements are decided by the vendor; with open source, you can participate. This difference isn’t visible short-term, but it accumulates long-term.

I’ve also tried the tuning path a bit. System prompts solve most output-format problems, retrieval solves factual problems, and I’ve only used LoRA in very small scenarios. Most of the time, the first two steps are enough; going to fine-tuning is often not because the model isn’t good enough, but because the requirement itself wasn’t thought through. And a fine-tuned model has to be re-evaluated, a workload that’s often underestimated.

I also don’t think open source and closed source are opposing camps. They’re more like two delivery methods: one gives control to the user, the other leaves maintenance responsibility with the vendor. Which to choose depends on whether anyone on the team is willing to take on that responsibility.

My current default configuration is hybrid: tasks that can be automatically verified go to open source, those needing language feel and fuzzy judgment go to closed source. This split is crude, but it’s the only conclusion I can state clearly after two weeks of trying.

It may change later. Once open-source models are a bit more stable in long contexts, or my tasks get a bit narrower, this line will move further left. But for now, I don’t plan to take on debugging time that could have been avoided just for the goal of “fully self-hosted.”

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#Agents #Inference Costs #Open-Source Models

Comments