amtutorial

Getting started

  • Associative Memory Tutorial
  • Getting started
  • lib
    • data_utils
  • tutorial
    • Binary Dense Storage
    • Energy Transformer
    • Memory and Diffusion
    • Distributed Memory

On this page

  • Installation
    • Pre-requisites
    • Setting up the environment
    • Website structure
  • Deploying
  • Report an issue

Other Formats

  • CommonMark

Getting started

Playing with the codebase

This website serves as a living companion to the tutorial manuscript (coming soon!) to be presented at ICML 2025. It dreams of being a one-stop shop for learning all things about Associative Memory. It’s definitely not there yet.

See the tutorials for a brief introduction to the list of example notebooks.

Installation

We have tried to streamline the installation of the repo as much as possible.

Pre-requisites

  • Install uv using curl -LsSf https://astral.sh/uv/install.sh | sh
  • Install quarto
  • We use conda (or better yet, mamba) for managing the ffmpeg dependency, which only matters if ffmpeg is not already installed on your system.

Setting up the environment

From the root of the repo:

uv sync
source .venv/bin/activate
uv run ipython kernel install --user --env VIRTUAL_ENV $(pwd)/.venv --name=amtutorial # Expose venv to ipython

# OPTIONAL: For rendering videos in notebooks
conda install conda-forge::ffmpeg conda-forge::openh264 

# OPTIONAL: For developing the interactive frontend
conda install conda-forge::nodejs
npm install --prefix javascript && npm run build --prefix javascript 

You can view a local version of the website with

uv run nbdev_preview

Website structure

.ipynb versions of the tutorial notebooks are located in tutorial_ipynbs. Setup the uv environment above to play with them locally, or run them in Google Colab.

Note

The first time you run the notebooks will be slow. We cache some of the long-running code after the first time, but this will not persist across Colab sessions

  • Binary Dense Storage Notebook
  • Energy Transformer Notebook
  • Diffusion as Memory Notebook
  • Distributed Associative Memory Notebook

The website () is built using an in-house fork of nbdev to allow developing everything (i.e., the tutorials, corresponding pip package, and documentation) using plain text representations of jupyter notebooks in .qmd files. The website preserves the folder-based routing in the nbs/ folder.

With the right extensions and hotkeys, .qmd files are pleasant to develop inside VSCode and interop seamlessly with both git and AI tooling.

Deploying

Deploy to tutorial.amemory.net by pushing commits to the main branch after building the site locally.

uv run nbdev_export && uv run nbdev_docs && git add . && git commit -m "Update site" && git push
Associative Memory Tutorial
lib
  • Report an issue