Repository navigation
Parallelizes LLM streaming - #5
Merged
Merged
Conversation
yagumana
reviewed
May 13, 2026
| continue | ||
|
|
||
| # forward only if this gen is the adopted speaker | ||
| if gen_id != self.adopted_gen: |
Collaborator
There was a problem hiding this comment.
I think this guard should reject older generations as well:
if gen_id <= self.adopted_gen:
returnThe caller checks gen_id > self.adopted_gen before calling _adopt_generation(), but that check happens outside _adopt_lock. If a newer generation is adopted while an older generation is waiting to enter this lock, the current equality-only check would still allow the older generation to set adopted_gen, causing adopted_gen to move backwards.
Since adopted_gen should be monotonic, this should be rechecked inside the lock.
Collaborator
Author
|
Since this is a quick fix for the surface-level inference code, we will merge it for now. We will improve it later by integrating it with |
Collaborator
Author
|
This PR is for #4. |
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.
alive briefly.