DeepSeek-R1-Distill-Qwen-1.5B在mindspore上的适配问题,报错tensor 0 not implemented for DT_FLOAT16, should be in dtype support list
收藏回复举报
DeepSeek-R1-Distill-Qwen-1.5B在mindspore上的适配问题,报错tensor 0 not implemented for DT_FLOAT16, should be in dtype support list
t('forum.solved') 已解决
新人帖
发表于2025-09-25 01:04:19
0 查看

参照 昇思+昇腾开发板:软硬结合玩转DeepSeek开发实战-昇腾社区 该课程的教程部署,运行orange-pi-mindspore仓库下,orange-pi-mindspore/Online/inference/17-DeepSeek-R1-Distill-Qwen-1.5B,但报错RuntimeError: aclnnCumsumGetWorkspaceSize call failed, please check!

参考帖子 deepseek在mindspore上的适配问题,aclnnCumsumGetWorkspaceSize call failed_MindSpore_昇腾论坛 ,调整Ascend toolkit以及kernels的版本为8.0.0.alpha002,出现新报错:tensor 0 not implemented for DT_FLOAT16, should be in dtype support list [].

pip已安装的包如下:

Package                   Version
------------------------- ----------------------
absl-py                   2.1.0
aclruntime                0.0.2
addict                    2.4.0
aiofiles                  23.2.1
aiohappyeyeballs          2.4.3
aiohttp                   3.10.10
aiosignal                 1.3.1
ais-bench                 0.0.2
albumentations            1.3.1
annotated-types           0.6.0
anyio                     4.2.0
appdirs                   1.4.4
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.4.1
astunparse                1.6.3
async-lru                 2.0.4
async-timeout             4.0.3
attrs                     23.2.0
auto_tune                 0.1.0
Babel                     2.14.0
backcall                  0.2.0
beautifulsoup4            4.12.3
bleach                    6.1.0
boltons                   23.0.0
brotlipy                  0.7.0
certifi                   2023.11.17
cffi                      1.15.1
charset-normalizer        2.0.4
click                     8.1.7
cloudpickle               3.1.0
comm                      0.2.1
conda                     23.7.4
conda-content-trust       0.1.3
conda-package-handling    2.0.2
conda_package_streaming   0.7.0
construct                 2.10.70
contourpy                 1.2.0
croniter                  2.0.1
cryptography              38.0.4
cycler                    0.12.1
dataflow                  0.0.1
datasets                  3.0.1
debugpy                   1.8.0
decorator                 5.1.1
defusedxml                0.7.1
dill                      0.3.8
download                  0.3.5
evaluate                  0.4.3
exceptiongroup            1.2.0
fastapi                   0.115.2
fastjsonschema            2.19.1
ffmpeg-python             0.2.0
ffmpy                     0.4.0
filelock                  3.13.1
fonttools                 4.47.2
fqdn                      1.5.1
frozenlist                1.4.1
fsspec                    2023.12.2
future                    0.18.3
gradio                    4.44.0
gradio_client             1.3.0
h11                       0.14.0
hccl                      0.1.0
hccl_parser               0.1
httpcore                  1.0.6
httpx                     0.27.2
huggingface-hub           0.25.2
hypothesis                6.115.2
idna                      3.4
ifaddr                    0.2.0
imageio                   2.33.1
importlib-metadata        7.0.1
importlib-resources       6.1.1
iniconfig                 2.0.0
ipykernel                 6.29.0
ipython                   7.34.0
ipywidgets                8.1.1
isoduration               20.11.0
jedi                      0.19.1
jieba                     0.42.1
Jinja2                    3.1.3
joblib                    1.3.2
json5                     0.9.14
jsonpatch                 1.32
jsonpointer               2.1
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.6.0
jupyter_core              5.7.1
jupyter-events            0.9.0
jupyter-lsp               2.2.2
jupyter_server            2.12.5
jupyter_server_terminals  0.5.2
jupyterlab                4.0.11
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.2
jupyterlab-widgets        3.0.9
kiwisolver                1.4.5
lazy_loader               0.3
llm_datadist              0.0.1
markdown-it-py            3.0.0
MarkupSafe                2.1.4
matplotlib                3.8.2
matplotlib-inline         0.1.6
mdurl                     0.1.2
micloud                   0.6
mindnlp                   0.4.1
mindspore                 2.5.0
mindspore-lite            2.2.11
mistune                   3.0.2
ml_dtypes                 0.5.0
mpmath                    1.3.0
msobjdump                 0.1.0
multidict                 6.1.0
multiprocess              0.70.16
nbclient                  0.9.0
nbconvert                 7.14.2
nbformat                  5.9.2
nest-asyncio              1.6.0
networkx                  3.2.1
notebook_shim             0.2.3
numpy                     1.22.4
op_compile_tool           0.1.0
op_gen                    0.1
op_test_frame             0.1
opc_tool                  0.1.0
opencv-python             4.10.0.84
opencv-python-headless    4.9.0.80
orjson                    3.10.7
overrides                 7.6.0
packaging                 23.1
pandas                    2.2.3
pandocfilters             1.5.1
parso                     0.8.3
pathlib2                  2.3.7.post1
pexpect                   4.9.0
pickleshare               0.7.5
pillow                    10.2.0
pip                       25.2
platformdirs              4.1.0
pluggy                    1.0.0
prometheus-client         0.19.0
prompt-toolkit            3.0.43
propcache                 0.2.0
protobuf                  3.20.0
psutil                    5.9.8
ptyprocess                0.7.0
pyarrow                   17.0.0
pycocotools               2.0.7
pycosat                   0.6.4
pycparser                 2.21
pycryptodome              3.20.0
pyctcdecode               0.5.0
pydantic                  2.5.3
pydantic_core             2.14.6
pydub                     0.25.1
Pygments                  2.17.2
pygtrie                   2.5.0
pyOpenSSL                 22.0.0
pyparsing                 3.1.1
PySocks                   1.7.1
pytest                    7.2.0
python-dateutil           2.8.2
python-json-logger        2.0.7
python-miio               0.6.0.dev0
python-multipart          0.0.12
pytz                      2023.3.post1
PyYAML                    6.0.1
pyzmq                     25.1.2
qudida                    0.0.4
referencing               0.32.1
regex                     2024.9.11
requests                  2.32.3
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rich                      13.9.2
rpds-py                   0.17.1
ruamel.yaml               0.17.21
ruamel.yaml.clib          0.2.6
ruff                      0.6.9
safetensors               0.4.5
schedule_search           0.0.1
scikit-image              0.22.0
scikit-learn              1.4.0
scikit-video              1.1.11
scipy                     1.12.0
semantic-version          2.10.0
Send2Trash                1.8.2
sentencepiece             0.2.0
setuptools                65.6.3
shellingham               1.5.4
show_kernel_debug_data    0.1.0
six                       1.16.0
sniffio                   1.3.0
sortedcontainers          2.4.0
soupsieve                 2.5
starlette                 0.40.0
sympy                     1.12
te                        0.4.0
terminado                 0.18.0
threadpoolctl             3.2.0
tifffile                  2023.12.9
tinycss2                  1.2.1
tokenizers                0.19.1
tomli                     2.0.1
tomlkit                   0.12.0
toolz                     0.12.0
torch                     2.1.0
torch-npu                 2.1.0.post2+git64bdab5
torchaudio                2.1.0
torchvision               0.16.0
tornado                   6.4
tqdm                      4.66.5
traitlets                 5.14.1
typer                     0.12.5
types-python-dateutil     2.8.19.20240106
typing_extensions         4.9.0
tzdata                    2024.2
tzlocal                   5.2
uri-template              1.3.0
urllib3                   2.2.3
uvicorn                   0.32.0
wcwidth                   0.2.13
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.7.0
websockets                12.0
wheel                     0.37.1
widgetsnbextension        4.0.9
xxhash                    3.5.0
yarl                      1.15.3
zeroconf                  0.131.0
zipp                      3.17.0
zstandard                 0.18.0

