Open Reader

When Running Your Own AI Models Beats Paying for APIs - Steven Latré, imec

completed 18:29 Oct 31, 2026 Watch on YouTube

Current Status

completed

Video ID

9-Y_oS9OBLc

RAG / Chat

Enabled
When Running Your Own AI Models Beats Paying for APIs - Steven Latré, imec
Description

Steven Latré leads AI at imec, the Belgian semiconductor R&D center, and his team ran thousands of benchmark runs to find out what moving from APIs to your own GPUs really costs for long-running coding agents. Testing open-weight models and three coding harnesses on SWE-Bench Pro, they found that hardware costs jump in steps rather than a smooth curve, that concurrency matters even more than accuracy, that break-even GPU utilization ranges from 89% on small systems to about 15% on 8x B200 machines, and that the right harness can cut GPU time in half for the same result. Chapters: 0:00 Intro 0:59 Why a chip lab studies AI workloads 1:32 The stages of AI maturity 3:28 Owning your stack blows up the design space 4:38 The benchmarking study 5:28 How the tests were set up 7:28 Accuracy by model 8:40 Adding the hardware cost 10:08 Concurrency: how many users fit 12:37 API vs. renting vs. buying GPUs 14:35 Harnesses and token use 16:20 What's next Steven Latré https://www.imec-int.com Join us in SF for the second annual AIE CODE summit: https://aie.codes our last flagship summit of 2026. Applications live now!

Summary

Generated by gpt-5.6-terra

At-a-Glance

  • Verdict: Watch fully
  • Core thesis: Self-hosting open-weight models can beat API pricing for sustained, long-horizon agent workloads, but only after jointly optimizing model quality, harness token efficiency, GPU architecture, concurrency, and utilization rather than treating infrastructure ownership as a simple cost swap.
  • Why it matters: For agentic coding and similar long-running workflows, the operating cost is driven as much by concurrency limits, KV-cache pressure, and harness behavior as by model token price—making this a control-plane and infrastructure-design problem.
  • Best use: Use the talk to frame a workload-level build-versus-buy evaluation and to identify the measurements required before committing agent workloads to leased or owned GPU capacity.

Executive Summary

Steven Latré of imec argues that AI organizations typically progress from consuming closed-model APIs, to routing among models for token-cost optimization, and then toward hosting open-weight models on leased or owned infrastructure. The latter transition becomes attractive as agent token consumption grows, but it expands the design problem from selecting a capable model into managing trust, serving engines, CPU/GPU balance, KV cache, concurrency, and total cost of ownership.

imec benchmarked long-horizon coding-agent tasks using SWE-Bench Pro, multiple coding harnesses (Codex, Pi, and Claude Code), API and open-weight models, and varied hardware configurations. The central finding is that application accuracy alone is insufficient: models with broadly comparable task resolution can require radically different GPU resources, while larger models may improve resolution but support very little concurrent usage at materially worse latency.

The reported economic crossover is highly hardware-dependent. Smaller or lower-tier deployments required roughly 89% GPU utilization to make self-hosting competitive, which Latré calls infeasible; H100/B200-class systems could reportedly break even around 15% utilization. For the study's coding-assistant case, a Claude-class workload was described as a practical threshold where infrastructure produced about 25% savings versus API use.

Harness choice is a second-order lever with first-order cost impact. The tested harnesses delivered similar task success at first glance, yet one Codex configuration used roughly half the tokens and GPU wall time of alternatives for a cited model case. The practical message is to benchmark the full model–harness–inference–hardware stack against the actual workload, continuously, rather than selecting any component in isolation.

