rishiraj commited on
Commit
d9a5549
·
verified ·
1 Parent(s): 44abf17

Upload ChessformerV2-5M-Joint weights, Orbax checkpoint, evals, and model card

Browse files
Files changed (28) hide show
  1. .gitattributes +7 -0
  2. README.md +227 -0
  3. checkpoints/250000/_CHECKPOINT_METADATA +1 -0
  4. checkpoints/250000/commit_success.txt +1 -0
  5. checkpoints/250000/default/_METADATA +0 -0
  6. checkpoints/250000/default/_sharding +0 -0
  7. checkpoints/250000/default/array_metadatas/process_0 +0 -0
  8. checkpoints/250000/default/commit_success.txt +1 -0
  9. checkpoints/250000/default/d/08941e9b32be5f067a99910eff94910e +3 -0
  10. checkpoints/250000/default/manifest.ocdbt +0 -0
  11. checkpoints/250000/default/ocdbt.process_0/d/134966c8727813eeb8a13228382525b6 +3 -0
  12. checkpoints/250000/default/ocdbt.process_0/d/315473d8e5d2babb48ff303b21c11ce1 +0 -0
  13. checkpoints/250000/default/ocdbt.process_0/d/42de0cc08cb3c4433148d2516a5b9e0e +3 -0
  14. checkpoints/250000/default/ocdbt.process_0/d/50870a1f51c90285d5e926b0237e7cff +0 -0
  15. checkpoints/250000/default/ocdbt.process_0/d/668a893e17fe1af0d4c5c64bfbd4b3fe +0 -0
  16. checkpoints/250000/default/ocdbt.process_0/d/75f8dd62eb5492ff27ddfc1f17885237 +0 -0
  17. checkpoints/250000/default/ocdbt.process_0/d/7b7ad108f6d2946e4aaf1d3907c520f2 +0 -0
  18. checkpoints/250000/default/ocdbt.process_0/d/c7df90b09c09b4f3c2a805e696b5be33 +3 -0
  19. checkpoints/250000/default/ocdbt.process_0/d/e2403ad9c8ef4729f973f328c82a20ce +3 -0
  20. checkpoints/250000/default/ocdbt.process_0/d/f4a8421ce0d38fe3a632fbeb1fa15172 +3 -0
  21. checkpoints/250000/default/ocdbt.process_0/d/f9cd095afc7ddbf7d473d804dab19d27 +3 -0
  22. checkpoints/250000/default/ocdbt.process_0/manifest.ocdbt +0 -0
  23. config.yaml +21 -0
  24. eval_results/eval_fide_otb.json +55 -0
  25. eval_results/eval_titled_online.json +71 -0
  26. model.msgpack +3 -0
  27. model_config.json +40 -0
  28. train_config.json +70 -0
.gitattributes CHANGED
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ checkpoints/250000/default/d/08941e9b32be5f067a99910eff94910e filter=lfs diff=lfs merge=lfs -text
37
+ checkpoints/250000/default/ocdbt.process_0/d/134966c8727813eeb8a13228382525b6 filter=lfs diff=lfs merge=lfs -text
38
+ checkpoints/250000/default/ocdbt.process_0/d/42de0cc08cb3c4433148d2516a5b9e0e filter=lfs diff=lfs merge=lfs -text
39
+ checkpoints/250000/default/ocdbt.process_0/d/c7df90b09c09b4f3c2a805e696b5be33 filter=lfs diff=lfs merge=lfs -text
40
+ checkpoints/250000/default/ocdbt.process_0/d/e2403ad9c8ef4729f973f328c82a20ce filter=lfs diff=lfs merge=lfs -text
41
+ checkpoints/250000/default/ocdbt.process_0/d/f4a8421ce0d38fe3a632fbeb1fa15172 filter=lfs diff=lfs merge=lfs -text
42
+ checkpoints/250000/default/ocdbt.process_0/d/f9cd095afc7ddbf7d473d804dab19d27 filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: flax
4
+ pipeline_tag: other
5
+ tags:
6
+ - chess
7
+ - human-ai-alignment
8
+ - behavioral-cloning
9
+ - cognitive-effort
10
+ - jax
11
+ - flax-nnx
12
+ - maia
13
+ - chessformer
14
+ - uci-engine
15
+ model-index:
16
+ - name: ChessformerV2-5M-Joint
17
+ results:
18
+ - task:
19
+ type: move-prediction
20
+ name: Human Move Prediction (Titled Online)
21
+ dataset:
22
+ name: Eval-Titled-Online (Aug 2025 Post-Cutoff)
23
+ type: eval_titled_antisf
24
+ metrics:
25
+ - type: accuracy
26
+ value: 60.55
27
+ name: Move Accuracy (%)
28
+ - type: top_3_accuracy
29
+ value: 87.37
30
+ name: Top-3 Move Accuracy (%)
31
+ - type: perplexity
32
+ value: 3.143
33
+ name: Move Perplexity
34
+ - type: accuracy
35
+ value: 61.54
36
+ name: WDL Value Accuracy (%)
37
+ - task:
38
+ type: move-prediction
39
+ name: Human Move Prediction (FIDE Classical OTB)
40
+ dataset:
41
+ name: Eval-FIDE-OTB (Aug-Sep 2025 Post-Cutoff)
42
+ type: eval_fide_otb_antisf
43
+ metrics:
44
+ - type: accuracy
45
+ value: 54.87
46
+ name: Move Accuracy (%)
47
+ - type: top_3_accuracy
48
+ value: 83.69
49
+ name: Top-3 Move Accuracy (%)
50
+ - type: perplexity
51
+ value: 3.721
52
+ name: Move Perplexity
53
+ - type: accuracy
54
+ value: 62.21
55
+ name: WDL Value Accuracy (%)
56
+ ---
57
+
58
+ # ChessformerV2-5M-Joint (5.12M Parameters)
59
+
60
+ **Authors:** [Rishiraj Acharya](https://profile.google.com/@rishirajacharya) *(Independent Researcher)* and **Soumik Rakshit** *(Principal Scientist, [eka.care](https://eka.care))*
61
+ **Codebase:** [`chessforge`](https://github.com/soumik12345/chessforge) | **Organization:** [`chessforge`](https://huggingface.co/chessforge) | **Larger Flagship:** [`chessforge/ChessformerV2-35M-Joint`](https://huggingface.co/chessforge/ChessformerV2-35M-Joint)
62
+
63
+ **ChessformerV2-5M-Joint** is a **5,123,809-parameter** searchless human chess behavioral & cognitive-effort foundation model built in **JAX / Flax NNX**. Strictly smaller than `MAIA-3-5M` (`5,230,084` parameters), it jointly models **human move selection and normalized thinking time** $p_\theta(a, u \mid s) = p_\theta(u \mid s)\,p_\theta(a \mid s, u)$ across both **Titled Online** (Blitz/Rapid) and **FIDE Over-The-Board (OTB) Classical** chess.
64
+
65
+ ### Key Highlights
66
+ * **Strictly Parameter-Matched Small-Scale SOTA:** With fewer parameters than `MAIA-3-5M` (`5.12M` vs. `5.23M`), `ChessformerV2-5M-Joint` outperforms `MAIA-3-5M` by **+1.55% Move Accuracy on Titled Online** (`60.55%` vs. `59.00%`, paired McNemar $\chi^2 = 211.11, p = 7.88 \times 10^{-48}$) and **+2.88% on FIDE OTB** (`54.87%` vs. `51.99%`, $\chi^2 = 892.78, p = 3.64 \times 10^{-196}$).
67
+ * **Surpasses `MAIA-3-23M` on Classical OTB & `MAIA-3-79M` on Outcome Calibration:** Despite having **4.5× fewer parameters and 8× fewer training examples** (`512M` vs. `4.10B`), `ChessformerV2-5M-Joint` beats `MAIA-3-23M` on FIDE OTB move prediction (`54.87%` vs. `54.57%`, $p = 7.28 \times 10^{-4}$) and outperforms **`MAIA-3-79M` (`15.4×` larger)** on WDL game-outcome calibration across *both* domains (`61.54%` vs. `60.64%` Online; **`62.21%` vs. `57.08%`** OTB).
68
+ * **Joint Move & Cognitive-Effort Factorization:** Predicts a 16-bin HL-Gauss distribution over scale-invariant cognitive effort $u \in [0,1]$ (Pearson $r = 0.6559$, $\text{MAE} = 0.1024$) and conditions move logits on effort via a rank-16 bilinear `EffortMoveResidual` (`+6,464` parameters), capturing fast System-1 intuition vs. slow System-2 calculation ($I(A; U \mid S) = 0.0260\text{ nats}$).
69
+
70
+ ---
71
+
72
+ ## Architectural Innovations Over Vanilla Chessformer / MAIA-3
73
+
74
+ | Component | MAIA-3-5M (`5.23M`) | ChessformerV2-5M-Joint (`5.12M`, Ours) |
75
+ | :--- | :--- | :--- |
76
+ | **Board State Markovity** | Non-Markov ($8\times 12$ piece planes only) | **Full Markov `v3`**: piece history + relative castling + side-to-move EP square + Zobrist repetitions |
77
+ | **Clock & Format Context** | Unconditioned (`Blitz` only) | 6-d masked bilateral log-clocks + `has_clock` gate + `Blitz / Rapid / OTB-Classical` embedding |
78
+ | **Skill & Title Conditioning** | Collinear 2-vector Elo line at input | 16-RBF Elo + rating-asymmetry $\tanh$ + **Official Human Title (`CM/NM`, `FM`, `IM`, `GM`)** via 128-d Bottleneck AdaLN |
79
+ | **Transformer Trunk ($L=8$)** | Post-RMSNorm + MHA + GELU ($2\times$) | **Pre-RMSNorm + QK-Norm MHA + SwiGLU** ($2.25\times$, $D=192$, 6 heads, `fp32` residual stream) |
80
+ | **Geometric Attention Bias** | Global mean-pooled GAB ($d_1 = 0$) | **Spatial GAB ($d_1 = 8$) + Zero-Copy Ray-GAB** (analytical 0-blocker line-of-sight & 1-blocker pin/skewer/X-ray masks) |
81
+ | **Global Readout** | Global mean pool over 64 squares | **Post-trunk `CrossAttentionPool`** (`[CLS_VALUE, CLS_PONDER]`, strictly preserving $S=64$ hardware tiling) |
82
+ | **Policy & Cognitive Heads** | Bilinear From–To + unused scalar MSE ponder | Source-Prior + Last-2-Layer Attn Residual + **HL-Gauss Effort Prior + Rank-16 `EffortMoveResidual`** + 2-Ply Reply Aux |
83
+
84
+ ---
85
+
86
+ ## Benchmark Results (Strictly Post-Cutoff Aug–Sep 2025)
87
+
88
+ All training shards strictly terminate on or before **July 2025**. Models are evaluated zero-shot on held-out post-cutoff benchmarks annotated with Stockfish 16 (`5,000` nodes/move; `AntiSF` denotes sound human–engine disagreements where $a_{\text{hum}} \neq a_{\text{SF}}$ and $\Delta_{\text{cp}} \le 35$).
89
+
90
+ ### 1. `Eval-Titled-Online` (`105,593` positions; `32,043` Anti-SF positions)
91
+
92
+ | Model | Params | Train Pos | Move Acc (%) ↑ | Top-3 (%) ↑ | PPL ↓ | Val Acc (%) ↑ | Val NLL ↓ | AntiSF Hum (%) ↑ | AntiSF Eng ↓ | AntiSF Pref (%) ↑ |
93
+ | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
94
+ | `MAIA-3-3M` | 3.15M | 0.51B–1.02B | 57.59 ± 0.30 | 85.05 | 3.497 | 59.53 | 0.8571 | 47.69 | 19.14 | 65.14 |
95
+ | `MAIA-3-5M` | 5.23M | 0.51B–1.02B | 59.00 ± 0.30 | 86.15 | 3.330 | 59.77 | 0.8553 | 49.51 | 19.16 | 65.69 |
96
+ | **`ChessformerV2-5M-Joint` (Ours)** | **5.12M** | **0.51B** | **60.55 ± 0.29** | **87.37** | **3.143** | **61.54** | **0.8258** | **50.63** | **19.12** | **66.44** |
97
+ | `MAIA-3-23M` *(4.5× larger)* | 22.94M | 4.10B | 61.33 ± 0.29 | 87.84 | 3.047 | 60.34 | 0.8464 | 51.64 | 19.33 | 66.65 |
98
+ | `MAIA-3-79M` *(15.4× larger)* | 78.90M | 4.10B | 62.52 ± 0.29 | 88.66 | 2.932 | 60.64 | 0.8431 | 52.61 | 19.33 | 67.13 |
99
+
100
+ ### 2. `Eval-FIDE-OTB` (`144,559` positions; `46,888` Anti-SF positions)
101
+
102
+ | Model | Params | Train Pos | Move Acc (%) ↑ | Top-3 (%) ↑ | PPL ↓ | Val Acc (%) ↑ | Val NLL ↓ | AntiSF Hum (%) ↑ | AntiSF Eng ↓ | AntiSF Pref (%) ↑ |
103
+ | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
104
+ | `MAIA-3-3M` | 3.15M | 0.51B–1.02B | 50.75 ± 0.26 | 79.82 | 4.401 | 55.60 | 1.1035 | 38.02 | 19.89 | 60.62 |
105
+ | `MAIA-3-5M` | 5.23M | 0.51B–1.02B | 51.99 ± 0.26 | 81.15 | 4.198 | 55.86 | 1.0988 | 38.90 | 19.88 | 61.22 |
106
+ | `MAIA-3-23M` *(4.5× larger)* | 22.94M | 4.10B | 54.57 ± 0.26 | 83.45 | 3.809 | 56.75 | 1.0712 | 41.09 | 20.14 | 62.36 |
107
+ | **`ChessformerV2-5M-Joint` (Ours)** | **5.12M** | **0.51B** | **54.87 ± 0.26** | **83.69** | **3.721** | **62.21** | **0.8273** | **41.63** | 20.81 | **61.80** |
108
+ | `MAIA-3-79M` *(15.4× larger)* | 78.90M | 4.10B | 55.80 ± 0.26 | 84.48 | 3.650 | 57.08 | 1.0598 | 42.50 | 20.00 | 62.96 |
109
+
110
+ ### 3. Cognitive Effort Prediction & Joint Move–Time Calibration (`Eval-Titled-Online`)
111
+
112
+ | Metric | Value |
113
+ | :--- | :---: |
114
+ | Marginal Effort NLL $H(U \mid S)$ ↓ | `2.0767` |
115
+ | Posterior Effort NLL $H(U \mid S, A)$ ↓ | `2.0507` |
116
+ | Move–Time Mutual Information $I(A; U \mid S)$ (nats) ↑ | `0.0260` |
117
+ | Joint Move–Time NLL ↓ | `3.1959` |
118
+ | Normalized Effort MAE ↓ | `0.1024` |
119
+ | Normalized Effort Pearson $r$ ↑ | `0.6559` |
120
+
121
+ ---
122
+
123
+ ## Repository Contents
124
+
125
+ * `model.msgpack` (`~20.5 MB`) — Pure `float32` Flax NNX weights (no optimizer state) for fast standalone Python/JAX loading.
126
+ * `checkpoints/250000/` — Native Orbax `TrainState` checkpoint for out-of-the-box use with `chessforge.cli.uci` and `chessforge.cli.eval`.
127
+ * `config.yaml` — Ready-to-run `chessforge` configuration file.
128
+ * `model_config.json` & `train_config.json` — Exact architecture & training metadata.
129
+ * `eval_results/` — Full evaluation JSONs (including Elo-stratified curves) on `Eval-Titled-Online` and `Eval-FIDE-OTB`.
130
+
131
+ ---
132
+
133
+ ## Quickstart Usage
134
+
135
+ ### 1. Install `chessforge` & Download Checkpoint
136
+ ```bash
137
+ git clone https://github.com/soumik12345/chessforge.git
138
+ cd chessforge
139
+ pip install -e ".[cpu]" # or ".[cuda12]" / ".[tpu]"
140
+
141
+ python -c "from huggingface_hub import snapshot_download; snapshot_download('chessforge/ChessformerV2-5M-Joint', local_dir='./ChessformerV2-5M-Joint')"
142
+ ```
143
+
144
+ ### 2. Play as a Human-Like UCI Engine (Nibbler / CuteChess / En Croissant / Lichess-Bot)
145
+ ```bash
146
+ python -m chessforge.cli.uci \
147
+ --config ./ChessformerV2-5M-Joint/config.yaml \
148
+ --set workdir=./ChessformerV2-5M-Joint \
149
+ --step 250000 --title GM --elo 2550 --format otb
150
+ ```
151
+
152
+ ### 3. Standalone JAX / Flax NNX Inference & Joint `(Move, Thinking-Time)` Sampling
153
+ ```python
154
+ import json
155
+ from pathlib import Path
156
+ import chess
157
+ import jax
158
+ import jax.numpy as jnp
159
+ import numpy as np
160
+ from flax import nnx, serialization
161
+
162
+ from chessforge import chess_utils as cu
163
+ from chessforge.config import ModelConfig
164
+ from chessforge.models import build_model, forward_model
165
+ from chessforge.models.joint_time import sample_joint_move_time
166
+
167
+ ckpt_dir = Path("./ChessformerV2-5M-Joint")
168
+ meta = json.loads((ckpt_dir / "model_config.json").read_text())
169
+ model_cfg = ModelConfig(**meta["model_config"])
170
+
171
+ # Build model & load pure fp32 weights from model.msgpack
172
+ model = build_model(model_cfg, rngs=0)
173
+ graphdef, state = nnx.split(model)
174
+ template = jax.tree.map(np.asarray, nnx.to_pure_dict(state))
175
+ pure_params = serialization.from_bytes(template, (ckpt_dir / "model.msgpack").read_bytes())
176
+ pure_params = jax.tree.map(jnp.asarray, pure_params)
177
+ if hasattr(nnx, "replace_by_pure_dict"):
178
+ nnx.replace_by_pure_dict(state, pure_params)
179
+ else:
180
+ state.replace_by_pure_dict(pure_params)
181
+ model = nnx.merge(graphdef, state)
182
+
183
+ # Run inference on starting position (GM 2550, 180s remaining clock)
184
+ board = chess.Board()
185
+ legal = np.zeros((1, cu.VOCAB_SIZE), dtype=bool)
186
+ legal[0, cu.legal_move_indices(board)] = True
187
+ batch = {
188
+ "board": jnp.asarray(np.tile(cu.board_codes(board), (1, model_cfg.history, 1))),
189
+ "self_elo": jnp.array([2550.0]),
190
+ "oppo_elo": jnp.array([2550.0]),
191
+ "self_title": jnp.array([cu.TITLE_GRANDMASTER]),
192
+ "oppo_title": jnp.array([cu.TITLE_GRANDMASTER]),
193
+ "game_format": jnp.array([cu.FORMAT_BLITZ]),
194
+ "clk_left": jnp.array([180.0]),
195
+ "has_clock": jnp.array([1.0]),
196
+ "legal": jnp.asarray(legal),
197
+ }
198
+
199
+ logits_move, logits_value, ponder_sec, aux = forward_model(model, batch, deterministic=True, return_aux=True)
200
+ sample = sample_joint_move_time(
201
+ jax.random.PRNGKey(0), aux["ponder_logits"], aux["conditional_move_logits"], batch["clk_left"], batch["legal"]
202
+ )
203
+ print("Top marginal move:", cu.index_to_uci(int(jnp.argmax(logits_move[0]))))
204
+ print("Sampled (move, think_sec):", cu.index_to_uci(int(sample["move"][0])), round(float(sample["ponder_sec"][0]), 2))
205
+ print("WDL probs [loss, draw, win]:", jax.nn.softmax(logits_value[0]).tolist())
206
+ ```
207
+
208
+ ---
209
+
210
+ ## Training Provenance & Limitations
211
+
212
+ * **Training Corpus (Strictly Pre-Cutoff `<= 2025-07`):** Trained for `250,000` steps at `global_batch_size = 2048` (`512M` positions) on a single Google Cloud TPU `v6e-1` using an exact 1-pass streaming shard iterator (`0%` within-epoch duplicates) and Warmup–Stable–Decay (`WSD`, `lr = 4.0e-4 -> 2.0e-6`, `grad_clip_norm = 2.0`). The first 80% (`200k` steps) trained on **Pool B** (`703.6M` unique positions: Lichess Blitz + Rapid $\ge 1800$ Elo with official title purity enforced $\ge 2350$ Elo + uncapped titled games + FIDE OTB), followed by 20% cosine annealing (`50k` steps) on **Pool C** (`310.6M` unique positions: `88.26%` Pure Titled Online + `11.74%` FIDE OTB Classical).
213
+ * **Limitations:** Because ~88% of titled training examples carry online game priors, passing `--mask_titles` during inference on classical OTB games can slightly improve pure classical calibration. This 5.12M checkpoint is Stage-2 WSD-trained (without Stage-3 Anti-Engine DPO); for anti-engine preference-aligned weights, see [`chessforge/ChessformerV2-35M-Joint`](https://huggingface.co/chessforge/ChessformerV2-35M-Joint).
214
+
215
+ ---
216
+
217
+ ## Citation
218
+
219
+ ```bibtex
220
+ @misc{acharya2026chessformerv2,
221
+ title = {ChessformerV2: Joint Move--Effort Modeling, Domain-Aligned Scaling, and Anti-Engine Alignment for Master and Over-the-Board Human Chess},
222
+ author = {Acharya, Rishiraj and Rakshit, Soumik},
223
+ year = {2026},
224
+ publisher = {Hugging Face},
225
+ howpublished = {\url{https://huggingface.co/chessforge/ChessformerV2-5M-Joint}}
226
+ }
227
+ ```
checkpoints/250000/_CHECKPOINT_METADATA ADDED
@@ -0,0 +1 @@
 
 
1
+ {"item_handlers": {"default": "orbax.checkpoint._src.handlers.standard_checkpoint_handler.StandardCheckpointHandler"}, "metrics": {}, "performance_metrics": {}, "init_timestamp_nsecs": 1795996958374872047, "commit_timestamp_nsecs": 1795996959143944956, "custom_metadata": {}}
checkpoints/250000/commit_success.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Checkpoint commit was successful to /mnt/maia3data/runs/joint_true5m_v2/checkpoints/250000
checkpoints/250000/default/_METADATA ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/250000/default/_sharding ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/250000/default/array_metadatas/process_0 ADDED
The diff for this file is too large to render. See raw diff
 
checkpoints/250000/default/commit_success.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Checkpoint commit was successful to /mnt/maia3data/runs/joint_true5m_v2/checkpoints/250000.orbax-checkpoint-tmp/default
checkpoints/250000/default/d/08941e9b32be5f067a99910eff94910e ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7c9c7d510466ab00ea3ed71fa7a553649acf65d6e2c74570d741ad73be434cc
3
+ size 116688
checkpoints/250000/default/manifest.ocdbt ADDED
Binary file (119 Bytes). View file
 
checkpoints/250000/default/ocdbt.process_0/d/134966c8727813eeb8a13228382525b6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c73aee9246a03be68267613afdab0383dc48fc0685baeade57dd0b2ff3764589
3
+ size 10641408
checkpoints/250000/default/ocdbt.process_0/d/315473d8e5d2babb48ff303b21c11ce1 ADDED
Binary file (698 Bytes). View file
 
checkpoints/250000/default/ocdbt.process_0/d/42de0cc08cb3c4433148d2516a5b9e0e ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c2936edf53a79cf02973f3fc2c3f37b5be8fff03ff9d3b810f73db8d379fb9f
3
+ size 4972544
checkpoints/250000/default/ocdbt.process_0/d/50870a1f51c90285d5e926b0237e7cff ADDED
Binary file (1.35 kB). View file
 
checkpoints/250000/default/ocdbt.process_0/d/668a893e17fe1af0d4c5c64bfbd4b3fe ADDED
Binary file (676 Bytes). View file
 
checkpoints/250000/default/ocdbt.process_0/d/75f8dd62eb5492ff27ddfc1f17885237 ADDED
Binary file (171 Bytes). View file
 
checkpoints/250000/default/ocdbt.process_0/d/7b7ad108f6d2946e4aaf1d3907c520f2 ADDED
Binary file (1.45 kB). View file
 
checkpoints/250000/default/ocdbt.process_0/d/c7df90b09c09b4f3c2a805e696b5be33 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44e355612b38d896278774fa3c72ba356cd1141e84e50d9c41c8dfbecbcb3994
3
+ size 3699674
checkpoints/250000/default/ocdbt.process_0/d/e2403ad9c8ef4729f973f328c82a20ce ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07334fbe3469cc2f2dfee55282c47239d0cfab0268e9a63b113cef9db98e20cc
3
+ size 2374760
checkpoints/250000/default/ocdbt.process_0/d/f4a8421ce0d38fe3a632fbeb1fa15172 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88848aed9eae833145bc51628d4484026209eb543854af7b05ed4fd37f3565ec
3
+ size 33075200
checkpoints/250000/default/ocdbt.process_0/d/f9cd095afc7ddbf7d473d804dab19d27 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac51987fa5b668a56cc500a66f2abd53fd0b1a917b6f85739aab2c2e1b20158
3
+ size 1923455
checkpoints/250000/default/ocdbt.process_0/manifest.ocdbt ADDED
Binary file (550 Bytes). View file
 
config.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model: chessforge-v2-5m
2
+ model_overrides:
3
+ compute_dtype: float32
4
+ remat_blocks: false
5
+ use_joint_move_time: true
6
+ joint_move_time_rank: 16
7
+ dim_vit: 192
8
+ head_hid_dim: 192
9
+ num_blocks: 8
10
+ num_heads: 6
11
+ mlp_ratio: 2.25
12
+ gab_per_square_dim: 8
13
+ gab_intermediate_dim: 64
14
+ gab_gen_size: 64
15
+ workdir: .
16
+ value_coef: 0.1
17
+ ponder_coef: 0.0
18
+ joint_time_coef: 1.0
19
+ reply_coef: 0.15
20
+ label_smoothing: 0.0
21
+ mask_illegal_in_loss: true
eval_results/eval_fide_otb.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "overall": {
3
+ "positions": 144559,
4
+ "move_acc": 0.548696380024765,
5
+ "move_acc_top3": 0.8369454686321848,
6
+ "move_acc_ci95": 0.0025652751831305577,
7
+ "move_acc_unmasked": 0.20389598710561085,
8
+ "perplexity": 3.720652196806265,
9
+ "policy_entropy": 1.2425829375894963,
10
+ "value_nll": 0.8272724069411106,
11
+ "value_acc": 0.6220643474290773,
12
+ "anti_sf_positions": 46888,
13
+ "anti_sf_human_acc": 0.41626855485412045,
14
+ "anti_sf_engine_pick_rate": 0.20807029517147244,
15
+ "anti_sf_human_pref_prob": 0.618017936358983,
16
+ "joint_time_weight": 0.0
17
+ },
18
+ "per_rating": {
19
+ "2100": {
20
+ "n": 958,
21
+ "acc": 0.5657620041753654,
22
+ "perplexity": 3.487872375325081
23
+ },
24
+ "2200": {
25
+ "n": 23138,
26
+ "acc": 0.554888062926787,
27
+ "perplexity": 3.670850987600567
28
+ },
29
+ "2300": {
30
+ "n": 53239,
31
+ "acc": 0.5464978681042093,
32
+ "perplexity": 3.7673168818506015
33
+ },
34
+ "2400": {
35
+ "n": 48733,
36
+ "acc": 0.5502431617179324,
37
+ "perplexity": 3.6742059922579204
38
+ },
39
+ "2500": {
40
+ "n": 16931,
41
+ "acc": 0.5427322662571614,
42
+ "perplexity": 3.7797051132444643
43
+ },
44
+ "2600": {
45
+ "n": 1168,
46
+ "acc": 0.5428082191780822,
47
+ "perplexity": 3.766222402468151
48
+ },
49
+ "2700": {
50
+ "n": 392,
51
+ "acc": 0.5229591836734694,
52
+ "perplexity": 4.135254247058677
53
+ }
54
+ }
55
+ }
eval_results/eval_titled_online.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "overall": {
3
+ "positions": 105593,
4
+ "move_acc": 0.6054757417631851,
5
+ "move_acc_top3": 0.8737416306005132,
6
+ "move_acc_ci95": 0.002947974597464303,
7
+ "move_acc_unmasked": 0.21334747568494122,
8
+ "perplexity": 3.1431417048609065,
9
+ "policy_entropy": 1.148273027094599,
10
+ "value_nll": 0.8257728080933395,
11
+ "value_acc": 0.6154479937117043,
12
+ "anti_sf_positions": 32043,
13
+ "anti_sf_human_acc": 0.5062884249290016,
14
+ "anti_sf_engine_pick_rate": 0.1911806010673158,
15
+ "anti_sf_human_pref_prob": 0.6643565994327935,
16
+ "marginal_effort_nll": 2.076687582273446,
17
+ "ponder_effort_mae": 0.10243192020304376,
18
+ "ponder_effort_r": 0.6559355677334023,
19
+ "joint_time_weight": 105593.0,
20
+ "joint_nll": 3.1958791657590937,
21
+ "effort_given_move_nll": 2.050656175125245,
22
+ "effort_move_mi_nats": 0.02603140714820107
23
+ },
24
+ "per_rating": {
25
+ "2100": {
26
+ "n": 390,
27
+ "acc": 0.5871794871794872,
28
+ "perplexity": 3.425163788368318
29
+ },
30
+ "2200": {
31
+ "n": 1337,
32
+ "acc": 0.6178010471204188,
33
+ "perplexity": 3.0866135647612065
34
+ },
35
+ "2300": {
36
+ "n": 7245,
37
+ "acc": 0.5950310559006211,
38
+ "perplexity": 3.2080616906574626
39
+ },
40
+ "2400": {
41
+ "n": 22374,
42
+ "acc": 0.6038705640475552,
43
+ "perplexity": 3.166903773183349
44
+ },
45
+ "2500": {
46
+ "n": 29178,
47
+ "acc": 0.6058331619713483,
48
+ "perplexity": 3.1526217532108007
49
+ },
50
+ "2600": {
51
+ "n": 25227,
52
+ "acc": 0.6092678479406984,
53
+ "perplexity": 3.09611260066792
54
+ },
55
+ "2700": {
56
+ "n": 11970,
57
+ "acc": 0.605764411027569,
58
+ "perplexity": 3.1364091486302996
59
+ },
60
+ "2800": {
61
+ "n": 6449,
62
+ "acc": 0.610172119708482,
63
+ "perplexity": 3.1128588387889313
64
+ },
65
+ "2900": {
66
+ "n": 1423,
67
+ "acc": 0.5790583274771609,
68
+ "perplexity": 3.2662441914899722
69
+ }
70
+ }
71
+ }
model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c24a4db39e36a3f7c7eea2f5cc0b260f0fcd8c44c1b2da093f6fbfbb18ca6e67
3
+ size 20503201
model_config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo_id": "chessforge/ChessformerV2-5M-Joint",
3
+ "exact_parameters": 5123809,
4
+ "checkpoint_step": 250000,
5
+ "model_config": {
6
+ "name": "chessforge-v2-5m",
7
+ "arch": "chessformer_v2",
8
+ "history": 8,
9
+ "include_time_info": false,
10
+ "dim_emb": 128,
11
+ "dim_vit": 192,
12
+ "num_blocks": 8,
13
+ "num_heads": 6,
14
+ "mlp_ratio": 2.25,
15
+ "dropout": 0.0,
16
+ "head_hid_dim": 192,
17
+ "pos_encoding": "gab",
18
+ "gab_gen_size": 64,
19
+ "gab_per_square_dim": 8,
20
+ "gab_intermediate_dim": 64,
21
+ "use_rms_norm": true,
22
+ "omit_qkv_biases": true,
23
+ "activation": "gelu",
24
+ "elo_max": 5000.0,
25
+ "compute_dtype": "float32",
26
+ "param_dtype": "float32",
27
+ "num_registers": 4,
28
+ "use_swiglu": true,
29
+ "use_qk_norm": true,
30
+ "use_adaln": true,
31
+ "use_ray_gab": true,
32
+ "use_attn_policy_residual": true,
33
+ "use_opponent_reply_head": true,
34
+ "ponder_buckets": 16,
35
+ "elo_num_basis": 16,
36
+ "remat_blocks": true,
37
+ "use_joint_move_time": true,
38
+ "joint_move_time_rank": 16
39
+ }
40
+ }
train_config.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "chessforge-v2-5m",
3
+ "model_overrides": {
4
+ "compute_dtype": "bfloat16",
5
+ "remat_blocks": false,
6
+ "use_joint_move_time": true,
7
+ "joint_move_time_rank": 16,
8
+ "dim_vit": 192,
9
+ "head_hid_dim": 192,
10
+ "num_blocks": 8,
11
+ "num_heads": 6,
12
+ "mlp_ratio": 2.25,
13
+ "gab_per_square_dim": 8,
14
+ "gab_intermediate_dim": 64,
15
+ "gab_gen_size": 64
16
+ },
17
+ "data": {
18
+ "train_glob": "/mnt/maia3data/mix_1800plus_titled_otb/*/train/*.array_record",
19
+ "anneal_glob": "/mnt/maia3data/pure_titled_and_otb/*/train/*.array_record",
20
+ "anneal_start_frac": 0.8,
21
+ "val_glob": "/mnt/maia3data/pure_titled_and_otb/*/val/*.array_record",
22
+ "test_glob": "/mnt/maia3data/eval_titled_antisf/*.array_record",
23
+ "global_batch_size": 2048,
24
+ "eval_batch_size": 1024,
25
+ "history_mask_prob": 0.05,
26
+ "shuffle_seed": 0,
27
+ "num_workers": 16,
28
+ "read_threads": 16,
29
+ "prefetch_buffer_size": 256,
30
+ "local_cache_dir": "/tmp/chessforge_shard_cache",
31
+ "val_batches": 50
32
+ },
33
+ "optim": {
34
+ "lr": 0.0004,
35
+ "min_lr": 2e-06,
36
+ "weight_decay": 0.0001,
37
+ "grad_clip_norm": 2.0,
38
+ "warmup_steps": 2000,
39
+ "cosine_cycle_steps": 50000,
40
+ "schedule": "wsd",
41
+ "decay_frac": 0.2,
42
+ "b1": 0.9,
43
+ "b2": 0.999,
44
+ "eps": 1e-08,
45
+ "total_steps": 250000,
46
+ "grad_accum_steps": 1
47
+ },
48
+ "policy_coef": 1.0,
49
+ "value_coef": 0.1,
50
+ "ponder_coef": 0.0,
51
+ "reply_coef": 0.15,
52
+ "label_smoothing": 0.0,
53
+ "dpo_coef": 0.0,
54
+ "dpo_beta": 0.2,
55
+ "kl_coef": 0.0,
56
+ "freeze_value_head": false,
57
+ "sf_max_cp_loss": 35.0,
58
+ "init_from_checkpoint": "",
59
+ "init_from_step": null,
60
+ "mask_illegal_in_loss": true,
61
+ "seed": 42,
62
+ "workdir": "/mnt/maia3data/runs/joint_true5m_v2",
63
+ "log_every": 100,
64
+ "eval_every": 10000,
65
+ "test_every": 50000,
66
+ "ckpt_every": 50000,
67
+ "keep_checkpoints": 6,
68
+ "wandb_project": "",
69
+ "joint_time_coef": 1.0
70
+ }