[fix][train] Reject unsafe MTP prefix caching - #2046
Open
bvolpato wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a validation check to prevent using MTP speculative decoding with prefix caching enabled on models with recurrent linear-attention layers, which is unsafe. It also updates the configuration documentation, disables prefix caching in the example script, and adds corresponding unit tests. The reviewer recommended wrapping the model configuration loading (AutoConfig.from_pretrained) in a try...except block to prevent training from crashing in offline or air-gapped environments if the Hugging Face Hub is unreachable.
- reject effective MTP plus prefix caching on recurrent linear attention - disable prefix caching in the Qwen3.5 speculative decoding recipe - cover model capability and final engine override precedence
bvolpato
force-pushed
the
bvolpato/guard-mtp-prefix-caching
branch
from
August 16, 2026 15:44
78e70a0 to
d4c2e5c
Compare
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.
Summary
layer_typesinstead of model names.engine_init_kwargsoverrides for prefix caching and speculative decoding.Why
Issue #1981 reports a Qwen3.6-27B accuracy collapse when MTP and prefix caching are combined. Current SkyRL config validation accepted that pair because prefix caching defaults to enabled. vLLM issue #43559 tracks the same failure class; proposed fixes #43650 and #50021 remain open and are not part of SkyRL’s pinned vLLM 0.26.0 release.
This guard fails during config validation and gives both supported mitigations: disable prefix caching or disable MTP. Full-attention MTP models and non-MTP hybrid models remain allowed.
Validation
SKYRL_DISABLE_SPEC=1accepted.uv lock --checkbash -ngit diff --checkFixes #1981