github lightvector/KataGo v1.16.0
New Training Data Gen, Metal Support, Many Bugfixes

20 days ago

If you're a new user, this section has tips for getting started and basic usage! If you don't know which version to choose (OpenCL, CUDA, TensorRT, Eigen, Eigen AVX2), see here. Also, download the latest neural nets to use with this engine release at https://katagotraining.org/.

KataGo is continuing to improve at https://katagotraining.org/ and if you'd like to donate your spare GPU cycles and support it, it could use your help there!

As a reminder, for 9x9 boards, see here for a special neural net better than any other net on 9x9, which was used to generate the 9x9 opening books at katagobooks.org.

Precompiled Exe Notes and Versions

For CUDA and TensorRT, the executables attached below are labeled with the versions they are built for.

  • E.g. "trt10.2.0" for TensorRT 10.2.0.*
  • E.g. CUDA 12.5 for CUDA 12.5.*
  • And so on
  • Cuda 12.8.* and/or TensorRT 10.9.0.* should hopefully be suitable for the most recently released NVIDIA GPUs as of April 2025, the RTX 5000 family.

It's recommended that you install and run these with the matching versions of CUDA and TensorRT rather trying to run with different versions.

The OpenCL version will more often work as long as you have any semi-modern GPU hardware accelerator and appropriate drivers installed, whether for Nvidia or non-Nvidia GPUs, without needing any specific versions, although it may be a bit less performant.

Available also below are both the standard and +bs50 versions of KataGo. The +bs50 versions are just for fun, and don't support distributed training but DO support board sizes up to 50x50. They may also be slower and will use much more memory, even when only playing on 19x19, so use them only when you really want to try large boards. Also, KataGo's default neural nets will behave extremely poorly and nonsensically for board sizes well above 25x25, but some large-board-trained nets may be available before too long.

The Linux executables were compiled on a 22.04 Ubuntu machine. Experimentally, the attached exes for Linux in this release were built using AppImage, in an attempt to mitigate libzip.5.so/libzip.4.so incompatibility issues, hopefully making them a bit more portable than before. You will still need to install e.g. correct versions of Cuda/TensorRT or have drivers for OpenCL, etc. on your own. If you are unable to run due to system library incompatibilities, you should be able to work around it by compiling from source, which is usually not so hard on Linux, see the "TLDR" instructions for Linux here.

Notable Changes this Release

New Training Data for Selfplay/Contribute

This release will record an entire new set of data for training that prior releases did not record, which are "action-value" winloss and score targets (i.e. q-value) indicating the predicted winrate and score after each move searched in a position. The new tensor is named qValueTargetsNCMove in the .npz data files.

These targets are not used yet by nets, however they are likely valuable for future experimentation and research. Once enough people switch and https://katagotraining.org/ accumulates enough of the new data, it should become possible to do some new experimentation and research on this as a neural net training target, possibly improving the nets or possibly enabling certain new algorithm improvements in the search in future KataGo versions.

Metal Backend for MacOS

Merged Metal backend implementation from @ChinChangYang into this main KataGo repo, for running KataGo neural nets on MacOS. (yay!). This release does not have prebuilt exes for Metal available, since @lightvector is unable to build and test them easily due to not having a Mac. However, CCY may be able to supply some before long.

Other user-facing feature additions/changes:

  • Added search parameter enableMorePassingHacks, enabled for GTP/Analysis by default, that forces both passing and non-passing moves to get searched properly if a pass would end the game and enough visits are used.
  • Analysis engine now reports playSelectionValue indicating KataGo's propensity to choose a move, see documentation.

User-facing bugfixes:

  • Fixed issue where KataGo GTP extension kata-get-param didn't work properly for numSearchThreads.
  • Fixed issue where a move by the same-colored player a second time in a row would be rejected as invalid even when tolerating illegal moves, improved internal checks on move legality.
  • Fixed bug where autoAvoidRepeat-related parameters could be ignored or fail to parse or take effect properly.

C++ tools/utils changes:

  • Minor fix to book generation and handling of passes in graph hashing.
  • Minor additions and adjustments to book policy metrics.
  • Minor updates to various sgf/hint processing tools.
  • Minor updates to improve handling of GoGoD and Fox sgfs for sgf training data generation tools.
  • Better testing scripts for GPU or other backend numerical error distributions.
  • KataGo now supports a new model version 16, which has two more policy head channels corresponding to predictions of the two new recorded data targets. These are not yet used for anything or reported, but they are computed, ready for further research and use in future versions.
  • Better GPU numerical error checking.

Python scripts feature additions/changes:

  • Updated scripts to read training data with the new qValueTargetsNCMove and to train and export version 16 nets.
    • The scripts should continue to be able to train older (version 15) nets and read data produced by older versions.
    • If -exclude-qvalues is provided to the v1.16 shuffle.py script, it should also output shuffled data that omits the new tensor and therefore is readable by v1.15 scripts.
      Support rectangular boards and named rules in python GTP play.py script.
  • Added logging of the training window (i.e. data range) in training.
  • Added experimental support for nested residual bottleneck blocks in training that consist entirely of dilated convolutions via a single pre/post transpose.
  • Implemented concurrent loading of npz files to slightly speed up training.
  • Added support for Pytorch 2.6+ secure checkpoint serialization.

Python scripts bugfixes:

  • Minor fixes to python GTP play.py script.
  • Fixed error reporting on script to summarize old selfplay files to cache their sizes and avoid filesystem queries.
  • Fixed bug where training code incorrectly computed the randomization for loading data files to train on the right number of rows in expectation with chunky data files.
  • Fixed bug where training code was overaggressive with respect to which recording which files were used to avoid double-sampling with chunky data files.
  • Fixed bug where shuffle script incorrectly recorded data file ranges for logging.

Don't miss a new KataGo release

NewReleases is sending notifications on new releases.