Conversation
When return_progress: true is set in the request, the server emits
prompt_progress chunks during prefill, matching llama.cpp's format:
{"prompt_progress": {"total": N, "cache": M, "processed": P, "time_ms": T}}
ExLlamaV3 already emits per-chunk prefill progress (stage=prefill,
curr_progress, max_progress). This change forwards that data to the
SSE stream instead of only using it for the server console status line.
Includes docker/Dockerfile.prefill: a thin overlay on the official
image that copies the three modified Python files.
Author
This branch has not been deployed
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.

Is your pull request related to a problem? Please describe.
During a long prefill (e.g. 64k+ context), the SSE stream is silent until the first generated token arrives. External clients see no data for minutes and cannot tell a slow prefill from a hang. There is no way to opt into progress updates.
ExLlamaV3 already computes per-chunk prefill progress. Its
Job.prefill()method appends{"stage": "prefill", "curr_progress": N, "max_progress": M}to its results after everychunk_sizebatch.generate_gen()receives these events and feeds them to the server console status line, but never forwards them to the SSE stream. The data is already there. It just is not exposed to the client.Why should this feature be added?
return_progressflag.return_progressdefaults tofalse. Existing clients see no change.prompt_progressfield is a vendor extension. Clients that ignore unknown fields are unaffected.Examples
When the client sets
return_progress: true, the server emits oneprompt_progresschunk perchunk_sizebatch during prefill, matching llama.cpp's format:{ "id": "chatcmpl-...", "object": "chat.completion.chunk", "choices": [{"index": 0, "delta": {"role": "assistant", "content": null}, "finish_reason": null}], "prompt_progress": {"total": 29000, "cache": 12400, "processed": 14448, "time_ms": 200} }totalmax_progressfrom ExLlamaV3cachecached_tokensfrom thestartedeventprocessedcurr_progressfrom ExLlamaV3time_msstartedevent (server-side)Test it:
A small prompt emits one
prompt_progresschunk (prefill fits in one batch). A large prompt emits several chunks with increasingprocessedvalues, then content chunks, then the final usage chunk. Without the flag, the response is identical to before.Additional context
Files changed (44 lines added, 0 removed):
endpoints/OAI/types/common.pyreturn_progress: bool = FalsetoCommonCompletionRequestbackends/exllamav3/model.py_prefill_progressevent when the flag is setendpoints/OAI/utils/chat_completion.py_prefill_progressevents through the stream collector. Serialize them as SSE chunks with theprompt_progressfielddocker/Dockerfile.prefillScope notes:
chat/completionsendpoint is modified. Thecompletionendpoint is unchanged.