Key Takeaways

  • Claim: Model routing is only the first optimization stage; organizations with growing agent-token demand should evaluate owning more of the serving stack. | Evidence: Latré describes a progression from closed APIs, to cost optimization through model routing, to hosting open-weight models on leased infrastructure and potentially buying infrastructure. | Implication: Ken should separate long-running background agents from interactive user-facing flows when deciding where self-hosting is economically justified. | Caveat: The case for self-hosting is strongest for long-horizon tasks; Latré explicitly says interactive workloads may have different economics.
  • Claim: The relevant unit of analysis is end-to-end task economics, not token price or benchmark accuracy alone. | Evidence: imec ran thousands of SWE-Bench Pro coding-task experiments varying models, coding harnesses, hardware architectures, resolution rate, latency, and cost. | Implication: Any infrastructure decision should be based on a workload-specific benchmark that includes success rate, latency distribution, concurrency, and fully loaded serving cost. | Caveat: The presented results are for one application class—coding assistance—not a representative enterprise workload portfolio.
  • Claim: Comparable agent-task quality can conceal major differences in GPU cost because model architecture and serving requirements are non-linear. | Evidence: The speaker says Qwen and DeepSeek achieved broadly similar application performance in the study, while one required roughly four times the GPU rental cost; moving from a Claude model to Kimi K3 reportedly added about 20% accuracy for only about 15% more GPU-rental cost. | Implication: Model evaluation should include hardware-fit and capacity planning; a nominally cheaper or smaller model can be more expensive in production. | Caveat: The talk does not disclose the exact model versions, hardware configurations, pricing assumptions, or statistical detail needed to generalize these ratios.
  • Claim: Concurrency and KV-cache capacity may be more operationally decisive than raw model accuracy for self-hosted long-context agents. | Evidence: Latré explains that both model weights and each user's KV cache must fit memory; in the cited long-horizon setting, Kimi K3 supported only about four reliable concurrent users and still ran around three times slower than the Claude Code baseline. | Implication: Before deploying a self-hosted coding or research agent, Ken should load-test simultaneous sessions with realistic context growth, rather than extrapolating from single-user throughput. | Caveat: The baseline and 'comfortable' concurrency threshold are not formally defined in the transcript.
  • Claim: Self-hosting economics have utilization cliffs: low-tier deployments need unrealistically high utilization, while high-end hardware can reach viability at much lower utilization. | Evidence: The study found lower-tier model/hardware systems needed approximately 89% GPU utilization to beat APIs, versus approximately 15% utilization for an H100- or B200-class setup; the speaker reports about 25% cost savings for the coding-assistant use case at the relevant threshold. | Implication: Ken should avoid buying small dedicated GPU capacity merely to reduce API bills; self-hosting should clear an explicit utilization and capacity-commitment hurdle. | Caveat: These break-even points are total-cost-of-ownership estimates tied to this benchmark, workload mix, and assumed procurement/rental conditions; they are not universal thresholds.
  • Claim: The agent harness can halve infrastructure cost even when task success is unchanged. | Evidence: Across Codex, Pi, and Claude Code, the study saw similar application-level benchmark accuracy, but a cited Codex setup generated about half the tokens and therefore about half the GPU wall time relative to the comparison harnesses. | Implication: Treat harness prompting, tool-loop design, and termination behavior as capacity-engineering variables; measure tokens per completed task and GPU-seconds per successful task. | Caveat: The duplicated transcript inconsistently names the associated model case, so the robust conclusion is harness-level token and wall-time variance rather than a precise model-specific result.

Detailed Brief

What changes when moving from API consumption to owned serving

  • Claims: API use largely abstracts away capacity management, whereas self-hosting creates responsibility for the entire model-serving design space.; The speaker sees a gap between software teams focused on models and harnesses and infrastructure teams focused on hardware, despite the two layers determining each other's economics.
  • Evidence: Latré names model trust, harnesses, hardware architecture, CPU-to-GPU balance, KV-cache optimization, and inference-engine choice as decisions that emerge once the organization owns infrastructure.; imec positions its work as connecting AI workloads to the underlying infrastructure and is building an ecosystem spanning software, chip, and infrastructure providers.
  • Caveats: The presentation is a directional benchmarking talk, not an implementation guide: it does not provide deployment architectures, inference-engine comparisons, or a reproducible cost model in the transcript.
  • Implications: An internal self-hosting program needs joint ownership across agent/application engineering and platform/infrastructure engineering, rather than being assigned solely to either function.; A cost comparison that excludes operational burden, reliability engineering, security controls, and capacity utilization will understate the true decision complexity.

Benchmarking must be continuous rather than a one-time procurement exercise

  • Claims: The optimal model, harness, and hardware combination is a moving target.; Additional levers such as quantization and speculative decoding can materially change the result but were not fully configured or analyzed in the presented study.
  • Evidence: The speaker cites continual releases of models and hardware architectures and says imec is expanding its pipeline into a public benchmarking dataset.; The study already incorporates thousands of runs and multiple dimensions, but explicitly leaves further serving optimizations for future work.
  • Caveats: Public benchmarks can inform selection but cannot replace evaluation on proprietary tools, repositories, context lengths, reliability requirements, and traffic patterns.
  • Implications: The durable asset is an internal evaluation and cost-observability pipeline, not a fixed vendor/model decision.

Notable Concepts & Terms

  • SWE-Bench Pro: The coding-agent benchmark used as the workload proxy; it evaluates whether agents resolve software-engineering tasks, making it more relevant than generic model benchmarks for coding workflows.
  • Long-horizon tasks: Multi-step agent jobs with extended tool use and context accumulation; the speaker identifies these as the initial use case where self-hosting can make economic sense.
  • KV cache: Inference memory used to retain prior token state; it grows with active users and context length, making concurrency a memory-capacity problem as well as a compute problem.
  • Harness: The agent runtime/orchestration layer—examples include Codex, Pi, and Claude Code—that determines how the model plans, calls tools, consumes tokens, and terminates.
  • GPU utilization break-even: The share of capacity that must be actively used for a leased or owned GPU deployment to cost less than APIs under a total-cost-of-ownership model.
  • Open-weight models: Models whose weights can be deployed under the operator's own infrastructure, enabling control of serving and potentially lower marginal cost but shifting operational responsibility in-house.
  • Speculative decoding: An inference optimization mentioned but not evaluated in detail; it can alter throughput and therefore change the model/hardware cost comparison.

Operator Notes / Why Ken Should Care

  • Create a per-agent scorecard with successful-task rate, tokens per successful task, GPU-seconds per successful task, p50/p95 latency, peak KV-cache memory, and sustainable concurrent sessions.
  • Segment workloads into interactive versus asynchronous long-horizon classes before evaluating self-hosting; do not use blended token volume as the decision metric.
  • Set a utilization gate for any reserved or owned GPU commitment, including expected traffic seasonality and redundancy headroom; reject deployments that require near-continuous utilization to break even.
  • Run harness A/B tests independently of model comparisons, with identical task suites and tool permissions, because token-loop efficiency may yield larger savings than model substitution.
  • Treat any reported 25% savings as a hypothesis to validate against actual model versions, cloud pricing, engineering labor, availability requirements, and internal workload distribution.

Source/Metadata

  • Title: When Running Your Own AI Models Beats Paying for APIs - Steven Latré, imec
  • Transcript words: 3611
  • Duration seconds: 1109
  • Timestamp note: No timestamps or chapter markers were present. The final portion of the transcript substantially repeats earlier material, with one inconsistent model name in the duplicated passage.

Transcript

3014 words en Processed in 97.1s

