# Day 0 support for Amazon Ergo on vLLM

> Source: <https://vllm-project.github.io/2026/12/01/amazon-ergo.html>
> Published: 2026-12-01 00:00:00+00:00

**Key takeaway:** Selective FP8 KV caching on the global and draft layers nearly doubles GPU KV capacity at BF16 accuracy parity, and on 8× B300 the default DSpark speculator delivers 1.66× aggregate throughput at concurrency 256 on SPEED-Bench, rising to 1.89× with adaptive verification.

# Day 0 support for Amazon Ergo on vLLM

We worked with Amazon Frontier Model Research (FMR) to bring **Amazon Ergo** to vLLM on day 0. Amazon Ergo is a 1.1T-parameter sparse mixture-of-experts (MoE) model with 55B active parameters per token and a 1M-token context window, built for long-horizon reasoning and agentic coding. It combines non-gated ReLU² experts with per-expert RMSNorm, 3:1 sliding-window and global NoPE attention, a 262K vocabulary, and a native 5-layer DSpark speculator.

## Highlights

- **Architecture:** 1.1T total parameters (55B active), 64 layers (1 dense + 63 MoE with 256 non-gated ReLU² experts, top-8 + 1 shared expert), 3:1 SWA-512 / global NoPE attention, 262K vocabulary, and a 1M-token context window.
- **Quantization:** Ships as pre-quantized MXFP4 (`Amazon-FMR/Ergo` ) and MXFP8 (`Amazon-FMR/Ergo-mxfp8` ) alongside BF16 (`Amazon-FMR/Ergo-bf16` , online-quantizable to MXFP8 at load).
- **Hardware & parallelism:** Verified day-0 recipes across NVIDIA GB300, GB200, B300, and single-node 8× H200, powered by custom DeepGEMM MegaMoE and Marlin kernels.
- **Long-context KV cache:** Selective FP8 KV caching on the global and draft layers nearly doubles GPU KV capacity at BF16 accuracy parity, paired with`--draft-kv-pool` to isolate the sliding-window DSpark draft cache.
- **Speculative decoding & RL:** Native 5-layer DSpark draft model (`Amazon-FMR/Ergo-dspark` ). On 8× B300, default DSpark nearly triples single-user decode speed and delivers 1.66× the aggregate throughput at concurrency 256 on SPEED-Bench; opt-in adaptive verification raises that to 1.89×. Day-0 LoRA RL is also supported with SkyRL.

## Usage

Prebuilt multi-arch (`x86_64` and `arm64`) image available on day 0:

- **NVIDIA:**`vllm/vllm-openai:amazon-fmr-ergo`

