> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m-star.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade from 0.2.1 to 0.3.0

> Check the native runtime, update deployment settings, and retest your clients before switching traffic.

Start a 0.3.0 server alongside your existing deployment. Check its native binaries, send one representative request through each route you use, then compare the results. The [release notes](https://github.com/mstar-project/mstar/releases/tag/v0.3.0) record the release-wide changes.

## Install the native runtime

0.3.0 ships Linux wheels for CPython 3.12–3.14 on x86-64 and aarch64. The server requires both `mstar_rust` and `mstar-server`. A separate virtual environment avoids mixing the wheel with an older editable build or another inference engine’s dependency pins.

```bash theme={null}
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install --torch-backend=auto 'mstar-ai[bagel]==0.3.0'
python -c 'import mstar_rust; print(mstar_rust.__version__)'
python -c 'from mstar.api_server.rust_frontend import find_server_binary; print(find_server_binary())'
```

For this release the extension reports `0.2.0`. If you installed the generic 0.3.0 wheel between 02:04 and 02:45 UTC on 2026-11-30, reinstall the same version on a supported Linux platform using `uv pip install --reinstall-package mstar-ai 'mstar-ai[bagel]==0.3.0' --torch-backend=auto`. For an editable installation, [build both Rust components](https://docs.m-star.org/installation.md#rust).

For an in-place upgrade, keep the extras your deployment uses. For an existing `all` installation run:

```bash theme={null}
uv pip install -U --torch-backend=auto "mstar-ai[all]"
```

If you installed via `mstar-serve` or `mstar-project`, upgrade `mstar-ai` itself. A separate `mstar-rust` distribution can shadow the wheel’s extension. Uninstall that distribution or rebuild it from the matching revision.

| Check before starting | Action |
| - | - |
| Python and model extras | Use Python 3.12 for Kokoro text input. Install Qwen3-TTS’s [separate package](https://docs.m-star.org/installation.md#manual-installs). Check PyTorch and CUDA before reusing a compiled dependency. |
| Frontend and supervisor | Start with `mstar serve`. It selects the model adapter and starts the native HTTP frontend. Exit code 3 identifies a frontend failure, 1 a worker or conductor failure, and 0 a clean interrupt. |
| IPC and containers | The socket prefix now includes the port. Give each launch its own socket prefix and deployment token when managing processes yourself. Give containers enough shared memory for tensor transport. |
| Checkpoints | The loader refuses a quantized checkpoint unless the model explicitly supports its quantization method. Use the family’s documented checkpoint, especially for models with specialized FP8 loaders. |

## Check clients

* Send files as uploads or `data:` URLs. Remote image and audio URLs require server-side opt-in. See [request and media limits](https://docs.m-star.org/environment_variables.md#request-media).
* Send form fields to `/generate`. Check a streaming request’s HTTP status before consuming its body. Unsupported OpenAI fields and invalid generation parameters can now produce a 400. [HTTP routes](https://docs.m-star.org/reference/http-api.md) · [Generation parameters](https://docs.m-star.org/clients.md#generation-parameters)
* Read streamed PCM as raw 16-bit samples. Request WAV if the reader needs a header. Long transcriptions use parallel windows by default. Whisper can request sequential decoding, and Qwen3-ASR can set its window length. [Speech recognition](https://docs.m-star.org/asr.md)
* Match a server fault to its error ID in the server log. Applications should branch on the status code. Internal exception text stays on the server.

## Compare output

Use your own representative prompts. Pin sampling settings if you depended on the old defaults. Most models pick up defaults from the checkpoint. Disable prefix reuse for a comparison that requires the same computation.

| Model or feature | What can change |
| - | - |
| pi0.5 DROID | Supply exterior and wrist images in that order, plus seven joint positions and the gripper state. |
| Cosmos3 image-to-video | The conditioning image is center-cropped. Select `conditioning_resize: stretch` to reproduce the earlier resize. |
| Qwen3-Omni speech | The talker can emit the first audio chunk after 12 codec frames. `codec_chunk_schedule: []` restores the former 25-frame first chunk. |
| Wan2.2 | Configure the shapes you want compiled under `compile_dit_sizes`. Other shapes run eagerly. |
| Parallel scheduling | TP, SP and CFG nodes use async scheduling by default. Check `tp_async_sched` when comparing older results. |

## Update deployment settings

| Old setting | Replacement |
| - | - |
| `MSTAR_RUST_ZMQ`, `MSTAR_SHM_ARENA` | Remove the selectors. Rust control messages and the shared-memory arena are standard. Arena sizing variables still apply. |
| Cosmos3 `cuda_graph`, `COSMOS3_DISABLE_CUDA_GRAPH`, `COSMOS3_DISABLE_PREFILL_CUDA_GRAPH` | Use `accelerator_graph`, `COSMOS3_DISABLE_ACCELERATOR_GRAPH`, and `COSMOS3_DISABLE_PREFILL_ACCELERATOR_GRAPH`. |
| `MSTAR_VIT_CUDA_GRAPH`, `MSTAR_VIT_CG_BATCH_SIZES` | Use `MSTAR_VIT_ACCELERATOR_GRAPH` and `MSTAR_VIT_ACCELERATOR_GRAPH_BATCH_SIZES`. |
| Per-model prefill bucket lists, `MSTAR_VIT_CG_TOKEN_BUCKETS`, `MSTAR_VIT_ACCELERATOR_GRAPH_TOKEN_BUCKETS`, `MSTAR_QWEN35_PREFILL_TOKEN_BUCKETS`, `COSMOS3_PREFILL_CAPTURE_TOKENS` | Move the sizes to the top-level [prefill token buckets](https://docs.m-star.org/reference/config.md#prefill-token-buckets) for the node and region. |
| `COSMOS3_VAE_DECODE_FP32`, `WAN22_VAE_DECODE_FP32` | Remove them. The VAE selects its decoding dtype. |
| INFO-level per-request logs | Enable `MSTAR_LOG_REQUESTS=1` or DEBUG for `mstar.requests` if a dashboard consumes these lines. |

List the ranks of each lockstep group in ascending order. Drop a non-null `autocast_dtype` for models that run without autocast.

## Port an external model package

Use the [model porting guide](https://docs.m-star.org/adding_models.md) and the [state contract](https://docs.m-star.org/contributing/state-contract.md) to check one graph walk before loading weights.

* Declare state and implement `walk_plan`. Declare recognized model-specific key names in `request_kwargs()`. Return per-request resource settings from `get_request_resource_configs()`. Worker-local state uses `fwd_info.rid_handle`.
* Use `PagedKVConfig` or `RingKVConfig` for KV storage. Rename `SamplerSpec.enable_repetion_penalty` to `enable_repetition_penalty`.
* Rename the `cuda_graph_config` and `cuda_graph_runner` modules and `CudaGraphConfig` and `get_cuda_graph_configs` symbols to their accelerator-graph counterparts. Use `capture_batch_sizes=None` for the defaults. An empty list disables capture for that config.
* Put plain data in request metadata. Send tensors through tensor inputs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.