My name is Steven. I'm leading the AI department at imec. For those of you who don't know what imec is, we're not that well known in the AI space, but we're very well known in the semiconductor space, been seen as the hidden gem. We've existed for more than four decades and what we typically do is we have the most advanced R&D clean room in the world and we run together with our partners next generation semiconductors. The impact that we've had in the semiconductor space is pretty huge. I think every single transistor technology that is deployed now has been invented by us in the last four decades. So a hidden gem in Belgium where I'm from. Why is a semiconductor expert talking about artificial intelligence? Well, we do way more than just transistor technology. We go all the way up to systems. We go all the way up to the workloads as well. That's where I'm responsible for, where we're trying to connect what AI workloads do to infrastructure. On one hand, because we've lived that the last few years. Of course, within imec, we're also working very much with AI to realize agentic flows as well. What we've experienced, I think a lot of us have experienced the last few years is different stages of AI maturity. We started off in 2024, 2025 thinking that we needed the latest and greatest of every single frontier model and that the best wasn't good enough and that we needed more and more. But at the same time, what we realized is that prices started to evolve. We moved from subscription-based pricing to token-based pricing. Then the last year, we moved more towards model routing where we tried to find the best type of model for the task at hand. Things that I think all of us have been doing the last year or so as well. What we're actually seeing, both within the company but also with customers that we're talking about, is that there are other stages to that as well. Model routing is maybe the first low-hanging fruit in getting good optimization of finding the right model to the right task. We're seeing more and more as token consumption really grows that there's a need for doing other things as well. Doing other things means taking control of your own stack. So we're seeing customers and we're on that path as well moving from, first of all, we started with just looking at closed APIs, just grabbing what we could. Then the second phase was for us more, okay, let's see how we can do cost optimization. We're very much ourselves now in the third phase where we're looking at how can we host open-weight models and how can we lease our infrastructure in the long run, maybe even buy our infrastructure as well. I particularly want to talk about this third and fourth phase and see what it actually would mean. Because running an API or just having an API for token consumption is straightforward. It's easy to do, but the moment you move towards this third and fourth phase, suddenly the design space starts expanding as well. In the first phase, we're just worried about what is the right type of model for the right model accuracy or for the right task complexity. But the moment you start owning your infrastructure, you suddenly need to worry about a whole lot of other things as well. What kind of model am I going to take? How can I trust this model? You need to think about harnesses, but you also need to think about a lot of hardware configurations, such as what is the right hardware architecture that I would use for this? What is the CPU to GPU balance? How can I do KV cache optimization and all of that? That's where we want to position ourselves as imec going forward as well. We're of course in a world that is very much aware of models and harnesses, but we do see very much also a gap from those models and harnesses to that infrastructure as well. So what we did in the last few months and what I'm here to present today is a benchmarking study that we did in the last few months. We did really thousands of runs to really quantify what does that move from going from an API to really infrastructure really give you. So really from an agentic AI perspective, if you have an agentic AI task, if you have a specific agentic AI task performance, what would be the cost for you if you move from an API towards your own infrastructure? That also means moving from a token-based cost subscription to really total cost of ownership. And also, how should you then configure the infrastructure, really, from what kind of harnesses are relevant? What kind of hardware would you need? What is the inference engine of choice for all of this? How did we do this? We really wanted to compare at a task level. So we looked at long horizon tasks specifically because long horizon tasks are really the perfect if you really have your own infrastructure that you want to own. If you do it very interactively, the economics might not be the same. But for long horizon tasks, we think that's the first reason or the first pivot point where taking hold of your AI stack is really relevant. So we took one specific one being the SWE Bench Pro tasks, which is a set of benchmark tasks that exist for coding assistance. What we did is we varied different types of coding harnesses. We took Codex, Py, and Claude Code for this, which are more or less the three most popular harnesses out there for coding assistance. Then we varied the different types of models that we could use on this as well, starting with a traditional standard API environment, but then also looking at a wide range of different open weight models with different types of complexities and parameter sizes as well. But as this is a talk about translating this towards your own infrastructure, we of course also map this to the right hardware architecture at hand as well. Always trying to find the right type architecture that is still sufficient enough to really do this at scale, and where you can have multiple concurrent users on this. So in essence, we increased the hardware complexity, increased the model complexity, but at the same time also looked at really the application performance of all of this. So what is the result rate of your task, what is the latency, and what is the cost? All in all, this was more than thousands of different runs that we did. We set up a full benchmarking pipeline, and I want to run you through the different results we got out of this. So let's start maybe with the most obvious one, different models, different model complexities, different model parameter sizes actually give you different accuracies of these tasks. We could actually really classify three main categories of models. The smaller ones, and with smaller ones I would say up to a few hundred billion parameters, where Qwen and DeepSeek are part of, they got into a resolve rate of about 35 to 40% of tasks that we were able to achieve accurately. Second one, like Claude, was really at opus level range, and then Kimi K3 that came out a few months ago, was really crushing it, in all honesty. Also probably because part of it has probably been in the training set as well, but still the results were quite substantial, had a resolve rate of 86%. Now, all of this is something that you can easily find on Artificial Analysis as well. This doesn't really give you a lot of additional insights. What I think is really more interesting is if you add the infrastructure and hardware angle to it as well, and there we do see quite a bit of differences. What I think is interesting is if you compare, for example, Qwen with DeepSeek, that all in all the application performance of it is more or less on the same level. Although if you then look at what kind of hardware you would need for Qwen and DeepSeek, you're looking at a factor four in terms of renting GPUs that is more expensive. Similarly, if you just make the move from a Claude model to a Kimi K3 model, it gives you a bump of about 20% in accuracy, but all in all it's just giving you only a 15% increase in cost in renting GPUs as well. So what does that tell you? It basically tells you that if you make this move towards open weight models, it's super important to look at the hardware constraints of this as well, and also look at the actual costs of all of this. There's definitely not a linear curve to be found here. So often it's just a stepwise function where it might be that you're choosing a specific model and that just taking a slightly better or slightly less performant model would have a huge impact on the hardware architecture of choice as well. That's one and that's looking at mainly from an application performance perspective. Let's take a different angle to it and that's concurrency. Because when you're using an API, you can get a certain performance of token consumption. You know more or less what your token latency is going to be and you know what your token throughput is going to be. The moment you make the move towards infrastructure-based solutions, suddenly you need to worry about concurrency as well. In other words, how many users can I reliably put on the same machine without the system completely deteriorating from a latency perspective. There's a memory size to it, but there's also a latency perspective to it. Memory means that on one hand, most systems are memory bound and it means that your model parameter size needs to fit your memory, but also your user's KV cache as well. As you have an increasing number of users using this system, your KV cache requirement will become bigger and bigger as well. So what we did is we tried to look at the different types of solutions I just already showed you and look at how many concurrent users we were actually able to fit really comfortably in that system. The results were pretty surprising or at least maybe not that positive for the bigger models as well. So bear in mind each of these different models has its own hardware architecture that is optimal for it, but if you then look at the comfortable concurrency levels that we were able to get, it really dropped down very significantly even with bigger hardware architectures as well. In all cases we were much slower than our baseline, which was Claude Code. By the way, I think you figured it out already. We actually have a detailed blog post on each of the topics I'm talking about. Every QR code actually leads you to that as well. This shows you that concurrency is actually probably even more important than accuracy. Accuracy gives you the baseline, but then even for the big models, and especially if you look at very long horizon tasks like code assistance, running a Kimi K3 model only gives you about four concurrent users that can really run reliably on this. Still the latency is a factor 3 slower. So what we then did is a full sweet spot analysis of, okay, in which cases is it really interesting to stick to your API usage? In which cases would it make sense more for you to move to renting GPUs with the various model providers that are out there? And in which case would it be more interesting for purchasing and really investing in your own infrastructure and building it out on-prem? Of course, there can be a lot of other reasons as well to make that switch, but we looked at it from a total cost of ownership perspective. Without going into too much detail, what we saw there is that the lower your hardware architecture system is, the worse it is to move from API to your own infrastructure. We saw that if you really are at the lower tiers of models and as a result also at the lower tiers of the hardware architecture that you would need, you actually need a GPU utilization of about 89%. That means that your GPU needs to run at capacity 89% of the time. Similarly, if you actually move to bigger hardware systems, for example, an H100 or B200, you're okay with just 15% of GPU utilization and that's really realistic. 89% is just completely infeasible. If you then average it out and if you look at, for example, Claude class applications, what we do see is that that's really the sweet spot or the threshold of when moving from API to infrastructure makes it more interesting as well. In the full total cost of ownership analysis that we did specifically for this application, the coding assistance, we really saw that you get into a kind of 25% of cost saving. So that's really infrastructure perspective. Let's switch it over to harnesses. We also varied the harnesses as well and looked at what the application performance was for those three different harnesses. On first glance, the application performance actually didn't really change that much, which was maybe surprising. Every single task we gave, every single harness we gave, more or less got it, and for different kinds of models, we got into the same kind of application accuracy on this benchmark. So at first glance, you could say the harness actually doesn't have an impact whatsoever on it because it gets the job done. Well, that might be the case if you're going for API only usage, but it's completely different if you're moving towards your own infrastructure and you actually pay for the GPU usage because then the wall time of your GPU really is relevant. What we saw there is that different kinds of harnesses actually had a huge impact on the amount of token consumption we had in this. Specifically in the case of Codex we had for Claude only half of the tokens that were actually being generated. As a result, also the wall time of using these GPUs actually was half of that as well. So even though the harnesses actually gave you the right type of application performance or more or less a similar level of application performance, the GPU bill you would in the end have would be half of the other harnesses as well. So it really shows very clearly that in this case also the right harness to model choice might not have an impact on application performance, but it has really an impact on your total cost of ownership for your GPUs as well. This is just the first study that we did in the last few months on this. Where are we going with this? I think there's a lot to unpack. It's very clear that moving this from API to infrastructure is not a simple, linear choice. I show this now for one single application, the coding assistance, but a real enterprise mix would often have a combination of a lot of different applications as well. That actually complicates things even further. We also saw that there's a very complex relationship between harnesses, between the models, between the infrastructure. I haven't touched upon other things like what do we do in terms of quantization, what is the impact of specific optimizations, like speculative decoding that we applied as well, but that we haven't configured in detail. The third dimension is, of course, that it's very much a constantly moving target as well. New models are being launched, new hardware architecture choices are there as well. So we're actually building out a benchmarking pipeline that we already have. We're building this out to a full benchmarking data set as well that we're going to share publicly for everyone, and trying to keep track of this moving target moving forward. But at the same time, we cannot do this alone. We're a research organization. We're a nonprofit research organization. The biggest important part for us is trying to bring that ecosystem together. I think that the software world and the hardware world deserve to be much closer together as well. So we're actually launching an alliance to bring people who are interested in this part, people from software who are interested in hardware optimization. We're bringing this together with our existing customer portfolio of new and existing chip providers and infrastructure providers as well. If you would be interested in this, feel free to reach out after this talk. Thanks a lot. So for example, an A times B 200, you're okay with just 15% of GPU utilization and that's really realistic. And 89% is just completely infeasible in that sense. If you then kind of average it out and if you look at, for example, GLM class applications, what we do see is that that's really the sweet spot or the threshold of when moving from API to infrastructure makes it more interesting as well. And in the full total cost of ownership analysis that we did specifically for this application, the encoding assistance, we really saw that you get into a kind of 25% of cost saving. So that's really infrastructure perspective. Let's kind of switch it over to harnesses. We also vary the harnesses as well and looked at what the application performance was for those three different harnesses. And on the first glance, the application performance actually didn't really change that much, which was maybe kind of surprising. Every single task we gave, every single harness we gave, more or less got it, and every single, for different kind of models, we kind of got into the same kind of application accuracy on this benchmark. So at a first glance, you could say, well, the harness actually doesn't have an impact whatsoever on it because it gets the job done. Well, that might be the case if you're going for an API only usage, but it's completely different if you're moving towards your own infrastructure and you actually pay for the GPU usage because then the wall time of your GPU really is relevant. And what we saw there is that different kinds of harnesses actually had a huge impact on the amount of token consumption we had in this. And then specifically in the case of codecs we had for GLM only half of the tokens that were actually being generated. And as a result, also the wall time of using these GPUs actually was half of that as well. So that meant that although the harnesses actually gave you the right type of application performance or more or less a similar level of application performance, the GPU bill you would in the end have would be half of the other harnesses as well. So it really shows very clearly that in that case also the right harness to model choice might not have an impact on application performance, but it has really an impact on your total cost of ownership for your GPUs as well. So this is just the first study that we did in the last few months on this. Where are we going with this? I think there's a lot to unpack. It's very clear that moving this from API to infrastructure, that it's just not very simple, a very linear choice. And I show this now for one single application, the encoding assistance, but a real enterprise mix would often have a combination of a lot of difference of applications. as well. And that actually complicates things even further. We also saw that there's a very complex relationship between harnesses, between the models, between the infrastructure. And I haven't touched upon other things like what do we do in terms of quantization, what is the impact of specific optimizations, like speculatively decoding that we applied as well, but that we haven't configured into detail. And the third dimension is, of course, that it's very much a constantly moving target as well. New models are being launched, new hardware architecture choices are there as well. So we're actually building out a kind of benchmarking pipeline that we already have. We're building this out to a full benchmarking data set as well that we're going to share publicly for everyone, and trying to keep track of this moving target moving forward. But at the same time, we cannot do this alone. We're a research organization. We're a nonprofit research organization. And the biggest important part for us is trying to bring that ecosystem together. And I think that the software world and the hardware world deserve to be much closer together as well. So we're actually launching a kind of alliance to bring people who are interested in this part, people from the software who are interested in hardware optimization. We're bringing this together with our existing customer portfolio of new and existing chip providers and infrastructure providers as well. And if you would be interested in this, feel free to reach out after this talk. Thanks a lot.