Eq. (43), App. B.1, p. 38 (corrected: one extra b_max for the batch straddling n_1 t_{b_max}) — cumulative processed tokens grow by at most (n_2 − n_1 + 1) b_max
ProvedLLMThroughput.TokenBudget.eq_43Cumulative processing bound. Consider the basic LLM queueing model under any scheduling algorithm and from any admissible initial state. Let the arrival counts and the request sizes be arbitrary, with every size at least . For a phase , let be the number of phase- tokens in the batches that the algorithm formed and that completed by time . Then for all ,
The bound makes precise that no schedule processes more than tokens per slots, apart from one batch straddling the left end of the window. It gives the Lipschitz bound of the fluid model (eq. (47)) after fluid scaling.
Formalization Note Slots are 0-based, and "by time " means by the end of slot , which is the paper's slot . A batch formed in slot with processing time is counted in once . The bound is written as , which avoids natural-number subtraction.
Differences from the source:
- correction: → ; reason: the printed bound is false. Take , , , (so , ), no arrivals, and an initial state with and one request with prefill tokens and decode token. A work-conserving run forms a full batch of tokens in the paper's slot , which completes at the end of slot , and then a 1-token batch, which completes at the end of slot . So
- reading: , "the cumulative number of tokens that have been completed phase processing by time " → phase- tokens of batches formed during the run and completed by time ; reason: the composition of a batch already in progress in the initial state is not part of the state (5), so its tokens cannot be counted
- generalization: → ; reason: covers more instances and specializes to the source's
- generalization: initial state in the paper's state space → any admissible state, with feasibility required at every admissible state; reason: consists of admissible states. A scheduling algorithm defined on extends feasibly to all admissible states (e.g. greedy oldest-first off ), and a run from a state of never leaves
- generalization: the policy is a function of the labelled state (5) → a function of the state (5) together with the next arrival label; reason: more policies are covered, and the paper's policies are those that ignore the extra field
- generalization: random i.i.d. sizes bounded by → arbitrary deterministic arrival counts and sizes , no upper bound; reason: the statement holds pathwise, so it specializes to every sample path of the paper's model
- encoding: feasibility (6a)–(6d) → (6a)–(6d) plus ; reason: a request has no decode token left to contribute when , which is implicit in "unprocessed decode tokens"
- encoding: real, → and , , ; reason: integer slots force integer , and the other conditions only exclude undefined cases
- encoding: slots → slots ; reason: Lean convention; same instances
import Mathlib import Definitions.Def_LLMThroughput_TokenBudget_Model
namespace LLMThroughput.TokenBudget
theorem eq_43 (P : Params) (hP : P.Valid) (π : Policy) (hπ : IsScheduler P π)
(x : State) (hx : Admissible P.bmax x) (a : ℕ → ℕ) (v : ℕ → ℕ × ℕ)
(hv : ∀ i, 1 ≤ (v i).1 ∧ 1 ≤ (v i).2) (n₁ n₂ : ℕ) (hn : n₁ < n₂) :
completedTokens P π x a v prefillLoad (n₂ * P.t P.bmax)
≤ completedTokens P π x a v prefillLoad (n₁ * P.t P.bmax) + (n₂ - n₁ + 1) * P.bmax ∧
completedTokens P π x a v decodeLoad (n₂ * P.t P.bmax)
≤ completedTokens P π x a v decodeLoad (n₁ * P.t P.bmax) + (n₂ - n₁ + 1) * P.bmax := by sorry
end LLMThroughput.TokenBudget
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.