hosted api or a $290/mo gpu box for 2.4m tokens a day AI Spend
Document classification and short summarisation, nothing creative. Steady 2.4M tokens a day, roughly 80% input 20% output. Latency requirement is loose, everything is queued and nothing is user-facing in real time.
Hosted API for this is running about $340/month on a small model. A dedicated 24GB GPU box is $290/month and I could run a quantised open model on it.
That looks like a wash on paper, which makes me think I am missing costs on one side. What does the self-hosted number actually look like once you have run it for six months? And is 24GB enough for anything useful at this workload, or am I about to discover I need double that?
@kraut_corner · 8mo ago · 3 replies
You are missing utilisation, which is the whole argument.
2.4M tokens a day spread evenly is about 28 tokens/second sustained. A 24GB card running a quantised 7-8B model with proper batching will do many multiples of that. So you would be renting a machine that sits idle most of the time, and you pay for idle at exactly the same rate as work.
The hosted API charges you for tokens. The box charges you for time. Self-hosting wins when you can keep the box busy - which means either much higher volume, or bursty work you can queue up and run flat out for four hours a night rather than trickling all day.
Your workload is actually a good candidate for that second shape, because you said nothing is real time. Batch it. If you can process a day's documents in a 90 minute window at high throughput, the economics change completely, and you could even use a cheaper spot instance because you do not care about interruptions.
Costs you did not list on the self-hosted side:
At a $50/month delta, the hosted API is cheaper once you value your own time above zero. Come back to this at 20M tokens a day, where the delta is large enough to pay for the operational burden.
Reply
Report
@egress_egon · 8mo ago
Concentrating also makes spot pricing viable, which is often less than half of on-demand for the same card. A queue that tolerates a machine disappearing mid-batch is not much extra code and it changes the maths more than any model choice.
Reply
Report
@back_of_envelope · 8mo ago
The batching reframe is useful. Everything I do is genuinely offline, I had just never thought about deliberately concentrating the work to raise utilisation rather than smoothing it out.
Reply
Report