Skip to content

Commit 0385143

Browse files
committed
update
1 parent ee58847 commit 0385143

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
### guide
33
- [mindspore 安装指南](./installation/installation.md)
44
- mindspore API 案例
5-
- mindspore 模型案例
5+
- [mindspore 模型案例](./model-examples/README.md)

model-examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
- [OpenSora-PKU 从零到一简单介绍](./opensora-pku/opensora-pku%20implemented%20from%20scratch.md)
1212
- [T5-XXL 简介与 MindSpore 实现](./opensora-pku/T5_implement.md)
13-
- [Attention 模块的 MindSpore 实现](./opensora-pku/T5_attention_module_implement.md)
13+
- [Attention 模块的 MindSpore 实现](./opensora-pku/attention_module_implement.md)
1414
- [MindSpore 静态图训练流程介绍](./opensora-pku/docs/MindSpore%20static%20graph%20training%20process%20introduction.md)
1515

1616

model-examples/opensora-pku/T5_implement.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
本文介绍如何使用 Mindspore 在 Ascend 910* 上构建 OpenSora-PKU 中用到的 T5 (Text-to-Text Transfer Transformer) 文本编码器模型。
44

5-
> 以下仅通过示例代码对 OpenSora-PKU 中 T5 文本编码器模型进行简单讲解,完整代码请到 mindone 套件中获取,代码位置 [opensora-pku](https://github.com/mindspore-lab/mindone/tree/master/examples/opensora_pku/opensora/models/text_encoder/t5_encoder.py)
5+
> 以下仅通过示例代码对 OpenSora-PKU 中 T5 文本编码器模型进行简单讲解,完整代码请到 mindone 套件中获取,代码位置 [opensora-pku](https://github.com/mindspore-lab/mindone/blob/b3d2a7c5faea702b6a440f488ead0697e84bf502/examples/opensora_pku/opensora/models/text_encoder/t5_encoder.py)
66
77
论文:[Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683)
88

@@ -27,15 +27,15 @@ encoder 结构图,参考自 [illustrated-transformer](https://jalammar.github.
2727
### 1.2 T5 结构较原Transformer改动点
2828

2929
- 简化的 `层归一化层 (LayerNorm)`,将在下面介绍
30-
- 简化的 `位置嵌入(Position Embedding)`,详情见 [注意力模块中2.3节的描述](./T5_attention_module_implement.md)
30+
- 简化的 `位置嵌入(Position Embedding)`,详情见 [注意力模块中2.3节的描述](./attention_module_implement.md)
3131

3232
<img src="imgs/t5_arch_diff.png" width="699">
3333

3434
## 2. MindSpore 实现
3535

3636
### 2.1 T5 Attention 注意力模块实现
3737

38-
请参考,[T5 注意力模块的 MindSpore 实现](./T5_attention_module_implement.md)
38+
请参考,[T5 注意力模块的 MindSpore 实现](./attention_module_implement.md)
3939

4040
### 2.2 T5 LayerNorm 基础模块实现
4141

model-examples/opensora-pku/T5_attention_module_implement.md renamed to model-examples/opensora-pku/attention_module_implement.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# T5 注意力模块的 MindSpore 实现
1+
# 注意力模块的 MindSpore 实现
22

3-
本文介绍如何基于 Mindspore 在 Ascend 910* 上实现 T5 网络的注意力模块
3+
本文介绍如何基于 Mindspore 在 Ascend 910* 上实现注意力模块,以 Attention 在 T5 中的使用为例
44

5-
> 以下仅通过示例代码对 T5 注意力模块进行简单讲解,完整代码请到 mindone 套件中获取,代码位置 [opensora-pku](https://github.com/mindspore-lab/mindone/tree/master/examples/opensora_pku/opensora/models/text_encoder/t5_encoder.py)
5+
> 以下仅通过示例代码对 T5 注意力模块进行简单讲解,完整代码请到 mindone 套件中获取,代码位置 [opensora-pku](https://github.com/mindspore-lab/mindone/blob/b3d2a7c5faea702b6a440f488ead0697e84bf502/examples/opensora_pku/opensora/models/text_encoder/t5_encoder.py)
66
77
## 1. 注意力模块原理介绍
88

model-examples/opensora-pku/opensora-pku implemented from scratch.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OpenSora-PKU 从零到一简单介绍
22

3-
本文介绍如何使用 Mindspore 在 Ascend 910* 上从零到一实现 OpenSora-PKU 视频生成模型(静态图),主要代码参考自mindone套件中[opensora-pku](https://github.com/mindspore-lab/mindone/tree/master/examples/opensora_pku)实现
3+
本文介绍如何使用 Mindspore 在 Ascend 910* 上从零到一实现 OpenSora-PKU 视频生成模型(静态图),主要代码参考自mindone套件中[opensora-pku v1.1](https://github.com/mindspore-lab/mindone/tree/b3d2a7c5faea702b6a440f488ead0697e84bf502/examples/opensora_pku)的实现
44

55
### 1、基本训练流程介绍
66

@@ -43,6 +43,8 @@ print(f"reconstruct video value: {reconstruct_video[:, :, :20]}")
4343

4444
#### 2.2 t5 模块搭建
4545

46+
- [T5 模型详细介绍](./T5_implement.md)
47+
4648
- [源码实现](https://github.com/mindspore-lab/mindone/blob/b3d2a7c5faea702b6a440f488ead0697e84bf502/examples/opensora_pku/opensora/models/text_encoder/t5.py#L24)
4749

4850
```python
@@ -104,10 +106,12 @@ for i, data in enumerate(loader):
104106

105107
### 4、训练流程搭建
106108

107-
#### 4.1 [MindSpore 静态图训练流程小示例](./docs/MindSpore static graph training process introduction.md)
109+
#### 4.1 [MindSpore 静态图训练流程小示例](./docs/MindSpore%20static%20graph%20training%20process%20introduction.md)
108110

109111
#### 4.2 opensora-pku 1.0 训练流程 (用于流程说明,代码不可运行)
110112

113+
[源码实现](https://github.com/mindspore-lab/mindone/blob/b3d2a7c5faea702b6a440f488ead0697e84bf502/examples/opensora_pku/README.md#training)
114+
111115
```python
112116
from mindspore import Model
113117
from mindone.trainers.optim import create_optimizer

0 commit comments

Comments
 (0)