mlabonne/LFM2.5-230M-Chess · Hugging Face

Reddit r/LocalLLaMA Models

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.

No content available
Original Article
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 ChessLFM

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.

Demo game

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:

  1. 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.
  2. Argmax over the 64 value tokens gives the model evaluation, where<v:k\>means a win probability in\[k/64, \(k\+1\)/64\).
  3. 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

Hugging Face Daily Papers

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.

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

Reddit r/artificial

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.