MAIN Lab · SmolLM2 135M, chess puzzles

Benchmark #005

A 135M language model fine-tuned by MAIN Lab on Stockfish-checked Lichess puzzles. It reads a board as text and names the best move. It does no search: one forward pass per move.

benchmark

Results (Benchmark #005)

% of puzzles solved (every move of the solution right). 2,500 Lichess puzzles the model never saw, 500 per set. Each move is picked among the legal moves by log-likelihood, the same way for every model. SmolLM3-3B was run on 200 per set.

Test Chance SmolLM2-135M (before) Gemma 3 270M SmolLM3-3B This model
Mate in 1 3.4 0.8 0.4 1.5 44.2
Mate in 2 0.1 0.0 0.0 0.0 24.8
Easy (< 1200) 1.3 1.0 1.0 0.5 35.6
Medium (1200–1800) 0.4 0.6 0.8 0.5 14.4
Hard (≥ 1800) 0.2 0.4 0.2 0.5 4.6
Writes a legal move (free text) – 0.0 2.4 2.0 86.8

This model wins every test (paired McNemar p < 0.01, also against the 3B). Overall: 24.7% of the 2,500 puzzles solved, up from 0.6%.

Prompt format (use it exactly)

Chess puzzle. Find the best move. Answer in UCI (e.g. e2e4).
8 r . . . . . . k
7 p p . . r . . p
6 . . . . R p . Q
5 . . . p . . . .
4 . . . . . . . .
3 . N . P . . b .
2 P q P . . . P P
1 . . . . . . . K
  a b c d e f g h
White to move. Castling: -.
Best move:
  • The board is drawn from the side to move (for Black, rank 1 is at the top and files run h→a).
  • UPPER case = white, lower case = black, . = empty.
  • The answer is one UCI move followed by a newline, e.g. h6f8.
  • Best results come from scoring every legal move (log-likelihood of <move>\n) and taking the top one; greedy text also works (see "writes a legal move").

Code for the prompt, the scoring and the benchmark: chessft/ in the MAIN Lab repository.

How it was trained

  • Teacher: Stockfish, through the Lichess puzzle database (CC0). Every puzzle solution is engine-verified.
  • Data: 153,600 positions (4,800 steps × 32), drawn from 693,547 solver moves of 300k puzzles in shard 0 of Lichess/chess-puzzles. Test puzzles (ids hashed into bucket 0 of 50) and every position inside them were removed from training.
  • Training: full fine-tune on CPU (4 cores, bf16 autocast), loss on the move tokens only, AdamW lr 3e-4 cosine, batch 32, 4,800 steps.
  • Test sets: 2,500 puzzles from a held-out slice (puzzle ids hashed into bucket 0 of 50). They were never trained on, and every position inside a test-pool puzzle was removed from training.

Limits

  • Puzzles only: it was never trained on openings, quiet positions or full games.
  • No search. Deep combinations (hard puzzles) are where it fails most.
  • It is a chess model now; its general chat ability was not kept or measured.

License

Apache-2.0 (base model: SmolLM2-135M-Instruct, Apache-2.0). Data: Lichess puzzle database, CC0.

Downloads last month
17
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

Model tree for MAIN-Lab/smollm2-135m-chess

Finetuned
(429)
this model

Dataset used to train MAIN-Lab/smollm2-135m-chess

Space using MAIN-Lab/smollm2-135m-chess 1