登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情
代码拉取完成,页面将自动刷新
仓库状态说明
开源项目
>
人工智能
>
AI-人工智能
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
59
Star
196
Fork
467
Ascend
/
msit
暂停
代码
Issues
11
Pull Requests
77
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
310idou卡量化DeepSeek-R1-Distill-Qwen-7B模型遇到错误
DONE
#ICB66T
缺陷
zxt-triumph
创建于
2025-05-28 16:08
按照https://gitee.com/ascend/ModelZoo-PyTorch/blob/master/MindIE/LLM/DeepSeek/DeepSeek-R1-Distill-Qwen-7B/README.md说明进行稀疏量化遇到如下问题: [root@localhost Qwen]# export ASCEND_RT_VISIBLE_DEVICES=0 [root@localhost Qwen]# export PYTORCH_NPU_ALLOC_CONF=expandable_segments:False [root@localhost Qwen]# python3 quant_qwen.py \ > --model_path /home/HwHiAiUser/Projects/weights/DeepSeekR1-7B/ \ > --save_directory /home/HwHiAiUser/Projects/weights/w8a8/ds7b/ \ > --calib_file ../common/boolq.jsonl \ > --w_bit 4 \ > --a_bit 8 \ > --fraction 0.011 \ > --co_sparse True \ > --device_type npu \ > --use_sigma True \ > --is_lowbit True /usr/local/lib64/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:295: ImportWarning: ************************************************************************************************************* The torch.Tensor.cuda and torch.nn.Module.cuda are replaced with torch.Tensor.npu and torch.nn.Module.npu now.. The torch.cuda.DoubleTensor is replaced with torch.npu.FloatTensor cause the double type is not supported now.. The backend in torch.distributed.init_process_group set to hccl now.. The torch.cuda.* and torch.cuda.amp.* are replaced with torch.npu.* and torch.npu.amp.* now.. The device parameters have been replaced with npu in the function below: torch.logspace, torch.randint, torch.hann_window, torch.rand, torch.full_like, torch.ones_like, torch.rand_like, torch.randperm, torch.arange, torch.frombuffer, torch.normal, torch._empty_per_channel_affine_quantized, torch.empty_strided, torch.empty_like, torch.scalar_tensor, torch.tril_indices, torch.bartlett_window, torch.ones, torch.sparse_coo_tensor, torch.randn, torch.kaiser_window, torch.tensor, torch.triu_indices, torch.as_tensor, torch.zeros, torch.randint_like, torch.full, torch.eye, torch._sparse_csr_tensor_unsafe, torch.empty, torch._sparse_coo_tensor_unsafe, torch.blackman_window, torch.zeros_like, torch.range, torch.sparse_csr_tensor, torch.randn_like, torch.from_file, torch._cudnn_init_dropout_state, torch._empty_affine_quantized, torch.linspace, torch.hamming_window, torch.empty_quantized, torch._pin_memory, torch.autocast, torch.load, torch.Generator, torch.set_default_device, torch.Tensor.new_empty, torch.Tensor.new_empty_strided, torch.Tensor.new_full, torch.Tensor.new_ones, torch.Tensor.new_tensor, torch.Tensor.new_zeros, torch.Tensor.to, torch.Tensor.pin_memory, torch.nn.Module.to, torch.nn.Module.to_empty ************************************************************************************************************* warnings.warn(msg, ImportWarning) /usr/local/lib64/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:250: RuntimeWarning: torch.jit.script and torch.jit.script_method will be disabled by transfer_to_npu, which currently does not support them, if you need to enable them, please do not use transfer_to_npu. warnings.warn(msg, RuntimeWarning) 2025-05-28 15:47:55,870 - msmodelslim-logger - WARNING - The current CANN version does not support importing the migration and migration_vit packages. 2025-05-28 15:47:55,877 - msmodelslim-logger - WARNING - The current CANN version does not support recall_window method. 2025-05-28 15:47:55,880 - msmodelslim-logger - WARNING - The current CANN version does not support LayerSelector quantile method. 2025-05-28 15:47:55,882 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,882 - msmodelslim-logger - INFO - write directory exists, write file to directory '/home/HwHiAiUser/Projects/weights/w8a8/ds7b/' 2025-05-28 15:47:55,882 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,884 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,885 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. Loading checkpoint shards: 100%|█████████████████████████████████████████████████████| 2/2 [00:04<00:00, 2.21s/it] 2025-05-28 15:48:06,831 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:48:07,023 - msmodelslim-logger - INFO - Automatically disabling the last linear layer: lm_head based on the `disable_last_linear` parameter setting. feature process: 0%| | 0/5 [00:00<?, ?it/s] Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 450, in rollback_names_process self.act_states = get_features(model, calib_data[:5], "features.npy", enable_tensor_dump) File "quant_funcs.py", line 1417, in quant_funcs.get_features File "quant_funcs.py", line 1418, in quant_funcs.get_features File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 1164, in forward outputs = self.model( File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 854, in forward inputs_embeds = self.embed_tokens(input_ids) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/sparse.py", line 162, in forward return F.embedding( File "/usr/local/lib64/python3.9/site-packages/torch/nn/functional.py", line 2233, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) RuntimeError: call aclnnEmbedding failed, detail:EZ9999: Inner Error! EZ9999: [PID: 1020913] 2025-05-28-15:48:07.078.206 Parse dynamic kernel config fail. TraceBack (most recent call last): AclOpKernelInit failed opType GatherV2AiCore ADD_TO_LAUNCHER_LIST_AICORE failed. [ERROR] 2025-05-28-15:48:07 (PID:1020913, Device:0, RankID:-1) ERR01100 OPS call acl api failed The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/HwHiAiUser/Projects/msit-master/msmodelslim/example/Qwen/quant_qwen.py", line 322, in <module> quantifier.convert(tokenized_calib_data, save_directory, args.disable_level, part_file_size=args.part_file_size, \ File "/home/HwHiAiUser/Projects/msit-master/msmodelslim/example/Qwen/quant_qwen.py", line 244, in convert calibrator = Calibrator(self.model, self.quant_config, calib_data=tokenized_data, disable_level=disable_level) File "/usr/local/lib64/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 160, in __init__ self.rollback_names_process(model) File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 452, in rollback_names_process raise Exception("Please check the model and calibration data, " Exception: ('Please check the model and calibration data, ensure that your model can run with `model(*(calib_data[0]))`.', RuntimeError('call aclnnEmbedding failed, detail:EZ9999: Inner Error!\nEZ9999: [PID: 1020913] 2025-05-28-15:48:07.078.206 Parse dynamic kernel config fail.\n TraceBack (most recent call last):\n AclOpKernelInit failed opType\n GatherV2AiCore ADD_TO_LAUNCHER_LIST_AICORE failed.\n\n[ERROR] 2025-05-28-15:48:07 (PID:1020913, Device:0, RankID:-1) ERR01100 OPS call acl api failed')) OS版本:openEuler release 22.03 (LTS-SP4) cann版本:Ascend-cann-toolkit_8.0.0.alpha003_linux-x86_64.run driver版本:Ascend-hdk-310p-npu-driver_24.1.0.1_linux-x86-64.run msit安装也是下载的最新分支了
按照https://gitee.com/ascend/ModelZoo-PyTorch/blob/master/MindIE/LLM/DeepSeek/DeepSeek-R1-Distill-Qwen-7B/README.md说明进行稀疏量化遇到如下问题: [root@localhost Qwen]# export ASCEND_RT_VISIBLE_DEVICES=0 [root@localhost Qwen]# export PYTORCH_NPU_ALLOC_CONF=expandable_segments:False [root@localhost Qwen]# python3 quant_qwen.py \ > --model_path /home/HwHiAiUser/Projects/weights/DeepSeekR1-7B/ \ > --save_directory /home/HwHiAiUser/Projects/weights/w8a8/ds7b/ \ > --calib_file ../common/boolq.jsonl \ > --w_bit 4 \ > --a_bit 8 \ > --fraction 0.011 \ > --co_sparse True \ > --device_type npu \ > --use_sigma True \ > --is_lowbit True /usr/local/lib64/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:295: ImportWarning: ************************************************************************************************************* The torch.Tensor.cuda and torch.nn.Module.cuda are replaced with torch.Tensor.npu and torch.nn.Module.npu now.. The torch.cuda.DoubleTensor is replaced with torch.npu.FloatTensor cause the double type is not supported now.. The backend in torch.distributed.init_process_group set to hccl now.. The torch.cuda.* and torch.cuda.amp.* are replaced with torch.npu.* and torch.npu.amp.* now.. The device parameters have been replaced with npu in the function below: torch.logspace, torch.randint, torch.hann_window, torch.rand, torch.full_like, torch.ones_like, torch.rand_like, torch.randperm, torch.arange, torch.frombuffer, torch.normal, torch._empty_per_channel_affine_quantized, torch.empty_strided, torch.empty_like, torch.scalar_tensor, torch.tril_indices, torch.bartlett_window, torch.ones, torch.sparse_coo_tensor, torch.randn, torch.kaiser_window, torch.tensor, torch.triu_indices, torch.as_tensor, torch.zeros, torch.randint_like, torch.full, torch.eye, torch._sparse_csr_tensor_unsafe, torch.empty, torch._sparse_coo_tensor_unsafe, torch.blackman_window, torch.zeros_like, torch.range, torch.sparse_csr_tensor, torch.randn_like, torch.from_file, torch._cudnn_init_dropout_state, torch._empty_affine_quantized, torch.linspace, torch.hamming_window, torch.empty_quantized, torch._pin_memory, torch.autocast, torch.load, torch.Generator, torch.set_default_device, torch.Tensor.new_empty, torch.Tensor.new_empty_strided, torch.Tensor.new_full, torch.Tensor.new_ones, torch.Tensor.new_tensor, torch.Tensor.new_zeros, torch.Tensor.to, torch.Tensor.pin_memory, torch.nn.Module.to, torch.nn.Module.to_empty ************************************************************************************************************* warnings.warn(msg, ImportWarning) /usr/local/lib64/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:250: RuntimeWarning: torch.jit.script and torch.jit.script_method will be disabled by transfer_to_npu, which currently does not support them, if you need to enable them, please do not use transfer_to_npu. warnings.warn(msg, RuntimeWarning) 2025-05-28 15:47:55,870 - msmodelslim-logger - WARNING - The current CANN version does not support importing the migration and migration_vit packages. 2025-05-28 15:47:55,877 - msmodelslim-logger - WARNING - The current CANN version does not support recall_window method. 2025-05-28 15:47:55,880 - msmodelslim-logger - WARNING - The current CANN version does not support LayerSelector quantile method. 2025-05-28 15:47:55,882 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,882 - msmodelslim-logger - INFO - write directory exists, write file to directory '/home/HwHiAiUser/Projects/weights/w8a8/ds7b/' 2025-05-28 15:47:55,882 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,884 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:47:55,885 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. Loading checkpoint shards: 100%|█████████████████████████████████████████████████████| 2/2 [00:04<00:00, 2.21s/it] 2025-05-28 15:48:06,831 - msmodelslim-logger - WARNING - The file path '/home/HwHiAiUser/Projects/weights' may be insecure because it can be written by others. 2025-05-28 15:48:07,023 - msmodelslim-logger - INFO - Automatically disabling the last linear layer: lm_head based on the `disable_last_linear` parameter setting. feature process: 0%| | 0/5 [00:00<?, ?it/s] Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 450, in rollback_names_process self.act_states = get_features(model, calib_data[:5], "features.npy", enable_tensor_dump) File "quant_funcs.py", line 1417, in quant_funcs.get_features File "quant_funcs.py", line 1418, in quant_funcs.get_features File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 1164, in forward outputs = self.model( File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 854, in forward inputs_embeds = self.embed_tokens(input_ids) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib64/python3.9/site-packages/torch/nn/modules/sparse.py", line 162, in forward return F.embedding( File "/usr/local/lib64/python3.9/site-packages/torch/nn/functional.py", line 2233, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) RuntimeError: call aclnnEmbedding failed, detail:EZ9999: Inner Error! EZ9999: [PID: 1020913] 2025-05-28-15:48:07.078.206 Parse dynamic kernel config fail. TraceBack (most recent call last): AclOpKernelInit failed opType GatherV2AiCore ADD_TO_LAUNCHER_LIST_AICORE failed. [ERROR] 2025-05-28-15:48:07 (PID:1020913, Device:0, RankID:-1) ERR01100 OPS call acl api failed The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/HwHiAiUser/Projects/msit-master/msmodelslim/example/Qwen/quant_qwen.py", line 322, in <module> quantifier.convert(tokenized_calib_data, save_directory, args.disable_level, part_file_size=args.part_file_size, \ File "/home/HwHiAiUser/Projects/msit-master/msmodelslim/example/Qwen/quant_qwen.py", line 244, in convert calibrator = Calibrator(self.model, self.quant_config, calib_data=tokenized_data, disable_level=disable_level) File "/usr/local/lib64/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 160, in __init__ self.rollback_names_process(model) File "/usr/local/lib/python3.9/site-packages/msmodelslim/pytorch/llm_ptq/llm_ptq_tools/quant_tools.py", line 452, in rollback_names_process raise Exception("Please check the model and calibration data, " Exception: ('Please check the model and calibration data, ensure that your model can run with `model(*(calib_data[0]))`.', RuntimeError('call aclnnEmbedding failed, detail:EZ9999: Inner Error!\nEZ9999: [PID: 1020913] 2025-05-28-15:48:07.078.206 Parse dynamic kernel config fail.\n TraceBack (most recent call last):\n AclOpKernelInit failed opType\n GatherV2AiCore ADD_TO_LAUNCHER_LIST_AICORE failed.\n\n[ERROR] 2025-05-28-15:48:07 (PID:1020913, Device:0, RankID:-1) ERR01100 OPS call acl api failed')) OS版本:openEuler release 22.03 (LTS-SP4) cann版本:Ascend-cann-toolkit_8.0.0.alpha003_linux-x86_64.run driver版本:Ascend-hdk-310p-npu-driver_24.1.0.1_linux-x86-64.run msit安装也是下载的最新分支了
评论 (
2
)
登录
后才可以发表评论
状态
DONE
TODO
WIP
DONE
CLOSED
REJECTED
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
Python
1
https://gitee.com/ascend/msit.git
git@gitee.com:ascend/msit.git
ascend
msit
msit
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册