Getting Started#

lczerolens is a package for running interpretability methods on lc0 models. It is designed to be easy to use and to work with the most common interpretability techniques. It is framework-agnostic (as long as you use PyTorch): you can pair it with tdhook, captum, zennit, or nnsight.

Installation#

To get started with lczerolens, install it with pip.

pip install lczerolens

Note

Core dependencies are light: mainly torch, onnx2torch, tensordict, and python-chess. Optional extras include matplotlib and graphviz (extra viz) and lc0 bindings (extra backends). Also, the Hugging Face Hub is required to load models from the Hub (extra hf).

First Steps#

Walkthrough

Walk through a basic usage of the package.

notebooks/walkthrough.ipynb
Features

Review the basic features provided by lczerolens.

Features

Note

Check out the walkthrough to get a better understanding of the package.

Advanced Features#

Warning

This following section is under construction, not yet stable nor fully functional.

Tutorials

See implementations of lczerolens through common interpretability techniques.

Tutorials
API Reference

See the full API reference for lczerolens to extend its functionality.

API Reference