Repository navigation
Description
Proposal: multiple independent prompts in one vLLM backend request
Target tracker: triton-inference-server/server. Design discussion requested;
this is not an approved API or a ready-to-merge PR.
At base 22f3280b6a62ccf12734a3ca4ea961488fcf0bf4, auto-completion
declares text_input shape [1], and generation parsing
consumes element zero. Separate Triton requests already enter vLLM concurrently.
The use case is a client submitting a list of independent prompts as one logical
request and reliably associating partial and final outputs with each prompt.
For example, send BYTES text_input shape [2] containing two questions over gRPC
streaming inference. The current auto-config rejects the shape; changing only
explicit dims to [-1] still consumes just the first element.
Proposed contract: rank-one UTF-8 text_input [N], N>=1; request-level sampling
parameters and LoRA shared across children. Leave max_batch_size=0 and vLLM-managed
batching. Preserve N=1 responses. For N>1, return per-prompt decoupled responses
with prompt_index UINT32 [1], completion_index UINT32 [K], prompt_finished BOOL [1].
Text and optional completion outputs align to completion_index; input-token count
is [1] per prompt. stream=false yields a full response for each finished prompt;
stream=true yields mapped deltas. A final flags-only notification completes the
parent. Completion order need not match input order. n>1 is supported.
Children use independent IDs and concurrent engine submissions. One bounded queue
slot per parent applies backpressure. A child failure fails the parent and aborts
unfinished children; already sent partial results are invalidated by the terminal
error. Cancellation also works while children are silent. Cleanup precedes the
single final-send attempt and parent counter decrement.
Explicit dims [1] remain single-prompt. Auto-completion adds missing mapping
outputs. Existing single-prompt generation and embeddings remain unchanged.
Multiple prompts plus images are rejected until ownership mapping is specified.
The prototype supports gRPC streaming inference, including stream=false. HTTP
/infer, unary gRPC, HTTP generate and OpenAI frontend support are not claimed.
Alternatives: retain N client requests; aggregate all non-streaming results into
one flattened result with offsets; or use a new opt-in input to avoid changing
auto-config. Decisions requested: response-envelope naming, whether stream=false
should aggregate, endpoint expectations, and a future prompt-count admission limit.
Related work: dynamic batching question #8203,
HTTP array parsing #7624,
frontend embedding batches #8961,
renderer migration #135,
optional outputs #70.
Searches included open/closed issues and PRs in both repositories but broad result
sets were not completely paginated; this is not a claim that no other work exists.
Testing: CPU lifecycle/parsing tests and new L0 gRPC cases for mapping, optional
outputs, multiple completions and scalar agreement. Run existing generation,
embedding, cancellation, health, metrics and multi-GPU/LoRA QA. GPU/container
execution and performance comparisons remain outstanding. No speedup is claimed.
Activity
Midhilesh4890 commentedon Oct 17, 2026
I have a local prototype ready to develop into a PR for this proposal. GPU/container validation is still outstanding. I would welcome feedback on the design and API; based on the maintainers' feedback and suggestions, I will revise and improve the implementation before opening a PR.