File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 82
82
"currently supported with encoder/"
83
83
"decoder models." )
84
84
85
+ STR_NOT_IMPL_ENC_DEC_CPU = ("CPU is not currently supported with "
86
+ "encoder/decoder models." )
87
+
85
88
# Efficiently import all enc/dec error strings
86
89
# rather than having to import all of the above
87
90
STR_NOT_IMPL_ENC_DEC_ERR_STRS = {
97
100
"STR_NOT_IMPL_ENC_DEC_CUDA_GRAPH" : STR_NOT_IMPL_ENC_DEC_CUDAGRAPH ,
98
101
"STR_NOT_IMPL_ENC_DEC_BACKEND" : STR_NOT_IMPL_ENC_DEC_BACKEND ,
99
102
"STR_NOT_IMPL_ENC_DEC_PROMPT_ADAPTER" : STR_NOT_IMPL_ENC_DEC_PROMPT_ADAPTER ,
103
+ "STR_NOT_IMPL_ENC_DEC_CPU" : STR_NOT_IMPL_ENC_DEC_CPU
100
104
}
101
105
102
106
# Constants related to forcing the attention backend selection
Original file line number Diff line number Diff line change 15
15
from vllm .multimodal import (MULTIMODAL_REGISTRY , BatchedTensorInputs ,
16
16
MultiModalInputs )
17
17
from vllm .sequence import IntermediateTensors , SequenceGroupMetadata
18
- from vllm .utils import make_tensor_with_pad
18
+ from vllm .utils import STR_NOT_IMPL_ENC_DEC_ERR_STRS , make_tensor_with_pad
19
19
from vllm .worker .model_runner_base import (
20
20
ModelRunnerBase , ModelRunnerInputBase ,
21
21
_add_attn_metadata_broadcastable_dict ,
@@ -121,6 +121,10 @@ def __init__(
121
121
# Lazy initialization.
122
122
self .model : nn .Module # Set after init_Model
123
123
124
+ if self .model_config .is_encoder_decoder_model :
125
+ raise NotImplementedError (
126
+ STR_NOT_IMPL_ENC_DEC_ERR_STRS ['STR_NOT_IMPL_ENC_DEC_CPU' ])
127
+
124
128
def load_model (self ) -> None :
125
129
self .model = get_model (model_config = self .model_config ,
126
130
load_config = self .load_config ,
You can’t perform that action at this time.
0 commit comments