---
id: 18301
lang: en
title: "Self-Hosted LLM on a Server: One Million Tokens Cost Between 123 and 1,970 Rubles Depending on Utilization"
published_at: "2026-11-26 10:25:45"
source_name: "Habr AI"
source_url: "https://habr.com/ru/companies/timeweb/articles/1095876/?utm_campaign=1095876&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18301"
categories: ["llm", "hardware"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Self-Hosted LLM on a Server: One Million Tokens Cost Between 123 and 1,970 Rubles Depending on Utilization

> **Краткая суть (BLUF):** A self-hosted neural network is neither "cheaper" nor "more expensive" than an API: the hardware costs money all the time, and the price per token depends on how much of the time the GPU sits idle. The author calculated the cost of one million tokens (roughly half a million Russian words). On a home GPU at 6% utilization it costs 1,970 rubles, on a team server at 30% it costs 539 rubles, and on a rented GPU serving a steady stream of requests at 70% it costs 123 rubles. Measure your own utilization before you buy.  • Two 24 GB cards are slower than one 48 GB card because data exchange between the cards slows generation • A 48 GB server pays for itself against a 300-ruble API at utilization above 54% • The KV cache of a 32B model with a 32K-token context takes 8 GB of memory in F16

Suppose you are thinking about running your own neural network instead of paying for an API. The unit of account here is the million tokens, which is roughly half a million Russian words, since one word takes 1.5 to 2 tokens. A Habr write-up with engineering arithmetic shows that on your own GPU, that million tokens can cost 1,970 rubles or 123 rubles, a 16-fold difference. The gap is almost entirely determined by utilization, meaning the share of time the graphics card is actually generating text rather than sitting idle. You pay for the hardware either way, and the less it is used, the more each token costs.

Two stories from the article set the tone. An eight-person bureau was paying 11,000 rubles a month for an API, and six months later the bill was 190,000 rubles, after a client with a steady flow of requests arrived. They ran into weekend tokens, which for flagship models cost several times more than input tokens. The second protagonist bought a workstation for 380,000 rubles with a 24 GB card and used it three times a day for ten minutes each. His own million tokens came to about 2,000 rubles, even though a lightweight model through an API costs tens of rubles.

## Memory First, Everything Else Second

Generation speed is limited by video memory bandwidth: for every token, the card reads all of the model's active weights. That makes the first question how much VRAM you have. The budget is calculated as follows: model weights plus KV cache plus buffers.

The weight size is the number of parameters multiplied by bytes per parameter: about 1.05 bytes for Q8, about 0.7 for Q5, and about 0.55 for Q4_K_M. A dense 32B model in Q4 takes 17 to 18 GB. The KV cache, where the model stores the conversation context, takes 8 GB for such a model at a 32,000-token context in F16. With buffers added, the total comes to about 26 GB, which does not fit on a 24 GB card. There are three ways out: cut the context to 16,000 tokens, store the cache in FP8, or get a bigger card.

The author offers a separate tip: 30B-class MoE models with 3B active parameters keep the entire file in memory (about 18 GB in Q4), but read only about 2 GB per token. For a single request, that means a hundred tokens per second or more, versus 30 to 40 for a dense 32B model. For a 24 GB card, the author almost always chooses MoE.

For hardware the rule is simple: one card of maximum capacity instead of two smaller ones. Two 24 GB cards formally give 48 GB, but data exchange between them over x4/x8 slots slows generation, and the power supply and cooling become more complicated. The same logic applies to engines: Ollama is good for experiments and a single user, while vLLM with continuous batching (new requests are mixed into the current batch) wins on total throughput by nearly an order of magnitude for a stream of thirty requests.

## The Formula and Three Scenarios

The cost of one million tokens = hourly price / (3,600 × tokens per second × utilization) × 1,000,000. Utilization is the factor people most often forget.

- **One user, 24 GB card.** A 380,000-ruble build over three years plus electricity comes to about 17 rubles per hour. At 40 tokens per second and 6% utilization, the cost is 1,970 rubles per million. Even at 100% utilization, it is 118 rubles, still more expensive than a lightweight API.
- **A team of 20 to 50 people, 48 GB server.** Including a quarter of an engineer's salary, the cost is 128 rubles per hour. At 220 tokens per second in aggregate and 30% utilization, the cost is 539 rubles per million. The server breaks even against an API priced at 300 rubles at 54% utilization. Here the argument is not price but keeping data inside the perimeter and having no request limits.
- **A product with a steady request stream, rented 80 GB card.** 464 rubles per hour including the engineer, 1,500 tokens per second, 70% utilization: 123 rubles per million. The break-even point is 29% utilization.

## What Is Easy to Forget, and When Local Is a Bad Idea

Budgets often leave out administration (the author allocated a quarter of a salary and calls this optimistic), spare parts and downtime, storing weights on NVMe, backups, LoRA fine-tuning, and the requirements of Federal Law 152-FZ. If personal data is involved, the law often becomes the real reason to run in your own perimeter, and then the economics are compared not with the API but with the risk.

Running locally loses out under peak loads (the card alternates between sitting idle and being overloaded), for rare heavy requests with a 128,000-token context, where frontier models are still ahead, and when you are experimenting with models, since renting is simpler. The practical conclusion: first rent a GPU for an hour, measure the real tokens per second and time to first token on your own requests, and only then plug the numbers into the formula. It makes sense to keep private and high-volume work local, such as documents, correspondence, and field extraction, while sending peak loads and complex tasks to an API.

For Russian, the author advises not to chase model size: LoRA trained on a couple thousand of your own question-and-reference-answer pairs gives more than moving from 32B to 70B. Keep tokenization in mind: a Russian word is 1.5 to 2 tokens, so a budget estimated "in pages" without this coefficient is underestimated by half. The prices in the article are a benchmark for autumn 2026 and should be rechecked before you buy.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/companies/timeweb/articles/1095876/?utm_campaign=1095876&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18301
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
