kimiyoung/transformer-xl
kimiyoung/transformer-xl has 3,718 GitHub stars and 761 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 15:58 UTC. Last push 2022-09-21.
This repository contains the code in both PyTorch and TensorFlow for our paper
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalTransformer-XL: Attentive Language Models Beyond a Fixed-Length Context
This repository contains the code in both PyTorch and TensorFlow for our paper
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov (*: equal contribution)
Preprint 2018
TensorFlow
- The source code is in the
tf/folder, supporting (1) single-node multi-gpu training, and (2) multi-host TPU training. - Besides the source code, we also provide pretrained "TensorFlow" models with state-of-the-art (SoTA) performances reported in the paper.
- Please refer to
tf/README.mdfor details.
PyTorch
- The source code is in the
pytorch/folder, supporting single-node multi-gpu training via the modulenn.DataParallel. - Please refer to
pytorch/README.mdfor details.
Results
Transformer-XL achieves new state-of-the-art results on multiple language modeling benchmarks. Transformer-XL is also the first to break through the 1.0 barrier on char-level language modeling. Below is a summary.
| Method | enwiki8 | text8 | One Billion Word | WT-103 | PTB (w/o finetuning) |
|---|---|---|---|---|---|
| Previous Best | 1.06 | 1.13 | 23.7 | 20.5 | 55.5 |
| Transformer-XL | 0.99 | 1.08 | 21.8 | 18.3 | 54.5 |
Acknowledgement
A large portion of the getdata.sh script comes from the awd-lstm repo. Happy Language Modeling :)
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,143 starspublic-apis/public-apis
A collective list of free APIs
497,360 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
444,407 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,216 stars