File "/usr/local/Ascend/atb-models/atb_llm/models/deepseekv2/flash_causal_deepseekv2.py", line 218, in get_weights
weight_wrapper.register_moe_layer(layer, self.quantize, dense_layer=False,
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 309, in register_moe_layer
self.register_layer_moe_mlp_experts(layer, self.moe_mlp_wrapper, quantize_type, expert_roster)
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 249, in register_layer_moe_mlp_experts
self.register_layer_moe_linear_pack(layer, wrapper, quantize_type, 'moe_mlp', expert_roster)
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 207, in register_layer_moe_linear_pack
self.register_linear_list_wrapper(linear_list, quantize_type, hidden_dim=wrapper_module.hidden_dim)
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 126, in register_linear_list_wrapper
trans_flag = self.register_linear_list_bias(linear_list, quantize_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 77, in register_linear_list_bias
trans_flag = self.register_linear_list_without_bias(linear_list, quantize_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 65, in register_linear_list_without_bias
tensor_stacked = torch.stack([linear.weight.data.transpose(0, 1) for linear in linear_list], dim=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: NPU out of memory. Tried to allocate 506.00 MiB (NPU 3; 60.00 GiB total capacity; 45.65 GiB already allocated; 45.65 GiB current active; 92.09 MiB free; 51.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.
我看了一下,其他都没有出错,不知道为何还是会报OOM。
其中运行过程中出现以下warning
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
not match.
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
[W compiler_depend.ts:733] Warning: expandable_segments setting failure, now change to `False`. (function operator())
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
[WARN]operator(),compiler_depend.ts:732:Feature is not supportted and the possible cause is that driver and firmware packages do not match.
使用两台机器推理启动mindieserver_daemon以及性能测验时都会报OOM,无论修改config中的seq_len以及batch_size都无法解决。
相关环境变量设置:
系统报错信息
File "/usr/local/Ascend/atb-models/atb_llm/models/deepseekv2/flash_causal_deepseekv2.py", line 218, in get_weights weight_wrapper.register_moe_layer(layer, self.quantize, dense_layer=False, File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 309, in register_moe_layer self.register_layer_moe_mlp_experts(layer, self.moe_mlp_wrapper, quantize_type, expert_roster) File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 249, in register_layer_moe_mlp_experts self.register_layer_moe_linear_pack(layer, wrapper, quantize_type, 'moe_mlp', expert_roster) File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 207, in register_layer_moe_linear_pack self.register_linear_list_wrapper(linear_list, quantize_type, hidden_dim=wrapper_module.hidden_dim) File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 126, in register_linear_list_wrapper trans_flag = self.register_linear_list_bias(linear_list, quantize_type, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 77, in register_linear_list_bias trans_flag = self.register_linear_list_without_bias(linear_list, quantize_type, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Ascend/atb-models/atb_llm/utils/data/moe_weight_wrapper.py", line 65, in register_linear_list_without_bias tensor_stacked = torch.stack([linear.weight.data.transpose(0, 1) for linear in linear_list], dim=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: NPU out of memory. Tried to allocate 506.00 MiB (NPU 3; 60.00 GiB total capacity; 45.65 GiB already allocated; 45.65 GiB current active; 92.09 MiB free; 51.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.我看了一下,其他都没有出错,不知道为何还是会报OOM。
其中运行过程中出现以下warning