File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1414from vllm .attention .selector import get_attn_backend
1515from vllm .config import CacheConfig , VllmConfig
1616from vllm .logger import init_logger
17- from vllm .multimodal import MULTIMODAL_REGISTRY
1817from vllm .utils import cdiv
1918from vllm .v1 .attention .backends .utils import (CommonAttentionMetadata ,
2019 subclass_attention_backend )
2322logger = init_logger (__name__ )
2423
2524
26- def _get_max_encoder_len (vllm_config : VllmConfig ) -> int :
27- return MULTIMODAL_REGISTRY .get_encdec_max_encoder_len (
28- vllm_config .model_config )
25+ def _get_max_encoder_len (vllm_config : "VllmConfig" ) -> int :
26+ """Gets the max number of encoder input tokens from the config.
27+ """
28+ sc = vllm_config .scheduler_config
29+ assert sc and isinstance (sc .max_num_encoder_input_tokens , int ), \
30+ "max_num_encoder_input_tokens must be int for enc-dec models"
31+ return sc .max_num_encoder_input_tokens
2932
3033
3134def _get_cross_slot_mapping (encoder_seq_lens : np .ndarray ,
You can’t perform that action at this time.
0 commit comments