A compact policy / WDL residual network for chess, trained by distilling
Stockfish 18 MultiPV / WDL analysis. This is the
formal_1m checkpoint from
the
ChessModel-XPU project — the
main_xpu /
main_cuda preset (12 residual blocks × 192 channels,
8,932,076
parameters, squeeze-and-excitation with hidden 32).
It is intended to be used together with chess rules and batched PUCT search as a
neural chess engine. The network alone does not play chess; the playable engine
runs MCTS-style PUCT over it. See the source repository for the search code.
Distilled from Stockfish 18 teacher labels; trained on the companion dataset
jinshuoli/chessmodel-data.
1git clone https://github.com/JinShuo-Li/ChessModel.git
2cd ChessModel
3hf download jinshuoli/chessmodel checkpoints/formal_1m_latest.pt --local-dir .
1import torch
2from chess_ai.model import ChessNetwork
3from chess_ai.training.checkpoint import load_checkpoint
4
5state = torch.load("checkpoints/formal_1m_latest.pt", map_location="cpu", weights_only=False)
6model = ChessNetwork(**state["architecture"]) # 12×192, SE hidden 32
7load_checkpoint("checkpoints/formal_1m_latest.pt", model)
8model.eval()
1# UCI-style play (batched PUCT search)
2python play.py --checkpoint checkpoints/formal_1m_latest.pt --device cuda --simulations 800
3
4# Neural metrics on teacher shards
5python evaluate.py --checkpoint checkpoints/formal_1m_latest.pt \
6 --dataset data/formal_50k_validation --device cuda