# yaml-language-server: $schema=https://recipes.vllm.ai/recipe.schema.json meta: title: "Ergo" slug: "ergo" provider: "Amazon FMR" description: "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." date_added: 2026-12-01 date_updated: 2026-12-01 tasks: - text performance_headline: "~200 output tok/s/GPU at 100 tok/s/user (1K in / 1K out) with DSpark on two 4-GPU GB300 trays (DP2 x TP4)" related_recipes: [] default_hardware: gb300 hardware: gb300: verified gb200: verified b300: verified h200: verified model: model_id: "Amazon-FMR/Ergo" min_vllm_version: "nightly" nightly_required: true # TODO(public image): replace with the public tag once published. docker_image: "inferactinc/dev:aag-ergo1-day0-x86_64-cu13-7fd7b0f" install: docker: note: "Serve from the Ergo day-0 image; no pip wheel is available yet." pip: false default_frontend: rust architecture: moe parameter_count: "1.1T" active_parameters: "55B" context_length: 1048576 # max_position_embeddings base_args: - "--max-model-len" - "1048576" - "--override-generation-config" - '{"max_new_tokens": 131072}' # = the reference's output-token limit - "--enable-prefix-caching" - "--async-scheduling" base_env: {} features: tool_calling: description: "Ergo tool-call parser with automatic tool choice. Constrains the tool-call envelope and declared tool names in the structural tag (--tool-strict-level function, matching the reference serving configuration); per-tool argument schemas are pinned when a tool sets strict: true." args: ["--enable-auto-tool-choice", "--tool-call-parser", "ergo", "--tool-strict-level", "function"] reasoning: description: "Ergo reasoning parser (thinking on by default, as in the reference chat format). Strict thinking is always on for Ergo: inside the block no special id but the close, and no empty block." args: ["--reasoning-parser", "ergo"] spec_decoding: description: "DSpark speculative decoding with the released draft Amazon-FMR/Ergo-dspark: 8 draft tokens per step, sampled drafts (probabilistic) verified with lossless block verification. The draft's sliding-window KV gets its own block pool (`--draft-kv-pool`)." # Fixed K. enable_adaptive_verification gives +4-13% throughput at c32-128 on GB300 but turns off balanced decode and is slower at c1. args: - "--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" opt_in_features: [] variants: default: precision: mxfp4 supported_hardware: - gb300 - gb200 - b300 - h200 # Routed experts ~1.08T params at 4.25 bits (~575 GB) plus the BF16 # remainder with the shared expert replicated per GPU (~245 GB on 8 GPUs, # from the MXFP8 load measured on 8 x B300), x 1.2. vram_minimum_gb: 980 description: "MXFP4 routed experts (1x32, UE8M0), everything else BF16, FP32 embedding and LM head." mxfp8: model_id: "Amazon-FMR/Ergo-mxfp8" label: "MXFP8" precision: mxfp8 supported_hardware: - gb300 - gb200 - b300 # 157.8 GiB per GPU measured after load on 8 x B300 (EP8), ~1.36 TB, x 1.2. vram_minimum_gb: 1627 description: "MXFP8 routed experts (1x32, UE8M0), everything else BF16, FP32 embedding and LM head." bf16: model_id: "Amazon-FMR/Ergo-bf16" label: "BF16 (online MXFP8)" precision: mxfp8 supported_hardware: - gb300 - gb200 - b300 vram_minimum_gb: 1627 description: "BF16 checkpoint; routed experts quantized to MXFP8 (1x32, UE8M0) at load, bit-identical to the reference's online quantization." extra_args: - "--quantization" - "online" - "--quantization-config" - '{"moe":"mxfp8"}' compatible_strategies: - single_node_tep - single_node_dep - multi_node_dep hardware_overrides: {} strategy_overrides: {} presets: b300_tp8: label: "TP8, EP8, FP8 KV (1 node)" hardware: b300 strategy: single_node_tep variants: [default, mxfp8, bf16] workload: "Chat / agentic" default: true description: "One engine on one 8 x B300 node: attention TP8, routed experts EP8 on DeepGEMM MegaMoE with the BF16 shared expert fused into the same launch, DSpark draft with 8 tokens, an FP8 KV cache on the global-attention and draft layers (sliding-window layers BF16), balanced decode, batch-sharded sampling and the prefill GEMM + collective fusion." select: frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: - "--tensor-parallel-size" - "8" - "--data-parallel-size" - "1" - "--moe-backend" - "deep_gemm_mega_moe" - "--attention-backend" - "FLASHINFER" - "--kv-cache-dtype" - "fp8" - "--kv-cache-dtype-skip-layers" - "sliding_window" - "--enable-batch-sharded-sampling" - "--max-num-seqs" - "64" # The default on GPUs with >= 160 GiB is 16384. - "--max-num-batched-tokens" - "8192" json_args: --attention-config: { disable_flashinfer_q_quantization: true, use_trtllm_attention: true, flashinfer_balanced_decode: true, flash_attn_balanced_decode: true } env: &blackwell_env VLLM_USE_RUST_FRONTEND: "1" VLLM_ENGINE_READY_TIMEOUT_S: "1800" VLLM_ERGO_SP_FUSED_ALL_GATHER_MIN_ROWS: "2048" VLLM_ENABLE_GEMM_RS: "1" PYTORCH_CUDA_ALLOC_CONF: "expandable_segments:True" runbook: | One aggregated engine on one 8 x B300 node: attention runs TP8 and the routed experts EP8 (32 experts per GPU). Each MoE layer is one DeepGEMM MegaMoE launch: dispatch and combine over its own symmetric memory, the routed ReLU² experts (MXFP4, or MXFP8 for the MXFP8 and BF16 variants), and the BF16 shared expert replicated on every GPU, each expert's output RMS-normalized with its own scale before the sum. The residual stream is token-sharded over the TP ranks, so a MoE layer runs no TP collective. MegaMoE needs the DeepGEMM build that `cmake/external_projects/deepgemm.cmake` pins. KV cache: FP8 (e4m3, scale 1.0) on the 16 global-attention target layers and the 5 DSpark draft layers; the sliding-window target layers stay BF16. Queries stay BF16 (`disable_flashinfer_q_quantization`; FP8 queries lower DSpark acceptance), and decode runs on trtllm-gen (`use_trtllm_attention`), which FlashInfer does not pick by itself with an FP8 KV cache. Leave `--gpu-memory-utilization` unset: the KV cache takes the memory measured free after warmup. Balanced decode (`flashinfer_balanced_decode`): with one long request among short ones, trtllm-gen reads that request's KV on only a few SMs; the flag runs the longest requests in launches of their own; `flash_attn_balanced_decode` does the same for the DSpark draft's FA4 decode by raising its split cap. Batch-sharded sampling: each TP rank verifies and drafts only its own requests instead of all-gathering the FP32 full-vocab logits. Prefill GEMM + collective fusion (`VLLM_ERGO_SP_FUSED_ALL_GATHER_MIN_ROWS=2048`, `VLLM_ENABLE_GEMM_RS=1`): in prefill steps the token-sharded all-gather before attention runs fused into the `wqkv` GEMM from 2048 gathered rows, and the attention `wo` GEMM runs fused with the reduce-scatter from 1024 tokens. Decode and verify batches stay below both thresholds. gb300_dep2_tp4: label: "DP2 x TP4, EP8, FP8 KV (2 trays)" hardware: gb300 strategy: multi_node_dep variants: [default, mxfp8, bf16] workload: "Chat / agentic" default: true description: "One engine over two 4-GPU GB300 trays: attention TP4 per tray and DP2 across trays, routed experts EP8 on DeepGEMM MegaMoE with the BF16 shared expert fused into the same launch, DSpark draft with 8 tokens, an FP8 KV cache on the global-attention and draft layers (sliding-window layers BF16), balanced decode, batch-sharded sampling and the prefill GEMM + collective fusion." select: nodes: 2 frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: # TP4 inside each tray, one DP rank per tray. - "--tensor-parallel-size" - "4" - "--data-parallel-size" - "2" - "--data-parallel-size-local" - "1" - "--moe-backend" - "deep_gemm_mega_moe" - "--attention-backend" - "FLASHINFER" - "--kv-cache-dtype" - "fp8" - "--kv-cache-dtype-skip-layers" - "sliding_window" - "--enable-batch-sharded-sampling" - "--max-num-seqs" - "64" - "--max-num-batched-tokens" - "8192" json_args: --attention-config: &blackwell_attention { disable_flashinfer_q_quantization: true, use_trtllm_attention: true, flashinfer_balanced_decode: true } env: &gb300_env <<: *blackwell_env NCCL_CUMEM_ENABLE: "1" NCCL_MNNVL_ENABLE: "1" runbook: | One aggregated engine over two GB300 trays (8 GPUs) in one NVL72 domain, with the MoE path, KV cache, attention config, sampling and prefill fusion of `b300_tp8`: attention runs TP4 inside each tray and DP2 across trays, and the routed experts run EP8 on one DeepGEMM MegaMoE launch per layer. NVLS stays on (NCCL default). With one DP rank per tray, each tray serves its own rank on its own API server (vLLM turns hybrid LB into external LB at local DP size 1). Put vllm-router >= 0.1.17 with `--policy sticky_least_loaded` in front of the two tray endpoints. A session's first request (keyed by `X-Session-ID`) goes to the DP rank with the fewest active sessions, and its later requests stay on that rank, so they reuse its prefix cache. A session idle longer than the TTL (`VLLM_ROUTER_SLL_SESSION_EXPIRATION_IN_S`, default 7200 s) may be re-placed. Send a session key on every request. vllm-router 0.1.17 does not balance requests without one: on Chat Completions it reads the key only from headers (`X-Session-ID` first), and it sends every request without a key to the same DP rank. Key each conversation or agent trajectory with its own `X-Session-ID`, for example with the OpenAI Python client `client.chat.completions.create(..., extra_headers={"X-Session-ID": conversation_id})`. For single-turn traffic (for example an eval harness), send a new `X-Session-ID` per request, or run the router with `--policy round_robin`. gb300_dep4_tp4: label: "DP4 x TP4, EP16, FP8 KV (4 trays)" hardware: gb300 strategy: multi_node_dep variants: [default, mxfp8, bf16] workload: "Chat / agentic" description: "`gb300_dep2_tp4` over four GB300 trays: attention TP4 per tray and DP4 across trays, routed experts EP16." select: nodes: 4 frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: - "--tensor-parallel-size" - "4" - "--data-parallel-size" - "4" - "--data-parallel-size-local" - "1" - "--moe-backend" - "deep_gemm_mega_moe" - "--attention-backend" - "FLASHINFER" - "--kv-cache-dtype" - "fp8" - "--kv-cache-dtype-skip-layers" - "sliding_window" - "--enable-batch-sharded-sampling" - "--max-num-seqs" - "64" - "--max-num-batched-tokens" - "8192" json_args: --attention-config: *blackwell_attention env: *gb300_env runbook: | The engine, router setup and session keys of `gb300_dep2_tp4` on four trays (16 GPUs): one API server per tray, vllm-router `--policy sticky_least_loaded` in front of the four tray endpoints. gb200_dep2_tp4: label: "DP2 x TP4, EP8, FP8 KV (2 trays)" hardware: gb200 strategy: multi_node_dep variants: [default] workload: "Chat / agentic" default: true description: "`gb300_dep2_tp4` on two GB200 trays, with NVLS off." select: nodes: 2 frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: - "--tensor-parallel-size" - "4" - "--data-parallel-size" - "2" - "--data-parallel-size-local" - "1" - "--moe-backend" - "deep_gemm_mega_moe" - "--attention-backend" - "FLASHINFER" - "--kv-cache-dtype" - "fp8" - "--kv-cache-dtype-skip-layers" - "sliding_window" - "--enable-batch-sharded-sampling" - "--max-num-seqs" - "64" - "--max-num-batched-tokens" - "8192" json_args: --attention-config: *blackwell_attention env: &gb200_env <<: *gb300_env NCCL_NVLS_ENABLE: "0" runbook: | The engine, router setup and session keys of `gb300_dep2_tp4` on two GB200 trays (8 GPUs) in one NVL72 domain, with MegaMoE built for SM100 from the same pinned DeepGEMM and NVLS off (`NCCL_NVLS_ENABLE=0`). The MXFP8 and BF16 variants run on `gb200_dep4_tp4`. gb200_dep4_tp4: label: "DP4 x TP4, EP16, FP8 KV (4 trays)" hardware: gb200 strategy: multi_node_dep variants: [default, mxfp8, bf16] workload: "Chat / agentic" description: "`gb200_dep2_tp4` over four GB200 trays: attention TP4 per tray and DP4 across trays, routed experts EP16." select: nodes: 4 frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: - "--tensor-parallel-size" - "4" - "--data-parallel-size" - "4" - "--data-parallel-size-local" - "1" - "--moe-backend" - "deep_gemm_mega_moe" - "--attention-backend" - "FLASHINFER" - "--kv-cache-dtype" - "fp8" - "--kv-cache-dtype-skip-layers" - "sliding_window" - "--enable-batch-sharded-sampling" - "--max-num-seqs" - "64" - "--max-num-batched-tokens" - "8192" json_args: --attention-config: *blackwell_attention env: *gb200_env runbook: | The engine, router setup and session keys of `gb300_dep2_tp4` on four GB200 trays (16 GPUs), NVLS off: one API server per tray, vllm-router `--policy sticky_least_loaded` in front of the four tray endpoints. h200_dep2_tp4: label: "DP2 x TP4, EP8 (1 node)" hardware: h200 strategy: single_node_dep variants: [default] workload: "Chat / agentic" default: true description: "One engine on one 8 x H200 node: attention TP4 and DP2, routed experts EP8 on Marlin (MXFP4 weights), all-gather / reduce-scatter dispatch, one API server per DP rank behind vllm-router, DSpark draft with 8 tokens." select: frontend: rust features: { tool_calling: true, reasoning: true, spec_decoding: true } args: - "--tensor-parallel-size" - "4" - "--data-parallel-size" - "2" - "--data-parallel-size-local" - "2" # One API server per DP rank (:8100 and :8101) for vllm-router. - "--data-parallel-multi-port-external-lb" # The MegaMoE per-expert norm runs only in the SM100 kernel. - "--moe-backend" - "marlin" - "--all2all-backend" - "allgather_reducescatter" - "--attention-backend" - "FLASHINFER" - "--max-num-seqs" - "32" env: VLLM_USE_RUST_FRONTEND: "1" VLLM_ENGINE_READY_TIMEOUT_S: "1800" NCCL_CUMEM_ENABLE: "1" # PyTorch symm-mem multimem all-reduce can deadlock from two streams (shared signal pad). VLLM_ALLREDUCE_USE_SYMM_MEM: "0" # No PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True: custom all-reduce IPC crashes with it. runbook: | Do not use the rendered vLLM Router tab for this preset: it routes `consistent_hash` to :8100 only, so the :8101 rank gets no traffic. Run this router instead: ```bash vllm-router \ --worker-urls http://localhost:8100 http://localhost:8101 \ --host 0.0.0.0 --port 8000 \ --policy sticky_least_loaded \ --request-timeout-secs 14400 --disable-retries \ --worker-startup-timeout-secs 1800 ``` One aggregated engine on one 8 x H200 node: attention runs TP4 and DP2, and the routed experts run EP8 on Marlin with the MXFP4 expert weights. Expert dispatch and combine are an all-gather and a reduce-scatter over the 8 GPUs. The KV cache is BF16; FlashInfer decodes on XQA. Load balance: `--data-parallel-multi-port-external-lb` starts one API server per DP rank, on :8100 and :8101, and vllm-router >= 0.1.17 `--policy sticky_least_loaded` on :8000 fronts both: a session's first request (keyed by `X-Session-ID`) goes to the DP rank with the fewest active sessions and its later turns stay there, so they reuse that rank's prefix cache. Send a session key on every request, as in `gb300_dep2_tp4`. guide: | ## Runtime Use the Ergo day-0 image until Ergo support is in a vLLM release: `inferactinc/dev:aag-ergo1-day0-x86_64-cu13-7fd7b0f` on x86_64 (B300, H200) and `inferactinc/dev:aag-ergo1-day0-arm64-cu13-7fd7b0f` on 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 `` 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)