Files
Rigby/train/policy/Cargo.toml
rektdieandclaude 1c9d2beec3 feat: policy network trainer on Lc0 visit distributions
train/policy is a fork of montytrain's policy trainer (the one Monty,
Vine and Jackal use: bullet at a pinned revision plus two CUDA
operations, SelectAffine over the legal moves' output rows and a
softmax cross-entropy against the visit distribution). Rigby's
version drops Monty's SEE split of the outputs (3920 rows, as in
Vine), takes its arguments on the command line and checks a
checkpoint with --check.

The Stockfish binpacks used for the value net only keep the played
move, so the data comes from Lc0's raw V6 training tars instead.
lc02monty rebuilds each game from its first record and the played
moves and checks every record: pieces must match, and the moves Lc0
gave a probability must be exactly the legal moves. Lc0 writes
castling as king-takes-rook; Chess960 games keep their rook files.
On a test91 tar all 351,454 records convert. fetch.ps1 downloads a
run's hourly tars day by day, converts and deletes them, and
interleave shuffles the day files into one.

Defaults sized for a 20-minute run on the RTX 3070: 1024 hidden,
10 superbatches of 100M positions (~1M positions/s). The pinned
cudarc does not know CUDA 13.3, so env.ps1 sets
CUDARC_CUDA_VERSION=13000.

Checked: a smoke run on one tar lowers the loss from 2.89 to 2.38 and
gives plausible opening priors; a checkpoint reloads to identical
output; interleaved data trains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:27:08 +01:00

23 lines
770 B
TOML

[package]
name = "rigby-policy"
version = "0.1.0"
edition = "2021"
publish = false
default-run = "rigby-policy"
# Trains Rigby's policy network on Lc0 self-play data.
# Based on montytrain's policy trainer (github.com/TomaszJaworski777/montytrain,
# the trainer Monty, Vine and Jackal use), which builds on a pinned bullet
# revision with two custom CUDA operations.
[dependencies]
acyclib = { package = "acyclib", git = 'https://github.com/jw1912/bullet', rev = "73618a4359ec44b48ae64ba63f49c247e7d200b9" }
bullet_cuda_backend = { package = "bullet_cuda_backend", git = 'https://github.com/jw1912/bullet', rev = "73618a4359ec44b48ae64ba63f49c247e7d200b9" }
montyformat = "0.9.2"
flate2 = "1"
tar = "0.4"
[profile.release]
lto = true
codegen-units = 1
panic = "abort"