Commit 9cba0a0b authored by chenzk's avatar chenzk
Browse files

Update sf.md

parent 250598f5
......@@ -6,17 +6,17 @@
## 模型结构
TransformersXL 是一种改进的 Transformer 模型,旨在处理更长的文本序列。它引入了**延展性机制**,通过**分块处理**超长序列,然后使用**跨块注意力**来捕捉长距离依赖关系。
![img](https://developer.hpccube.com/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/模型结构.png)
![img](https://developer.sourcefind.cn/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/模型结构.png)
## 算法原理
Transformer-XL 在很大程度上依赖于普通 Transformer(Al-Rfou 等人),但引入了两种创新技术——**递归机制****相对位置编码**——来克服普通 Transformer 的缺点以下是其原理对比
transformer
![](https://developer.hpccube.com/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/transformer的训练与评估.png)
![](https://developer.sourcefind.cn/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/transformer的训练与评估.png)
transformer-XL
![img](https://developer.hpccube.com/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/xl的训练与评估.png)
![img](https://developer.sourcefind.cn/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/xl的训练与评估.png)
## 环境配置
### Docker(方法一)
此处提供[光源](https://sourcefind.cn/#/main-page)拉取docker镜像的地址与使用步骤
......@@ -41,7 +41,7 @@ pip install -r requirements.txt
此处提供本地配置、编译的详细步骤,例如:
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装。
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.sourcefind.cn/tool/)开发者社区下载安装。
```
DTK驱动:dtk24.04.1
python:python3.10
......@@ -88,7 +88,7 @@ sh run_enwik8_base_dp.sh train
sh run_enwik8_base.sh eval --work_dir 模型路径
```
## result
![rusult](https://developer.hpccube.com/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/result.png)
![rusult](https://developer.sourcefind.cn/codes/modelzoo/transformer-XL-pytorch/-/raw/main/doc/result.png)
### 精度
测试数据:[test data](http://mattmahoney.net/dc/enwik8.zip),使用的加速卡:Z100L。
......@@ -106,6 +106,6 @@ sh run_enwik8_base.sh eval --work_dir 模型路径
`科研,设计,金融`
## 源码仓库及问题反馈
- https://developer.hpccube.com/codes/modelzoo/transformer-XL-pytorch
- https://developer.sourcefind.cn/codes/modelzoo/transformer-XL-pytorch
## 参考资料
- https://github.com/kimiyoung/transformer-xl
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