Value network v2: 1024 hidden trained on linrock S2 #22

Merged
claude merged 2 commits from value-net-v2 into main 2026-11-16 18:27:07 +01:00
Collaborator

Replaces the (768 -> 128)x2 value net with (768 -> 1024)x2 -> 1 SCReLU (same inputs, quantisation and output scale), trained on the 12 S2 files of linrock/bullet-training-data: 6.6B positions, already filtered and shuffled.

  • Training: 170 superbatches of 100M positions (17B, ~2.6 passes over S2), AdamW, LR 1e-3 cosine to 2.4e-6, target 0.4 * result + 0.6 * sigmoid(score / 400) as in v1. 1h34m on the RTX 3070 at ~3M positions/s; final running loss 0.01278.
  • Trainer: --hidden N (default 1024) and --batches N; reads bulletformat straight from .bin.zst (train/value/src/zstd_reader.rs), so S2 never has to be unpacked (108 GB → 210 GB); also reads raw .bin.
  • Engine: nnue::HIDDEN = 1024, EVALFILE = networks/rigby-value-v2.bin; the output layer sums in 32-bit blocks of 128 and adds them in 64, so it stays exact for any width.
  • nps on bench: 4.6M → 3.5M.

SPRT

https://bench.rektdie.com/test/5309/

Elo   | 129.33 +- 23.23 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 3.37 (-2.94, 2.94) [0.00, 5.00]
Games | N: 604 W: 345 L: 130 D: 129
Penta | [7, 21, 105, 88, 81]

Correctness

  • evalfens against the trainer's --check on the final checkpoint: same signs and sizes, within 6 cp on quiet positions and up to 7% on large evaluations (quantisation).
  • Bench deterministic: 663779.
  • UCI: uci, isready, ucinewgame, go nodes / movetime / infinite + stop.

Bench: 663779

🤖 Generated with Claude Code

Replaces the `(768 -> 128)x2` value net with `(768 -> 1024)x2 -> 1` SCReLU (same inputs, quantisation and output scale), trained on the 12 S2 files of [linrock/bullet-training-data](https://huggingface.co/datasets/linrock/bullet-training-data): 6.6B positions, already filtered and shuffled. - Training: 170 superbatches of 100M positions (17B, ~2.6 passes over S2), AdamW, LR 1e-3 cosine to 2.4e-6, target `0.4 * result + 0.6 * sigmoid(score / 400)` as in v1. 1h34m on the RTX 3070 at ~3M positions/s; final running loss 0.01278. - Trainer: `--hidden N` (default 1024) and `--batches N`; reads bulletformat straight from `.bin.zst` (`train/value/src/zstd_reader.rs`), so S2 never has to be unpacked (108 GB → 210 GB); also reads raw `.bin`. - Engine: `nnue::HIDDEN = 1024`, `EVALFILE = networks/rigby-value-v2.bin`; the output layer sums in 32-bit blocks of 128 and adds them in 64, so it stays exact for any width. - nps on bench: 4.6M → 3.5M. ## SPRT https://bench.rektdie.com/test/5309/ ``` Elo | 129.33 +- 23.23 (95%) SPRT | 8.0+0.08s Threads=1 Hash=64MB LLR | 3.37 (-2.94, 2.94) [0.00, 5.00] Games | N: 604 W: 345 L: 130 D: 129 Penta | [7, 21, 105, 88, 81] ``` ## Correctness - `evalfens` against the trainer's `--check` on the final checkpoint: same signs and sizes, within 6 cp on quiet positions and up to 7% on large evaluations (quantisation). - Bench deterministic: 663779. - UCI: `uci`, `isready`, `ucinewgame`, `go nodes` / `movetime` / `infinite` + `stop`. Bench: 663779 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 2 commits 2026-11-16 18:26:57 +01:00
Replaces the (768 -> 128)x2 value net with (768 -> 1024)x2 -> 1 SCReLU, same
inputs, quantisation and output scale, trained on much more data: the 12 S2
files of huggingface.co/datasets/linrock/bullet-training-data (6.6B positions,
already filtered and shuffled; v1 had one month of test80).

Training: 170 superbatches of 100M positions (17B positions, about 2.6
passes over S2), AdamW, LR 1e-3 cosine to 2.4e-6, target 0.4 * result +
0.6 * sigmoid(score / 400) as in v1. 1h34m on the RTX 3070 at ~3M
positions/s (GPU-bound); final running loss 0.01278 (not comparable to v1's
0.0220, other data). The width was picked for the 2 hour budget: 1024 trains
at 3-4M/s, and in the engine a random 1024 net cost only 16% nps against 128,
thanks to the SIMD kernels.

Trainer (train/value):
- --hidden N (default now 1024) and --batches N for speed tests
- reads bulletformat straight from .bin.zst (src/zstd_reader.rs), so the
  108 GB of S2 never has to be unpacked to 210 GB; training needs ~40 MB/s
  of compressed input, which the HDD holding it gives easily
- also reads raw .bin files (bullet's DirectSequentialDataLoader)

Engine:
- nnue::HIDDEN = 1024, Makefile EVALFILE = networks/rigby-value-v2.bin
- the output layer now sums in blocks of 128 that fit 32 bits and adds
  them up in 64, so it stays exact for any width (the single 32-bit sum was
  only provably safe up to 128)

Checked: evalfens against the trainer's --check on the final checkpoint:
same signs and sizes, within 6 cp on quiet positions and up to 7% on large
evaluations (quantisation; e.g. 553 vs 594 cp). Bench deterministic. UCI:
uci, isready, ucinewgame, go nodes / movetime / infinite + stop.
nps on bench: 4.6M -> 3.5M.

Bench: 663779

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bench: 663779

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude merged commit c8d1ca682d into main 2026-11-16 18:27:07 +01:00
claude deleted branch value-net-v2 2026-11-16 18:27:08 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rektdie/Rigby#22