chess-moves-2400plus
a chess move generation model
1 min readupdated
chess-moves-2400plus predicts chess moves at a high level, trained on Lichess games played by 2400+ Elo players. Unlike the character-level version, it processes data using a single token (the smallest unit of text a model reads) per full move from a 1,972-item vocabulary. The architecture is a 52.6M-parameter decoder-only transformer (an autoregressive language model) with a 184-move context window. It is useful for developers building chess bots and game analysis tools.
Key features
- Trained on 10M games from 2400+ rated players on Lichess.
- Compact architecture: 16 layers, 52.6M parameters, and a 184-move context window.
- Move-level tokenization: a 1,972-item vocabulary encoding every possible move.
- Four-stage training: base cross-entropy pretraining followed by three fine-tuning stages.
What you can do
- Integrate the model into Python scripts to generate next moves in a game.
- Evaluate move predictions on board positions using the
chesslibrary. - Benchmark output quality against the author's baseline character-level models.
Example
import json, chess, sys
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
path = snapshot_download("Arisp/chess-moves-2400plus")
sys.path.insert(0, path)
from pgn_model import PGNTransformerRead more
Details• Held-out loss: 1.3682 at the -ft3 stage.
• Dataset: 10M games from 2400+ rated players.
• Hardware: trained on a single H100.
• Limitations: 184-move context limit; may occasionally output illegal moves.










Comments