Dollars per token considered harmful
Teams self-hosting LLM inference should reason in dollars per request, not dollars per token, because per-token pricing reflects the economics of API providers selling inference as a service rather than applications serving users. Requests are the unit users care about and the unit that can be split across replicas. Latency targets come from per-request time-to-first-token and inter-token latency, replica counts come from requests per second and per-replica concurrency, and cost is dollars per second per replica times replicas. Framing cost per request lets engineering weigh it directly against conversion, lifetime value and revenue.
Related posts
- Comparing token economics across 42 AI models
Neon mediumAdept
A synthetic workload of 100 support tickets (20 scenarios × 5 tone variants) was run through 42 models via Neon AI Gateway, with responses graded on seven checks including JSON validity, correct classification and escalation, and policy compliance. GPT-5 Nano had the lowest cost per usable response and finished in about 3 minutes. GPT-5.5 Pro cost about $8.34 and took 57 minutes, GPT-5.3 Codex had the highest pass rate at 82%, and Llama 3.1 8B was fastest but passed only 34%. Catalog price alone misleads, because token volume and failure rate drive the real cost per unit of work. A projection of one 1M-token agent task per engineer per day shows roughly an 86× spend gap between moderately cheap and moderately expensive models. The harness uses one Neon branch per model, created with --no-compute, plus a Python runner, Postgres result tables, a Next.js report and a scheduled GitHub Actions workflow.
- Optimizing inference speed and costs: Lessons learned from large-scale deployments
Together AI easyNoviceLower LLM inference latency and cost come mainly from how inference runs rather than from buying more GPUs. The levers covered are FP8/FP4 quantization (claimed 20–40% throughput gains), distilled models like DeepSeek-R1 variants (2–5× lower cost), regional proxies that cut 50–100 ms of TTFT, removing GPU stalls via kernel fusion, MoE execution and scheduling, and speculative decoding or MTP (20–50% faster decode). It also covers Blackwell-class hardware with tensor or expert parallelism and dynamically shifting GPU capacity between endpoints. A starting checklist: measure TTFT, decode TPS and network RTT, then add proxies, continuous batching and decoding optimizations.
- Llama 2 on Amazon SageMaker a Benchmark
Hugging Face mediumAdeptA benchmark of 60 Llama 2 deployment configurations on Amazon SageMaker using the Hugging Face LLM Inference Container (TGI) covers 7B, 13B and 70B models on g5 (A10G) and p4d (A100) instances. Each configuration was measured for per-token latency and throughput at 1–20 concurrent requests, with and without GPTQ 4-bit quantization. GPTQ is the most cost-effective option: 7B on a g5.2xlarge costs about $3.50 per million tokens, and 13B fits on a single GPU. The best throughput came from 13B unquantized on p4d at roughly 668 tokens/sec with 20 concurrent requests, and the lowest latency was 7B on ml.g5.12xlarge at about 16.8 ms/token.
- Scaling LLM Inference: Innovations in Tensor Parallelism, Context Parallelism, and Expert Parallelism
Meta Engineering hardMasterMeta scales LLM inference with three parallelism techniques aimed at latency targets of under 350ms time-to-first-token and under 25ms per incremental token. For tensor parallelism, custom direct-data-access allreduce algorithms (flat and tree) cut communication latency, beating RCCL by 10-50% on decode and bringing AMD MI300X to parity with H100. Context parallelism via ring attention, in Pass-KV and Pass-Q variants, enables 1M-token prefill in under a minute on one H100 host and near-linear scaling for Llama 3 405B (128K tokens in 3.8s over 16 nodes). Expert parallelism for MoE models relies on all-to-all token exchange that costs 10-30% of latency, and Meta is moving toward N-D parallelism with disaggregated prefill and decode tiers on heterogeneous hardware.
- Benchmarking Text Generation Inference
Hugging Face mediumAdeptText Generation Inference ships a benchmarking tool that profiles LLM serving across batch sizes, plotting throughput against latency separately for prefill and decode so deployments can be tuned for a workload such as RAG or chat. Using a duplicable Hugging Face Space bundling TGI with JupyterLab, the walkthrough shows how to read the charts. Vertical regions mean added batch size buys throughput at no latency cost. Horizontal regions mean the server is compute bound: in the example, decode latency stayed flat near 5.3s up to batch 32, while prefill beyond 32 doubled TTFT with no throughput gain. The recommended loop is to benchmark on hardware matching production, adjust TGI launch settings, and repeat, checking real user token patterns in TGI logs.