Skip to content

nnue_train: WDL lambda の cosine-cycle スケジュールと result 欠損行の除外 - #406

Merged
SH11235 merged 2 commits into
mainfrom
feat/wdl-cycle
Sep 4, 2026
Merged

SH11235 merged 2 commits into
mainfrom
feat/wdl-cycle

Conversation

@SH11235

@SH11235 SH11235 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

WHY

学習ターゲット target = lambda * result + (1 - lambda) * WRM(score) の lambda は定数 (--wdl) か線形 taper でしか動かせなかった。「学習の中盤だけ勝敗の重みを上げ、終盤は純スコアに戻す」cos 形のスケジュール (nnue-pytorch lambda_utils.py の cycle と同形) を superbatch 単位で使えるようにする。

付随して: (1) 教師 PSV では対局に属さない局面 (policy 展開行) の result が 0 = 引き分けとして入るため、wdl == 0.5 の行を lambda 0 として扱う opt-in (--wdl-ignore-draws)。(2) lambda が動く run で検証側の lambda を固定する opt-in (--validation-wdl)。

変更

  • CycleWDL スケジューラ (half-cos warmup → cooldown → base) + --wdl-cycle-delta / --wdl-cycle-warmup-pct / --wdl-schedule-superbatch
  • --wdl-ignore-draws: oxide kernel / CPU reference (loss_wdl, loss_wrm) / native .cu 3 kernel + launch 4 箇所。未指定時は bit-identical
  • --validation-wdl: superbatch 末 validation と eval-only の lambda 固定
  • docs (training-schedule / wrm-loss-tuning / held-out-validation en/ja)

検証

  • bash scripts/local-ci.sh PASS ×2 (sh11235、GPU 同等性テスト・native parity 込み)
  • 独立 dual review (Claude + Codex) 2 巡: 1 巡目 REQUEST CHANGES → 対応、2 巡目フレッシュ両者 APPROVE (指摘は docs/help 文言のみ、反映済み)

🤖 Generated with Claude Code

SH11235 and others added 2 commits September 4, 2026 01:50
- `CycleWDL`: `--wdl` を base に `--wdl-cycle-delta` を half-cos で warmup→cooldown
  (`--wdl-cycle-warmup-pct`、`--wdl-schedule-superbatch`)。既存 Constant/Linear は不変
- `--wdl-ignore-draws`: WDL ラベル 0.5 の行 (引き分け / 対局結果なし) を lambda 0 で学習。
  cuda-oxide kernel・CPU reference・native CUDA・launch 4 箇所に `ignore_draws` を追加
  (未指定時は全経路 bit-identical)
- `--validation-wdl`: held-out validation / eval-only の lambda を固定
- experiment.json params と docs (training-schedule / held-out-validation / wrm-loss-tuning) を更新

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T18:01:09.037955Z 6622aff PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SH11235
SH11235 merged commit cfc1cfb into main Sep 4, 2026
1 check passed
@SH11235
SH11235 deleted the feat/wdl-cycle branch September 4, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant