[WIP][Feature] Integrate Suffix Spec Decoding #4045
Draft
+56
−2
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.
What this PR does / why we need it?
This PR integrate suffix decoding (https://arxiv.org/abs/2411.04975) from vllm (vllm-project/vllm#25784)
Suffix Decoding is a dynamic n-gram matching method that:
Does this PR introduce any user-facing change?
This feature should be implemented as opt-in and remain seamless for users who do not require suffix speculative decoding.
For users who wish to enable it, they must first install arctic-inference:
pip install arctic-inferenceAfter installation, the suffix speculative decoding feature can be enabled using the following speculative config:
--speculative_config '{"method": "suffix", "num_speculative_tokens": 5}'How was this patch tested?
This PR is currently being tested on vLLM main:vllm-project/vllm@83f478b
with PR vllm-project/vllm#25784
In our previous testing, suffix decoding achieved a 13%-30% throughput improvement over n-gram on the sonnet dataset, tested on vllm-ascend v0.9.1 with concurrency ranging from 2 to 40.