Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
transformer-xl_pytorch
Commits
9cba0a0b
Commit
9cba0a0b
authored
May 08, 2025
by
chenzk
Browse files
Update sf.md
parent
250598f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
README.md
README.md
+6
-6
No files found.
README.md
View file @
9cba0a0b
...
@@ -6,17 +6,17 @@
...
@@ -6,17 +6,17 @@
## 模型结构
## 模型结构
TransformersXL 是一种改进的 Transformer 模型,旨在处理更长的文本序列。它引入了
**延展性机制**
,通过
**分块处理**
超长序列,然后使用
**跨块注意力**
来捕捉长距离依赖关系。
TransformersXL 是一种改进的 Transformer 模型,旨在处理更长的文本序列。它引入了
**延展性机制**
,通过
**分块处理**
超长序列,然后使用
**跨块注意力**
来捕捉长距离依赖关系。


## 算法原理
## 算法原理
Transformer-XL 在很大程度上依赖于普通 Transformer(Al-Rfou 等人),但引入了两种创新技术——
**递归机制**
和
**相对位置编码**
——来克服普通 Transformer 的缺点以下是其原理对比
Transformer-XL 在很大程度上依赖于普通 Transformer(Al-Rfou 等人),但引入了两种创新技术——
**递归机制**
和
**相对位置编码**
——来克服普通 Transformer 的缺点以下是其原理对比
transformer
transformer


transformer-XL
transformer-XL


## 环境配置
## 环境配置
### Docker(方法一)
### Docker(方法一)
此处提供
[
光源
](
https://sourcefind.cn/#/main-page
)
拉取docker镜像的地址与使用步骤
此处提供
[
光源
](
https://sourcefind.cn/#/main-page
)
拉取docker镜像的地址与使用步骤
...
@@ -41,7 +41,7 @@ pip install -r requirements.txt
...
@@ -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
DTK驱动:dtk24.04.1
python:python3.10
python:python3.10
...
@@ -88,7 +88,7 @@ sh run_enwik8_base_dp.sh train
...
@@ -88,7 +88,7 @@ sh run_enwik8_base_dp.sh train
sh run_enwik8_base.sh eval --work_dir 模型路径
sh run_enwik8_base.sh eval --work_dir 模型路径
```
```
## result
## result


### 精度
### 精度
测试数据:
[
test data
](
http://mattmahoney.net/dc/enwik8.zip
)
,使用的加速卡:Z100L。
测试数据:
[
test data
](
http://mattmahoney.net/dc/enwik8.zip
)
,使用的加速卡:Z100L。
...
@@ -106,6 +106,6 @@ sh run_enwik8_base.sh eval --work_dir 模型路径
...
@@ -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
-
https://github.com/kimiyoung/transformer-xl
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment