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
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.
@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.
LiquidAI/LFM2.5-2.6B-GGUF
This Hugging Face model card presents LiquidAI's LFM2.5-2.6B model in GGUF quantized format, with instructions for running it locally via llama.cpp, vLLM, Ollama, and other tools.
fine-tuned LiquidAI’s LFM2.5-230M on Fable-5 coding traces - its better than I expected it to be
Fine-tuned LiquidAI's LFM2.5-230M model on Fable-5 coding traces, finding the results better than expected.
LFM 2.5 QAD
LiquidAI releases LFM 2.5, a language model optimized for quantized deployment, with GGUF format available on Hugging Face.
