[Model]Support Step-3.7-Flash (#43859)
Signed-off-by: luotingdan <luotingdan@stepfun.com> Signed-off-by: Isotr0py <Isotr0py@outlook.com> Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai> Co-authored-by: luotingdan <luotingdan@stepfun.com> Co-authored-by: Isotr0py <Isotr0py@outlook.com> Co-authored-by: Yu Huang <yuhuang@nvidia.com> Co-authored-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
co-authored by
luotingdan
Isotr0py
Yu Huang
Jee Jee Li
parent
325a1ec4fb
commit
b690b2bb67
@@ -186,6 +186,7 @@ from vllm.v1.spec_decode.ngram_proposer_gpu import (
|
||||
update_ngram_gpu_tensors_incremental,
|
||||
update_scheduler_for_invalid_drafts,
|
||||
)
|
||||
from vllm.v1.spec_decode.step3p5 import Step3p5MTPProposer
|
||||
from vllm.v1.spec_decode.suffix_decoding import SuffixDecodingProposer
|
||||
from vllm.v1.spec_decode.utils import update_num_computed_tokens_for_batch_change
|
||||
from vllm.v1.structured_output.utils import apply_grammar_bitmask
|
||||
@@ -547,6 +548,7 @@ class GPUModelRunner(
|
||||
| MedusaProposer
|
||||
| ExtractHiddenStatesProposer
|
||||
| Gemma4Proposer
|
||||
| Step3p5MTPProposer
|
||||
)
|
||||
if self.speculative_config.method == "custom_class":
|
||||
self.drafter = create_custom_proposer( # type: ignore[assignment]
|
||||
@@ -581,6 +583,8 @@ class GPUModelRunner(
|
||||
)
|
||||
elif self.speculative_config.use_gemma4_mtp():
|
||||
self.drafter = Gemma4Proposer(self.vllm_config, self.device, self)
|
||||
elif self.speculative_config.use_step3p5_mtp():
|
||||
self.drafter = Step3p5MTPProposer(self.vllm_config, self.device, self)
|
||||
elif self.speculative_config.use_dflash():
|
||||
self.drafter = DFlashProposer(self.vllm_config, self.device, self)
|
||||
self.use_aux_hidden_state_outputs = True
|
||||
@@ -2428,7 +2432,11 @@ class GPUModelRunner(
|
||||
else:
|
||||
spec_decode_common_attn_metadata = cm
|
||||
# Capture per-group block tables for multi-group proposers.
|
||||
if self.speculative_config and isinstance(self.drafter, Gemma4Proposer):
|
||||
if self.speculative_config and isinstance(self.drafter, Step3p5MTPProposer):
|
||||
self.drafter.set_per_group_attn_metadata(
|
||||
kv_cache_gid, cm.block_table_tensor, cm.slot_mapping
|
||||
)
|
||||
elif self.speculative_config and isinstance(self.drafter, Gemma4Proposer):
|
||||
self.drafter.set_per_group_block_table(
|
||||
kv_cache_gid, cm.block_table_tensor
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user