-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
[Spec Decode] Integrate Suffix Decoding from Arctic Inference #25784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+304
−11
Merged
Changes from 21 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
2d4180c
Integrate Suffix Decoding
sfc-gh-aqiao db621b4
update
sfc-gh-aqiao a15727d
add tests
sfc-gh-aqiao 50d6fd3
fix
sfc-gh-aqiao 92fe31e
docs
sfc-gh-aqiao 6755a31
move import check
sfc-gh-aqiao 6acc529
Merge branch 'main' into HEAD
sfc-gh-aqiao 72c85e6
fix
sfc-gh-aqiao da82b85
SuffixDecodingProposer
sfc-gh-aqiao 0751844
fix
sfc-gh-aqiao 9692d9d
docstring
sfc-gh-aqiao 4536270
precommit
sfc-gh-aqiao 6a24831
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 6342db2
minor
sfc-gh-aqiao ecf3efd
Update speculative.py
aurickq 062bafe
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 1e9ac44
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 9774fb3
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 213276f
format
sfc-gh-aqiao 4724b25
format
sfc-gh-aqiao dba74a6
doc
sfc-gh-aqiao 0f45554
update
sfc-gh-aqiao af6a237
merge update with propose
sfc-gh-aqiao e94166b
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 802d291
update
sfc-gh-aqiao 7050bc4
format
sfc-gh-aqiao 1f3d326
version
sfc-gh-aqiao a79107f
f-string
sfc-gh-aqiao 2d8e05d
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao e1d62bc
type
sfc-gh-aqiao 1d64189
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao 149c907
Merge branch 'main' into suffix-decoding
aurickq d85dc3f
fix import
sfc-gh-aqiao 2f5b451
Merge branch 'suffix-decoding' of https://github.com/aurickq/vllm int…
sfc-gh-aqiao 387fe61
Merge branch 'main' into suffix-decoding
sfc-gh-aqiao aae2b61
config
sfc-gh-aqiao 7ade5e7
Merge branch 'main' into suffix-decoding
aurickq ae0beb3
Trigger CI
sfc-gh-aqiao ba82677
Merge branch 'main' into suffix-decoding
aurickq cfcfcde
Merge branch 'main' into suffix-decoding
aurickq 78798c2
Merge branch 'main' into suffix-decoding
aurickq d851834
Merge branch 'main' into suffix-decoding
aurickq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3303,6 +3303,12 @@ def has_tilelang() -> bool: | |
| return _has_module("tilelang") | ||
|
|
||
|
|
||
| def has_arctic_inference() -> bool: | ||
|
||
| """Whether the optional `arctic_inference` package is available.""" | ||
|
|
||
| return _has_module("arctic_inference") | ||
|
|
||
|
|
||
| def set_process_title( | ||
| name: str, suffix: str = "", prefix: str = envs.VLLM_PROCESS_NAME_PREFIX | ||
| ) -> None: | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind to explore the memory usage of the suffix decoding cache? Just curious, if there're other mechanism to limit the cache memory usage in the case that all requests are long context, in that case, the corresponding suffix tree corresponding to 10000 requests could be quite large.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small clarification that only the responses are stored in the global cache, not prompts. Suffix decoding builds one tree for each prompt which is only used while that request is alive, and deleted after the request finishes.
For other ways to limit the global cache size, perhaps a limit based on number of tokens might be better? Open to suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, make sense. However, there would still be cases with long outputs (e.g. reasoning models). So I think adding some token-level guarding might still be helpful, and we could do that in a relatively simpler way.
WDYT? But I think that could be a followup enhancement, but might worth the flags the memory usages could be linear to max(total tokens in <max_cached_recent_requests> requests) IIUC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, having an additional config to limit the number of tokens makes sense. Created snowflakedb/ArcticInference#215 to track.