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

LiquidAI/LFM2.5-2.6B-GGUF

Hugging Face Models Trending

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.

LFM 2.5 QAD

Reddit r/LocalLLaMA

LiquidAI releases LFM 2.5, a language model optimized for quantized deployment, with GGUF format available on Hugging Face.