Skip to content

Conversation

@tt5416
Copy link

@tt5416 tt5416 commented Dec 30, 2025

任务描述
基于 MindSpore 2.7.0 +MindNLP版本实现 T5 文本摘要案例的整改。

修改内容
新增 new_t5文件夹。
更新 README.md 中的版本列表。

关联 Issue
Fixes #2028

llm/README.md Outdated
- mindspore == 2.3.1
- mindnlp == 0.4.1
- mindspore == 2.7.0
- mindnlp == 0.5.1
Copy link
Contributor

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

标题里不用写版本,直接“基于MindSpore NLP的T5文本摘要微调与推理就行”

Copy link
Contributor

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据管线听起来怪怪的,构建数据处理流水线 或 数据预处理?

Copy link
Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在不用这种写法了,写数据类型直接mindspore.int32就行,下面代码也辛苦调整下

@xing-yiren
Copy link
Contributor

xing-yiren commented Dec 30, 2025

  1. 不需要新建文件夹,直接在原本t5的文件夹替换即可,本来原本t5里面的案例也是要被刷新的
  2. 同上,文件名不用前缀加new
  3. 最后记得清楚ipynb文件里的冗余metadata,参考wiki

"import mindtorch as mt\n",
"from mindnlp.transformers import T5ForConditionalGeneration\n",
"\n",
"try:\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我有点好奇,这里是因为mindtorch的profiler出现什么报错了吗,所以做了这个处理

Copy link
Author

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'这个错误,所以我加了一个处理

Copy link
Contributor

@xing-yiren xing-yiren Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解,这个稍等我和mindnlp的吕老师确认下,这个问题是不是可能提个issue修下或者有没有在新版本解决,辛苦 @lvyufeng 帮忙看下呢

Copy link
Contributor

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代码吧

@xing-yiren
Copy link
Contributor

@moyu026 辛苦再验收下代码运行

@tt5416
Copy link
Author

tt5416 commented Dec 30, 2025

老师,我已修改完毕,请查收

@moyu026
Copy link

moyu026 commented Dec 31, 2025

MindSpore 2.7.0 与 MindNLP 0.5.1版本可以运行

@xing-yiren
Copy link
Contributor

其他我这边没问题了,就是profiler那里要再确认下,辛苦同学了

@xing-yiren
Copy link
Contributor

案例我这边没问题嘞,辛苦了很棒,请 @wang-hua-2019 也把把关

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

Successfully merging this pull request may close these issues.

3 participants