Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,6 @@ tags:
|
|
| 12 |
- games
|
| 13 |
- elite
|
| 14 |
- lichess
|
| 15 |
-
- twic
|
| 16 |
- tokenized
|
| 17 |
size_categories:
|
| 18 |
- 1M<n<10M
|
|
@@ -20,29 +19,22 @@ size_categories:
|
|
| 20 |
|
| 21 |
# chess-elite-uci
|
| 22 |
|
| 23 |
-
A transformer-ready dataset of ~8 million elite chess games, pre-tokenized in UCI notation with a deterministic 1977-token vocabulary. Built for training chess language models directly with no preprocessing required.
|
| 24 |
|
| 25 |
## Dataset Summary
|
| 26 |
| Field | Value |
|
| 27 |
|---|---|
|
| 28 |
-
| Total games | 7,
|
| 29 |
-
|
|
| 30 |
-
| TWIC OTB games | 166,568 |
|
| 31 |
-
| Average sequence length | 94.3 tokens |
|
| 32 |
| Max sequence length | 255 tokens |
|
| 33 |
| Vocabulary size | 1,977 tokens |
|
| 34 |
-
| Mean combined Elo | 5,
|
| 35 |
|
| 36 |
## Sources
|
| 37 |
|
| 38 |
**Lichess Elite Database** (June 2020 – November 2025)
|
| 39 |
Games where both players are rated 2500+ vs 2300+ (2022 onwards: 2500+ vs 2300+; prior: 2400+ vs 2200+). Source: [database.nikonoel.fr](https://database.nikonoel.fr). Licensed CC0.
|
| 40 |
|
| 41 |
-
**The Week in Chess (TWIC)** (Issues 920–1633, ~2013–2026)
|
| 42 |
-
OTB classical tournament games where both players are FIDE-rated 2500+. Source: [theweekinchess.com](https://theweekinchess.com).
|
| 43 |
-
|
| 44 |
-
Cross-dataset duplicates (3,173 games appearing in both sources) were removed using SHA1 hashing of move sequences. In these cases, Lichess takes priority on conflicts.
|
| 45 |
-
|
| 46 |
## Vocabulary
|
| 47 |
|
| 48 |
The vocabulary contains **1,977 tokens** and is fully deterministic and enumerated from chess geometry, not derived from data. It will never produce OOV tokens for any legal chess game.
|
|
@@ -118,12 +110,11 @@ Games were filtered as follows before inclusion:
|
|
| 118 |
|
| 119 |
| Type | Count | % |
|
| 120 |
|---|---|---|
|
| 121 |
-
| White checkmate | 1,702,751 | 21.
|
| 122 |
-
| White resignation | 2,000,000 | 25.
|
| 123 |
-
| Black checkmate | 1,702,752 | 21.
|
| 124 |
-
| Black resignation | 2,000,000 | 25.
|
| 125 |
-
| Forced draw | 400,000 | 5.
|
| 126 |
-
| TWIC (all types) | 166,568 | 2.1% |
|
| 127 |
|
| 128 |
## Schema
|
| 129 |
```python
|
|
@@ -135,7 +126,7 @@ Games were filtered as follows before inclusion:
|
|
| 135 |
"game_type": string, # "checkmate", "resignation", or "forced_draw"
|
| 136 |
"pov": string, # "<W>" or "<B>"
|
| 137 |
"terminal": string, # "<CHECKMATE>", "<RESIGN>", "<STALEMATE>", ...
|
| 138 |
-
"source": string, # "lichess"
|
| 139 |
"moves_uci": string, # space-separated UCI moves, human-readable
|
| 140 |
"token_ids": list[int32], # encoded sequence, use this for training
|
| 141 |
"ntp_mask": list[int32], # 1 = apply NTP loss, 0 = skip
|
|
@@ -162,10 +153,6 @@ tokens = [id_to_token[i] for i in row["token_ids"]]
|
|
| 162 |
print(" ".join(tokens))
|
| 163 |
# → <W> e2e4 e7e5 g1f3 b8c6 f1b5 ... <RESIGN>
|
| 164 |
|
| 165 |
-
# Filter by source
|
| 166 |
-
lichess_only = ds.filter(lambda x: x["source"] == "lichess")
|
| 167 |
-
twic_only = ds.filter(lambda x: x["source"] == "twic")
|
| 168 |
-
|
| 169 |
# PyTorch DataLoader
|
| 170 |
import torch
|
| 171 |
from torch.utils.data import DataLoader
|
|
@@ -212,6 +199,5 @@ Terminal tokens are never generated during normal play. The game ends when the o
|
|
| 212 |
## Acknowledgements
|
| 213 |
|
| 214 |
- [Lichess Elite Database](https://database.nikonoel.fr) by nikonoel — CC0
|
| 215 |
-
- [The Week in Chess](https://theweekinchess.com) by Mark Crowther
|
| 216 |
- [python-chess](https://python-chess.readthedocs.io) for move parsing and board state verification
|
| 217 |
- [Modal](https://modal.com) for distributed compute
|
|
|
|
| 12 |
- games
|
| 13 |
- elite
|
| 14 |
- lichess
|
|
|
|
| 15 |
- tokenized
|
| 16 |
size_categories:
|
| 17 |
- 1M<n<10M
|
|
|
|
| 19 |
|
| 20 |
# chess-elite-uci
|
| 21 |
|
| 22 |
+
A transformer-ready dataset of ~7.8 million elite chess games, pre-tokenized in UCI notation with a deterministic 1977-token vocabulary. Built for training chess language models directly with no preprocessing required.
|
| 23 |
|
| 24 |
## Dataset Summary
|
| 25 |
| Field | Value |
|
| 26 |
|---|---|
|
| 27 |
+
| Total games | 7,805,503 |
|
| 28 |
+
| Average sequence length | 94.24 tokens |
|
|
|
|
|
|
|
| 29 |
| Max sequence length | 255 tokens |
|
| 30 |
| Vocabulary size | 1,977 tokens |
|
| 31 |
+
| Mean combined Elo | 5,211 (~2,606 per player) |
|
| 32 |
|
| 33 |
## Sources
|
| 34 |
|
| 35 |
**Lichess Elite Database** (June 2020 – November 2025)
|
| 36 |
Games where both players are rated 2500+ vs 2300+ (2022 onwards: 2500+ vs 2300+; prior: 2400+ vs 2200+). Source: [database.nikonoel.fr](https://database.nikonoel.fr). Licensed CC0.
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
## Vocabulary
|
| 39 |
|
| 40 |
The vocabulary contains **1,977 tokens** and is fully deterministic and enumerated from chess geometry, not derived from data. It will never produce OOV tokens for any legal chess game.
|
|
|
|
| 110 |
|
| 111 |
| Type | Count | % |
|
| 112 |
|---|---|---|
|
| 113 |
+
| White checkmate | 1,702,751 | 21.8% |
|
| 114 |
+
| White resignation | 2,000,000 | 25.6% |
|
| 115 |
+
| Black checkmate | 1,702,752 | 21.8% |
|
| 116 |
+
| Black resignation | 2,000,000 | 25.6% |
|
| 117 |
+
| Forced draw | 400,000 | 5.1% |
|
|
|
|
| 118 |
|
| 119 |
## Schema
|
| 120 |
```python
|
|
|
|
| 126 |
"game_type": string, # "checkmate", "resignation", or "forced_draw"
|
| 127 |
"pov": string, # "<W>" or "<B>"
|
| 128 |
"terminal": string, # "<CHECKMATE>", "<RESIGN>", "<STALEMATE>", ...
|
| 129 |
+
"source": string, # "lichess"
|
| 130 |
"moves_uci": string, # space-separated UCI moves, human-readable
|
| 131 |
"token_ids": list[int32], # encoded sequence, use this for training
|
| 132 |
"ntp_mask": list[int32], # 1 = apply NTP loss, 0 = skip
|
|
|
|
| 153 |
print(" ".join(tokens))
|
| 154 |
# → <W> e2e4 e7e5 g1f3 b8c6 f1b5 ... <RESIGN>
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
# PyTorch DataLoader
|
| 157 |
import torch
|
| 158 |
from torch.utils.data import DataLoader
|
|
|
|
| 199 |
## Acknowledgements
|
| 200 |
|
| 201 |
- [Lichess Elite Database](https://database.nikonoel.fr) by nikonoel — CC0
|
|
|
|
| 202 |
- [python-chess](https://python-chess.readthedocs.io) for move parsing and board state verification
|
| 203 |
- [Modal](https://modal.com) for distributed compute
|