Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
GameIndex
uint64
WhiteRating/16
uint8
BlackRating/16
uint8
InitialTime
uint16
Increment
uint8
1
102
87
600
8
2
103
119
480
2
3
102
109
420
17
4
114
123
60
1
5
110
113
60
1
6
92
92
300
3
7
96
93
300
0
8
110
109
540
0
9
90
73
900
0
10
95
89
180
5
11
102
96
600
8
12
122
109
300
8
13
103
113
420
17
14
89
94
420
0
15
117
121
300
0
16
108
110
540
0
17
114
113
360
6
18
103
87
1,200
0
19
118
104
480
2
20
93
90
420
0
21
93
99
300
0
22
91
94
1,560
30
23
97
89
300
2
24
121
117
300
0
25
83
83
300
5
26
112
114
300
0
27
111
108
540
0
28
123
100
60
1
29
106
112
360
6
30
88
93
300
8
31
115
108
60
0
32
90
93
420
0
33
96
88
480
8
34
97
93
60
0
35
93
97
300
3
36
93
95
1,560
30
37
84
94
300
5
38
72
77
420
0
39
101
102
180
15
40
85
107
240
0
41
110
112
300
8
42
95
107
300
0
43
109
110
540
0
44
107
116
60
1
45
116
107
60
1
46
93
94
60
0
47
73
76
420
0
48
83
80
300
5
49
94
89
420
0
50
98
83
60
0
51
92
94
1,560
30
52
107
111
360
6
53
108
116
60
0
54
104
119
420
9
55
116
108
60
0
56
116
111
60
0
57
84
96
300
5
58
105
109
240
0
59
88
95
420
0
60
97
95
480
8
61
107
116
60
0
62
79
102
60
0
63
103
77
60
0
64
116
101
60
0
65
94
96
480
0
66
112
102
60
0
67
109
115
60
0
68
96
100
300
0
69
85
90
300
5
70
116
107
60
0
71
76
103
60
0
72
101
112
60
0
73
108
94
60
0
74
101
103
180
3
75
93
118
660
0
76
106
98
180
0
77
115
108
60
0
78
67
0
300
3
79
94
89
1,560
30
80
113
101
60
0
81
109
114
60
0
82
116
108
60
0
83
75
103
60
0
84
111
104
540
0
85
118
110
180
0
86
100
94
60
0
87
101
98
300
8
88
95
95
480
0
89
115
109
60
0
90
115
109
60
0
91
103
89
0
1
92
117
117
60
0
93
102
104
600
5
94
94
112
600
3
95
77
116
120
0
96
118
93
660
0
97
103
89
0
1
98
93
101
60
0
99
102
112
180
15
100
114
89
60
0
End of preview. Expand in Data Studio

Lichess Standard Rated Games, 2013-01 → 2026-05 (binary move encoding)

A compact binary re-encoding of the Lichess monthly database for standard rated games, covering 161 consecutive months (January 2013 through May 2026) — the full Lichess standard archive at time of publication. Designed for training sequence models on chess games — every move is one 16-bit token, every game is a variable-length sequence of tokens, and per-game metadata lives in Parquet alongside.

Source PGNs were processed with the encoder at https://github.com/Alfredvc/chess-autocomplete (see rust/src/move_codec.rs for the authoritative codec implementation).

Dataset at a glance

Coverage 161 months, 2013-012026-05
Total games 7,863,012,339 (~7.86 billion)
Total positions 520,788,632,891 (~520.8 billion plies / move decisions)
Move tokens (incl. game-end markers) 528,651,645,230
Files 483 (3 per month)
Total dataset size ~1.17 TB (1,173,885,174,888 bytes)
  • moves (*.bin) ~1.06 TB
  • game offset maps (*-map.bin) ~63 GB
  • metadata (*-metadata.parquet) ~54 GB

Size vs. the raw Lichess source (same 161 months): the source PGN is 2.49 TB compressed (.pgn.zst, per the Lichess database totals) and an estimated ~17 TB uncompressed. This binary encoding (~1.17 TB) is therefore about 2× smaller than the compressed source and roughly 14× smaller than the uncompressed PGN. The uncompressed figure is an estimate — scaled from the September 2025 dump (28.3 GB compressed → ~189 GB uncompressed, a 6.7× ratio); the compressed figure is exact.

A "position" above is one ply — a single side-to-move decision — so the position count equals the number of move tokens excluding the one game-end marker per game.

File layout

Per month, three files share the prefix lichess_db_standard_rated_YYYY-MM:

File Format Purpose
*.bin Packed little-endian u16 tokens Concatenated games. One game = one variable-length run of u16 move tokens. No in-stream delimiters — use the map file to find game boundaries.
*-map.bin Packed little-endian u64 Cumulative byte offsets, one per game. Game i occupies bytes [offsets[i-1], offsets[i]) in *.bin (with offsets[-1] = 0). Number of games = len(map) / 8.
*-metadata.parquet Parquet One row per game, in the same order as games appear in *.bin.

All months together: 483 files, ~1.17 TB. The 161 Parquet files alone are ~54 GB and can be browsed directly on the Hub's Datasets viewer via the metadata config.

Metadata schema

Column Type Notes
GameIndex uint64 1-based index within the source PGN file. Skipped games (non-standard start positions, etc.) leave gaps.
WhiteRating/16 uint8 Rating quantized to 16-pt buckets — multiply by 16 to recover. 0 = unknown. Saturates at 4080+ (255 × 16).
BlackRating/16 uint8 Same encoding as WhiteRating.
InitialTime uint16 Initial clock in seconds. 0 = unknown.
Increment uint8 Increment in seconds.

Move token encoding (16 bits per move)

Each u16, parsed in little-endian byte order, packs five fields:

bits 15-12 : op       (4 bits — piece, castle, promotion, or game-end marker)
bits 11-9  : from_file (3 bits, 0=a … 7=h)
bits  8-6  : from_rank (3 bits, 0=rank 1 … 7=rank 8)
bits  5-3  : to_file   (3 bits)
bits  2-0  : to_rank   (3 bits)

op codes:

Code Meaning
0b0000 Pawn move
0b0001 Knight move
0b0010 Bishop move
0b0011 Rook move
0b0100 Queen move
0b0101 King move (non-castle)
0b0110 White king-side castle
0b0111 White queen-side castle
0b1000 Game-end marker (see special tokens below)
0b1001 Promotion to knight
0b1010 Promotion to bishop
0b1011 Promotion to rook
0b1100 Promotion to queen
0b1101 Black king-side castle
0b1110 Black queen-side castle
0b1111 Reserved / unused

When op == 0b1000, the lower 12 bits encode the termination reason rather than squares:

Token Reason
0x8000 Unknown
0x8001 Checkmate
0x8002 Stalemate
0x8003 Insufficient material
0x8004 Fifty-move rule
0x8005 Threefold repetition

Each game's token stream terminates with one of these markers. This representation is board-free: a parser does not need to maintain a chess position to decode any single move (unlike SAN or UCI), since the moving piece type, origin square, destination square, and promotion piece are all explicit.

Decoding example (Python)

Reading game i from a single month:

import numpy as np
import pyarrow.parquet as pq

month = "2024-01"
prefix = f"lichess_db_standard_rated_{month}"

# Per-game byte offsets into *.bin (cumulative end positions)
offsets = np.fromfile(f"{prefix}-map.bin", dtype=np.uint64)
num_games = len(offsets)

# Memory-map the moves
moves = np.memmap(f"{prefix}.bin", dtype=np.uint16, mode="r")

def get_game_tokens(i: int) -> np.ndarray:
    start_byte = 0 if i == 0 else offsets[i - 1]
    end_byte = offsets[i]
    # offsets are byte positions; tokens are 2 bytes each
    return moves[start_byte // 2 : end_byte // 2]

# Per-game metadata aligns row-for-row with the games in *.bin
meta = pq.read_table(f"{prefix}-metadata.parquet").to_pandas()
print(meta.iloc[0])
print(get_game_tokens(0))

To decode an individual move token:

def decode(token: int):
    op = (token >> 12) & 0xF
    if op == 0b1000:
        return ("game_end", token & 0xFFF)
    from_file = (token >> 9) & 0x7
    from_rank = (token >> 6) & 0x7
    to_file   = (token >> 3) & 0x7
    to_rank   =  token       & 0x7
    return (op, from_file, from_rank, to_file, to_rank)

Coverage

161 months, one set of files per month: 2013-01, 2013-02, …, 2025-12, 2026-01, …, 2026-05.

Per-month size varies by two orders of magnitude — from 2013-01 (121,332 games, a 16 MB .bin) to recent months around 90–100M games (12 GB .bin) — so download only the months you need (see filtering below). Games with non-standard starting positions (e.g., Chess960 mixed into the standard archive, or unusual FEN tags) are skipped during encoding, so GameIndex is not contiguous; only 7 such games are skipped across the entire archive.

Filtering / partial downloads

Use huggingface_hub's filtered download to pull only the months or file types you need:

from huggingface_hub import snapshot_download

# Just the metadata Parquet files (~54 GB total)
snapshot_download(
    repo_id="Alfredvc/chess-autocomplete-lichess",
    repo_type="dataset",
    allow_patterns="*-metadata.parquet",
    local_dir="./lichess",
)

# A single month, all three files
snapshot_download(
    repo_id="Alfredvc/chess-autocomplete-lichess",
    repo_type="dataset",
    allow_patterns="lichess_db_standard_rated_2024-01*",
    local_dir="./lichess",
)

License

The underlying Lichess game data is published by Lichess under CC0 1.0 (public domain dedication). This re-encoded copy is released under the same terms. Please cite the Lichess database when using this dataset.

Downloads last month
609