We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug/ 问题描述 (Mandatory / 必填)
Blip2ForConditionalGeneration的generate方法调用了不兼容ascend910b的接口,具体报错信息见最后截图:
Ascend
GPU
CPU
Ascend 910b
Software Environment / 软件环境 (Mandatory / 必填): -- MindSpore version (e.g., 1.7.0.Bxxx) : 2.3.1和2.4.1都一样的问题 -- Python version (e.g., Python 3.7.5) : 3.9 -- OS platform and distribution (e.g., Linux Ubuntu 16.04): Euler2(用的是启智的AscendD910B 32G, mindtorch0.3_mindspore2.3.0_torchnpu2.2.0_cann8.0镜像) -- GCC/Compiler version (if compiled from source): 7.3.0 -- MindNLP : 0.4.1(源码编译安装)
Excute Mode / 执行模式 (Mandatory / 必填)(PyNative/Graph):
PyNative
Graph
Please delete the mode not involved / 请删除不涉及的模式: pynative
To Reproduce / 重现步骤 (Mandatory / 必填) Steps to reproduce the behavior:
from mindnlp.transformers import Blip2ForConditionalGeneration, Blip2Processor import mindspore as ms import mindspore.numpy as np ms.set_context(device_target='Ascend', device_id=0, pynative_synchronize=True) processor = Blip2Processor.from_pretrained(<path_to_blip2-opt-2.7b>) model = Blip2ForConditionalGeneration.from_pretrained(<path_to_blip2-opt-2.7b>) pixel_values = np.randn((16, 3, 224, 224)) generated_ids = model.generate(pixel_values) print(generated_ids) generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
Expected behavior / 预期结果 (Mandatory / 必填) 预期正确产生generated_ids,但generated_ids = model.generate(pixel_values)报错
Screenshots/ 日志 / 截图 (Mandatory / 必填)
The text was updated successfully, but these errors were encountered:
重现步骤3提到的“另外的bug”为#1905
Sorry, something went wrong.
fix Blip2加载和推理bug #1902 #1904 #1905 (#1958)
8c26b18
No branches or pull requests
Describe the bug/ 问题描述 (Mandatory / 必填)
Blip2ForConditionalGeneration的generate方法调用了不兼容ascend910b的接口,具体报错信息见最后截图:
Ascend
/GPU
/CPU
) / 硬件环境:Software Environment / 软件环境 (Mandatory / 必填):
-- MindSpore version (e.g., 1.7.0.Bxxx) : 2.3.1和2.4.1都一样的问题
-- Python version (e.g., Python 3.7.5) : 3.9
-- OS platform and distribution (e.g., Linux Ubuntu 16.04): Euler2(用的是启智的AscendD910B 32G, mindtorch0.3_mindspore2.3.0_torchnpu2.2.0_cann8.0镜像)
-- GCC/Compiler version (if compiled from source): 7.3.0
-- MindNLP : 0.4.1(源码编译安装)
Excute Mode / 执行模式 (Mandatory / 必填)(
PyNative
/Graph
):To Reproduce / 重现步骤 (Mandatory / 必填)
Steps to reproduce the behavior:
Expected behavior / 预期结果 (Mandatory / 必填)
预期正确产生generated_ids,但generated_ids = model.generate(pixel_values)报错
Screenshots/ 日志 / 截图 (Mandatory / 必填)
The text was updated successfully, but these errors were encountered: