Algorithm

Tandemn is a continuously learning planner for inference fleets. It combines causal models of serving behavior, multi-objective optimization, and constrained allocation to decide how workloads should run across heterogeneous GPUs, clouds, and regions. Every deployment produces evidence that informs the next plan, helping the same infrastructure serve more useful work.

A measurable objective.

The algorithm optimizes an objective function that accounts for how well the overall deployment satisfies individual workload performance and cost objectives, the risk of violating serving requirements, the cost of reconfiguration, and the value of learning from new deployments. Workload priorities, quotas, and infrastructure constraints define the feasible solutions.

Four factors determine how Tandemn scores every potential deployment plan.

Workload performance

Scores how well configurations meet each workload’s weighted latency, throughput, and cost objectives.

The configuration and placement that best meet workload objectivesIllustrative waves compare configurations across placements. The highlighted configuration reaches the global maximum, marked by a dot at its best placement.

SLO violation risk

Penalizes the estimated probability of violating a service-level objective (SLO), accounting for prediction uncertainty.

A descending mint zigzag ends in a downward arrow, illustrating reduced SLO violation risk.

Reconfiguration cost

Accounts for loading, warm-up, draining, and transient disruption when changing a deployment.

A balance scale represents weighing the benefit of a deployment change against its reconfiguration cost.

Learning value

Rewards informative deployments that test uncertain relationships and improve future decisions.

A brain outline represents learning from deployment evidence to improve future decisions.

From inputs to deployment plans.

The inputs define the requirements, resources, and constraints from which Tandemn constructs potential deployment plans. Each plan represents a different combination of model configurations, GPU assignments, parallelism, replica counts, and placement. Because workloads share finite resources, decisions for one workload affect the options available to others. The result is an enormous number of possible fleet-wide configurations, each with different performance, cost, and risk characteristics.

Searching for the best deployment plan.

The enormous number of possible plans makes exhaustive evaluation impractical. Tandemn uses its causal model of inference serving to structure and guide a search toward promising alternatives. Its directed acyclic graph (DAG) maps relationships among 146 variables, helping predict how configuration and allocation decisions affect performance and cost. Observed deployment results continuously refine these predictions, while deterministic validation ensures candidate plans satisfy infrastructure constraints. The algorithm searches for the highest-scoring feasible deployment plan.

Causal graph connecting deployment choices such as parallelism and workload mix to runtime behavior, then to cost, throughput, and latency outcomes.

How the algorithm works

Causal confidence

The planner needs to know which configuration changes are worth exploring and how well their expected effects are supported. Causal confidence provides that foundation: it connects deployment decisions to measurable runtime behavior, then to serving outcomes, focusing search on relationships relevant to each workload’s targets.

For example, a change in parallelism can alter memory pressure and communication overhead, which can affect throughput and latency. The graph makes that chain of effects explicit and testable through serving telemetry. Decisions X connect to runtime behavior V and outcomes Y.

X→V→Y,pe∼Beta(αe,βe)X\rightarrow V\rightarrow Y,\qquad p_e\sim\mathrm{Beta}(\alpha_e,\beta_e)

Observed deployments update each relationship’s belief with supporting or contradictory evidence. Confidence measures that support; uncertainty tracks how much remains to learn. Two relationships can have the same confidence but different amounts of evidence, so the planner uses both signals to guide proposals and identify informative deployments to test.

ce=αeαe+βe,Ue=12αeβe(αe+βe)2(αe+βe+1)c_e=\frac{\alpha_e}{\alpha_e+\beta_e},\qquad U_e=\frac{12\alpha_e\beta_e}{(\alpha_e+\beta_e)^2(\alpha_e+\beta_e+1)}

Tandemn’s distinctive approach combines this persistent causal evidence with language-model-guided search and deterministic evaluation. Related edges form hypotheses scoped to particular models, hardware, and workloads, allowing relevant evidence to inform future proposals. Only deployment evidence updates causal confidence; deterministic tools predict, score, and validate candidates before a fleet-wide plan is selected. Each deployment therefore informs both the next allocation and the planner’s understanding of serving behavior.

Workload performance

A deployment ladder LiL_i specifies job i’s configurations, environments, and replica groups. Each predicted outcome is compared with the job’s reference target, then weighted by its importance to that workload.

