Before you install
- On Linux x86-64 or aarch64, 0.3.0 ships native wheels for CPython 3.12, 3.13, and 3.14. Python 3.12 has the widest model-extra coverage.
- Choose a model and check its GPU count and extra. The examples below use BAGEL on one NVIDIA GPU.
- Install uv. NVIDIA models build some kernels on first use and need a local CUDA toolkit. A CUDA 13 build of PyTorch needs driver r580 or newer. Check your toolkit.
Install the Linux wheel
mstar-ai; Python imports it as mstar. The native wheel includes the Rust extension, HTTP server, and default deployment configs. A generic Python wheel lacks the two native components required to serve. Verify your installation.
Build current main
Start in a fresh environment. On NVIDIA, run the following from the machine that will serve the model. Install rustup and a C/C++ toolchain first. The checkout pins the Rust compiler version.Rebuild the Rust components
Rebuild both components when their sources change. A source-hash mismatch at startup identifies the stale build. If you setCARGO_TARGET_DIR, set MSTAR_SERVER_BIN to the binary in its release directory. See server flags for an explicit binary override.
From the repository root, rust/server/target/release/mstar-server --source-hash prints the hash of the built frontend. A separately installed mstar-rust can shadow the wheel’s extension. For a source build, run the Rust tests after building the extension and HTTP server:
Install on AMD ROCm
Use current main and a working ROCm PyTorch environment for the in-progress AMD backend. Install the AITER distribution for your ROCm environment (amd-aiter). Autoregressive models also use AMD’s FlashInfer fork for RMSNorm, RoPE, and sampling. Both NVIDIA’s distribution and the AMD fork provide the Python name flashinfer. When installing a model extra, exclude NVIDIA’s package from the resolution.
hipcc on first use. Its cache defaults to ~/.cache/flashinfer. Keep using the override when changing extras.
AITER serves eligible paged, cross, and ragged attention. AMD FlashInfer is required for power-of-two page sizes up to 64, windowed or scaled paged attention, context parallelism, or sequence-parallel split steps. Non-causal multi-query paged steps and block-causal ragged attention can first require it during warmup or the first such request.
Model dependencies
Use the Extra column in the model catalog. Add extras together, for example'mstar-ai[qwen3_omni,audio]'. Install metrics for Prometheus, vad for server-side turn detection, and audio for compressed audio formats. The all extra omits some model-specific dependencies. Install the extra for the family you serve.
On Python 3.13 and later, Kokoro accepts phonemes supplied by the caller but lacks the text-to-phoneme package used for plain text. Use Python 3.12 for text input. Waypoint’s serving path works on Python 3.14, where its parity-test dependency tensordict is excluded. The all extra includes AudioSeal. M* requires torch>=2.10,<2.13. The ASR extra pins its PyTorch stack to 2.10.
Additional packages
- OmniVoice requires
uv pip install "git+https://github.com/k2-fsa/OmniVoice.git". - Qwen3-TTS requires
uv pip install --no-deps "qwen-tts==0.1.1". - LingBot-World requires FlashAttention for
reference_numerics: true. BAGEL’s vision encoder can use PyTorch SDPA when FlashAttention is absent. - Waypoint requires a pinned TAEHV decoder and can use FlashAttention-4.
--find-links, the resolver can prefer a CUDA 13 build on CUDA 12. An undefined-symbol import failure usually indicates a PyTorch or CUDA ABI mismatch. The 2.8.3 kernels for Blackwell do not build with nvcc 13. When compiling for Hopper, exclude those targets.
A FlashAttention wheel must match Python, PyTorch, CUDA, and the platform. For a source build on Hopper, use the local PyTorch environment and target Hopper explicitly.
Match the CUDA toolkit
--torch-backend=auto selects PyTorch using the driver. Source builds such as the MoE align kernel also check the major version of the installed toolkit. If the driver supports CUDA 13 but nvcc reports CUDA 12.9, install into a fresh environment with an explicit backend, for example uv pip install --torch-backend=cu129 'mstar-ai[bagel]'. Set CUDA_HOME if you have multiple toolkits. PyPI’s torch 2.12 wheel uses CUDA 13.0. With torch 2.10, install a matching torchvision and torchaudio from the same PyTorch wheel index, then uv pip install "torchcodec==0.10.*" for media decoding.
Containers
From the root of a source checkout, build the CUDA serving image and start BAGEL. The named volumes retain weights and compiled kernels across restarts.Intel XPU
The host needs Intel GPU drivers and/dev/dri. The XPU Dockerfile clones M* at build time. Pass --build-arg MSTAR_REF=<tag-or-branch> to select a revision.
Verify the install
Troubleshooting
Missing cuDNN sublibrary
If a CUDA 12 environment with cuDNN 9.20.0.48 reportsCUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH and loads a newer system copy, install a complete cuDNN 9 build in that environment with uv pip install --no-deps -U "nvidia-cudnn-cu12>=9.21,<10".