KeyError: 'model.layers.6.mlp.experts.w2_weight_scale'

When deploying DeepSeek - R1 - Channel - INT8 using lws, the following error occurred:

INFO 04-18 01:30:29 [model_runner.py:1110] Starting to load model /models...
(RayWorkerWrapper pid=296, ip=172.200.216.170) INFO 04-18 01:30:29 [parallel_state.py:959] rank 9 in world size 16 is assigned as DP rank 0, PP rank 1, TP rank 1
(RayWorkerWrapper pid=296, ip=172.200.216.170) DEBUG 04-18 01:30:29 [config.py:3908] enabled custom ops: Counter()
(RayWorkerWrapper pid=296, ip=172.200.216.170) DEBUG 04-18 01:30:29 [config.py:3910] disabled custom ops: Counter()
(RayWorkerWrapper pid=296, ip=172.200.216.170) INFO 04-18 01:30:29 [model_runner.py:1110] Starting to load model /models...
DEBUG 04-18 01:30:29 [decorators.py:109] Inferred dynamic dimensions for forward method of <class 'vllm.model_executor.models.deepseek_v2.DeepseekV2Model'>: ['input_ids', 'positions', 'intermediate_tensors', 'inputs_embeds']
(RayWorkerWrapper pid=582) DEBUG 04-18 01:30:29 [decorators.py:109] Inferred dynamic dimensions for forward method of <class 'vllm.model_executor.models.deepseek_v2.DeepseekV2Model'>: ['input_ids', 'positions', 'intermediate_tensors', 'inputs_embeds']
DEBUG 04-18 01:30:29 [config.py:3908] enabled custom ops: Counter({'rms_norm': 124, 'silu_and_mul': 31, 'unquantized_fused_moe': 28, 'rotary_embedding': 1})
DEBUG 04-18 01:30:29 [config.py:3910] disabled custom ops: Counter()
(RayWorkerWrapper pid=582) DEBUG 04-18 01:30:29 [config.py:3908] enabled custom ops: Counter({'rms_norm': 124, 'silu_and_mul': 31, 'unquantized_fused_moe': 28, 'rotary_embedding': 1})
Loading safetensors checkpoint shards:   0% Completed | 0/163 [00:00<?, ?it/s]
ERROR 04-18 01:30:30 [worker_base.py:620] Error executing method 'load_model'. This might cause deadlock in distributed execution.
ERROR 04-18 01:30:30 [worker_base.py:620] Traceback (most recent call last):
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 612, in execute_method
ERROR 04-18 01:30:30 [worker_base.py:620]     return run_method(self, method, args, kwargs)
ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/utils.py", line 2378, in run_method
ERROR 04-18 01:30:30 [worker_base.py:620]     return func(*args, **kwargs)
ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker.py", line 183, in load_model
ERROR 04-18 01:30:30 [worker_base.py:620]     self.model_runner.load_model()
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/model_runner.py", line 1113, in load_model
ERROR 04-18 01:30:30 [worker_base.py:620]     self.model = get_model(vllm_config=self.vllm_config)
ERROR 04-18 01:30:30 [worker_base.py:620]                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/__init__.py", line 14, in get_model
ERROR 04-18 01:30:30 [worker_base.py:620]     return loader.load_model(vllm_config=vllm_config)
ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/loader.py", line 455, in load_model
ERROR 04-18 01:30:30 [worker_base.py:620]     loaded_weights = model.load_weights(
ERROR 04-18 01:30:30 [worker_base.py:620]                      ^^^^^^^^^^^^^^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/deepseek_v2.py", line 798, in load_weights
ERROR 04-18 01:30:30 [worker_base.py:620]     param = params_dict[name]
ERROR 04-18 01:30:30 [worker_base.py:620]             ~~~~~~~~~~~^^^^^^
ERROR 04-18 01:30:30 [worker_base.py:620] KeyError: 'model.layers.6.mlp.experts.w2_weight_scale'
(RayWorkerWrapper pid=296, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620] Error executing method 'load_model'. This might cause deadlock in distributed execution.
(worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_device.py", line 104, in __torch_function__
[rank0]: Traceback (most recent call last):
[rank0]:   File "<frozen runpy>", line 198, in _run_module_as_main
[rank0]:   File "<frozen runpy>", line 88, in _run_code
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 1121, in <module>
[rank0]:     uvloop.run(run_server(args))
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/uvloop/__init__.py", line 109, in run
[rank0]:     return __asyncio.run(
[rank0]:            ^^^^^^^^^^^^^^
[rank0]:   File "/usr/lib/python3.12/asyncio/runners.py", line 195, in run
[rank0]:     return runner.run(main)
[rank0]:            ^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
[rank0]:     return self._loop.run_until_complete(task)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/uvloop/__init__.py", line 61, in wrapper
[rank0]:     return await main
[rank0]:            ^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 1069, in run_server
[rank0]:     async with build_async_engine_client(args) as engine_client:
[rank0]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
[rank0]:     return await anext(self.gen)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 146, in build_async_engine_client
[rank0]:     async with build_async_engine_client_from_engine_args(
[rank0]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
[rank0]:     return await anext(self.gen)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 194, in build_async_engine_client_from_engine_args
[rank0]:     engine_client = AsyncLLMEngine.from_vllm_config(
[rank0]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/async_llm_engine.py", line 653, in from_vllm_config
[rank0]:     return cls(
[rank0]:            ^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/async_llm_engine.py", line 608, in __init__
[rank0]:     self.engine = self._engine_class(*args, **kwargs)
[rank0]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/async_llm_engine.py", line 267, in __init__
[rank0]:     super().__init__(*args, **kwargs)
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/llm_engine.py", line 282, in __init__
[rank0]:     self.model_executor = executor_class(vllm_config=vllm_config, )
[rank0]:                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/executor_base.py", line 286, in __init__
[rank0]:     super().__init__(*args, **kwargs)
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/executor_base.py", line 52, in __init__
[rank0]:     self._init_executor()
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/ray_distributed_executor.py", line 114, in _init_executor
[rank0]:     self._init_workers_ray(placement_group)
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/ray_distributed_executor.py", line 396, in _init_workers_ray
[rank0]:     self._run_workers("load_model",
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/ray_distributed_executor.py", line 516, in _run_workers
[rank0]:     self.driver_worker.execute_method(sent_method, *args, **kwargs)
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 621, in execute_method
[rank0]:     raise e
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 612, in execute_method
[rank0]:     return run_method(self, method, args, kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/utils.py", line 2378, in run_method
[rank0]:     return func(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker.py", line 183, in load_model
[rank0]:     self.model_runner.load_model()
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/model_runner.py", line 1113, in load_model
[rank0]:     self.model = get_model(vllm_config=self.vllm_config)
[rank0]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/__init__.py", line 14, in get_model
[rank0]:     return loader.load_model(vllm_config=vllm_config)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/loader.py", line 455, in load_model
[rank0]:     loaded_weights = model.load_weights(
[rank0]:                      ^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/deepseek_v2.py", line 798, in load_weights
[rank0]:     param = params_dict[name]
[rank0]:             ~~~~~~~~~~~^^^^^^
[rank0]: KeyError: 'model.layers.6.mlp.experts.w2_weight_scale'
(RayWorkerWrapper pid=296, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     return func(*args, **kwargs)
(RayWorkerWrapper pid=296, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^
(RayWorkerWrapper pid=296, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 896.00 MiB. GPU 1 has a total capacity of 79.25 GiB of which 768.00 KiB is free. Including non-PyTorch memory, this process has 0 bytes memory in use. Of the allocated memory 77.67 GiB is allocated by PyTorch, and 150.52 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
(RayWorkerWrapper pid=295, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 896.00 MiB. GPU 0 has a total capacity of 79.25 GiB of which 144.75 MiB is free. Including non-PyTorch memory, this process has 0 bytes memory in use. Of the allocated memory 77.67 GiB is allocated by PyTorch, and 150.52 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620]     loaded_weights = model.load_weights(
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620]                      ^^^^^^^^^^^^^^^^^^^
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/deepseek_v2.py", line 798, in load_weights
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620]     param = params_dict[name]
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620]             ~~~~~~~~~~~^^^^^^
(RayWorkerWrapper pid=580) ERROR 04-18 01:30:30 [worker_base.py:620] KeyError: 'model.layers.6.mlp.experts.w2_weight_scale'
(RayWorkerWrapper pid=299, ip=172.200.216.170) INFO 04-18 01:30:28 [custom_all_reduce_utils.py:244] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json [repeated 14x across cluster]
(RayWorkerWrapper pid=584) INFO 04-18 01:30:28 [utils.py:993] Found nccl from library libnccl.so.2 [repeated 15x across cluster]
(RayWorkerWrapper pid=584) INFO 04-18 01:30:28 [pynccl.py:69] vLLM is using nccl==2.21.5 [repeated 15x across cluster]
(RayWorkerWrapper pid=584) DEBUG 04-18 01:30:28 [shm_broadcast.py:288] Connecting to ipc:///tmp/d42c5e60-d838-40b2-962a-81284028fa6d [repeated 13x across cluster]
(RayWorkerWrapper pid=584) INFO 04-18 01:30:29 [parallel_state.py:959] rank 7 in world size 16 is assigned as DP rank 0, PP rank 0, TP rank 7 [repeated 14x across cluster]
(RayWorkerWrapper pid=584) DEBUG 04-18 01:30:29 [config.py:3908] enabled custom ops: Counter() [repeated 14x across cluster]
(RayWorkerWrapper pid=584) DEBUG 04-18 01:30:29 [config.py:3910] disabled custom ops: Counter() [repeated 21x across cluster]
(RayWorkerWrapper pid=584) INFO 04-18 01:30:29 [model_runner.py:1110] Starting to load model /models... [repeated 14x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) DEBUG 04-18 01:30:29 [decorators.py:109] Inferred dynamic dimensions for forward method of <class 'vllm.model_executor.models.deepseek_v2.DeepseekV2Model'>: ['input_ids', 'positions', 'intermediate_tensors', 'inputs_embeds'] [repeated 14x across cluster]
(RayWorkerWrapper pid=584) DEBUG 04-18 01:30:29 [config.py:3908] enabled custom ops: Counter({'rms_norm': 124, 'silu_and_mul': 31, 'unquantized_fused_moe': 28, 'rotary_embedding': 1}) [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620] Error executing method 'load_model'. This might cause deadlock in distributed execution. [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620] Traceback (most recent call last): [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 612, in execute_method [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     return run_method(self, method, args, kwargs) [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/utils.py", line 2378, in run_method [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     return func(*args, **kwargs) [repeated 21x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^ [repeated 21x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/loader.py", line 455, in load_model [repeated 42x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     self.model_runner.load_model() [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     self.model = get_model(vllm_config=self.vllm_config) [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/__init__.py", line 14, in get_model [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     return loader.load_model(vllm_config=vllm_config) [repeated 14x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 21x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     model = _initialize_model(vllm_config=vllm_config) [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/model_loader/loader.py", line 133, in _initialize_model [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     return model_class(vllm_config=vllm_config, prefix=prefix) [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/layer.py", line 520, in __init__ [repeated 42x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     self.model = DeepseekV2Model(vllm_config=vllm_config, [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     old_init(self, vllm_config=vllm_config, prefix=prefix, **kwargs) [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     self.start_layer, self.end_layer, self.layers = make_layers( [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                                    ^^^^^^^^^^^^ [repeated 14x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/utils.py", line 610, in make_layers [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     maybe_offload_to_cpu(layer_fn(prefix=f"{prefix}.{idx}")) [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/deepseek_v2.py", line 621, in <lambda> [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     lambda prefix: DeepseekV2DecoderLayer( [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                    ^^^^^^^^^^^^^^^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     self.mlp = DeepseekV2MoE( [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                ^^^^^^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     self.experts = FusedMoE( [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]                    ^^^^^^^^^ [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     self.quant_method.create_weights(layer=self, **moe_quant_params) [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/fused_moe/layer.py", line 93, in create_weights [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]     w2_weight = torch.nn.Parameter(torch.empty( [repeated 7x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_device.py", line 104, in __torch_function__ [repeated 7x across cluster]
(RayWorkerWrapper pid=301, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 896.00 MiB. GPU 4 has a total capacity of 79.25 GiB of which 768.00 KiB is free. Including non-PyTorch memory, this process has 0 bytes memory in use. Of the allocated memory 77.67 GiB is allocated by PyTorch, and 150.52 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables) [repeated 5x across cluster]
(RayWorkerWrapper pid=299, ip=172.200.216.170) ERROR 04-18 01:30:29 [worker_base.py:620] torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 896.00 MiB. GPU 7 has a total capacity of 79.25 GiB of which 144.75 MiB is free. Including non-PyTorch memory, this process has 0 bytes memory in use. Of the allocated memory 77.67 GiB is allocated by PyTorch, and 150.52 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     loaded_weights = model.load_weights( [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]                      ^^^^^^^^^^^^^^^^^^^ [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/deepseek_v2.py", line 798, in load_weights [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]     param = params_dict[name] [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620]             ~~~~~~~~~~~^^^^^^ [repeated 6x across cluster]
(RayWorkerWrapper pid=583) ERROR 04-18 01:30:30 [worker_base.py:620] KeyError: 'model.layers.6.mlp.experts.w2_weight_scale' [repeated 6x across cluster]
INFO 04-18 01:30:31 [ray_distributed_executor.py:127] Shutting down Ray distributed executor. If you see error log from logging.cc regarding SIGTERM received, please ignore because this is the expected termination process in Ray.
Loading safetensors checkpoint shards:   0% Completed | 0/163 [00:01<?, ?it/s]

/usr/lib/python3.12/multiprocessing/resource_tracker.py:279: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
[rank0]:[W418 01:30:31.261602207 ProcessGroupNCCL.cpp:1496] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())

lws配置如下

apiVersion: leaderworkerset.x-k8s.io/v1
kind: LeaderWorkerSet
metadata:
  name: vllm
spec:
  replicas: 1
  leaderWorkerTemplate:
    size: 2
    restartPolicy: RecreateGroupOnPodRestart
    leaderTemplate:
      metadata:
        labels:
          role: leader
      spec:
        containers:
          - name: vllm-leader
            image: docker.1ms.run/vllm/vllm-openai:v0.8.4
            env:
              - name: VLLM_LOGGING_LEVEL
                value: "DEBUG"
              - name: CUDA_LAUNCH_BLOCKING
                value: "1"
              - name: VLLM_PP_LAYER_PARTITION
                value: "31,30"
            command:
              - sh
              - -c
              - "bash /vllm-workspace/examples/online_serving/multi-node-serving.sh leader --ray_cluster_size=$(LWS_GROUP_SIZE); 
                 python3 -m vllm.entrypoints.openai.api_server --port 8080 --model /models --served-model-name deepseek-r1 --tensor-parallel-size 8 --pipeline_parallel_size 2 --trust-remote-code --max-model-len 65536 --gpu-memory-util 0.8"
            resources:
              limits:
                nvidia.com/nvidia-a100-sxm4-80GB: "8"
                memory: 300Gi
                ephemeral-storage: 100Gi
              requests:
                ephemeral-storage: 100Gi
                cpu: 100
            ports:
              - containerPort: 8080
            readinessProbe:
              tcpSocket:
                port: 8080
              initialDelaySeconds: 15
              periodSeconds: 10
            volumeMounts:
              - mountPath: /dev/shm
                name: dshm
              - mountPath: /models
                name: model-volume
        volumes:
        - name: dshm
          emptyDir:
            medium: Memory
            sizeLimit: 15Gi
        - name: model-volume
          hostPath:
            path: /data/lsy/modelscope/deepseek-ai/DeepSeek-R1-Channel-INT8/
            type: Directory
    workerTemplate:
      spec:
        containers:
          - name: vllm-worker
            image: docker.1ms.run/vllm/vllm-openai:v0.8.4
            env:
              - name: VLLM_LOGGING_LEVEL
                value: "DEBUG"
              - name: CUDA_LAUNCH_BLOCKING
                value: "1"              
              - name: VLLM_PP_LAYER_PARTITION 
                value: "31,30"
            command:
              - sh
              - -c
              - "bash /vllm-workspace/examples/online_serving/multi-node-serving.sh worker --ray_address=$(LWS_LEADER_ADDRESS)"
            resources:
              limits:
                nvidia.com/nvidia-a100-sxm4-80GB: "8"
                memory: 300Gi
                ephemeral-storage: 100Gi
              requests:
                ephemeral-storage: 100Gi
                cpu: 100
            volumeMounts:
              - mountPath: /dev/shm
                name: dshm
              - mountPath: /models
                name: model-volume
        volumes:
        - name: dshm
          emptyDir:
            medium: Memory
            sizeLimit: 15Gi
        - name: model-volume
          hostPath:
            path: /data/lsy/modelscope/deepseek-ai/DeepSeek-R1-Channel-INT8/
            type: Directory
---
apiVersion: v1
kind: Service
metadata:
  name: vllm-leader
spec:
  ports:
    - name: http
      port: 8080
      protocol: TCP
      targetPort: 8080
      nodePort: 18080
  selector:
    leaderworkerset.sigs.k8s.io/name: vllm
    role: leader
  type: NodePort