Manuscript Offprint

arXiv:2610.25356

CHSM8: A Chess Transformer that Follows Natural-Language Style Prompts

Ilia Badanin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present CHSM8, a 210M-parameter chess transformer that plays moves conditioned on a free-text description of a playing style, e.g. "go for the Sicilian Defense", "solid, safe, risk-free chess" or "You are Magnus Carlsen in his prime". The model is pretrained without search on 1.07B filtered Lichess games, using a factorized move representation and legal-move masking. It reaches 1837 Elo against a strength-limited Stockfish and, in 1,000-game matches, beat every other public model we tested that was likewise trained without preference tuning, rewards or search, including one with 13 times as many parameters. We then fine-tune it to follow text on a synthetic dataset: Gemma-4-31B describes the playing style of 3M game sides, a 1B Gemma-3 model distilled from the 2.4M of those descriptions that contradict nothing on the board labels the rest, and every one of 30M selected game sides gets five descriptions. Supervised fine-tuning attaches a frozen text encoder through gated cross-attention, and direct preference optimization (DPO) uses the same moves under a mismatched description as the rejected sample. After DPO, style adherence rises on every prompt we test (for example, queens traded early 53%→67%, pawn moves 29%→32% of all moves, queenside castling 97.3%→99.7%), and strength without a prompt stays within noise of SFT (1792 vs. 1797 Elo). Design choices at every stage were made by fixed-budget automated search loops on top of standard architectures and training recipes. We document the full pipeline and the decisions behind it, report the ablations that failed, and evaluate the models across many style prompts and kinds of games, with 1,000 games per setting. The work is fully open source and reproducible: weights, datasets with all training labels, prompts, configurations, inference code and playable demos are public and free to build on.

style prompt

"castle queenside

and storm the king"

game so far

  1. e4 c5 2. Nf3 d6 3. d4 ...

CHSM8

chess transformer

conditioned on

the prompt

next move

always legal,

in the asked style

With this prompt, queenside castling: 13% → 94% of games against Stockfish.

Contents

1 Introduction 4
2 Related work 6
3 Evaluation protocol 8
4 Data 10
4.1 Pretraining corpus (chsm8-pre-training) 10
4.2 Post-training corpus (chsm8-post-training) 11
4.3 Top players 12
4.4 Data for each training stage 12
5 Pretraining 14
5.1 Factorized move tokens 14
5.2 Architecture 15
5.3 Training run 17
5.4 Results 18
6 Style labels 20
6.1 Task and prompt 20
6.2 Teacher models 20
6.3 Distilled labeler (chsm8-labeler-gemma3-1b) 22
6.4 Label quality matters more than volume 23
7 Style SFT 25
7.1 Final model (chsm8-sft) 25
7.2 Recipe search 27
7.3 The first full run and why pooled conditioning was not enough 29
8 Preference optimization 32
8.1 Label-swap pairs 32
8.2 Early rounds on the pooled model 32
8.3 Search on the final SFT model 33
8.4 Scaling up, pair construction and batch size 36
9 Final results 38
9.1 Against strong public models 40
9.2 How noisy is this? 42
9.3 Selection score 42

10 Lessons and limitations 43
A Hyperparameters 49
B Player fine-tunes 51
C A labeled example 53
D Open release and reproducibility 54
E Bradley-Terry strength 56

References (60)