Repository navigation
Report prefill progress on the VLM path - #183
Merged
Merged
Conversation
Only the LLM prepare calls activePrefillProgressHook; VLM prepare reports chunked prefill through PrefillParameters.progress, which the server never set. On a --vision model the prefill_progress heartbeat therefore stayed at n_past 0 for the whole prefill. Forward prefill.progress to the hook, and keep n_past monotonic since updates arrive as unordered Tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Cross-review (M6 session): no blocking issues. OK to merge once CI is green. Reviewed the full diff (
Verified on a Mac mini M6 (32 GB): Qwen3.8-27B-4bit (VLM path), |
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.
Summary
On
--visionmodels,n_pastandfractionin the prefill progress heartbeat stayed at 0 for the whole prefill. Only the LLMpreparecallsactivePrefillProgressHook. The VLMprepare/prepareContinuationreport throughPrefillParameters.progress, which SwiftLM never set.prefill.progresson the chat and text completion parameters to forward intoactivePrefillProgressHook.PrefillState.updatekeeps the highestnPast, because updates arrive as detached Tasks and can land out of order.Test plan
--vision, 8,413-token prompt: before,n_paststayed 0 for 26 s; after, it rose 495 → 7,920 (fraction 0.06 → 0.94), and the answer was correctswift test --filter SwiftLMTests: 185 tests, 0 failures🤖 Generated with Claude Code