ByteCosts
self-hosting-ai-workload-requirements.mdx

GPU economics

Requirements for self-hosting an AI workload

The requirements for self-hosting an AI workload include a GPU memory budget for the model weights, key-value cache, and runtime overhead, plus a serving configuration that meets your latency and concurrency targets. Before committing to hardware, replay representative traffic on an engine such as vLLM, measure how much provisioned capacity the workload uses, and assign ownership for monitoring, upgrades, and recovery.

vLLM’s optimization guide explains how vLLM budgets GPU memory for weights, activations, and the KV cache and how cache pressure affects serving. imec aistack’s July 2026 self-hosting study compares several self-hosted hardware tiers for a coding-agent workload and discusses hardware fit, concurrency, and utilization.

Define the workload and its pass conditions

Choose a workload you can replay, such as the model endpoint behind an internal coding assistant. Record the exact checkpoint and weight format, expected input and output lengths, overlapping request count, and peak demand periods. Include longer sessions in the trace. The key-value cache, or KV cache, grows as active requests progress, so a trace made up of short prompts may miss the memory pressure from longer sessions. PagedAttention paper, September 2023

Agree on caller requirements before benchmarking. For an interactive endpoint, set targets for time to first token, the interval between generated tokens, and the share of requests that can time out. For a background queue, set a deadline for completing the backlog and decide how long jobs may wait. Measure throughput and response timing separately. A fast aggregate run must still meet the user-facing targets. Latency and throughput guide

RequirementWhat to write down before testingEvidence to collect
Model and qualityCheckpoint, weight format, and tasks whose outputs must be acceptedResults on representative tasks for the exact candidate configuration
Memory and trafficContext limit, input and output lengths, and peak overlapStartup cache capacity and preemptions during a replay. vLLM parallelism guide · vLLM optimization guide
Serving performanceLatency, completion, and queueing targetsResponse timing and completed work during typical and peak load
Capacity and utilizationWhen the service must be available and what capacity must stay onlineProvisioned GPU time and completed work over the same observation window
OperationsService owner, overload behavior, and recovery targetA recorded restart or rollback drill with the time to restore service

Budget GPU memory for warm serving

Record the weight footprint of the checkpoint you plan to load. Budget separately for the KV cache and the engine’s runtime allocations. In the captured latest vLLM documentation, the extensible KV cache on CUDA and ROCm is sized from available memory after graph capture and warmup. vLLM optimization guide Check the engine’s startup report to see what remains for serving on your candidate hardware. vLLM parallelism guide

The KV cache stores attention keys and values for reuse during generation. NVIDIA’s November 2023 inference optimization article explains that reuse and shows how cache memory grows with batch size and sequence length in its half-precision example. Use the deployed model’s configuration to estimate the footprint, then test the context length and concurrent request count your service must support. LLM memory calculation guide

Record startup cache capacity, then repeat the test with long sessions overlapping. vLLM reports cache capacity in tokens and estimates maximum concurrency for a specified token count per request. Treat this as a memory check, then compare it with observed concurrency at your latency target. Repeat the check if a rollout changes the model format or context limit. vLLM parallelism guide · VRAM for LLMs

Choose a serving topology and replay peak traffic

Start with a single GPU if it meets the memory requirement for one replica. If a replica needs several GPUs but fits within one node, vLLM recommends tensor parallelism, which shards model parameters across GPUs within each model layer. vLLM parallelism guide · vLLM optimization guide If the replica needs several nodes, the project documents combining tensor and pipeline parallelism. Check the inter-node connection for that setup, and verify that each host has the same execution environment and model path. vLLM parallelism guide

Record the engine release, model revision, GPU topology, context limit, and batching settings alongside the replay results. Run typical traffic, then test a burst with overlapping long requests. Compare first-token latency, output pacing, completed requests, and failures in each condition. Keep the request mix and acceptance criteria fixed when changing topology or scheduler settings.

Watch vLLM’s preemption counter during the replay. The vLLM optimization guide says vLLM can preempt requests when the cache lacks space for the active batch and that recomputation can increase end-to-end latency. The guide recommends reducing max_num_seqs or max_num_batched_tokens if preemptions occur often. Replay the same traffic to see whether the new configuration still completes enough work by the deadline.

Measure utilization over the hours you need coverage

Use the peak replay to estimate the capacity needed when requests overlap. Use a longer traffic record to decide how much capacity to keep available between peaks. For each observation window, record provisioned GPU hours, your chosen GPU activity metric, completed work, and the hours when the endpoint must stay available. If capacity is reserved, include idle reserved time in the same window. GPU commitment utilization guide

Track GPU activity alongside completed work. If the engine reports preemptions and the service misses response targets, inspect those periods before treating higher GPU activity as evidence of better capacity use. If demand falls for long stretches, test whether lower capacity between peaks would still let the endpoint meet its readiness target when traffic returns. vLLM optimization guide · imec aistack utilization case study

Assign ownership and rehearse recovery

Name the person responsible when requests time out, the queue grows, or the service fails to start. Include the served checkpoint, engine release, and configuration in the handoff. Decide how the endpoint handles overload, who can reduce its intake, and which configuration the operator should restore after a failed rollout.

In a test environment, restart the service and observe it until it is ready and serves a representative request successfully. If the model spans several hosts, repeat the exercise with a worker unavailable and record what callers see. Then rehearse restoring the previous checkpoint and engine configuration. Compare the measured recovery time with the target agreed before the hardware trial. During the drill, collect vLLM’s Prometheus preemption counts and its startup log lines for GPU KV cache capacity.

Case study from July 2026 on serving Kimi K3

In its July 29, 2026 update, imec aistack reported that Kimi K3’s 1.4 TB of weights left too little room for KV cache on the eight-GPU NVIDIA B200 node the team had used for GLM-5.2. The team served Kimi K3 with SGLang on an eight-GPU NVIDIA B300 node. imec aistack update A commenter who identified as one of the authors described the same hardware change in the Hacker News discussion from July 29, 2026.

In the July 2026 update, imec aistack reported 16 concurrent sessions for Kimi K3 on the B300 node and 24 for GLM-5.2 on the B200 node. The same update cautioned that the SWE-bench Pro tasks may have appeared in Kimi K3’s training data. Treat the serving results and task evaluation as specific to this case. In your own trial, record cache headroom and successful concurrency for each candidate, then check output quality against tasks from your workload.

Make the deployment decision

Approve the configuration when the replay meets the memory, quality, and serving targets, observed utilization fits the capacity you plan to provision, and the operator can restore service within the agreed recovery window. Record any test restriction, such as a context cap or intake limit, so the service can enforce it in production. If a requirement fails, identify the constraint, change the candidate configuration, and repeat the affected test before committing to hardware.

Sources

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

Requirements for self-hosting an AI workload. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/self-hosting-ai-workload-requirements/

Sources