PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.28k stars 5.61k forks source link

跑llama碰到AttributeError: module 'paddle.base.libpaddle.eager.ops.legacy' has no attribute 'c_identity'. Did you mean: 'npu_identity'? #68483

Open shang-mt opened 1 month ago

shang-mt commented 1 month ago

bug描述 Describe the Bug

File "/workspace/PaddleNLP/paddlenlp/transformers/llama/modeling.py", line 1540, in forward logits = parallel_matmul(hidden_states, self.weight, tensor_parallel_output=tensor_parallel_output) File "/workspace/PaddleNLP/paddlenlp/transformers/llama/modeling.py", line 166, in parallel_matmul input_parallel = paddle.distributed.collective._c_identity(x, group=model_parallel_group) File "/usr/local/lib/python3.10/dist-packages/paddle/distributed/fleet/layers/mpu/mp_ops.py", line 100, in _c_identity return c_identity_eager.apply(tensor, group, skip_c_identity_dynamic) File "/usr/local/lib/python3.10/dist-packages/paddle/distributed/fleet/layers/mpu/mp_ops.py", line 34, in forward return _legacy_C_ops.c_identity( AttributeError: module 'paddle.base.libpaddle.eager.ops.legacy' has no attribute 'c_identity'. Did you mean: 'npu_identity'?

使用v3.0.0-beta1 源码编译运行llama 7B 会报错

其他补充信息 Additional Supplementary Information

No response

lijialin03 commented 1 month ago

感谢您的反馈,麻烦也给PaddleNLP提一下issue吧,谢谢!

shang-mt commented 1 month ago

感谢您的反馈,麻烦也给PaddleNLP提一下issue吧,谢谢!

https://github.com/PaddlePaddle/PaddleNLP/issues/9211

在PaddleNLP也提了issue

DrownFish19 commented 1 month ago

您好,这个问题可能是编译命令导致,辛苦您发一下编译命令。 也请@lijialin03提供一下编译命令。

lijialin03 commented 1 month ago

麻烦请参考官网https://www.paddlepaddle.org.cn/进行编译,如果有特殊的需求请一并提供,谢谢

DrownFish19 commented 1 month ago

补充一下,官网nightly版本是包含x86_64和armv8架构的,而且提供了每日编译版本,如果无需改动代码,可以直接安装相应版本。

ZHUI commented 1 month ago

分布式的编译选项 是打开了吗?

shang-mt commented 1 month ago

分布式的编译选项 是打开了吗?

cmake .. -DPY_VERSION=3.10 -DWITH_MKL=OFF -DWITH_GPU=ON -DWITH_NCCL=ON make -j 128 使用这个命令编译的