Theorem 2(b), pp. 15–16 (corrected) — below load b_max/t_{b_max} every work-conserving K-FCFS scheduler has finite expected return time to a finite set
ProvedLLMThroughput.TokenBudget.theorem_2_bConsider the basic LLM queueing model of §3.1: the batch processing time is (Assumption 1, , ); the arrival counts per slot are i.i.d. with finite mean ; the request sizes are i.i.d., independent of the arrivals, with values in and means . Write for the total number of unprocessed tokens at the beginning of slot .
Theorem 2(b) (stability, corrected). If
then for every and every work-conserving K-FCFS scheduling algorithm there is a finite set of configurations such that, for every admissible initial state whose requests have at most unprocessed prefill and at most unprocessed decode tokens, the first time at which the configuration lies in has finite expectation. A configuration is the remaining batch time together with the token counts of the requests in arrival order, labels forgotten.
This is part (b) of Theorem 2 of the source in the corrected form used by the mission's goal theorem (finite expected return to a finite set is Foster's form of positive recurrence; the labelled process itself is not positive recurrent).
Formalization Note This is the second conjunct of LLMThroughput.TokenBudget.theorem_2, with the load hypothesis moved before the quantifiers. The set is chosen before the initial state; the expectation is the lower Lebesgue integral of the hitting time in , so a time that is infinite with positive probability has infinite expectation.
import Mathlib import Definitions.Def_LLMThroughput_TokenBudget_Model
namespace LLMThroughput.TokenBudget
open MeasureTheory ProbabilityTheory Filter Topology
open scoped ENNReal
theorem theorem_2_b {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]
(P : Params) (hP : P.Valid) (vpmax vdmax : ℕ) (a : ℕ → Ω → ℕ) (v : ℕ → Ω → ℕ × ℕ)
(hA : IIDArrivals μ a v vpmax vdmax)
(hload : arrivalRate μ a * (meanPrefill μ v + meanDecode μ v) < (P.bmax : ℝ) / (P.t P.bmax : ℝ)) :
∀ (K : ℕ) (π : Policy), IsScheduler P π → IsWorkConserving P π → IsKFCFS P K π →
∃ F : Finset (ℕ × List (ℕ × ℕ)), ∀ x : State, Admissible P.bmax x →
(∀ r ∈ x.reqs, r.P ≤ vpmax ∧ r.D ≤ vdmax) →
∫⁻ ω, ((hitTime F (run P π x (fun m => a m ω) (fun i => v i ω)) : ℕ∞) : ℝ≥0∞) ∂μ
< ⊤ := by sorry
end LLMThroughput.TokenBudget