[Mypy Fix] Mypy fix for "vllm/model_executor/models/[eE][fF]" (#53381)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-08-22 15:41:27 -04:00
committed by GitHub
parent 236f78cc5c
commit 811d12ee26
16 changed files with 71 additions and 84 deletions
@@ -231,7 +231,7 @@ class CacheOnlyAttentionLayer(nn.Module, AttentionLayerBase):
head_size: int,
cache_config: CacheConfig | None = None,
prefix: str = "",
attn_type: str = AttentionType.DECODER,
attn_type: AttentionType = AttentionType.DECODER,
):
super().__init__()
@@ -329,7 +329,9 @@ class ExtractHiddenStatesModel(nn.Module):
super().__init__()
self.vllm_config = vllm_config
self.hf_config = vllm_config.speculative_config.draft_model_config.hf_config
speculative_config = vllm_config.speculative_config
assert speculative_config is not None
self.hf_config = speculative_config.draft_model_config.hf_config
self.hidden_size = vllm_config.model_config.get_hidden_size()
self.target_num_hidden_layers = (
vllm_config.model_config.get_total_num_hidden_layers()