Editor’s introduction
The study evaluates Koi, a self-calibrating planner designed for heterogeneous, multi-cloud large language model inference fleets. It compares deployment strategies by measuring goodput, service level objectives, admission rates, and cost across different planning approaches. Koi uses a recursive language model to generate hypotheses and a fixed causal graph to link decisions like accelerator choice to outcomes such as latency and throughput, with each deployment updating the model’s understanding of these relationships. The evidence shows Koi outperforms baseline methods in goodput by 1.18x and reduces cost per token by 20% in real-world clusters. Ablation tests indicate that deterministic components and causal reasoning significantly enhance performance, with the full system achieving a composite score of 70.8 compared to 35.3 for a pure language model.
Introduction
An LLM inference provider serves a changing mix of jobs on a shared accelerator fleet that spans clouds, regions, markets (reserved, on-demand, or spot), and hardware generations. Users specify each job’s model, workload profile (input/output lengths and arrival process), class (online or batch), and serving target (a latency bound for online jobs or a completion deadline for batch jobs). The provider decides how every job runs, including the environment and accelerator, the parallelism and engine configuration, and the number of replicas, and must revise these decisions as jobs arrive and complete and as available capacity changes.
These choices are also coupled across jobs that compete for the same finite accelerators, quota, and budget. Most schedulers decide one job at a time, giving each arriving job its best-ranked feasible placement, so scarce capacity goes to whichever job arrives first. This is suboptimal whenever an earlier job has a workable second choice that a later job lacks. For example, an online chat job and a batch evaluation job both prefer the cluster’s only free H100 node, but only the batch job can meet its target on A100s. If the batch job arrives first, a greedy scheduler gives it the H100, and the online job must miss its SLO or wait. Even a correct per-job ranking cannot prevent this, because avoiding it requires weighing the opportunity cost of giving a scarce device to one job rather than another, which only a cluster-wide decision can do.
Existing systems address parts of this problem. Serving engines optimize request execution within a given deployment. Multi-cloud orchestrators place workloads across clouds and markets but leave the accelerator type and configuration to the user. Configuration optimizers and heterogeneous serving planners choose parallelism, placement, or GPU types for a single model or a fixed set of models. Request schedulers decide how requests are queued and served on existing deployments, and cluster schedulers allocate resources among competing jobs, but neither chooses the deployment configuration of an inference job. No existing system jointly chooses deployment configurations and allocates shared capacity for all online and batch inference jobs across a heterogeneous, multi-cloud fleet, while recalibrating those choices as observed behavior drifts.
Search-based methods instead deploy candidate configurations, observe their end-to-end performance, and use it to choose the next candidates. Bayesian optimization fits a statistical model to these observations, and LLM-guided evolutionary search asks a language model to propose new candidates from high-scoring ones. These methods have two fundamental limitations. First, because they learn only from end-to-end outcomes, they cannot tell why a candidate performed as it did, for example whether low throughput came from pipeline bubbles or KV-cache pressure, and therefore which fix applies or which other jobs the evidence should inform. Second, every trial is a live deployment that occupies capacity other jobs need and can breach a running job’s SLO. Evolutionary search needs many such trials, and Bayesian optimization restarts for each new workload. LLM-guided evolutionary search pairs a language model with measurement only loosely, because the model sees only a scalar score and measurements never confirm or refute its reasoning. A tighter pairing is difficult because the model’s knowledge is qualitative while telemetry is numeric.
Koi pairs them tightly through a fixed causal graph on which both can operate. The graph links deployment decisions (e.g., accelerator, parallelism), runtime mediators (e.g., KV-cache pressure, communication overhead), and serving outcomes (e.g., latency, throughput). Scoped mechanisms compose its edges into testable hypotheses, which a language model can propose and telemetry can support or contradict. For example, one mechanism states that raising pipeline parallelism lowers throughput through pipeline bubbles for a given model and hardware. Each edge and mechanism carries a confidence and an uncertainty updated from runtime evidence, so confident relationships guide exploitation and uncertain ones identify deployments worth testing. Koi runs no separate trials, since every deployment both serves its job and tests the relationships it exercises, and the plan score values both. Bayesian optimization also updates a model after each trial, but that model maps configurations to end-to-end outcomes for a single workload. Koi instead updates its beliefs about mechanisms, so evidence from one job informs every job within the mechanism’s scope.
Koi turns this evidence into a cluster plan by alternating between language-model proposals and deterministic evaluation. For each job, the language model proposes candidate deployments from the causal graph, the cluster snapshot, the job’s workload, and the matching mechanisms. The graph lets it focus on the decisions that affect the job’s targets, so Koi evaluates a few candidates per job instead of enumerating the space. Deterministic components predict each candidate’s behavior with a profile-based performance model whose error is tracked against observed outcomes, score it against the job’s weighted objectives, and compose candidates into a cluster-wide plan. The plan score balances serving value, the value of testing uncertain relationships, SLO risk under prediction error, and reconfiguration cost, subject to shared capacity. Because candidates for all jobs compete within one plan, this score exposes the opportunity costs that per-job optimization misses. Only deployment evidence updates causal confidence, and the language model only proposes and cannot override measured evidence or cluster constraints.
What determines deployment performance
The deployment objective is not to maximize raw throughput or GPU utilization. Rather, the controller should select the least-cost configuration that satisfies the workload’s service objectives: online workloads must meet TTFT, TPOT, and throughput targets, while batch workloads must complete by their deadlines. Operating closer to saturation can reduce cost, but it also reduces queueing headroom and can sharply degrade tail latency under bursty demand.
The lowest-cost feasible configuration is workload-dependent because different workload characteristics expose different hardware bottlenecks. Input-heavy requests make prefill compute the limiting resource and first manifest as elevated TTFT. Long-context and output-heavy requests increase KV-cache residency and HBM-bandwidth pressure, which can degrade TPOT and reduce the capacity available to concurrent requests. Arrival rate and burstiness determine the replication and queueing headroom required to preserve these objectives. Consequently, a model identifier and mean request rate alone are insufficient to determine the appropriate GPU type, model-parallel configuration, or replica count.
Configuration choices affect end-to-end objectives indirectly through runtime mechanisms. For example, pipeline parallelism can reduce per-GPU memory pressure but introduce pipeline bubbles and stage imbalance; similarly degraded throughput can instead arise from KV-cache pressure or interconnect contention. These mechanisms require different corrective actions. Thus, a controller must use runtime evidence to identify the binding bottleneck and select the least-cost feasible intervention, rather than relying on repeated configuration trials guided only by endpoint metrics. This motivates Koi’s evidence-conditioned control loop.
Experimental Setup
Benchmarks. We evaluate Koi in one real-hardware setting and three simulated settings: a 3-hour deployment on a 104-GPU heterogeneous GCP cluster, 3-hour and 12-hour heterogeneous simulations, and a 12-hour homogeneous-cluster simulation. Each setting defines a benchmark consisting of a shared resource pool and a concurrent mix of online and batch workloads. For each benchmark, Koi and each of the ten baselines independently generate the placements and configurations used to serve the same workload.
Real-Hardware Execution. Each experiment is conducted with three Google Cloud Kubernetes clusters across three distinct regions: us-central1, us-east5 and europe-west2. There are 104 GPUs in total, consisting of a heterogeneous mix of H100-80GB, A100-80GB, A100-40GB, and RTXPRO6000. Due to cost constraints, non-evolutionary algorithm based baselines were omitted from real experiments.
Simulation Setup. For the simulation environment, we used LLMServingSim 2.0, a discrete event simulator (DES) as the execution environment for the simulated clusters. Unlike Koi’s internal surrogate model, LLMServingSim 2.0 does not provide point estimates per placement, but rather simulates request execution and queueing semantics for all requests routed to a deployed configuration. After a plan is selected by Koi, LLMServingSim 2.0 executes the corresponding configuration and provides the realized performance observations that would otherwise come from hardware telemetry. It simulates using per-operator compute profiles across GPU, model, and tensor-parallel configurations, and an ASTRA-SIM backend for collective communication. To support all model–GPU combinations in our benchmark, we augmented LLMServingSim 2.0 with layer-wise profiles for the additional LLM models and GPU types used in the evaluation.
Non-learning baselines. FCFS+First-Fit admits jobs in arrival order and assigns the least-VRAM feasible placement. EDF applies the same placement rule but prioritizes earlier deadlines. Best Fixed uses one static hardware and parallelism configuration per job, selected offline by GPT-5.6-Sol with access to the complete workload trace; at runtime, it reuses these configurations and falls back to VRAM-based placement when the selected configuration is unavailable.
Per-job optimizers. Prism estimates memory and KV-cache pressure to place preconfigured model-parallel groups, reallocating memory at runtime but never choosing GPU type, parallelism, or replica count. To adapt Prism to cluster scheduling, we enumerate policy-compliant GPU-pool and TP/PP placement candidates using workload-derived VRAM and KV-cache demand. Prism then admits waiting jobs by assigning high-KV-demand workloads to the least-pressured feasible pool under global capacity constraints.
LLM-guided planners. GPT-only (non-agentic) receives a frozen cluster snapshot, containing the same public job, resource, policy, and model-catalog information available to Koi, and generates a placement plan without tools or cross-tick state. Its prompt requires a complete policy-compliant action for each job, specifying feasible GPU pool and TP/PP/DP configuration while respecting current capacity. Agentic additionally uses a REPL and the same read-only inspection and placement-validation tools available to Koi’s agent.
Learning and performance improvement
We distinguish fleet scale from elapsed learning time using two comparisons. Over roughly three hours, the 104-GPU real cluster commits 20 deployments and selects eight mechanisms, whereas the 800-GPU simulation commits 80 deployments and selects 17 mechanisms. At a larger cluster scale (800 GPUs for 12 hours vs. 104 GPUs for 3 hours), Koi gathered more evidence, increasing from 407 to 2,272 pieces of evidence, and ran more CUSUM tests, increasing from 18,705 to 101,420. The share of decisive mechanism tests that support their predicted mediator–outcome path rises from 1.9% to 19.1%, and ICP acceptance for the same workload-to-mediator edge rises from 11.0% to 63.3%. These runs show that more concurrent deployments activate learning sooner and that a longer horizon strengthens its evidence.
LLM backbone ablation
The backbone ablation localizes the Cohere–GPT-5.6 Sol difference to a single 7,200-request Llama-70B batch campaign. Both planners admit it at 00:15 and never reconfigure it, but Cohere selects one eight-GPU MI300 TP8 chain and finishes at 01:07 with 82 minutes of deadline slack, whereas Sol selects four TP4 A100 replicas using 16 GPUs and reaches 7,115 requests by the 02:30 deadline, missing by 85. Because batch goodput credits the campaign only when it meets its deadline, this single decision contributes 8.64 million tokens and explains 99.3% of their trace-derived goodput gap; their online contributions differ by only 57,921 tokens. The insight is that deterministic validation bounds the action space but cannot make all valid candidates equally useful: a small number of initial proposals can dominate the final result. This single-run comparison does not isolate accelerator type, parallelism, replication, or batching limits, which change together. Another insight is that the achieved outcomes (TTFT, TPOT etc.) of all the jobs, in all ablations are well within three standard deviations of each other - indicating a model agnostic behavior.
Conclusion
Heterogeneous LLM inference requires more than a better predictor. A useful controller must allocate scarce devices globally, act safely under prediction error, and decide which expensive deployments should improve its future knowledge. Koi addresses these requirements by attaching falsifiable, mediator-grounded mechanisms to deployment plans; using a sandboxed LLM only to propose candidate plans; and keeping scoring, validation, and side effects deterministic. Telemetry closes a calibrated slow loop, while a stateless execution plane keeps fast serving and recovery independent of the planner. The result is a cluster control architecture that can improve with use without making availability depend on an agent’s correctness.
B.1. Common Store-to-plan contract
Each implemented driver independently reads one frozen Store snapshot at a planning tick: the resource map and the running, waiting, paused, and finished job groups for the evaluated user. It subtracts the footprint of running jobs from the resource map before making new assignments. It then emits exactly one lifecycle action for every visible job: keep for running jobs, place or defer for waiting jobs, defer for paused jobs, and preempt for finished jobs. A placement is serialized as a normal Store plan and is checked against the concrete environment or pool capacity before it is recorded.
CP-SAT, contextual Thompson sampling, Prism, and EvoX each locally construct their candidate set from the same kinds of public facts, rather than reading Koi state. For every waiting job, they read the model, token and SLO fields, priority, and an explicit or benchmark VRAM requirement. They enumerate available resource targets and policy-permitted TP values, choose the smallest PP sufficient for the VRAM requirement with DP fixed to one, and record each candidate’s resource keys, GPU footprint, price, model-weight estimate, and KV-demand estimate. The drivers reject candidates that violate the configuration policy or nested environment/pool capacity. This gives the four methods the same job and resource-map interface while leaving their selection rules independent of Koi’s predictions, mechanisms, and objective.
The contextual Thompson-sampling and EvoX drivers are currently registered in the simulator CLI. The best-fit, CP-SAT, AIConfigurator, and Prism drivers are implemented and unit-tested Store adapters, but still need factory registration before they can be selected through the CLI.
Contextual Thompson sampling
The contextual-bandit baseline uses a Bayesian linear reward model over 11 public action features: an intercept; job priority and queue depth; average input and output lengths; SLO tightness; candidate GPU count, memory, KV-cache pressure, price, and requested capacity share. Jobs are processed in priority order. For each job, the planner samples a weight vector from its current linear-Gaussian posterior, scores the feasible candidates with that sample, and chooses the highest-scoring candidate before reserving its capacity. After the simulator returns an outcome, the driver applies the corresponding rank-one posterior update. Online reward is the fraction of offered output tokens that meet both latency targets, minus a normalized price penalty; batch reward is zero when the deadline is missed.
We use Thompson sampling rather than LinUCB, epsilon-greedy, a neural bandit, or a tree/forest bandit because the action set is discrete, the context is a small explicit feature vector, and the controller needs to act from few observations. Sampling from the posterior performs probability matching: a candidate is explored when uncertainty gives it a plausible chance of being best, instead of using a fixed random-action rate or a separately tuned UCB bonus. The implementation is deliberately a linear Thompson sampler, not Bayesian optimization and not a claim that it dominates the other bandit families on these workloads. Its default posterior-draw scale is 0.25 and its random seed is zero for reproducibility.
Rolling EvoX
At each tick, EvoX receives the static candidate payload and nested capacities. SkyDiscover evolves a deterministic Python function, compute_placement(payload), that returns one candidate ID or a defer decision for every waiting job. The evaluator rejects malformed or infeasible programs and scores valid outputs by priority-weighted admission, followed by hourly price and GPU-footprint tie breaks. The initial program is a simple priority-first greedy policy; the best program from one tick seeds the next tick’s search. The winning program is rerun on the frozen payload, its choices are revalidated, and valid choices become Store placement actions.
EvoX is the search procedure in this baseline; there is no second optimizer. Candidate construction and feasibility checks stay in the simulator so evolved code cannot invent hardware or bypass capacity rules. The rolling driver adapts to the current queue and resource map, but its EvoX evaluator currently uses static placement facts rather than simulated serving outcomes as its fitness signal. The frozen-snapshot EvoX table uses the same candidate encoding and evaluator without the cross-tick lifecycle loop.


