AI Engineer World's Fair 2026
Stop Renting Your Cognitive Infrastructure
About this talk
Thiyagarajan Maruthavanan argues that metered AI APIs can produce unpredictable inference costs, especially when agent loops waste tokens and context. Drawing on his Ultasono application and a migration from Anthropic to NVIDIA DGX Spark hardware, he contrasts rented inference, cloud token factories, and owned local infrastructure. He recommends renting while validating product-market fit, then owning infrastructure when enterprise cost control and rate-limit autonomy become material, and introduces JustInfer, the open-source JustTokenMax optimization project, and his book on inference economics.
Chapters
- 0:00Why rented inference costs escalate
- 1:43Agent-loop waste and token-factory alternatives
- 3:08Migrating inference to NVIDIA DGX Spark
- 3:47Enterprise constraints and when to stop renting
- 5:53JustInfer, JustTokenMax, and inference economics
Talk transcript
- 0:00
One of the largest retailers in the country spent close to two hundred million dollars on inference with Anthropic and decided that things got way out of hand and built their own infrastructure.
- 0:09
I'm pretty sure most of you have read the news from Uber CTO on how they had planned a budget of their tokens for an entire year, and it got over in month four.
- 0:19
I'm also confident that half of you in this room have come to a very similar conclusion that as time goes by, the cost of intelligence really builds. Using inference feels like, you know, it's one of the most inexpensive thing.
- 0:30
But then this is very different from using a phone where you get a bill once every month, and then you have like a specific set of amount that you can actually anchor your mind to.
- 0:40
But in case of using these rented intelligence platform, they are like prepaid. You load credits. It's almost as if you're loading credits inside a casino. You put some, and then you pull it, and then you are so addicted to it, then you end up doing more and more of it.
- 0:54
And by some time, you realize that you've blown past the threshold that you had mentally kept in mind. And I had this experience myself. I built an app called Ultasono, and I experienced the inference cost ballooning here.
- 1:07
Sono.com, has anybody heard about sono.com? Yeah, sono.com is this application that allows a user to turn a text prompt into music. What I was interested in is, is doing the reverse, which is given a particular song, what prompt could have actually generated it?
- 1:23
This is something that I wanted, so I built this, and I was having a lot of fun using this application, shared it with a few friends, and spread w-wide around.
- 1:32
I had hundreds of thousands of users, but then the cost ballooned way more than what I had anticipated. Hundreds of thousands of dollars had to spend on inference. Now, this happens for many reason.
- 1:43
There are many talks that are there at AI itself, where people talk about how you need to manage your context better,
- 1:50
and many people forget about doing compression of their input token. And when there are agent loops, then there are many of these calls that are happening which are very, very wasteful.
- 2:00
The inference endpoint that is consuming this is completely unaware of the shape of the workload and which is why this happens. And I have this other issue that had happened.
- 2:08
Three weeks ago, my key got stolen. Someone in China got hold of it and then was sucking my endpoint dry. I could see the cost rise up from seven thousand to seven thousand five hundred dollars to eight thousand go on and so forth.
- 2:23
Thanks to my co-founder, who heads the research and technology, we were able to arrest it at ten thousand dollars. Otherwise, it could have been a hundred thousand dollars. Now, many people suggest that the alternative to rented intelligence platform is is to use token factory.
- 2:35
Token factory is, is basically saying that why are you paying money to Anthropic and OpenAI? Instead, go open source, have these open-source models that are already deployed somewhere on the cloud, and then they are provisioned as tokens per second.
- 2:48
There are neo clouds, and then there are inference endpoint providers who actually do this. In fact, there is also an argument saying that, you know, you can build this token factory locally.
- 2:56
There are AI Twitter influencers who actually talk about building inference in your garage, in your basement. Buy GPU cards, rig them up together, and then you could actually run a local token factory.
- 3:08
In fact, I was in-inspired by that a little bit. I bought my own DGX Sparks, and then I first moved Ultasono from Anthropic to DGX Sparks. It worked well.
- 3:19
I ran into this one issue of memory being the bottleneck, and then it was good enough that I started building my next applications. I started having agents. I have some agents that I need for running my research lab, so these agents started shaping up inside the DGX Sparks, you know, two, six, eight, 12, and it worked all
- 3:36
right. The issue, though, is, is that, you know, it may not be reliable for enterprise, which is what I exactly faced. Three enterprises reached out to me to replicate the same setup for them.
- 3:47
But for enterprises, renting and leasing don't cut it. Bill is a problem, but then there are secondary set of problems that makes it extremely ineffective approach. The enterprises that I reached out to me, one was a fund, another a hospital, and the third a tax practice, and each of them had different wall that they had hit.
- 4:06
The fund, it was an investment fund. They were running an investment analyst on a NeMo cloud architecture, and they didn't want somebody else to dictate as to what the rate limit that they could consume.
- 4:16
So control became a big issue for them to actually go with token factories. Hospital had a different issue. They used the use case, it worked well, but later when they went through an audit, a third-party vendor dependency was red-lined, and then they couldn't go forward.
- 4:32
The tax practice was a completely different issue. In a tax practice, what is happening is, is when intelligence generates a recommendation, you want to be able to recreate it.
- 4:42
And when you don't have access to the in-depth of the model, you will not be able to do this, and that became the issue. So that brings me to the most important point of this presentation.
- 4:52
Where do you sit? When do you stop renting infrastructure? If you're a startup, if you're a founder who is doing pre-product market fit work, so you're still figuring out that the use case that you have, if there is demand for it, you can get by, by renting.
- 5:05
But if you're post-product market fit, you cannot afford to do. And if you're an enterprise who's already budgeted a project, which means you're telling that you are assuming that this particular use case has product market fit, then again, you cannot ignore to build your own infrastructure.
- 5:21
Which is what I realized, and I said that this, this situation is, is like if you're going to a new city, you may initially start with saying that, "I don't want to buy a house.
- 5:31
Let me actually rent and see." Sometimes you might even Airbnb. You experience the environment, you experience the city, the neighborhood, but then eventually you have to buy the house.
- 5:40
You cannot raise a family in an Airbnb. As I went through this experience, I decided, I came to the conclusion that I need to build my own inference infrastructure for the apps, the agents, and the scaling of the apps that I'm building.
- 5:53
And I call this as JustInfer. And while I went through this exercise, I realized that there is optimization to be done at multiple layers. Even at the renting and the lease layer, you can do optimization around input cost, token management, and then, you know, context management and so on and so forth.
- 6:09
Some of those experiences that I've had in the last couple of months combined it into an open source project and published it as JustTokenMax. If you have used Headroom from Netflix, then this is an alternative to it.
- 6:21
We have benchmarked against Headroom, and on many parameters, JustTokenMax is, is far superior. If this is a thing that is of interest to you, give it a try, maybe a GitHub star if you like it.
- 6:31
And I also wrote the book called Peak Inference: Infraeconomics of AI Inference, when you have to think about building your own inference infrastructure. The AI market is, is very different compared to the rest of the technology market that used to exist because here the rules of the game change every three to six months, which means it becomes
- 6:50
a very noisy marketplace. You talk to someone like Jensen, he would say, "Token factory is the future." You hear someone like a Satya Nadella, he will say, "Unmetered intelligence is the future.
- 6:59
It is going to be local." And then when you hear neo clouds and inference endpoint providers, they'll say, "Hey, inference endpoint providers are the ones that are going to capture the value in the marketplace."
- 7:08
Now, my experience working from application to agents to scaling them and then building my own inference infrastructure taught me that if you want to learn, you can rent, but if you want to earn, then you have to own.
- 7:22
And if there was the one sentence that you were to take away from this entire presentation, it is that: Rent to learn, own to earn. But then you have to come to your own answers.
- 7:32
Thank you. And if any of these topics are of interest to you, then I'm happy to talk to you about renting, about JustTokenMax, about how to build your own inference infrastructure.
- 7:44
I'm here [REDACTED:username] the AI Engineers Conference for the next three days. Hit me up on, uh, Twitter [REDACTED:username] or through my site, mtrajan.com.