chess-move-tagger (v3.3)

A small model that reads chess text and finds what it says, with exact character spans:

  • every move, in SAN, UCI, long algebraic or prose ("the queen slides to h8"), whether it starts a line, continues one or is an alternative reply, and whether the text chose, rejected or just considered it;
  • every piece, square, file, rank, diagonal and region (center, kingside, …);
  • every checkable claim: check, mate, wins material, attacks/covers, where a king can or can't go, evaluations, and whether it is about the position now or after the move just discussed.

It only detects. Checking the claims against the board is deterministic code (python-chess, or chess.js in the browser). I built it as a process reward for RL on a chess-playing LLM, to reward reflections that contain true chess and not just the right final move.

Try it in your browser: manoletre.com/chess/tagger · Code, data and labelling rules: github.com/manoletre/chess-moves-from-text · The project: manoletre.com/chess

{Qxc3+}[move new rejected] <gives check>[check after] but White can {recapture the queen}[move next rejected],
and the {king simply escapes to d2}[move alt rejected]. The winning idea is to slide the {queen to d1}[move new chosen]:
the {king}[piece after] <cannot go to>[flight after] {d2}[square] because the {queen}[piece after] <covers>[attacks after] it.

Model

LiquidAI/LFM2.5-Encoder-230M (revision 0b649ad) with one linear output layer over every token, split into five heads in the order of tagger_config.json:

head labels read on
mention (BIO) MOVE, PIECE, SQUARE, FILE, RANK, DIAGONAL, REGION every token
line NEW (from the current position), NEXT (after the previous move), ALT (another reply to the previous move) MOVE spans
stance CHOSEN, REJECTED, CONSIDERED MOVE spans
frame NOW, AFTER PIECE spans and claims
claim (BIO) CHECK, MATE, WINS, ATTACKS, FLIGHT, EVAL every token

Max length 512 tokens. On held-out real reflections: mention F1 0.987, claim F1 0.939, line / stance / frame accuracy 0.995 / 0.996 / 0.989 (the 4-bit ONNX model: 0.986 / 0.939). Unseen wording is the weak spot: on a probe of new phrasings, mate and check claims are found 73% and 82% of the time.

Files

  • model.safetensors, tokenizer.json, tagger_config.json: the PyTorch weights (encoder + output layer) and label layout. training_history.json has the training curves.
  • onnx/: a 4-bit export split into three parts (onnx_parts in onnx/tagger_config.json; concatenate them), used by the browser demo with onnxruntime-web.

To run it in Python, use ChessTagger and verify from the GitHub repo (ChessTagger takes a local directory with these files).

License

A derivative of LiquidAI/LFM2.5-Encoder-230M under the LFM Open License v1.0. Changes: fine-tuned for chess token classification with a new output layer; the ONNX file is a quantized export.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for manoletre/chess-move-tagger

Finetuned
(7)
this model