> ## 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.

# Command A+

> Prepare local BF16 weights and send an image question to a four- or eight-GPU deployment.

Command A+ serves the Cohere BF16 mixture-of-experts checkpoint over the native API. Text and still images can share a request.

## Install and start

Point `CUDA_HOME` at a toolkit matching PyTorch. Download the checkpoint before starting workers. The launcher fetches the tokenizer, config and shard index. The workers also need about 437 GB of BF16 weight shards on local disk.

### `command_a_plus`

Text, image → text. The default `command_a_plus_tp4.yaml` uses 4 GPUs. Experimental. The [weights](https://huggingface.co/CohereLabs/command-a-plus-05-2026-bf16) use Apache-2.0.

Greedy decode ran on four GB200 GPUs at TP4. [PR #379](https://github.com/mstar-project/mstar/pull/379).

```bash theme={null}
uv pip install --torch-backend=auto "mstar-ai[command_a_plus]"
hf download CohereLabs/command-a-plus-05-2026-bf16 \
  --revision 5fb6fde5fd12ff89356aae552e11883bc49f069b --local-dir ./command-a-plus-bf16
```

Copy the four-GPU config from the installed wheel. For a source checkout, use `cp configs/command_a_plus_tp4.yaml command-a-plus.yaml`.

```bash theme={null}
cp "$(python -c 'from importlib.resources import files; print(files("mstar.default_configs") / "command_a_plus_tp4.yaml")')" command-a-plus.yaml
```

In the copy, add `checkpoint_dir` to the existing `model_kwargs` block. On four 141 GB GPUs, also set `resources.kv_cache.max_num_pages` to 2048.

```yaml theme={null}
model_kwargs:
  max_seq_len: 65536
  checkpoint_dir: ./command-a-plus-bf16
```

Launch from the directory containing the checkpoint and YAML.

```bash theme={null}
mstar serve command_a_plus --config command-a-plus.yaml
```

[Send the request](#describe-image).

## Send a request

Run either client example in a second terminal after `/health` returns 200.

### Ask about an image

Supply a photograph as `scene.png` and read the model’s description.

**Python SDK**

```python theme={null}
from mstar import MStarClient

client = MStarClient("http://localhost:8000")
print(client.generate(
    text='Describe this image.',
    images='scene.png',
    input_modalities=('image', 'text'),
    output_modalities=('text',),
).text)
```

**curl**

```bash theme={null}
curl -fsS http://localhost:8000/generate \
  --form-string 'text=Describe this image.' \
  -F files=@scene.png \
  --form-string input_modalities=image,text \
  --form-string output_modalities=text \
  --form-string streaming=false \
  | python3 -c '
import base64, json, sys

outputs = json.load(sys.stdin)["outputs"]
text = b"".join(base64.b64decode(chunk["data"]) for chunk in outputs["text"])
print(text.decode())
'
```

## Deployment configs

| File | GPUs | Parallelism | When to use |
| - | - | - | - |
| `configs/command_a_plus_tp4.yaml` | 4 | TP4 | The default: 65536-token `max_seq_len`, FlashInfer's one-kernel all-reduce. Its 8192-page KV pool fits on GB200; on 141 GB GPUs such as the H200, set `resources.kv_cache.max_num_pages` to 2048. |
| `configs/command_a_plus_tp8.yaml` | 8 | TP8 | Eight 80 GB GPUs, 8192-token `max_seq_len`, NCCL all-reduce. |

The image encoder runs once per image prompt beside the first LLM rank.

To use an alternative, pass `--config configs/<file>` after the launcher name. From a wheel installation, [copy the shipped YAML](https://docs.m-star.org/serving.md#custom-configs) and pass its local path.

## Settings and defaults

| Knob | Default | Effect |
| - | - | - |
| `messages` | | Chat turns through the checkpoint's template. |
| `max_output_tokens` | 2048 | Output budget. The model reasons before it answers, so give it room. |
| `temperature`, `top_p`, `repetition_penalty` | 0.9, 0.95, 1.04 | Used where the checkpoint's `generation_config.json` sets none. `top_k`, `min_p`, `penalize_prompt` and `ignore_eos` are also read. |
| `model_kwargs.checkpoint_dir` | | Deployment key: the local checkpoint directory. |
| `model_kwargs.max_seq_len` | 8192 | Deployment key: the longest prompt plus output. |

Images are tiled as transformers' `Cohere2VisionProcessor` tiles them: up to 12 tiles of 512x512 plus a thumbnail, 256 tokens each.

## Limits

* No OpenAI routes; see [No OpenAI adapter](https://docs.m-star.org/models.md#no-openai-adapter).
* A prompt plus `max_output_tokens` longer than `max_seq_len` is refused.
* No FP8 weights, no prefill graph capture and no prefix cache.


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