This repository holds the files needed to recreate the two datasets above. The debug dataset is just a smaller version of the main dataset for quickly testing new code on your local machine, whilst the main dataset is meant to be downloaded on the machine that will actually be used for training, whether that's a server, workstation, or compute cluster. The data is originally retrieved from lichess Jan. 2021 to Mar. 2024, and is then binned into different elos. Each folder 1000, 1100, etc. corresponds to all games between 900-1000 and 1000-1100, respectively. The main dataset contains roughly 3.2B games. Since each game is around 400 characters or so, this very roughly corresponds to ~1.3T tokens. These numbers were done back of hand, and could certainly be made more precise.
Each folder (1000, 1100, etc.) corresponds to games within specific Elo ranges:
1000: 900-1000 Elo1100: 1000-1100 Elo- And so on...
- Storage: At least 20TB of free space for processing
- Processing time: Several hours for uncompression step
Note: verify the required packages in requirements.txt
The data processing pipeline goes in the following order:
- Download
- Uncompress
- Split into chunks
- Bin by Elo
- Compress
To run the entire Data Processing Pipeline with default arguments, use the default.sh script.
python download_lichess.pyNote: This step requires about 20TB of free space and may take several hours.
python uncompress_zst.py --input_dir /path/files/to/uncompressThis step is necessary to allow the zstd_process in chess-research to open enough file handlers.
python split_in_chunks.py --input_dir /path/files/to/splitspython elo_bin.py --input_dir /path/files/to/binpython zstd_compress_elo_bin.py The debug dataset can be created from the main one using the script create_debug_dataset.py, that picks the first file for each elo bin:
python create_debug_dataset.py --input_dir /path/to/the/dataset