mlabonne/LFM2.5-230M-Chess · Hugging Face
Summary
A 230M-parameter chess engine fine-tuned from LFM2.5-230M-Base using Stockfish distillation, capable of predicting chess moves with a language model interface and playing at around 2004 Elo.
View Cached Full Text
Cached at: 09/16/26, 05:28 AM
mlabonne/LFM2.5-230M-Chess · Hugging Face
Source: https://huggingface.co/mlabonne/LFM2.5-230M-Chess

https://huggingface.co/mlabonne/LFM2.5-230M-Chess#lfm25-230m-chessLFM2.5-230M-Chess
A 230M chess engine with a language model interface, fine-tuned fromLFM2.5-230M-Baseusing Stockfish distillation.
Every possible chess move is a single token in the vocabulary. The model reads a position as a fixed 80-token prompt, predicts its own win probability, then predicts one move token. The host masks the move logits to the legal moves, so the model can never play an illegal move.
It plays at roughly 2004 Elo with a shallow depth-3 search on top, and roughly 1500 with the raw one-pass policy.
**Demo:**Play it in your browser with theChessLFM Space.
https://huggingface.co/mlabonne/LFM2.5-230M-Chess#usageUsage
import json
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("mlabonne/LFM2.5-230M-Chess")
token_ids = json.load(open("token_ids.json"))
Each move takes two short forward passes:
- Build the 80-token prompt from the FEN. It encodes the 64 squares, side to move, castling rights, en passant file, halfmove clock, repetition count, and the last 8 plies.
- Argmax over the 64 value tokens gives the model evaluation, where
<v:k\>means a win probability in\[k/64, \(k\+1\)/64\). - Append that value token and
<\|bestmove\|\>, mask the move logits to the legal moves, and take the argmax.
You can find the 2,106 added token IDs intoken\_ids\.json(it starts at 64402).
Similar Articles
Language Models that Play Chess and Explain Their Moves
The paper introduces Queen, a 4B-parameter chess-language model that explains its moves while playing at Grandmaster level, using a silent-expert chess encoder fused with an instruction-tuned LM via cross-attention and an iterative Bellman-style distillation loop that gains over 900 Elo points.
I built a chess coach that explains moves like a grandmaster instead of showing engine lines — powered by LLM
A chess coaching tool that uses an LLM to explain moves in natural language like a grandmaster, replacing raw engine evaluations with contextual coaching narratives. It analyzes user games from Chess.com and Lichess with local Stockfish, detects recurring mistakes, and offers personalized chat and spaced repetition for blunders.
Princeton researchers train a 4B LLM to reach 2700 Elo in chess (with no signs of a plateau when they stopped training) and can explain its moves accurately. They say the training technique can also be applied to other games, robotics, and computer use
Princeton researchers train a 4B-parameter LLM to reach 2700 Elo chess strength using a natural-language analogue of the AlphaZero algorithm, with architectural and algorithmic innovations that also allow it to accurately explain its moves. The authors say the technique generalizes to other games, robotics, and computer use.
@maximelabonne: ChessLFM went full circle and is now on the home page of @lichess Super cool to see, Lichess is where I collected all t…
ChessLFM, an AI model, has been featured on the home page of Lichess, a popular chess platform, where the model's seed data was collected.
Benchmarking Prompt Optimization of Large Language Models With Chess
Researchers introduce a chess-puzzle benchmark (1,118 Lichess puzzles) for automatic prompt optimization of frozen LLMs, evaluating six APO algorithms on eight models with cheap, deterministic, renewable scoring at a total cost of around $800.
