8000 GitHub - Dam930/minimamba: A simple implementation of the MAMBA paper for educational purposes.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dam930/minimamba

Repository files navigation

MINIMAMBA

MINIMAMBA is a reimplementation of the concepts presented in the MAMBA paper.
This repository serves as an educational project, aiming to understand and reimplement the ideas described in the paper to deepen comprehension of its methods and techniques.

Documentation

Download the dataset:

cd data/shakespeare_char
python prepare.py

Start training:

python -m minimamba train -c configs/commands/train.json

Generate some examples: change the config configs/commands/generate.json with the path of the last model

run the following script

python -m minimamba generate -c configs/commands/generate.json

📥 Installation

Initialization

N.B. This section is intended for the person who creates the project and must be followed only once during project setup

Execute the following make command to start the initialization procedure:

make init

The procedure will ask you to enter the project info (name, author, etc.) and will guide you through the setup of a conda environment and git repository.

The procedure assumes that you have Anaconda installed on the system and a default Python interpreter available.

Install project and dependencies

Create a new Python 3.12 environment:

conda create --name minimamba python=3.12

Activate the conda environment just created:

conda activate env_name

Install dependencies on the environment:

make install

or the following command if you want to install dependencies for developing mode:

make dev

🗂️ Structure

The project contains:


📁 minimamba : that contain the code of the project. We encourage to split the project in different subfolders, one for each project module.

📁 tests : in this folder will be stored the python test files for pytest. A sample script is contained.

📁 utils : it contains some scripts for support operations, you can add other scripts if needed.

📁 docs : it contains the documentation in html folder, the documentation is autogenerated, do not modify the folder content. (see utils chapter)

🔨 .gitlab-ci.yml for the gitlab definition of the CI pipeline.

🔨 .pre-commit-config.yaml for the definition of the hooks caught by the pre-commit.

📇 LICENSE

📄 Makefile (see Utils for details)

📄 requirements.txt/requirements_dev.txt for packages required by the project. You can append the packages needed.

⚙️ Utils

The project contains a make file with some standard operation that helps you to better manage the project and the code.


Print all the available make commands by typing:

make help

You will get the followings

Command Description
help to print all the possible commands
init to create the git local and remote repository
install to install requirements without development dependencies
dev to install requirements with development dependencies
format to format code using ruff
format-check to check code format using ruff
lint to check the code style
lint-fix to fix the code style
test to launch the tests
doc to create the project documentation
doc to print repository tree structure
patch to release a patch
minor to release a minor version
major to release a major version
wheel to create a wheel to distribute this software

About

A simple implementation of the MAMBA paper for educational purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0