Commit b7c30931 authored by yuguo's avatar yuguo
Browse files

update

parent 7dc34919
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
## 模型结构 ## 模型结构
第二代生成式预训练模型(Generative Pre-Training2),GPT2使用 Transformer 的 Decoder 结构,并对 Transformer Decoder 进行了一些改动,原本的 Decoder 包含了两个 Multi-Head Attention 结构,GPT2 只保留了 Mask Multi-Head Attention。 第二代生成式预训练模型(Generative Pre-Training2),GPT2使用 Transformer 的 Decoder 结构,并对 Transformer Decoder 进行了一些改动,原本的 Decoder 包含了两个 Multi-Head Attention 结构,GPT2 只保留了 Mask Multi-Head Attention。
<img src="http://developer.hpccube.com/codes/modelzoo/GPT/-/raw/main/gpt2%E6%A8%A1%E5%9E%8B%E7%BB%93%E6%9E%84.png" alt="gpt2模型结构.png" style="zoom: 67%;" />
我们为了用户可以使用OneFlow-Libai快速验证GPT2模型预训练,统计性能或验证精度,提供了一个GPT2网络示例,主要网络参数: 我们为了用户可以使用OneFlow-Libai快速验证GPT2模型预训练,统计性能或验证精度,提供了一个GPT2网络示例,主要网络参数:
...@@ -36,7 +36,7 @@ model.cfg.max_seq_length = 1024 ...@@ -36,7 +36,7 @@ model.cfg.max_seq_length = 1024
GPT-2中使用掩模自注意力(masked self-attention),一般的自注意力模块允许某位置右侧的词计算时处于最大值。而掩模自注意力会阻止这种情况发生。 GPT-2中使用掩模自注意力(masked self-attention),一般的自注意力模块允许某位置右侧的词计算时处于最大值。而掩模自注意力会阻止这种情况发生。
<img src="http://developer.hpccube.com/codes/modelzoo/GPT/-/raw/main/gpt2%E7%AE%97%E6%B3%95%E5%8E%9F%E7%90%86.png" alt="gpt2算法原理.png" style="zoom:50%;" />
## 数据集 ## 数据集
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment