Skip to content

Add adaptive token-work admission - #31

Draft
DavidBellamy wants to merge 1 commit into
prodfrom
feature/30-adaptive-work-admission
Draft

Add adaptive token-work admission#31
DavidBellamy wants to merge 1 commit into
prodfrom
feature/30-adaptive-work-admission

Conversation

@DavidBellamy

Copy link
Copy Markdown

Adds shadow and enforce modes for per-partition admission after request tokenization. The controller predicts output length from recency-weighted model, user, workload, endpoint, prompt-size, output-limit, tool, reasoning, and streaming features, then compares predicted outstanding decode work with learned per-replica engine capacity.

Router reservations are reconciled with fresh engine running and waiting counts, replica scaling is automatic, missing telemetry fails open, estimator state is bounded, and unknown partition headers fall back to the requested model. Shadow mode records the complete decision but never rejects or delays requests.

This addresses static concurrency tuning that can either strand GPU capacity or create long engine queues as request shapes change. It applies to regular, prefill/decode, Harmony, Messages, Completions, Generate, and Responses paths, including streaming completion accounting.

Validated with cargo check, nine focused adaptive-admission tests, the full SMG library suite (1407 passed, 5 ignored), and clippy on the SMG crate. Full workspace clippy still encounters unrelated pre-existing lint failures in scheduler and protocol files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant