GPT-2 Chess LoRA

A GPT-2 model fine-tuned on Lichess chess games to predict the best move given a board position in FEN format.

Training Data

  • Dataset: Lichess/standard-chess-games
  • Filtered to games where both players are rated > 1800 ELO
  • 10000 games used for fine-tuning

Prompt Format

The model expects input in exactly this format:

Board FEN: <fen string>
Best move:

And will complete it with a UCI move like e2e4.

Training

  • Base model: openai-community/gpt2
  • Fine-tuning method: LoRA (r=8, alpha=16)
  • Max steps: 5000
  • Learning rate: 5e-4
  • Custom tokens added: all 64 board squares as atomic tokens

Usage

This model is used as part of a TransformerPlayer chess agent that scores all legal moves by log-probability and selects the highest scoring one.

Downloads last month
356
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support