Skip to content
fast-axolotl_
beginner 5 minutes

Install the fast-axolotl shim

fast-axolotl is a drop-in acceleration shim. This guide installs it into an existing Axolotl environment and confirms the Rust extension is active — with no changes to your training config.

  1. 1

    Install the package

    Add the PyPI package. Prebuilt wheels exist for Python 3.10 through 3.13 on Linux, macOS, and Windows, so there is nothing to compile.

    uv add fast-axolotl   # or: pip install fast-axolotl
  2. 2

    Import before axolotl

    Import fast_axolotl before importing axolotl. This installs the acceleration shim into sys.modules so the Rust implementations take over the data-pipeline hot paths.

    import fast_axolotl
    import axolotl
  3. 3

    Verify the extension linked

    Confirm the Rust extension is available. is_available() returns True when the compiled extension is linked into the process.

    python -c "import fast_axolotl; print(fast_axolotl.is_available())"
  4. 4

    Toggle per process if needed

    You can turn the shim off and on within a process. Call uninstall() to restore pure Python and install() to re-enable the Rust paths.

    fast_axolotl.uninstall()
    fast_axolotl.install()

What did not change

  • Your Axolotl training script and config stay the same.
  • The shim routes existing axolotl.utils.* import paths to the Rust implementations.
  • No source edits to Axolotl itself.

More guides in the index, or read the architecture to see what the shim is doing.