[None][feat] Enforce multimodal encoder runtime budgets with budgeted output storage - #16051
Conversation
cb85bc0 to
f2242dd
Compare
c552067 to
9b9ee3f
Compare
8daa248 to
602b402
Compare
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
c91a392 to
ef0b537
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #66452 [ run ] triggered by Bot. Commit: |
|
PR_Github #66409 [ run ] completed with state |
|
PR_Github #66452 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #66479 [ run ] triggered by Bot. Commit: |
|
PR_Github #66479 [ run ] completed with state
|
|
/bot help |
GitHub Bot Help
Provide a user friendly way for developers to interact with a Jenkins server. Run See details below for each supported subcommand. Details
Launch build/test pipelines. All previously running jobs will be killed.
kill
Kill all running builds associated with pull request. skip
Skip testing for latest commit on pull request. reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break. |
|
/bot run --disable-fail-fast |
|
PR_Github #66532 [ run ] triggered by Bot. Commit: |
|
PR_Github #66532 [ run ] completed with state |
Description
Multimodal encoder work is unbounded at runtime today: the scheduler admits on
LLM/KV capacity alone, so one iteration can submit more encoder items — or more
encoder attention tokens — than the workspace was sized for, and the embeddings
held between encode and prefill accumulate with no cap. KV-cache sizing at
startup does not know any of it exists.
This PR makes encoder execution a scheduled, budgeted resource:
encoder_max_num_items×encoder_max_num_tokensareenforced per iteration over atomic items (one image or video), selected FCFS;
a request left partial resumes later. The executor's encoder step is the
single encode site.
prefill. A request's first scheduled item allocates one contiguous buffer for
all of its items, so a started request can always finish; KV estimation
reserves that budget at startup. A request that could never fit is rejected at
admission with a message naming the knob, instead of becoming a CUDA OOM.
multimodal_config.encoder_scheduling_policyselectsDEFAULT,EAGER(advance encoder work for capacity-rejected requests), or
DISABLED(legacyinline encode).
Models: Qwen2-VL / Qwen2.5-VL, Qwen3-VL (deepstack-widened rows), Mistral3 /
Pixtral.
Measurements
Qwen3-VL-8B-Instruct, 1×H200,
aiperf, n=8 per policy, policy the onlydifference and
kv_cache_config.max_tokenspinned equal. Caches off.Availability — past the headroom, removing the cap does not degrade: it
loses essentially every request and the server process dies.
DISABLEDDEFAULTReproduced on two hosts. At 105 GiB
DISABLEDis non-deterministic.Peak memory —
DEFAULThas zero variance across repetitions and barelymoves as the workload gets 7× heavier (136.1 / 135.9 / 135.1 GiB at 1 / 4 / 7
images per request);
DISABLEDtracks the traffic (131.7 → 138.0 → 138.1).Latency — a trade, and only under heavy load:
At 7 images both are real (non-overlapping ranges).
DEFAULTraises the fastITL percentiles and lowers the slow ones (p50 +17%, p99 −2.0%) — spreading
encoder work across iterations. Quote both halves or neither.
Test coverage
test_multimodal_scheduler.py(atomic packing, byte-budgetallocate-before-compute, whole-request charging, admission fail-fast, per-item
cache read-through, contiguous-buffer ownership, per-rank resolution under PP),
test_kv_cache_estimation.py(encoder profiled at its own budget; reservationof unmaterialized capacity),
test_modeling_qwen2_5vl.py/test_modeling_mistral.py(capacity from processor geometry, window countsmatching the encoder's padding, dummy tensors satisfying the encoder contract),
test_scheduler_serializable_output.py(item schedule survives rankdistribution).
Follow-ups
Unify the remaining full-request consumers (side-stream prefetch,
mm_encoder_only/ disagg, non-item models) onto the item path andsingle-source the item manifest; TODO markers are anchored at the migration
sites.
Dev Engineer Review
DEFAULT,EAGER, andDISABLEDscheduling policies.encoder_max_batch_sizewithencoder_max_num_itemsacross APIs, configuration, telemetry, manifests, and documentation.setup_attn_metadatacallers, budget calculations, admission behavior, cache reuse, and partial-progress handling.QA Engineer Review
get_dummy_mm_data_for_tokenstests with coverage forget_dummy_mm_data.tests/integration/test_lists/were modified.test-db/orqa/based on the provided changes.