File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1369,11 +1369,7 @@ def get_num_experts(self) -> int:
13691369 # Coerce to 0 if explicitly set to None
13701370 return num_experts or 0
13711371
1372- def get_layers_start_end_indices (
1373- self , parallel_config : ParallelConfig
1374- ) -> tuple [int , int ]:
1375- from vllm .distributed .utils import get_pp_indices
1376-
1372+ def get_total_num_hidden_layers (self ) -> int :
13771373 if (
13781374 self .hf_text_config .model_type == "deepseek_mtp"
13791375 or self .hf_config .model_type == "mimo_mtp"
@@ -1393,6 +1389,15 @@ def get_layers_start_end_indices(
13931389 total_num_hidden_layers = getattr (
13941390 self .hf_text_config , "num_hidden_layers" , 0
13951391 )
1392+ return total_num_hidden_layers
1393+
1394+ def get_layers_start_end_indices (
1395+ self , parallel_config : ParallelConfig
1396+ ) -> tuple [int , int ]:
1397+ from vllm .distributed .utils import get_pp_indices
1398+
1399+ total_num_hidden_layers = self .get_total_num_hidden_layers ()
1400+
13961401 # the layout order is: DP x PP x TP
13971402 pp_rank = (
13981403 parallel_config .rank // parallel_config .tensor_parallel_size
You can’t perform that action at this time.
0 commit comments