fix(serve): emit OPTION_SPECULATIVE_CONFIG so vLLM enables speculative decoding - #6143
Open
ZealSV wants to merge 1 commit into
Open
fix(serve): emit OPTION_SPECULATIVE_CONFIG so vLLM enables speculative decoding#6143ZealSV wants to merge 1 commit into
ZealSV wants to merge 1 commit into
Conversation
…e decoding
The speculative-decoding path set only OPTION_SPECULATIVE_DRAFT_MODEL, the env
var the legacy lmi-dist rolling batcher read. The current LMI container runs the
vLLM V1 engine, which reads OPTION_SPECULATIVE_CONFIG (a JSON blob) and ignores
OPTION_SPECULATIVE_DRAFT_MODEL. As a result a model requested with
speculative_decoding_config deploys and serves, but vLLM leaves speculative
decoding off (speculative_config=None) -- the draft model is staged but never used.
Add _set_speculative_draft_model_env, which emits BOTH vars: the legacy path var
(back-compat with older containers) and OPTION_SPECULATIVE_CONFIG
{"method":"draft_model","model":<path>,"num_speculative_tokens":N}. Wire it
into the custom, JumpStart, and deployment-config SD paths. num_speculative_tokens
defaults to 5 and is overridable via NumSpeculativeTokens in the config.
Unit: 6 SD tests pass (3 new asserting OPTION_SPECULATIVE_CONFIG + override).
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.
The speculative-decoding path set only OPTION_SPECULATIVE_DRAFT_MODEL, the env var the legacy lmi-dist rolling batcher read. The current LMI container runs the vLLM V1 engine, which reads OPTION_SPECULATIVE_CONFIG (a JSON blob) and ignores OPTION_SPECULATIVE_DRAFT_MODEL. As a result a model requested with speculative_decoding_config deploys and serves, but vLLM leaves speculative decoding off (speculative_config=None) -- the draft model is staged but never used.
Add _set_speculative_draft_model_env, which emits BOTH vars: the legacy path var (back-compat with older containers) and OPTION_SPECULATIVE_CONFIG {"method":"draft_model","model":,"num_speculative_tokens":N}. Wire it into the custom, JumpStart, and deployment-config SD paths. num_speculative_tokens defaults to 5 and is overridable via NumSpeculativeTokens in the config.
Unit: 6 SD tests pass (3 new asserting OPTION_SPECULATIVE_CONFIG + override).
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.