Skip to content

fix(serve): emit OPTION_SPECULATIVE_CONFIG so vLLM enables speculative decoding - #6143

Open
ZealSV wants to merge 1 commit into
aws:masterfrom
ZealSV:fix/spec-decoding-vllm-config
Open

fix(serve): emit OPTION_SPECULATIVE_CONFIG so vLLM enables speculative decoding#6143
ZealSV wants to merge 1 commit into
aws:masterfrom
ZealSV:fix/spec-decoding-vllm-config

Conversation

@ZealSV

@ZealSV ZealSV commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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.

…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant