-
Notifications
You must be signed in to change notification settings - Fork 38
基于 MindSpore 2.7.0 与 MindNLP 0.5.1 的 T5 文本摘要案例优化 #35
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
base: dev
Are you sure you want to change the base?
Conversation
llm/README.md
Outdated
| - mindspore == 2.3.1 | ||
| - mindnlp == 0.4.1 | ||
| - mindspore == 2.7.0 | ||
| - mindnlp == 0.5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不需要修改,这个是给legacy目录下没有在ipynb文件中明确说明版本的案例,这个案例ipynb已经说明了就不用管
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# 基于 MindSpore 2.7.0 与 MindNLP 0.5.1 的 T5 文本摘要微调与推理\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
标题里不用写版本,直接“基于MindSpore NLP的T5文本摘要微调与推理就行”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同时辛苦注意下,文中涉及MindNLP名字部分的,建议都改成全称 MindSpore NLP
| "id": "a6073a14", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## 构建 MindSpore 数据管线\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据管线听起来怪怪的,构建数据处理流水线 或 数据预处理?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是数据处理流水线,我已修改
| "source": [ | ||
| "import mindspore.dataset as ds\n", | ||
| "from mindspore.dataset import transforms\n", | ||
| "from mindspore import dtype as mstype\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在不用这种写法了,写数据类型直接mindspore.int32就行,下面代码也辛苦调整下
|
| "import mindtorch as mt\n", | ||
| "from mindnlp.transformers import T5ForConditionalGeneration\n", | ||
| "\n", | ||
| "try:\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我有点好奇,这里是因为mindtorch的profiler出现什么报错了吗,所以做了这个处理
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
老师,会报AttributeError: module 'mindtorch.autograd' has no attribute 'profiler'这个错误,所以我加了一个处理
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解,这个稍等我和mindnlp的吕老师确认下,这个问题是不是可能提个issue修下或者有没有在新版本解决,辛苦 @lvyufeng 帮忙看下呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tt5416 这个问题是mindnlp里的mindtorch缺profiler的类,这块辛苦给mindnlp也同步提个PR代码吧
|
@moyu026 辛苦再验收下代码运行 |
|
老师,我已修改完毕,请查收 |
|
MindSpore 2.7.0 与 MindNLP 0.5.1版本可以运行 |
|
其他我这边没问题了,就是profiler那里要再确认下,辛苦同学了 |
|
案例我这边没问题嘞,辛苦了很棒,请 @wang-hua-2019 也把把关 |
任务描述
基于 MindSpore 2.7.0 +MindNLP版本实现 T5 文本摘要案例的整改。
修改内容
新增 new_t5文件夹。
更新 README.md 中的版本列表。
关联 Issue
Fixes #2028