现在应该如何解决?

运行详细信息如下:

(base) HwHiAiUser@orangepiaipro-20t:~/Desktop/code/orange-pi-mindspore/Online/inference/17-DeepSeek-R1-Distill-Qwen-1.5B$ python deepseek-r1-distill-qwen-1.5b.py
/usr/local/miniconda3/lib/python3.9/site-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
/usr/local/miniconda3/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  return self._float_to_str(self.smallest_subnormal)
/usr/local/miniconda3/lib/python3.9/site-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
/usr/local/miniconda3/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  return self._float_to_str(self.smallest_subnormal)
[WARNING] ME(5066:255086646460448,MainProcess):2025-09-25-00:55:42.258.481 [mindspore/context.py:1335] For 'context.set_context', the parameter 'ascend_config' will be deprecated and removed in a future version. Please use the api mindspore.device_context.ascend.op_precision.precision_mode(),
                                                       mindspore.device_context.ascend.op_precision.op_precision_mode(),
                                                       mindspore.device_context.ascend.op_precision.matmul_allow_hf32(),
                                                       mindspore.device_context.ascend.op_precision.conv_allow_hf32(),
                                                       mindspore.device_context.ascend.op_tuning.op_compile() instead.
Building prefix dict from the default dictionary ...
Dumping model to file cache /tmp/jieba.cache
Loading model cost 2.233 seconds.
Prefix dict has been built successfully.
MindSpore do not support bfloat16 dtype, we will automaticlly convert to float16
Qwen2ForCausalLM has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`.`PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
Sliding Window Attention is enabled but not implemented for `eager`; unexpected results may be encountered.
/home/HwHiAiUser/.local/lib/python3.9/site-packages/gradio/analytics.py:106: UserWarning: IMPORTANT: You are using gradio version 4.44.0, however version 4.44.1 is available, please upgrade.
--------
  warnings.warn(
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/local/miniconda3/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/local/miniconda3/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindnlp/core/utils/_contextlib.py", line 117, in decorate_context
    return func(*args, **kwargs)
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindnlp/transformers/generation/utils.py", line 1789, in generate
    self._prepare_special_tokens(generation_config, kwargs_has_attention_mask)
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindnlp/transformers/generation/utils.py", line 1631, in _prepare_special_tokens
    logger.warning(f"Setting `pad_token_id` to `eos_token_id`:{pad_token_tensor} for open-end generation.")
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py", line 50, in fun
    return method(*arg, **kwargs)
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindspore/common/tensor.py", line 473, in __str__
    return str(self.asnumpy())
  File "/home/HwHiAiUser/.local/lib/python3.9/site-packages/mindspore/common/tensor.py", line 1036, in asnumpy
    return Tensor_.asnumpy(self)
RuntimeError: aclnnCatGetWorkspaceSize call failed, please check!

----------------------------------------------------
- Ascend Error Message:
----------------------------------------------------
EZ1001: [PID: 5066] 2025-09-25-00:57:11.826.488 tensor 0 not implemented for DT_FLOAT, should be in dtype support list [].[THREAD:5931]

(Please search "CANN Common Error Analysis" at https://www.mindspore.cn for error code description)

----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ops/kernel/ascend/pyboost/auto_generate/pyboost_ascend_ops_2.cc:2201 operator()

我要发帖子