yi(Li)=(cost/token,p99 TTFT,p99 TPOT,throughput,SLO margin)\mathbf y_i(L_i)=\bigl(\text{cost/token},\text{p99 TTFT},\text{p99 TPOT},\text{throughput},\text{SLO margin}\bigr)
wij≥0,∑jwij=1w_{ij}\ge0,\qquad \sum_j w_{ij}=1

Cost and latency are minimized; throughput and serving headroom are maximized. The reference zij⋆z_{ij}^{\star}and scale σij\sigma_{ij} normalize these different units into comparable gaps.

gij(Li)={(yij(Li)−zij⋆)/σij,metric minimized,(zij⋆−yij(Li))/σij,metric maximized.g_{ij}(L_i)=\begin{cases}\bigl(y_{ij}(L_i)-z_{ij}^{\star}\bigr)/\sigma_{ij},&\text{metric minimized},\\\bigl(z_{ij}^{\star}-y_{ij}(L_i)\bigr)/\sigma_{ij},&\text{metric maximized}.\end{cases}
Ji(Li)=−[max⁡jwijgij(Li)+ρ∑jwijgij(Li)]J_i(L_i)=-\left[\max_j w_{ij}g_{ij}(L_i)+\rho\sum_j w_{ij}g_{ij}(L_i)\right]

The augmented Tchebycheff score prioritizes the largest weighted gap, so strength on one metric cannot mask weakness on another. The sum term distinguishes ties. A higher score means closer alignment with the workload’s objectives.

Learning and SLO violation risk

Exploration rewards testing uncertain edges and scoped mechanisms. Activation indicators count each relationship once per plan, avoiding duplicate credit when several deployments test the same hypothesis.

Expl(P)=∑e∈EAe(P)Ue+ωm∑m∈MAm(P)Um\mathrm{Expl}(P)=\sum_{e\in E}A_e(P)U_e+\omega_m\sum_{m\in\mathcal M}A_m(P)U_m

SLO violation risk estimates use prediction-error bands calibrated against observed residuals. The per-objective breach probabilities are combined using an independence approximation over the job’s constrained objectives.

pibrk(Li)=1−∏j∈Si(1−pjbrk)p_i^{\mathrm{brk}}(L_i)=1-\prod_{j\in\mathcal S_i}\left(1-p_j^{\mathrm{brk}}\right)
Switchi=Ccold+Cparallel+Ckill+Crisk\mathrm{Switch}_i=C_{\mathrm{cold}}+C_{\mathrm{parallel}}+C_{\mathrm{kill}}+C_{\mathrm{risk}}

Reconfiguration cost accounts for loading and warm-up, concurrent execution, draining and termination, and transient underperformance. Retaining the existing deployment incurs no reconfiguration cost.

Feasible selection

A plan P={Li}P=\{L_i\} assigns a ladder to each active and pending job. The fleet objective weights SLO violation risk with γ\gamma, reconfiguration cost with λt\lambda_t, and learning value with βt\beta_t. Learning and reconfiguration weights adapt across planning cycles.

Pt∈arg⁡max⁡P∈FtΦ(P)P_t\in\arg\max_{P\in\mathcal F_t}\Phi(P)

The feasible set Ft\mathcal F_t enforces resource capacity, physical validity, SLO violation risk, reconfiguration limits, quotas, and priorities. Search is bounded: Tandemn commits the highest-scoring feasible plan found within its budget.

Cluster score

Tandemn evaluates each candidate plan with a single cluster-wide score. It adds up workload performance scores, subtracts weighted penalties for SLO violation risk and reconfiguration cost, and rewards useful learning across the fleet.

Φ(P)=∑(i,Li)∈P[Ji(Li)−γpibrk(Li)−λtSwitchi(Li(t−1),Li)]+βtExpl(P)\Phi(P)=\sum_{(i,L_i)\in P}\left[J_i(L_i)-\gamma p_i^{\mathrm{brk}}(L_i)-\lambda_t\mathrm{Switch}_i(L_i^{(t-1)},L_i)\right]+\beta_t\mathrm{Expl}(P)

The weights control the balance between SLO violation risk, reconfiguration, and exploration. Learning is rewarded once across the plan, so multiple workloads testing the same relationship do not inflate its value. Tandemn selects the highest-scoring feasible plan found within its search budget, subject to capacity, serving targets, quotas, and priorities.

Research whitepaper.

Explore the mathematical formulation and planning architecture behind Tandemn. Open the full PDF here.

Evaluate your fleet.

Bring your models, serving targets, and infrastructure constraints. We’ll walk through how Tandemn’s research translates into a deployment plan for your environment.