Expose optimized Gemma serving controls - #54
Open
mohammadaaftabv wants to merge 9 commits into
Open
Conversation
Closed
mohammadaaftabv
force-pushed
the
gemma-serving-controls
branch
from
July 22, 2026 17:56
91c7154 to
cee9f7f
Compare
Add opt-in serving, sampling, queue admission, and runtime-environment controls while preserving existing defaults. Signed-off-by: V Mohammad Aaftab <aaftaabv@gmail.com>
mohammadaaftabv
force-pushed
the
gemma-serving-controls
branch
from
July 22, 2026 18:10
cee9f7f to
564d207
Compare
Add cache-aware router selection, reduce admission control to the validated workflow inputs, declare the gateway dependency, and cover preinstalled runtime reuse.
mohammadaaftabv
marked this pull request as ready for review
July 28, 2026 09:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Expose optimized Gemma/vLLM serving controls through the text-processing pipeline:
temperatureandtop_pvalues per text stageWhy
The shared Dynamo path already represented model placement, tensor parallelism, context length, KV-cache dtype, sequence and token limits, request timeout, and per-client concurrency. It did not expose the remaining executable serving controls or provide one overload signal and adaptive concurrency state shared by all remote text-stage actors.
Queue control is implemented once at the server boundary. Remote stage clients do not poll Prometheus independently, and there is no manual metrics-URL fallback or selectable queue-control policy. The user-facing admission inputs are limited to the queue threshold and shared concurrency ceiling.
Compatibility
Existing behavior is unchanged unless the new options are supplied. Setting
--inference_queue_max_waiting_requestsenables the shared admission gateway. Worker metrics endpoints are discovered from Dynamo placements. Missing or stale queue metrics fail open.Validation
Focused tests and static checks
git diff --checkpassedMatched Slurm performance experiment
Configuration:
RedHatAI/gemma-4-31B-it-FP8-dynamicIncremental feature attribution, reported as paired median throughput change:
Speculative decoding accounts for most of the measured improvement. Draft-token acceptance was approximately 87.4%. The measured result is about 1.24x at pipeline-stage level; it does not reproduce a 2.5x improvement on this short-output text-processing workload.
Admission/AIMD is an overload-resilience feature rather than an unsaturated throughput optimization. The normal matrix never developed a vLLM waiting queue, so admission correctly remained inactive there.
Completeness and correctness parity
Across all 12 profiles:
.donemarkers were writtenAbsolute prompt-contract checks were consistent between baseline and full configurations:
Pooled full-versus-baseline exact-match rates over 4,096 paired rows:
llm_language_predictionpnc_texttn_rawcode_switched_textspeech_qa_textFor comparison, the two baseline repetitions matched each other at 100.00% for LanguageID, 99.76% for PnC, 99.66% for TN, 99.51% for CodeSwitching, and 97.17% for SpeechQA. Full-versus-baseline text differences are therefore approximately the same scale as ordinary batched-inference repeat variability. No output-contract regression was detected.
These checks establish completeness, format/constraint compliance, and output parity. They do not establish semantic accuracy for TN, CodeSwitching, or SpeechQA, and this English workload does not validate the intended Indic languages.
Triggered-overload stress experiment
A separate run deliberately saturated one TP=2 worker:
.donemarkers completed with no missing output fields or parse failuresExperiment-design caveat
Baseline and full profiles used the same frozen complete source, with the opt-in runtime controls disabled or enabled. This cleanly isolates the executable controls without changing code between profiles. Prebuilt-environment reuse was common to every profile and was not separately ablated.