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

# Serve your first model

> Start BAGEL on one NVIDIA GPU and read a reply over HTTP.

You need:

* Linux and one NVIDIA GPU with more than 30 GB of memory. The [BAGEL weights](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT) alone take about 30 GB.
* Python 3.12, [uv](https://docs.astral.sh/uv/), and a [CUDA toolkit compatible with PyTorch](https://docs.m-star.org/installation.md#cuda-toolkit).
* About 30 GB of disk for the weights, plus space for dependencies and compiled kernels.

For AMD and Intel GPUs, see [hardware support](https://docs.m-star.org/hardware.md).

## Start the server

In your first terminal, install the Linux wheel and the dependencies for BAGEL. Bind to the loopback interface for this local example.

```bash theme={null}
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install --torch-backend=auto 'mstar-ai[bagel]'
mstar serve bagel --host 127.0.0.1 --gpus 0
```

Leave this terminal open. The first launch downloads weights and compiles kernels. Use a second terminal for the remaining commands.

## Check readiness

```bash theme={null}
curl -fsS http://127.0.0.1:8000/health
```

Wait until you see `{"status":"healthy"}`. If the connection is refused, check the first terminal for progress or an error. On a fresh machine startup can take several minutes. [Diagnose startup](https://docs.m-star.org/cold-start.md).

## Send a request

```bash theme={null}
curl -fsS http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"bagel","messages":[{"role":"user","content":"Name one planet."}],"max_tokens":24}' \
  | python3 -c 'import json, sys; print(json.load(sys.stdin)["choices"][0]["message"]["content"])'
```

The command prints the model’s answer. To try the other half of BAGEL, [generate an image](https://docs.m-star.org/models/bagel.md). Stop the server with Ctrl+C in the first terminal.

## What next?

* For speech, video, or actions, [choose a model and its default GPU count](https://docs.m-star.org/models.md#matrix).
* To change ports, devices, or authentication, use the [CLI reference](https://docs.m-star.org/reference/cli.md).
* To reuse compiled kernels and compare first launch with restart, see [cold start](https://docs.m-star.org/cold-start.md).


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