| --- |
| license: mit |
| library_name: pytorch |
| tags: |
| - chess |
| - transformer |
| - reinforcement-learning |
| - stockfish |
| - policy |
| language: |
| - en |
| pipeline_tag: other |
| --- |
| |
| # Chess Transformer 200M β MaxElo (policy-only) |
|
|
| Finetune of [`avewright/chess-transformer-200m-compact-soft`](https://huggingface.co/avewright/chess-transformer-200m-compact-soft) |
| for **high Elo without MCTS**: next-move prediction via legal-mask policy argmax. |
|
|
| ## Model card |
|
|
| | | | |
| |--|--| |
| | Architecture | ChessTransformer ~204M (fused board encoder, 16L Γ 1024d Γ 16H) | |
| | Vocab | **compact** (`MOVE_VOCAB_VERSION=compact`) | |
| | Heads | Spatial policy + 3-class WDL value | |
| | Inference | Policy argmax only (no search) | |
| | Base | `chess-transformer-200m-compact-soft` | |
| | Train run | **exp189** (soft MultiPV + deep soft mix + hard depthβ₯15) | |
|
|
| ### Checkpoints in this repo |
|
|
| | File | Meaning | |
| |------|---------| |
| | `best_model.pt` | Best blended soft holdout top-1 during deep-mix resume | |
| | `latest_model.pt` | Shutdown weights at step **2851** | |
| | `config.json` | Architecture + training metadata | |
| | `PROGRESS.md` | Full session write-up | |
| | `elo_eval.json` | Raw Elo ladder results | |
|
|
| Lean checkpoints contain `model_state_dict` + metadata (no optimizer). |
|
|
| ## Training data mix |
|
|
| 1. **Shallow soft** β MultiPV soft targets from [`avewright/exp186-sf-multipv-2m`](https://huggingface.co/datasets/avewright/exp186-sf-multipv-2m) |
| 2. **Deep soft** β phase-balanced SF18 MultiPV from [`avewright/exp190-phase-deep-soft`](https://huggingface.co/datasets/avewright/exp190-phase-deep-soft) (~40% of soft steps) |
| 3. **Hard ballast** β HF Stockfish-labeled stream, `min_depth β₯ 15` |
|
|
| Augmentation: horizontal flip on soft batches (`hflip_p=0.5`). |
|
|
| ## Elo (pure policy) |
|
|
| Evaluated with `elo_eval_latest.py` vs Stockfish 18 `UCI_LimitStrength` |
| (50ms/move, opening book + Syzygy, 8 openings Γ both colors): |
|
|
| | Opponent Elo | Score | WβDβL | |
| |--------------|-------|-------| |
| | 1500 | 0.625 | 7β6β3 | |
| | 1800 | 0.438 | 4β6β6 | |
|
|
| **Estimated Elo β 1700** (bracket 1500β1800; small sample, noisy). |
|
|
| ## Quick load |
|
|
| ```python |
| import os, torch |
| os.environ["MOVE_VOCAB_VERSION"] = "compact" |
| from play import load_model # or elo_eval_latest.load_eval_model |
| |
| model = load_model("best_model.pt", device="cuda") |
| model.eval() |
| ``` |
|
|
| Or play in the local GUI: |
|
|
| ```bash |
| export MOVE_VOCAB_VERSION=compact |
| python play_factory_gui.py --checkpoint best_model.pt |
| ``` |
|
|
| ## Known limits |
|
|
| - Plateaued on the available soft mix; more deep phase-balanced data should help |
| - Weaker as **Black** in the Elo sample |
| - Castling indices use Chess960-style UCI in the vocab; GUI converts to standard UCI for chess.js |
|
|
| ## Citation / code |
|
|
| Training code: [avewright/transform](https://github.com/avewright/transform) β |
| `experiments/exp189_200m_maxelo_policy.py`, `docs/PROGRESS_2026-07-10.md`. |
|
|