@@ -122,9 +122,10 @@ def forward(
122122
123123 def load_fused_expert_weights (self , name : str , params_dict : dict ,
124124 loaded_weight : torch .Tensor , shard_id : str ,
125- num_experts : int ):
125+ num_experts : int ) -> bool :
126126 param = params_dict [name ]
127127 weight_loader = typing .cast (Callable [..., bool ], param .weight_loader )
128+ loaded_local_expert = False
128129 for expert_id in range (num_experts ):
129130 curr_expert_weight = loaded_weight [expert_id ]
130131 success = weight_loader (param ,
@@ -133,9 +134,10 @@ def load_fused_expert_weights(self, name: str, params_dict: dict,
133134 shard_id ,
134135 expert_id ,
135136 return_success = True )
136- if not success :
137- return False
138- return True
137+ if success :
138+ loaded_local_expert = True
139+
140+ return loaded_local_expert
139141
140142 def load_weights (self , weights : Iterable [tuple [str ,
141143 torch .Tensor ]]) -> set [str ]:
@@ -345,4 +347,4 @@ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
345347 for _ in range (self .deepstack_num_level )
346348 ] if self .use_deepstack else None
347349 self .visual_dim = config .vision_config .out_hidden_size
348- self .multiscale_dim = self .visual_dim * self .deepstack_num_level
350+ self .multiscale_dim = self .visual_dim * self .deepstack_num_level
0 commit comments