Comments (5)
In case anyone else was wondering about this:
The preprocessing script prep_enwik8.py
used by Transformer-XL keeps newlines intact when it writes the characters back out to a separate file. Then, when vocab.encode_file
is used, the code here reads in the preprocessed data line-by-line, keeping the ending \n
appended to each line. Tokenization subsequently treats \n
as a separate token.
Thus, \n
tokens are not dropped by the Transformer-XL preprocessing, and no <eos>
character is needed.
from adaptive-span.
Hi,
enwik8 and text8 were introduced in the context of data compression, where every character must be considered, including the end of line (\n
replaced by <eos>
in our code).
Example of a previous dataloader used for character level language modeling on enwik8:
https://github.com/salesforce/awd-lstm-lm/blob/master/data.py
from adaptive-span.
Thanks for your justification, it's weird to see Transformer-XL not add eos for these two datasets, considering you use exactly the same prep_enwik8.py
to preprocess data.
from adaptive-span.
Note that pre_enwik8.py
originally comes from the repository I linked in my previous message:
https://github.com/salesforce/awd-lstm-lm/tree/master/data/enwik8
from adaptive-span.
Right, I mean though using the same script, the way Transformer-XL load data is still different from yours and awd-lstm.
It seems including eos is the right way in the context of compression.
from adaptive-span.
Related Issues (20)
- Will adaptive-span have faster predictive speeds than gpt-2? HOT 2
- Compute attention span of individual attention heads HOT 1
- Queries about adaptive span HOT 1
- Understanding adaptive-span loss HOT 7
- Warning with PyTorch 1.4 HOT 4
- A question about parameter z_t HOT 9
- Generate text HOT 1
- BPC HOT 6
- Understanding graphs from papers
- What does batch-size mean using distributed trainning? HOT 1
- Please convert to a permissive license
- confuse HOT 1
- Accept a mask to remove padding in batch HOT 1
- what is the cache_size mean? HOT 1
- Why does the hyper-parameter --batch-sz affect the bpc during evaluation? HOT 3
- Where to find the pretrained checkpoint? HOT 1
- Using mask can reduce FLOPs? HOT 2
- Question: How to reduce the memory in this project HOT 7
- did you try to start with maximum possibile cache size HOT 2
- why not compare other local attention methods? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptive-span.