# Amazon-FMR/Ergo — vLLM serving recipe

> 1.1T-parameter MoE (55B active): 256 non-gated ReLU² experts (top-8) + one shared expert with per-expert output RMSNorm, GQA attention with sliding window on 3 of every 4 layers, and a separately released DSpark draft.

Configuration: hardware `gb300` (4× GB300 NVL4) · strategy `single_node_tep` (Tensor + Expert Parallel) · variant `default` (MXFP4) · features `tool_calling`, `reasoning`, `spec_decoding` · frontend `rust`

- Interactive page: https://recipes.vllm.ai/Amazon-FMR/Ergo
- This configuration as JSON: https://recipes.vllm.ai/Amazon-FMR/Ergo.json?hardware=gb300

The commands below were rendered for exactly this configuration and take precedence over any example in the guide.

## Other configurations

Change the query string (the same parameters as the page URL) and fetch this URL again. Unknown or incompatible values fall back to the recipe default, so check the Configuration line.

- `hardware`: `h200`, `gb200`, `b300`, `gb300`
- `variant`: `default`, `mxfp8`, `bf16`
- `strategy`: `single_node_tep`, `single_node_dep`, `multi_node_dep` (multi-node strategies also need `nodes=<n>`)
- `features`: comma-separated list of `tool_calling`, `reasoning`, `spec_decoding` (default: `tool_calling`, `reasoning`, `spec_decoding`). Use `features=none` to turn them all off.
- `preset`: a tuned, evidence-backed configuration (`baseline` opts out of a default one). Each sets its own hardware and strategy:
  - `b300_tp8` — TP8, EP8, FP8 KV (1 node) (b300 · TEP · Chat / agentic · default): `hardware=b300&strategy=single_node_tep&preset=b300_tp8`
  - `gb300_dep2_tp4` — DP2 x TP4, EP8, FP8 KV (2 trays) (gb300 · Multi-node DEP · Chat / agentic · default): `hardware=gb300&strategy=multi_node_dep&preset=gb300_dep2_tp4`
  - `gb300_dep4_tp4` — DP4 x TP4, EP16, FP8 KV (4 trays) (gb300 · Multi-node DEP · Chat / agentic · opt-in): `hardware=gb300&strategy=multi_node_dep&preset=gb300_dep4_tp4`
  - `gb200_dep2_tp4` — DP2 x TP4, EP8, FP8 KV (2 trays) (gb200 · Multi-node DEP · Chat / agentic · default): `hardware=gb200&strategy=multi_node_dep&preset=gb200_dep2_tp4`
  - `gb200_dep4_tp4` — DP4 x TP4, EP16, FP8 KV (4 trays) (gb200 · Multi-node DEP · Chat / agentic · opt-in): `hardware=gb200&strategy=multi_node_dep&preset=gb200_dep4_tp4`
  - `h200_dep2_tp4` — DP2 x TP4, EP8 (1 node) (h200 · DEP · Chat / agentic · default): `hardware=h200&strategy=single_node_dep&preset=h200_dep2_tp4`

## Install

Requires vLLM >= nightly (not released yet — nightly wheel).

Docker image: `vllm/vllm-openai:amazon-fmr-ergo`

## Serve

```bash
export VLLM_USE_RUST_FRONTEND=1
vllm serve Amazon-FMR/Ergo \
  --max-model-len 1048576 \
  --override-generation-config '{"max_new_tokens": 131072}' \
  --enable-prefix-caching \
  --async-scheduling \
  --enable-expert-parallel \
  --tensor-parallel-size 4 \
  --enable-auto-tool-choice \
  --tool-call-parser ergo \
  --tool-strict-level function \
  --reasoning-parser ergo \
  --speculative-config '{"method":"dspark","model":"Amazon-FMR/Ergo-dspark","num_speculative_tokens":8,"attention_backend":"FLASH_ATTN","draft_sample_method":"probabilistic","rejection_sample_method":"block"}' \
  --draft-kv-pool
```

Docker equivalent:

```bash
docker run --gpus all \
  --privileged --ipc=host -p 8000:8000 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -e VLLM_USE_RUST_FRONTEND=1 \
  vllm/vllm-openai:amazon-fmr-ergo Amazon-FMR/Ergo \
  --max-model-len 1048576 \
  --override-generation-config '{"max_new_tokens": 131072}' \
  --enable-prefix-caching \
  --async-scheduling \
  --enable-expert-parallel \
  --tensor-parallel-size 4 \
  --enable-auto-tool-choice \
  --tool-call-parser ergo \
  --tool-strict-level function \
  --reasoning-parser ergo \
  --speculative-config '{"method":"dspark","model":"Amazon-FMR/Ergo-dspark","num_speculative_tokens":8,"attention_backend":"FLASH_ATTN","draft_sample_method":"probabilistic","rejection_sample_method":"block"}' \
  --draft-kv-pool
```

## Guide

> Background reference. Commands in it are examples and may target another configuration — use the Serve section above.

### Runtime

Use the dedicated Ergo image `vllm/vllm-openai:amazon-fmr-ergo` until Ergo support is in a vLLM release. The tag is multi-arch: x86_64 (B300, H200) and arm64 (GB300, GB200).

### Overview

Ergo is a 1.1T-parameter MoE with 55B active parameters: 64 layers, hidden size 8192, a 262144-token vocabulary, 256 non-gated ReLU² experts (top-8, sigmoid router with bias, routed scaling 2.828) plus one shared expert, and a per-expert RMSNorm on every expert output. Attention is GQA (64 query, 8 KV heads) with QK-norm; three of every four layers use a 512-token sliding window with RoPE, every fourth layer is global and NoPE. The residual stream is FP32 with sandwich norms and a gated residual. The DSpark draft is released separately as `Amazon-FMR/Ergo-dspark`.

### Checkpoints

| Repo | Experts | Loading |
| --- | --- | --- |
| `Amazon-FMR/Ergo` (default) | MXFP4 | as released, no quantization flag |
| `Amazon-FMR/Ergo-mxfp8` | MXFP8 | as released, no quantization flag |
| `Amazon-FMR/Ergo-bf16` | BF16 | `--quantization online --quantization-config '{"moe":"mxfp8"}'`: experts quantized to MXFP8 at load |

Everything but the routed experts is BF16 in all three, with an FP32 embedding and LM head.

### Tokenizer

The repos ship `tokenizer.json`, `tokenizer_config.json` and `tokenizer.model`, so no `--tokenizer` flag is needed. The Rust frontend, which this recipe uses, loads `tokenizer.json`; the Python side reads `tokenizer.model`. Control tokens such as `<ctrl100>` spelled in text never encode to that token (`split_special_tokens`, on by default for Ergo). To serve with the Python frontend, set `VLLM_USE_RUST_FRONTEND=0`.

### References

- Model cards: [Amazon-FMR/Ergo](https://huggingface.co/Amazon-FMR/Ergo), [Amazon-FMR/Ergo-mxfp8](https://huggingface.co/Amazon-FMR/Ergo-mxfp8), [Amazon-FMR/Ergo-bf16](https://huggingface.co/Amazon-FMR/Ergo-bf16), [Amazon-FMR/Ergo-dspark](https://huggingface.co/Amazon-FMR/Ergo-dspark)
