Open
Conversation
|
删除掉README.assets目录 |
|
涉及到需要修改的py文件中的原错误代码直接删除掉即可,不用以注释的方式保留 |
Author
|
删除readme.asset 及 注释 |
|
验收通过,可以合入 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
技术公开课内容测试任务12
任务链接:https://gitee.com/mindspore/community/issues/IC700Z#note_43798754
测试内容:Season2.step_into_llm/15.pipeline测试任务
环境配置
基于mindspore 2.6.0 和 mindnlp 0.4.1(mindnlp 0.4.0 与 mindspore 2.6.0 有部分接口不兼容。mindnlp 0.4.0 调用了mindspore._c_expression.Tensor,而mindspore 2.6.0 对应的接口应为mindspore._c_expression.TensorPy)
pipeline测试
automatic_speech_recognition
需要安装 torchcodec 包
mindnlp 的 AutoProcessor 没有对应的 tokenizer 和 feature_extractor 属性,此处需要调整:
最后运行结果如下,使用完整的sample运行时间过长,此处截取了部分数据计算。
document_question_answering
需要安装pytesseract环境,参考教程:https://blog.csdn.net/m0_37576542/article/details/132315537
示例1:
**示例2:**pipeline接口发生变化,需要接受的参数为图像和 word_boxes,因此需要修改图像处理函数和 dqa_pipeline 参数
fill_mask_demo
执行结果与预期结果精度基本相同。
question_answering_demo
执行结果与预期结果精度基本相同。
text_generation_demo
加载模型时出现报错:SafeTensorError::InvalidOffset(h.3.ln_2.bias);需要修改模型的加载方式,禁用 SafeTensor
在进行对话demo时,tokenizer默认没有设置
chat_template, 此处需要设置:text2text_generation_demo
zero_shot_classification_demo
输出结果与预期结果精度基本一致
备注:
mindnlp.transformers.modeling_attn_mask_utils.py 的 _make_causal_mask 的 mask 创建方式是:
而在 CPU 上 mindspore 不支持 [float32, bool, int64] --> [float32]。建议可以修改 mask 创建方式为: