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

vary-toy #741

Open
ShaunLeeblob opened this issue Sep 21, 2024 · 2 comments
Open

vary-toy #741

ShaunLeeblob opened this issue Sep 21, 2024 · 2 comments

Comments

@ShaunLeeblob
Copy link

ModuleNotFoundError: No module named 'mindspore.nn.layer.flash_attention'

@ShaunLeeblob
Copy link
Author

mindspore版本 试过2.3.0 2.3.1 2.4.0 都会报错

@panshaowu
Copy link
Collaborator

您好,vary-toy仅适配了MindSpore 2.2版本。
该问题是由于MindSpore 2.3及后续版本,将FlashAttention模块移到了MindFormers套件中。
如您必须使用MindSpore 2.3及后续版本,则需要先安装MindFormers套件:

python -m pip install mindformers

然后修改mindocr/nlp/llm/qwen_model.py中第11行的库导入代码:

# from mindspore.nn.layer.flash_attention import FlashAttention
from mindformers.modules.flash_attention import FlashAttention

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

No branches or pull requests

2 participants