Installation

Prerequisites

  • Python 3.10 or later

  • PyTorch (recommended, for GPU acceleration)

  • SGLang (required for LLM inference)

It is strongly recommended to install PyTorch and SGLang before installing MMIRAGE so that the correct GPU-enabled variants are resolved.

Environment Setup

Several CLI features rely on environment variables (e.g. HuggingFace token, project paths). A helper script is provided to generate a .env file:

./scripts/generate_env.sh

Optional Dependencies

Development tools (linters, type-checkers, testing):

pip install -e "./MMIRAGE[dev]"

Verifying the Installation

mmirage --help