Welcome to Mammoth’s documentation!#

logo

Mammoth - An Extendible (General) Continual Learning Framework for Pytorch#

Official repository of:

Mammoth is a framework for continual learning research. With more than 40 methods and 20 datasets, it includes the most complete list competitors and benchmarks for research purposes.

The core idea of Mammoth is that it is designed to be modular, easy to extend, and - most importantly - easy to debug. Ideally, all the code necessary to run the experiments is included in the repository, without needing to check out other repositories or install additional packages.

With Mammoth, nothing is set in stone. You can easily add new models, datasets, training strategies, or functionalities.

Sequential MNIST Sequential CIFAR-10 Sequential TinyImagenet Permuted MNIST Rotated MNIST MNIST-360

Setup#

  • Install with pip install -r requirements.txt.

  • Use ./utils/main.py to run experiments.

  • New models can be added to the models/ folder.

  • New datasets can be added to the datasets/ folder.

Note

Pytorch version >=2.1.0 is required for scaled_dot_product_attention (see: https://github.com/Lightning-AI/litgpt/issues/763). If you cannot support this version, the slower base version (see backbone/vit.py).

Models#

Mammoth currently supports more than 40 models, with new releases covering the main competitors in literature.

Datasets#

NOTE: Datasets are automatically downloaded in data/. - This can be changed by changing the base_path function in utils/conf.py or using the --base_path argument. - The data/ folder should not be tracked by git and is craeted automatically if missing.

Mammoth includes 21 datasets, covering toy classification problems (different versions of MNIST), standard domains (CIFAR, Imagenet-R, TinyImagenet, MIT-67), fine-grained classification domains (Cars-196, CUB-200), aerial domains (EuroSAT-RGB, Resisc45), medical domains (CropDisease, ISIC, ChestX).

Pretrained backbones#