Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shang-mt opened this issue Sep 26, 2024 · 7 comments
Assignees

Comments

@shang-mt
Copy link

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
Copy link
Contributor

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

@shang-mt
Copy link
Author

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

PaddlePaddle/PaddleNLP#9211

在PaddleNLP也提了issue

@DrownFish19
Copy link
Contributor

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

@lijialin03
Copy link
Contributor

@DrownFish19
Copy link
Contributor

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

@ZHUI
Copy link
Collaborator

ZHUI commented Sep 29, 2024

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

@shang-mt
Copy link
Author

shang-mt commented Oct 8, 2024

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants