Description
NNUE PyTorch is the neural network trainer for the NNUE evaluation used by the Stockfish chess engine, published by the official Stockfish project. It trains the network that Stockfish uses to score chess positions, and it is built on PyTorch. The recommended way to run it is in a Docker container that already contains the PyTorch and GPU dependencies, which avoids a local Python environment. The provided script builds and starts the container and asks which GPU vendor to use, NVIDIA, AMD, or CPU only for testing, and which data directory to mount. Apple Silicon users cannot use Metal (MPS) acceleration inside Docker, so the README sets up a conda or micromamba environment instead. The repository also has a guide to local network training and testing, including hardware requirements. It is meant for chess engine developers and contributors who train Stockfish networks. Building the container takes a long time and tens of gigabytes of disk space.…
Highlights
- Trains Stockfish NNUE evaluation networks
- Docker container with GPU support
- NVIDIA, AMD and CPU-only setups
- Conda or micromamba setup for Apple Silicon
- Guide to local training and testing
Ratings & Reviews
No ratings yet
Be the first to rate Nnue Pytorch.
People also visit
Nnue Pytorch FAQ
What is nnue-pytorch?
A PyTorch trainer for the NNUE evaluation network used by the Stockfish chess engine.
Who is it for?
Chess engine developers and contributors who want to train or test Stockfish networks.
How do I run it?
Use the provided script, which builds a Docker container and asks for your GPU vendor and a data directory. Without Docker, the README suggests Conda or micromamba.
Does it work on Apple Silicon?
Yes, through a conda or micromamba environment, because native MPS acceleration does not work in Docker. Docker can still be used for CPU-only testing.
How much disk space does it need?
The README says building the container can take 30 to 60 GB of disk space and a good deal of time.
What are the best Nnue Pytorch alternatives?
Popular alternatives to Nnue Pytorch include Neural Network Chess, Docs and TrenTorch. See all Nnue Pytorch alternatives





