Maia-2 source, conversion and model provenance
Updated 2026-10-13

Official code: https://github.com/CSSLab/maia2
Pinned release: v0.11.0, commit 230d982b1d5dece7d6c94945a5b9a09b3f4246c9
Code license: MIT, Copyright (c) 2024 CSSLab; full notice in LICENSE.txt.
The upstream source archive is produced by git archive from that commit.

Official Rapid checkpoint:
https://drive.google.com/uc?id=1gbC1-c7c0EQOPPAVpGWubezeEW8grVwc
SHA256: 65aae8465eed5e65df66a24ea7370715579f9e5435098d06fe18bdb1e267e997
This is the pinned checkpoint identified by official maia2/model.py.
The 280 MB training checkpoint is not bundled in the app; the inference-only
conversion is 84,928,253 bytes, with hash and individual part hashes in model.json.

Rebuild using Python 3.12 in a fresh environment:
1. Clone CSSLab/maia2 and check out the pinned commit above, without modifications.
2. Install maia2/requirements.txt from that checkout, plus:
   onnx==1.19.0 onnxruntime==1.23.0
3. Run the included script:
   python scripts/export-maia2.py --upstream /path/to/maia2 \
     --checkpoints /path/to/checkpoints --output /path/to/output
The script downloads and verifies the original checkpoint, loads it with
weights_only=True, exports ONNX opset 17 float32 with a fixed batch size of one,
and omits only the unused auxiliary training head. No learned parameters are
otherwise modified. Model parts are byte slices, not distinct neural networks.

Verification performed during export:
- ONNX structural validation.
- PyTorch versus ONNX Runtime output comparisons for 19 positions, covering
  all 11 rating bins, both colors, castling, en passant, promotion and endgames.
- Maximum policy logit absolute difference: 0.0000152587890625.
- fixtures.json stores original PyTorch legal-move probabilities and input
  tensors for independent JavaScript/WebAssembly parity checks.
- Checkpoint, conversion, model parts and dependency versions are in model.json.

Maia-2 is an alternative to Maia-3, not a rename of Maia-3. The new runtime does
not load Maia-3 weights, its AGPL source, or maia3-js. The scalar value output is
not presented as separate White-win/draw/Black-win probabilities.

Licensing record:
The Maia authors directed ChessIQ to use Maia-2 instead of Maia-3 when keeping
the application source private. The official Maia-2 repository is MIT licensed.
This notice is not a separate model-rights grant, legal opinion, or App Store
clearance. ChessIQ's App Store release remains on hold pending its full review,
including model redistribution documentation and the separate Stockfish terms.
