{"slug": "day-0-support-for-amazon-ergo-on-vllm", "title": "Day 0 support for Amazon Ergo on vLLM", "summary": "VLLM shipped day-0 support for Amazon Ergo, a 1.1T-parameter sparse mixture-of-experts model with 55B active parameters per token and a 1M-token context window, built with Amazon Frontier Model Research (FMR) for long-horizon reasoning and agentic coding. The prebuilt multi-arch image vllm/vllm-openai:amazon-fmr-ergo runs on NVIDIA GB300, GB200, B300 and single-node 8× H200, with pre-quantized MXFP4 and MXFP8 checkpoints alongside BF16. On 8× B300, the native 5-layer DSpark draft model nearly triples single-user decode speed and delivers 1.66× aggregate throughput at concurrency 256 on SPEED-Bench, rising to 1.89× with opt-in adaptive verification.", "body_md": "# Day 0 support for Amazon Ergo on vLLM\n\nWe 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.\n\n## Highlights\n\n- **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.\n- **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).\n- **Hardware & parallelism:** Verified day-0 recipes across NVIDIA GB300, GB200, B300, and single-node 8× H200, powered by custom DeepGEMM MegaMoE and Marlin kernels.\n- **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.\n- **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.\n\n## Usage\n\nPrebuilt multi-arch (`x86_64` and `arm64`) image available on day 0:\n\n- **NVIDIA:**`vllm/vllm-openai:amazon-fmr-ergo`\n\nThe 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:\n\n```\nexport VLLM_USE_RUST_FRONTEND=1\n\nvllm serve Amazon-FMR/Ergo \\\n    --tensor-parallel-size 8 \\\n    --enable-expert-parallel \\\n    --moe-backend deep_gemm_mega_moe \\\n    --attention-backend FLASHINFER \\\n    --attention-config '{\"disable_flashinfer_q_quantization\":true,\"use_trtllm_attention\":true,\"flashinfer_balanced_decode\":true,\"flash_attn_balanced_decode\":true}' \\\n    --kv-cache-dtype fp8 \\\n    --kv-cache-dtype-skip-layers sliding_window \\\n    --draft-kv-pool \\\n    --enable-batch-sharded-sampling \\\n    --reasoning-parser ergo \\\n    --tool-call-parser ergo --enable-auto-tool-choice \\\n    --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\"}'\n```\n\nSend 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):\n\n```\ncurl http://localhost:8000/v1/chat/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"Amazon-FMR/Ergo\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Refactor this module.\"}]\n  }'\n```\n\n### Supported hardware configurations\n\n| Hardware | Default footprint | Parallelism | Highlights | \n|---|---|---|---|\n| **GB300** | 2 trays (8 GPUs); 4 trays opt. | DP2×TP4, EP8 (4 trays: DP4×TP4, EP16) | DeepGEMM MegaMoE · Selective FP8 KV + `--draft-kv-pool` | \n| **GB200** | 2 trays (MXFP4); 4 trays (MXFP8/BF16) | DP2×TP4, EP8 (4 trays: DP4×TP4, EP16) | DeepGEMM MegaMoE · Selective FP8 KV | \n| **B300** | 1 node (8 GPUs) | TP8, EP8 | DeepGEMM MegaMoE · Selective FP8 KV + balanced decode | \n| **H200** | 1 node (8 GPUs, MXFP4) | DP2×TP4, EP8 | Marlin W4A16 + fused Triton MXFP8 activation emulation | \n\n## Implementation details\n\n### Model architecture\n\nAmazon 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:\n\n| Component | Parameters | Runtime precision | \n|---|---|---|\n| Routed experts (63 × 256) | 1,082.5 B | MXFP4 / MXFP8 (1×32 UE8M0) | \n| Attention (64 layers, GQA 64Q / 8KV) | 9.7 B | BF16 | \n| Shared experts (63) | 8.5 B | BF16 | \n| Embedding & LM head (untied) | 4.3 B | FP32 | \n| Dense MLP (layer 0) & norms | 0.67 B | BF16 / FP32 | \n| **Total** | **1,105.6 B** |  | \n\n**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.\n\n**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.\n\n**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.\n\n**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.\n\n### Optimizations\n\n#### Blackwell (GB300, GB200, B300)\n\n- **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.\n- **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.\n- **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.\n- **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.\n\n#### Hopper (H200)\n\nWith 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.\n\n### DSpark\n\nAmazon 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.\n\n*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)).*\n\nOn SPEED-Bench qualitative on 8× B300 (MXFP4, K=8), DSpark expands the entire throughput–latency Pareto frontier:\n\n- **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×).\n- **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.\n\nDefault 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.\n\nEnable DSpark with (add `\"enable_adaptive_verification\":true` to enable adaptive verification):\n\n```\n--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\"}' \\\n    --draft-kv-pool\n```\n\n## Reinforcement learning in vLLM\n\nvLLM 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.\n\nAs 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`).\n\n## Acknowledgement\n\nThanks to the Amazon Frontier Model Research (FMR) team and the vLLM community for collaborating on day-0 Amazon Ergo support.\n\nContributors:\n\n- **Inferact:** David Cheung, Ao Shen\n- **Amazon:** Hao Liu, Younggyo Seo, Justin Chiu", "url": "https://wpnews.pro/news/day-0-support-for-amazon-ergo-on-vllm", "canonical_source": "https://vllm-project.github.io/2026/12/01/amazon-ergo.html", "published_at": "2026-12-01 00:00:00+00:00", "updated_at": "2026-12-01 21:14:26.837783+00:00", "lang": "en", "topics": ["large-language-models", "ai-infrastructure", "ai-tools", "ai-agents", "machine-learning"], "entities": ["vLLM", "Amazon Ergo", "Amazon Frontier Model Research", "NVIDIA GB300", "NVIDIA GB200", "NVIDIA B300", "NVIDIA H200", "SkyRL"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/day-0-support-for-amazon-ergo-on-vllm", "markdown": "https://wpnews.pro/news/day-0-support-for-amazon-ergo-on-vllm.md", "text": "https://wpnews.pro/news/day-0-support-for-amazon-ergo-on-vllm.txt", "jsonld": "https://wpnews.pro/news/day-0-support-for-amazon-ergo-on-vllm.jsonld"}}