Chess Qwen 3.5 4B (v2 Zero-Hallucination Champion)

An advanced, end-to-end trained Chess Reasoning & Move Generation LLM built on Qwen 3.5 4B, fine-tuned and aligned on an AMD Instinct MI300X (192GB VRAM):

  1. Curated Full SFT: 202,785 high-quality chess reasoning traces (candidate captures, checks, PV analysis, and best UCI moves).
  2. Zero-Hallucination GRPO v2 RL: Online GRPO with severe punitive illegal move penalties (-15.0) and +2.0 legal move baseline incentives on 62,794 dynamic self-play, endgame, and GM puzzle positions.
  3. Logit-Constrained High-Elo Engine: 100% legal move adherence across all multi-ply tournament play.

Evaluation Benchmarks

1. Static Accuracy & Engine Alignment (478 Held-Out Positions)

Metric SFT Base RL v1 RL v2 Champion
Format Compliance 100.0% 100.0% 100.0%
Legal Move Rate 90.8% 91.8% 92.7%
Stockfish Top-1 Match 32.2% 31.8% 31.0%
Stockfish Top-3 Match 48.5% 48.1% 47.7%
Mean Centipawn Loss (ACPL) 329.1 cp 328.2 cp 330.7 cp

2. Multi-Elo Ladder Benchmark Results

Opponent Tier Engine Elo Games W / D / L Model Score % Retries Used
Beginner Baseline (200โ€“600 Elo) 200โ€“600 5 1/1/3 30.0% 33
Stockfish 1350 1350 5 0/0/5 0.0% 22
Stockfish 1600 1600 5 0/0/5 0.0% 53
Stockfish 1850 1850 5 0/0/5 0.0% 40
Max Stockfish (Skill 20 / 3000+ Elo) 3000+ (Max) 3 0/0/3 0.0% 18

How to Play

import chess, re
from unsloth import FastModel

model, tokenizer = FastModel.from_pretrained("maxylium/chess-qwen35-4b-rl")
FastModel.for_inference(model)

board = chess.Board()
prompt = f"You are a chess engine. Analyze the board inside <think></think> tags and output the best UCI move inside <move></move> tags.\nFEN: {board.fen()}\nBoard:\n{board}"

inputs = tokenizer.apply_chat_template([{'role': 'user', 'content': prompt}], add_generation_prompt=True, return_tensors='pt').to('cuda')
output = model.generate(inputs, max_new_tokens=256, temperature=0.2)
text = tokenizer.decode(output[0], skip_special_tokens=True)
print(text)
Downloads last month
53
Safetensors
Model size
5B params
Tensor type
F32
ยท
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for maxylium/chess-qwen35-4b-rl

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(264)
this model
Quantizations
1 model