The Rust frontend (`VLLM_USE_RUST_FRONTEND=1`) is enabled by default across all recipes. Run the minimal single-node 8× B300 (TP8, EP8) command below inside the `vllm/vllm-openai:amazon-fmr-ergo` container; see the [Amazon Ergo recipe](https://recipes.vllm.ai/Amazon-FMR/Ergo) for multi-tray GB300/GB200, H200, and full tuning flags:

```
export VLLM_USE_RUST_FRONTEND=1

vllm serve Amazon-FMR/Ergo \
    --tensor-parallel-size 8 \
    --enable-expert-parallel \
    --moe-backend deep_gemm_mega_moe \
    --attention-backend FLASHINFER \
    --attention-config '{"disable_flashinfer_q_quantization":true,"use_trtllm_attention":true,"flashinfer_balanced_decode":true,"flash_attn_balanced_decode":true}' \
    --kv-cache-dtype fp8 \
    --kv-cache-dtype-skip-layers sliding_window \
    --draft-kv-pool \
    --enable-batch-sharded-sampling \
    --reasoning-parser ergo \
    --tool-call-parser ergo --enable-auto-tool-choice \
    --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"}'
```

Send a chat completion request (when running multiple DP ranks behind `vllm-router`, pass `X-Session-ID` to pin each multi-turn session to one DP rank for prefix-cache reuse):

```
curl http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "Amazon-FMR/Ergo",
    "messages": [{"role": "user", "content": "Refactor this module."}]
  }'
```

### Supported hardware configurations

| Hardware | Default footprint | Parallelism | Highlights | 
|---|---|---|---|
| **GB300** | 2 trays (8 GPUs); 4 trays opt. | DP2×TP4, EP8 (4 trays: DP4×TP4, EP16) | DeepGEMM MegaMoE · Selective FP8 KV + `--draft-kv-pool` | 
| **GB200** | 2 trays (MXFP4); 4 trays (MXFP8/BF16) | DP2×TP4, EP8 (4 trays: DP4×TP4, EP16) | DeepGEMM MegaMoE · Selective FP8 KV | 
| **B300** | 1 node (8 GPUs) | TP8, EP8 | DeepGEMM MegaMoE · Selective FP8 KV + balanced decode | 
| **H200** | 1 node (8 GPUs, MXFP4) | DP2×TP4, EP8 | Marlin W4A16 + fused Triton MXFP8 activation emulation | 

## Implementation details

### Model architecture

Amazon Ergo is a 64-layer sparse MoE decoder (*d_model = 8192*, *vocab = 262,144*) with 1,105.6B total parameters (~55B active). Layer 0 is a dense ReLU² MLP; layers 1–63 are MoE layers with 256 routed experts (top-8) and one shared expert:

| Component | Parameters | Runtime precision | 
|---|---|---|
| Routed experts (63 × 256) | 1,082.5 B | MXFP4 / MXFP8 (1×32 UE8M0) | 
| Attention (64 layers, GQA 64Q / 8KV) | 9.7 B | BF16 | 
| Shared experts (63) | 8.5 B | BF16 | 
| Embedding & LM head (untied) | 4.3 B | FP32 | 
| Dense MLP (layer 0) & norms | 0.67 B | BF16 / FP32 | 
| **Total** | **1,105.6 B** |  | 

**Sandwich norms and gated FP32 residuals.** Every attention and FFN block applies pre- and post-RMSNorm in FP32 and updates the FP32 residual stream through a learned per-channel gate *s*: `h <- sigmoid(s) * post_norm(x) + sqrt(1 - sigmoid(s)^2) * h`, keeping residual variance stable across all 64 layers.

**3:1 hybrid SWA-512 / global NoPE attention.** Three of every four layers use 512-token sliding-window attention with FP32 RoPE; every fourth layer (16 total) attends over the full 1M context with no positional encoding, with per-head Q/K RMSNorm across all layers. Because only 16 layers store long-range KV, 1M-context KV storage is 4× smaller than an all-global stack.

**Non-gated ReLU² MoE with per-expert RMSNorm.** Both routed and shared experts use a two-matrix `relu(x W_up)^2 W_down` FFN with sigmoid routing and renormalized top-8 weights. Each active expert’s output is RMS-normalized with a per-expert learned scale *before* the weighted sum, so GEMM2 cannot fold routing weights ahead of normalization.

**Pre-quantized MXFP4 / MXFP8 weights.** Nearly 98% of the weights live in routed experts, which ship pre-quantized in MXFP4 (626 GB) and MXFP8 (1.17 TB) alongside BF16 (2.22 TB, quantizable to MXFP8 at load), while attention and shared experts stay in BF16 and the 262K embeddings/LM head stay in FP32.

### Optimizations

#### Blackwell (GB300, GB200, B300)

- **Single-launch DeepGEMM MegaMoE:** Standard SwiGLU MoE kernels cannot express Ergo’s non-gated ReLU² experts or per-expert output RMSNorm. On Blackwell, each MoE layer runs in a single DeepGEMM MegaMoE launch fusing symmetric-memory EP dispatch/combine, MXFP4 or MXFP8 routed experts, per-expert RMSNorm finalize, and the BF16 shared expert, while keeping the residual stream token-sharded across TP ranks to eliminate MoE TP all-reduces.
- **Prefill GEMM and collective fusion:** At attention boundaries, large prefill steps fuse token-sharded all-gather into`wqkv` and fuse`wo` with NVSwitch reduce-scatter (GEMM-RS), reducing long-prompt prefill latency without regressing decode.
- **Selective FP8 KV cache and private draft KV pool:** Quantizing only the 16 global target layers and 5 DSpark draft layers to FP8 while keeping all 48 sliding-window layers and queries in BF16 expands GPU KV capacity by 1.91× at BF16 accuracy parity. Adding`--draft-kv-pool` places the sliding-window DSpark layers in their own block pool so they are not padded to match the 16-layer target group.
- **Balanced decode, batch-sharded sampling, and Rust frontend:** Balanced decode (`flashinfer_balanced_decode` and FA4 balanced decode on B300) prevents a single 1M-context request from stalling sibling ranks in mixed-length batches. With a 262K FP32 vocabulary and K=8 verification,`--enable-batch-sharded-sampling` shards logits across TP ranks via all-to-all, while`vllm-rs` handles tokenization and Ergo’s reasoning and tool-calling parsers.

#### Hopper (H200)

With the pre-quantized MXFP4 checkpoint (`Amazon-FMR/Ergo`), a single 8× H200 node serves Ergo out of the box on Marlin W4A16 paired with a fused Triton MXFP8 activation quantize-dequantize kernel to match reference activation numerics. Two 8× H200 nodes are also validated for MXFP8. Serving behind `vllm-router --policy sticky_least_loaded` pins multi-turn trajectories to one DP rank for ~98% prefix-cache hit rates on agentic workloads like DeepSWE.

### DSpark

Amazon Ergo ships with a separately released 5-layer sliding-window DSpark draft model (`Amazon-FMR/Ergo-dspark`, SWA-32768, with a trained confidence head) that proposes 8 tokens per pass using probabilistic drafting and lossless block rejection sampling, with `--draft-kv-pool` isolating its sliding-window KV cache.

*Figure 4: Aggregate output throughput against per-user decode speed on 8 × NVIDIA B300 (TP8, EP8, MXFP4), one point per concurrency level from c1 to c256 ([open interactive chart](https://vllm-project.github.io/assets/interactive_pages/amazon-ergo-dspark-throughput.html)).*

On SPEED-Bench qualitative on 8× B300 (MXFP4, K=8), DSpark expands the entire throughput–latency Pareto frontier:

- **Single-user (`c=1`):** Fixed K=8 lifts decode speed from 101.4 → 300.9 tok/s/user (2.97×), and K=8 + Adaptive reaches 301.9 tok/s/user (2.98×).
- **High concurrency (`c=256`):** Fixed K=8 lifts aggregate throughput from 7,600 → 12,590 tok/s (1.66×) at 69.6 tok/s/user. Adaptive verification trims low-confidence tail draft tokens once batches become compute-bound, pushing aggregate throughput to 14,368 tok/s (1.89× vs no-spec) at 81.7 tok/s/user (2.01× vs no-spec) — +17.3% per-user and +14.1% aggregate over Fixed K=8.

Default day-0 recipes keep Fixed K=8 so `flashinfer_balanced_decode` stays active for mixed-length 1M-context agentic serving, while adaptive verification can be enabled for compute-bound high-concurrency workloads.

Enable DSpark with (add `"enable_adaptive_verification":true` to enable adaptive verification):

```
--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
```

## Reinforcement learning in vLLM

vLLM also supports Day-0 LoRA RL on Amazon Ergo as the rollout engine paired with [SkyRL](https://github.com/NovaSky-AI/SkyRL) and Megatron-Bridge across 16 colocated GB200 trays (64 GPUs). On the rollout side, four DP4×TP4 vLLM engines serve MXFP8 experts on the Rust frontend with DSpark speculative decoding (`K=7`) and the LoRA adapter applied on top. On the training side, Megatron-Bridge updates the adapter with matched Triton kernels, replays the rollout’s MoE routing (R3), applies token-level truncated importance sampling (TIS), and syncs updated LoRA weights back to vLLM over NCCL after each step.

As an end-to-end validation, we trained for 50 steps on DAPO-Math-17K; AIME-2024 accuracy (`mean@8`, up to 4K tokens per response) rose from 30.4% at step 0 to 37.5% at step 50 (+7.08 percentage points, peaking at 38.8% at step 40), while online train–inference log-probability MAE stayed flat around 0.027 throughout the run. Implementation details and launch scripts are in [SkyRL PR #2841](https://github.com/skyrl-project/SkyRL/pull/2841) (validated at commit `d62611d`; requires a Megatron-Bridge build with `megatron.bridge.models.ergo` on `PYTHONPATH`).

## Acknowledgement

Thanks to the Amazon Frontier Model Research (FMR) team and the vLLM community for collaborating on day-0 Amazon Ergo support.

Contributors:

- **Inferact:** David Cheung, Ao Shen
- **Amazon:** Hao Liu, Younggyo Seo, Justin Chiu
