【文件属性】:
文件名称:performer-pytorch:Pytorch中Performer(基于线性注意的转换器)的实现
文件大小:69.79MB
文件格式:ZIP
更新时间:2021-03-16 10:24:33
deep-learning transformers artificial-intelligence attention attention-mechanism
表演者-火炬手
的实施,线性注意力基于变压器的变体与A F AST甲ttention V IA正O rthogonalřandom特征的方法(FAVOR +)。
安装
$ pip install performer-pytorch
用法
表演者语言模型
import torch
from performer_pytorch import PerformerLM
model = PerformerLM (
num_tokens = 20000 ,
max_seq_len = 2048 , # max sequence length
dim = 512 , # dimension
depth = 12 , # layers
heads = 8 ,
【文件预览】:
performer-pytorch-main
----setup.py(888B)
----.gitignore(2KB)
----favor+.png(57KB)
----performer_pytorch()
--------__init__.py(240B)
--------reversible.py(5KB)
--------autoregressive_wrapper.py(3KB)
--------performer_enc_dec.py(3KB)
--------performer_pytorch.py(20KB)
----LICENSE(1KB)
----.github()
--------workflows()
----examples()
--------enwik8_simple()
--------toy_tasks()
--------enwik8_deepspeed()
----README.md(7KB)