{
  "hf_id": "baidu/ERNIE-5.5-Flash",
  "meta": {
    "title": "ERNIE-5.5-Flash",
    "slug": "ernie-5.5-flash",
    "provider": "Ernie (Baidu)",
    "description": "Deploy ERNIE-5.5-Flash with vLLM: Baidu's 280B-total / 14B-active Mixture-of-Experts model with hybrid HCA + MLA-DSA attention and up to 1M context, served through the vLLM-ERNIE plugin. The Base model (FP8, BF16) with ECHO (MTP) speculative decoding, and the ERNIE-5.5-Flash-Preview chat model (FP4, FP8, BF16) with reasoning, tool calling and DSpark speculative decoding, on B300, GB300, B200, GB200 and H100, with KV cache offload and PD disaggregation.",
    "performance_headline": "280B / 14B-active MoE with hybrid HCA + MLA-DSA attention, up to 1M context, ECHO (MTP) and DSpark speculative decoding",
    "date_added": "2026-11-05",
    "date_updated": "2026-11-23",
    "tasks": [
      "text"
    ],
    "related_recipes": [
      "baidu/ERNIE-4.5-21B-A3B-PT"
    ],
    "hardware": {
      "gb200": "verified",
      "h100": "verified",
      "mi300x": "unsupported",
      "mi325x": "unsupported",
      "mi350x": "unsupported",
      "mi355x": "unsupported"
    },
    "default_hardware": "gb200",
    "default_variant": {
      "h100": "preview_fp8"
    }
  },
  "recommended_command": {
    "hardware": "gb200",
    "strategy": "single_node_dep",
    "variant": "default",
    "node_count": 1,
    "deploy_type": "single_node",
    "env": {
      "VLLM_ENGINE_READY_TIMEOUT_S": "3600"
    },
    "docker_image": null,
    "command": "vllm serve baidu/ERNIE-5.5-Flash-Preview \\\n  --kv-cache-dtype fp8 \\\n  --max-model-len 131072 \\\n  --trust-remote-code \\\n  --reasoning-parser ernie5 \\\n  --tool-call-parser ernie5 \\\n  --enable-auto-tool-choice \\\n  --enable-expert-parallel \\\n  --port 8100 \\\n  --data-parallel-size 4 \\\n  --attention-config '{\"indexer_kv_dtype\":\"mxfp4\"}' \\\n  --speculative-config '{\"method\":\"dspark\",\"num_speculative_tokens\":7,\"draft_sample_method\":\"probabilistic\"}'",
    "argv": [
      "vllm",
      "serve",
      "baidu/ERNIE-5.5-Flash-Preview",
      "--kv-cache-dtype",
      "fp8",
      "--max-model-len",
      "131072",
      "--trust-remote-code",
      "--reasoning-parser",
      "ernie5",
      "--tool-call-parser",
      "ernie5",
      "--enable-auto-tool-choice",
      "--enable-expert-parallel",
      "--port",
      "8100",
      "--data-parallel-size",
      "4",
      "--attention-config",
      "{\"indexer_kv_dtype\":\"mxfp4\"}",
      "--speculative-config",
      "{\"method\":\"dspark\",\"num_speculative_tokens\":7,\"draft_sample_method\":\"probabilistic\"}"
    ],
    "docker_command": null,
    "docker_argv": null,
    "companions": [
      {
        "feature": "strategy:single_node_dep",
        "label": "vLLM Router",
        "after": true,
        "description": "Routes client requests across the DP ranks of the single engine process. --intra-node-data-parallel-size must match the engine's --data-parallel-size; consistent_hash keeps a conversation pinned to the rank that already holds its prefix. Requires: uv pip install vllm-router",
        "command": "vllm-router \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --policy consistent_hash \\\n  --intra-node-data-parallel-size 4 \\\n  --worker-urls http://localhost:8100 \\\n  --worker-startup-timeout-secs 1800"
      }
    ],
    "strategy_spec": {
      "name": "single_node_dep",
      "deploy_type": "single_node",
      "display_name": "Data + Expert Parallel",
      "short_label": "DEP",
      "orientation": "throughput",
      "description": "Single-node DEP. Expert layers are shared across all GPUs via EP, dense layers run independently in DP groups. Best throughput for MoE models on 8-GPU single nodes. For MoE models only.\n",
      "hardware_match": {
        "min_gpus": 2,
        "max_gpus": 8,
        "multi_node": false,
        "architecture": "moe"
      },
      "vllm_args": [
        "--enable-expert-parallel",
        "--port",
        "8100"
      ],
      "parallel_flag": "--data-parallel-size",
      "companion": {
        "label": "vLLM Router",
        "description": "Routes client requests across the DP ranks of the single engine process. --intra-node-data-parallel-size must match the engine's --data-parallel-size; consistent_hash keeps a conversation pinned to the rank that already holds its prefix.",
        "install": "uv pip install vllm-router",
        "start": "after",
        "command": "vllm-router \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --policy consistent_hash \\\n  --intra-node-data-parallel-size {dp_size} \\\n  --worker-urls http://localhost:{port} \\\n  --worker-startup-timeout-secs 1800\n"
      }
    },
    "hardware_profile": {
      "brand": "NVIDIA",
      "generation": "blackwell",
      "compute_arch": "sm100",
      "display_name": "GB200 NVL4",
      "description": "NVIDIA GB200 Grace-Blackwell compute tray · 192 GB HBM3e/GPU · 4 Blackwell GPUs (NVL72 tray unit)",
      "gpu_count": 4,
      "vram_gb": 768,
      "multi_node": false
    },
    "alternatives": {
      "single_node_tep": "/baidu/ERNIE-5.5-Flash/strategies/single_node_tep.json",
      "multi_node_dep": "/baidu/ERNIE-5.5-Flash/strategies/multi_node_dep.json",
      "pd_cluster": "/baidu/ERNIE-5.5-Flash/strategies/pd_cluster.json",
      "kv_store_distributed_mooncake": "/baidu/ERNIE-5.5-Flash/strategies/kv_store_distributed_mooncake.json"
    },
    "by_hardware": {
      "gb200": "/baidu/ERNIE-5.5-Flash/hw/gb200.json",
      "b200": "/baidu/ERNIE-5.5-Flash/hw/b200.json",
      "b300": "/baidu/ERNIE-5.5-Flash/hw/b300.json",
      "gb300": "/baidu/ERNIE-5.5-Flash/hw/gb300.json"
    }
  },
  "model": {
    "model_id": "baidu/ERNIE-5.5-Flash",
    "min_vllm_version": "0.32.0",
    "architecture": "moe",
    "parameter_count": "280B",
    "active_parameters": "14B",
    "context_length": 1048576,
    "base_args": [
      "--kv-cache-dtype",
      "fp8",
      "--max-model-len",
      "131072"
    ],
    "base_env": {
      "VLLM_ENGINE_READY_TIMEOUT_S": "3600"
    },
    "rust_frontend": "unsupported",
    "install": {
      "pip": {
        "command": "uv venv --python 3.12\nsource .venv/bin/activate\nuv pip install vllm==0.32.0\nuv pip install git+https://github.com/baidu/vLLM-ERNIE.git\n",
        "note": "ERNIE 5.5 runs through the vLLM-ERNIE plugin, which is pinned to vLLM 0.32.0"
      }
    }
  },
  "features": {
    "spec_decoding": {
      "description": "Speculative decoding: the Base checkpoints' built-in ECHO layer through vLLM's MTP path (2 draft steps by default; 1 or 3 also work), or the DSpark draft bundled with the ERNIE-5.5-Flash-Preview checkpoints.",
      "default_mode": "mtp2",
      "modes": {
        "mtp": {
          "label": "MTP, 1 step",
          "description": "Built-in ECHO (MTP) layer, 1 draft step; mean accept length 1.98 tokens per step (GSM8K, batch size 1).",
          "variants": [
            "fp8",
            "bf16"
          ],
          "args": [
            "--speculative-config",
            "{\"method\":\"mtp\",\"num_speculative_tokens\":1}"
          ]
        },
        "mtp2": {
          "label": "MTP, 2 steps",
          "description": "The ECHO (MTP) layer runs twice per step, drafting 2 tokens; mean accept length 2.39 tokens per step (GSM8K, batch size 1).",
          "variants": [
            "fp8",
            "bf16"
          ],
          "args": [
            "--speculative-config",
            "{\"method\":\"mtp\",\"num_speculative_tokens\":2}"
          ]
        },
        "mtp3": {
          "label": "MTP, 3 steps",
          "description": "The ECHO (MTP) layer runs three times per step, drafting 3 tokens; mean accept length 2.49 tokens per step (GSM8K, batch size 1).",
          "variants": [
            "fp8",
            "bf16"
          ],
          "args": [
            "--speculative-config",
            "{\"method\":\"mtp\",\"num_speculative_tokens\":3}"
          ]
        },
        "dspark": {
          "label": "DSpark",
          "description": "3-layer DSpark draft bundled with the ERNIE-5.5-Flash-Preview checkpoints, proposing a block of 7 tokens per step; mean accept length about 5.1 (FP4 on GB200). The Base checkpoints carry no DSpark draft.",
          "variants": [
            "default",
            "preview_fp8",
            "preview_bf16"
          ],
          "args": [
            "--speculative-config",
            "{\"method\":\"dspark\",\"num_speculative_tokens\":7,\"draft_sample_method\":\"probabilistic\"}"
          ]
        }
      }
    }
  },
  "variants": {
    "default": {
      "model_id": "baidu/ERNIE-5.5-Flash-Preview",
      "label": "Preview · FP4",
      "precision": "mxfp4",
      "vram_minimum_gb": 200,
      "description": "ERNIE-5.5-Flash-Preview chat model with MXFP4 routed experts (W4A8), FP8 elsewhere, and a bundled DSpark draft; ~155 GB of weights.",
      "supported_hardware": [
        "b300",
        "gb300",
        "b200",
        "gb200"
      ],
      "extra_args": [
        "--trust-remote-code",
        "--reasoning-parser",
        "ernie5",
        "--tool-call-parser",
        "ernie5",
        "--enable-auto-tool-choice"
      ],
      "default_modes": {
        "spec_decoding": "dspark"
      },
      "hardware_overrides": {
        "blackwell": {
          "extra_args": [
            "--attention-config",
            "{\"indexer_kv_dtype\":\"mxfp4\"}"
          ]
        }
      },
      "json": "/baidu/ERNIE-5.5-Flash-Preview.json"
    },
    "preview_fp8": {
      "model_id": "baidu/ERNIE-5.5-Flash-Preview-FP8",
      "label": "Preview · FP8",
      "precision": "fp8",
      "vram_minimum_gb": 347,
      "description": "ERNIE-5.5-Flash-Preview chat model in 128x128 block FP8 with a bundled DSpark draft; ~280 GB of weights.",
      "supported_hardware": [
        "b300",
        "gb300",
        "b200",
        "gb200",
        "h100"
      ],
      "extra_args": [
        "--trust-remote-code",
        "--reasoning-parser",
        "ernie5",
        "--tool-call-parser",
        "ernie5",
        "--enable-auto-tool-choice"
      ],
      "default_modes": {
        "spec_decoding": "dspark"
      },
      "hardware_overrides": {
        "blackwell": {
          "extra_args": [
            "--moe-backend",
            "humming"
          ]
        },
        "h100": {
          "extra_args": [
            "--gpu-memory-utilization",
            "0.93"
          ]
        }
      },
      "json": "/baidu/ERNIE-5.5-Flash-Preview-FP8.json"
    },
    "preview_bf16": {
      "model_id": "baidu/ERNIE-5.5-Flash-Preview-BF16",
      "label": "Preview · BF16",
      "precision": "bf16",
      "vram_minimum_gb": 688,
      "description": "ERNIE-5.5-Flash-Preview chat model in BF16 with a bundled DSpark draft; ~560 GB of weights.",
      "supported_hardware": [
        "b300",
        "gb300",
        "b200",
        "gb200",
        "h100"
      ],
      "extra_args": [
        "--trust-remote-code",
        "--reasoning-parser",
        "ernie5",
        "--tool-call-parser",
        "ernie5",
        "--enable-auto-tool-choice"
      ],
      "default_modes": {
        "spec_decoding": "dspark"
      },
      "hardware_overrides": {
        "gb200": {
          "vram_minimum_gb": 800
        },
        "h100": {
          "extra_args": [
            "--gpu-memory-utilization",
            "0.93"
          ]
        }
      },
      "json": "/baidu/ERNIE-5.5-Flash-Preview-BF16.json"
    },
    "fp8": {
      "model_id": "baidu/ERNIE-5.5-Flash-Base",
      "label": "Base · FP8",
      "precision": "fp8",
      "vram_minimum_gb": 347,
      "description": "ERNIE-5.5-Flash-Base, 128x128 block FP8 with UE8M0 scales; ~280 GB of weights.",
      "supported_hardware": [
        "b300",
        "gb300",
        "b200",
        "gb200",
        "h100"
      ],
      "hardware_overrides": {
        "blackwell": {
          "extra_args": [
            "--moe-backend",
            "humming"
          ]
        },
        "h100": {
          "extra_args": [
            "--gpu-memory-utilization",
            "0.93"
          ]
        }
      },
      "json": "/baidu/ERNIE-5.5-Flash-Base.json"
    },
    "bf16": {
      "model_id": "baidu/ERNIE-5.5-Flash-Base-BF16",
      "label": "Base · BF16",
      "precision": "bf16",
      "vram_minimum_gb": 688,
      "description": "ERNIE-5.5-Flash-Base in BF16; ~560 GB of weights.",
      "supported_hardware": [
        "b300",
        "gb300",
        "b200",
        "gb200",
        "h100"
      ],
      "hardware_overrides": {
        "gb200": {
          "vram_minimum_gb": 800
        },
        "h100": {
          "extra_args": [
            "--gpu-memory-utilization",
            "0.93"
          ]
        }
      },
      "json": "/baidu/ERNIE-5.5-Flash-Base-BF16.json"
    }
  },
  "kv_cache_strategy_hardware": {
    "kv_store_centralized_mooncake": {
      "gb200": "unsupported",
      "b200": "unsupported",
      "gb300": "unsupported",
      "b300": "unsupported"
    }
  },
  "kv_offload_support": {
    "offloading_fs": "verified",
    "lmcache": "unsupported"
  },
  "strategy_hardware": {
    "single_node_dep": {
      "amd": "unsupported"
    },
    "pd_cluster": {
      "amd": "unsupported"
    },
    "multi_node_dep": {
      "h100": "supported",
      "gb200": "supported"
    }
  },
  "hardware_overrides": {},
  "presets": {
    "b200_fp8": {
      "label": "FP8 · 4 GPUs",
      "hardware": "b200",
      "strategy": "single_node_dep",
      "variants": [
        "preview_fp8",
        "fp8"
      ],
      "default": true,
      "description": "The smallest GPU count that holds the FP8 weights with room for the KV cache.",
      "args": [
        "--data-parallel-size",
        "4"
      ],
      "json": "/baidu/ERNIE-5.5-Flash/presets/b200_fp8.json"
    },
    "gb300_fp8": {
      "label": "FP8 · 2 GPUs",
      "hardware": "gb300",
      "strategy": "single_node_dep",
      "variants": [
        "preview_fp8",
        "fp8"
      ],
      "default": true,
      "description": "The smallest GPU count that holds the FP8 weights with room for the KV cache.",
      "args": [
        "--data-parallel-size",
        "2"
      ],
      "json": "/baidu/ERNIE-5.5-Flash/presets/gb300_fp8.json"
    },
    "b300_fp8": {
      "label": "FP8 · 2 GPUs",
      "hardware": "b300",
      "strategy": "single_node_dep",
      "variants": [
        "preview_fp8",
        "fp8"
      ],
      "default": true,
      "description": "The smallest GPU count that holds the FP8 weights with room for the KV cache.",
      "args": [
        "--data-parallel-size",
        "2"
      ],
      "json": "/baidu/ERNIE-5.5-Flash/presets/b300_fp8.json"
    },
    "b300_bf16": {
      "label": "BF16 · 4 GPUs",
      "hardware": "b300",
      "strategy": "single_node_dep",
      "variants": [
        "preview_bf16",
        "bf16"
      ],
      "default": true,
      "description": "The smallest GPU count that holds the BF16 weights with room for the KV cache.",
      "args": [
        "--data-parallel-size",
        "4"
      ],
      "json": "/baidu/ERNIE-5.5-Flash/presets/b300_bf16.json"
    },
    "gb200_pd_mooncake": {
      "label": "1P1D Mooncake",
      "hardware": "gb200",
      "strategy": "pd_cluster",
      "default": true,
      "description": "One prefill and one decode GB200 tray (4 GPUs each), KV over Mooncake RDMA.",
      "select": {
        "pd_connector": "mooncake"
      },
      "json_args": {
        "--kv-transfer-config": {
          "kv_connector_extra_config": {
            "device_name": "mlx5_0,mlx5_1,mlx5_4,mlx5_5"
          }
        }
      },
      "roles": {
        "prefill": {
          "nodes": 1,
          "parallelism": "dep"
        },
        "decode": {
          "nodes": 1,
          "parallelism": "dep",
          "remove_args": [
            "--compilation-config"
          ]
        }
      },
      "runbook": "Tested as one prefill and one decode GB200 tray, each DP4 + EP4, KV\nover `MooncakeConnector` on InfiniBand. The router was vllm-router\n0.1.16 (`uv pip install vllm-router==0.1.16`). With speculative\ndecoding on, both roles get the same `--speculative-config`. Replace\n`device_name` in `--kv-transfer-config` with this node's InfiniBand\nHCAs (`ibdev2netdev` lists them).\n\nThe ERNIE-5.5-Flash-Preview FP4 checkpoint was also run as two\nprefill and two decode GB200 trays (2P2D) at\n`--max-model-len 1048576`, with DSpark and the MXFP4 indexer: chat\nGSM8K with thinking off 0.9636, needle retrieval at 128K / 510K / 930K\ntokens 9 of 9, and a DSpark mean accept length of about 5.1. Both\nroles get `--trust-remote-code` and the parser flags.\n",
      "json": "/baidu/ERNIE-5.5-Flash/presets/gb200_pd_mooncake.json"
    }
  },
  "notes": [
    {
      "title": "Chat flags for ERNIE-5.5-Flash-Preview",
      "when": {
        "variants": [
          "default",
          "preview_fp8",
          "preview_bf16"
        ]
      },
      "body": "The chat checkpoints always get `--trust-remote-code`,\n`--reasoning-parser ernie5`, `--tool-call-parser ernie5` and\n`--enable-auto-tool-choice`. Thinking is returned in\n`reasoning_content`, the answer in `content` and tool calls in\n`message.tool_calls`.\n"
    },
    {
      "title": "MXFP4 indexer",
      "when": {
        "variants": [
          "default"
        ],
        "hardware": [
          "blackwell"
        ]
      },
      "body": "The FP4 recipe passes `--attention-config '{\"indexer_kv_dtype\":\"mxfp4\"}'`,\nwhich keeps the DSA indexer's query and key cache in MXFP4. It needs\nBlackwell data-center GPUs (sm_10x: B200, GB200, B300, GB300) and the\ndefault context parallel sizes (prefill and decode context parallel 1).\nThe FP8 and BF16 recipes, and H100, keep the FP8 indexer.\n"
    },
    {
      "title": "Speculative decoding on both PD roles",
      "when": {
        "strategies": [
          "pd_cluster"
        ],
        "features": [
          "spec_decoding"
        ]
      },
      "body": "Prefill and decode must run the same `--speculative-config`; the\nbuilder adds it to both commands.\n"
    },
    {
      "title": "PD connector: Mooncake on GB200",
      "when": {
        "strategies": [
          "pd_cluster"
        ]
      },
      "body": "PD was validated with **Mooncake** (`MooncakeConnector` over RDMA) on\nGB200: 1P1D (one prefill and one decode tray, each DP4 + EP4), 2P2D,\nand 2P2D at 1M context with DSpark and the MXFP4 indexer, all behind\nvllm-router 0.1.16 (`uv pip install vllm-router==0.1.16`). On GB200\nthe 1P1D Mooncake preset makes Mooncake the default. NIXL has not been\ntested with ERNIE 5.5; other GPUs default to it. To use Mooncake on\nanother GPU, pick it on the PD Connector row and add `device_name` to\n`kv_connector_extra_config` in both roles' `--kv-transfer-config`,\nlisting this node's InfiniBand HCAs only (`ibdev2netdev` lists them),\nfor example\n`\"kv_connector_extra_config\":{\"device_name\":\"mlx5_0,mlx5_1,mlx5_4,mlx5_5\"}`.\nWith the empty default, Ethernet ports are picked too and transfers\nfail.\n"
    },
    {
      "title": "Longer context on H100",
      "when": {
        "hardware": [
          "h100"
        ]
      },
      "body": "The commands use the 128K training length. On 80 GB GPUs\n`--max-model-len 262144` was measured to work (301,900 KV tokens per\nrank at `--gpu-memory-utilization 0.93`). The checkpoint's 1,048,576 does\nnot fit: one 1M-token request needs 16.2 GiB of KV cache per GPU, and\nvLLM refuses to start.\n"
    },
    {
      "title": "Measured on H100 (FP8 Base)",
      "when": {
        "hardware": [
          "h100"
        ],
        "variants": [
          "fp8"
        ]
      },
      "body": "One 8 x H100 80 GB node, DP8 + EP8, `--gpu-memory-utilization 0.93`:\n301,900 KV cache tokens per rank (2.3 concurrent 128K requests, or\n1.15 at `--max-model-len 262144`). GSM8K 5-shot (full set) 94.9-96.1,\nand needle retrieval finds every needle up to 258K tokens. At 64\nconcurrent requests without a draft: about 3.3k output tokens/s, p50\nlatency about 5.0 s, TTFT about 0.4 s. On Hopper the `humming` MoE\nkernel gives the same accuracy as vLLM's default, so the recipe keeps\nthe default.\n"
    },
    {
      "title": "1M context",
      "when": {
        "hardware": [
          "b300",
          "gb300",
          "b200",
          "gb200"
        ]
      },
      "body": "The commands use the 128K training length (`--max-model-len 131072`).\nFor the full 1M, pass `--max-model-len 1048576`: each rank's KV cache\nmust hold whole 1M-token requests, so lower `--max-num-seqs` to fit, and\na 1M-token prefill needs extra temporary memory: add\n`--gpu-memory-utilization 0.85`.\n"
    }
  ],
  "troubleshooting": [
    {
      "title": "tool parser `ernie5` is not registered",
      "body": "The Rust frontend (`VLLM_USE_RUST_FRONTEND=1`) has no `ernie5`\nreasoning or tool-call parser and does not run the ERNIE chat renderer,\nso it fails at startup for ERNIE-5.5-Flash-Preview. Use the default\nPython frontend; the recipe disables the Rust option.\n"
    },
    {
      "title": "Architecture Ernie5_5_MoeForCausalLM is not supported",
      "body": "The vLLM-ERNIE plugin is not installed, or `VLLM_PLUGINS` excludes it.\nInstall it into the same environment as vLLM 0.32.0 and leave\n`VLLM_PLUGINS` unset (or include `ernie`).\n"
    },
    {
      "title": "Timed out waiting for engine core processes to start",
      "body": "Loading the weights and warming up the kernels takes longer than the\ndefault timeout. Set `VLLM_ENGINE_READY_TIMEOUT_S=3600`.\n"
    },
    {
      "title": "Out of memory during a 1M-token prefill",
      "body": "Lower `--gpu-memory-utilization` to 0.85 to leave room for the\ntemporary prefill buffers, and lower `--max-num-seqs`, or lower\n`--max-model-len`.\n"
    }
  ],
  "guide": "## Deployment\n\nPick your hardware, checkpoint and strategy in the builder above to\ngenerate the launch command. The FP8 and BF16 recipes run on the\nrecommended (smallest) GPU count through the default presets, and the\nFP4 recipe on one full node, all with vLLM's defaults and the 128K\ntraining context (`--max-model-len 131072`); size `--max-num-seqs` and\n`--max-model-len` to your own workload. Pick **Baseline** on the Preset\nrow to use the whole node.\n\n- **Speculative decoding** is on by default: ECHO through vLLM's MTP\n  path (2 draft steps) for ERNIE-5.5-Flash-Base, DSpark for\n  ERNIE-5.5-Flash-Preview. It gives the fastest replies for a single\n  user or light load. Turn **Spec Decoding** off for the most tokens per\n  second across many concurrent requests.\n- **PD Cluster.** One prefill and one decode GB200 tray, KV over Mooncake\n  RDMA (the default preset on GB200).\n\n| GPU | FP4 (~155 GB weights) | FP8 (~280 GB weights) | BF16 (~560 GB weights) |\n| :-- | :-- | :-- | :-- |\n| B300 / GB300 (288 GB) | 1 GPU | 2 GPUs | 4 GPUs |\n| B200 (192 GB) | 2 GPUs | 4 GPUs | 8 GPUs |\n| GB200 (192 GB) | 2 GPUs | 4 GPUs | 2 trays × 4 GPUs |\n| H100 (80 GB) | 4 GPUs | 8 GPUs | 2 nodes × 8 GPUs |\n\nThe table lists the smallest GPU count that holds the weights. FP4 is\nERNIE-5.5-Flash-Preview only. It was tested on full 4-GPU GB200 trays,\nand the builder offers it on Blackwell only.\nAll recipes run attention data parallel\nand the MoE expert parallel (`--data-parallel-size N --enable-expert-parallel`).\n\n## 1. Model introduction\n\n**ERNIE-5.5-Flash** is an efficient sparse Mixture-of-Experts language\nmodel with **280B total and 14B\nactivated parameters per token**, pre-trained from scratch on 33.5T tokens\nwith a training context of up to 128K. It comes as two models:\n**ERNIE-5.5-Flash-Base** (FP8 and BF16), taken at the end of pre-training\nbefore any mid- or post-training, a starting point for domain adaptation,\ninstruction tuning and reinforcement-learning research, served through the\ncompletions endpoint; and **ERNIE-5.5-Flash-Preview** (FP4 / FP8 / BF16),\nthe chat model, with reasoning, tool calling and a bundled DSpark draft.\n\nIts 43 layers are 1 dense FFN layer plus 42 Multi-Router Latent MoE layers.\nAttention is hybrid: 37 layers use Heavily Compressed Attention (HCA, one\ncached entry per 128 tokens plus a 128-token sliding window, 512-dim heads)\nand one in seven, 6 layers, keep full-context access through MLA with DSA\nsparse attention (256-dim heads). Every attention layer adds a low-rank\noutput gate, Virtual Head Attention (a low-rank post-mix across heads) and\nQK-norm. Each MoE layer has 512 routed experts (top-10) plus 1 shared expert\nin a 2048-d latent space, selected by several sigmoid routers.\nManifold-constrained hyper-connections (expansion rate 4) replace the\nresidual stream, a MultiMax head produces the logits, and ECHO reuses the\nfinal layer as a one-step speculative draft, which vLLM runs through its\nMTP path.\n\n| Model | Weights | Use |\n| :-- | :-- | :-- |\n| **ERNIE-5.5-Flash-Base** | [FP8](https://huggingface.co/baidu/ERNIE-5.5-Flash-Base) / [BF16](https://huggingface.co/baidu/ERNIE-5.5-Flash-Base-BF16) | Base model, completions, ECHO |\n| **ERNIE-5.5-Flash-Preview** | [FP4](https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview) / [FP8](https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview-FP8) / [BF16](https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview-BF16) | Chat, reasoning, tool calling, DSpark |\n\nAll checkpoints share the architecture above: 280B total / 14B activated\nparameters.\n\nTotal parameters include the input embedding and the output head; activated\nparameters count the output head but not the embedding lookup. Both exclude\nthe 0.36B ECHO parameters. The model was trained with a context of up to\n128K tokens (131,072); fine-tuning and inference support up to 1M\n(1,048,576); pass `--max-model-len 1048576` to use it (80 GB GPUs such as\nH100 reach 262,144).\n\nThe FP8 checkpoint uses 128x128 blocks with UE8M0 scales. It keeps the\nembedding, the output head, the MoE routers, the HCA compressor, the\nindexer, the VHA post-mix in BF16, and the mHC parameters in FP32; every other linear layer and the\nrouted experts are FP8. The FP4 checkpoint (ERNIE-5.5-Flash-Preview) stores\nthe routed experts in MXFP4 instead (W4A8), about 155 GB in total.\n\n**Sampling Defaults.** `temperature=1.0`, `top_p=0.95` (from the\ncheckpoint's `generation_config.json`). vLLM applies them when a request\nleaves them out and ignores `do_sample`, so the Base model, whose config\nsets `do_sample=false`, also samples at `temperature=1.0` by default; pass\n`temperature=0` for greedy decoding.\n\n**License.** The `LICENSE` file in each checkpoint; for\nERNIE-5.5-Flash-Base, the ERNIE 5.5 Flash Base Model License Agreement\nv1.0.\n\nvLLM serves the model through the out-of-tree\n[vLLM-ERNIE](https://github.com/baidu/vLLM-ERNIE) plugin on the released\nvLLM 0.32.0 wheel, without modifying vLLM. Set `VLLM_USE_MODELSCOPE=True`\nto download from ModelScope; the repo names are the same on both hubs.\n\n## 2. Configuration tips\n\n- **Parallelism.** Data + Expert Parallel holds the most KV cache and gives\n  the highest throughput. Tensor + Expert Parallel (TP 2, 4 or 8) lowers\n  latency at low concurrency but holds less KV cache, since the single KV\n  head is replicated on every TP rank.\n- **MoE Kernel.** The FP8 recipes on Blackwell pass `--moe-backend humming`,\n  which supports SiTU with FP8 weights; on Hopper they keep vLLM's default.\n  The FP4 and BF16 recipes use vLLM's default MoE kernel.\n- **Long Context.** Every recipe passes `--max-model-len 131072`, the\n  128K training length. The checkpoint allows 1,048,576: on Blackwell pass\n  `--max-model-len 1048576`, lower `--max-num-seqs` so each rank's KV\n  cache holds whole 1M-token requests, and pass\n  `--gpu-memory-utilization 0.85`, since a 1M-token prefill needs tens of\n  GB of temporary memory on top. On 80 GB GPUs 1M does not fit and vLLM\n  fails at startup; H100 reaches 262,144 at `--gpu-memory-utilization 0.93`.\n- **MXFP4 Indexer.** On Blackwell the ERNIE-5.5-Flash-Preview FP4 recipe\n  passes `--attention-config '{\"indexer_kv_dtype\":\"mxfp4\"}'`, which keeps\n  the DSA indexer's query and key cache in MXFP4. It needs Blackwell\n  data-center GPUs (sm_10x: B200, GB200, B300, GB300) and the default\n  context parallel sizes; on other GPUs, or with prefill or decode context\n  parallelism, drop it to keep the FP8 indexer. The FP8 and BF16 recipes\n  keep the FP8 indexer.\n- **KV Cache.** Every recipe passes `--kv-cache-dtype fp8`, which stores\n  the KV cache in FP8 and is what was tested; `auto` keeps it in BF16.\n- **FlashIndexer.** Off by default; pass\n  `--hf-overrides '{\"enable_flashindexer\": true}'` to cut the DSA\n  indexer's prefill cost at long context. See 3.6.\n\n## 3. Advanced usage\n\n### 3.1 Completions (Base)\n\nAs a base model, ERNIE-5.5-Flash-Base continues text: send prompts to\n`/v1/completions`. It has no chat, reasoning or tool-call training, so chat\nrequests, `--reasoning-parser` and `--tool-call-parser` do not apply. For\nfew-shot use, put the examples in the prompt and stop at the end of one\nanswer.\n\n```bash\ncurl http://localhost:8000/v1/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"baidu/ERNIE-5.5-Flash-Base\",\n    \"prompt\": \"Question: What is 15% of 240?\\nAnswer:\",\n    \"max_tokens\": 64,\n    \"temperature\": 0,\n    \"stop\": [\"\\n\"]\n  }'\n```\n\nThe completion text in the response is ` 36`.\n\n### 3.2 Chat and reasoning (ERNIE-5.5-Flash-Preview)\n\nERNIE-5.5-Flash-Preview is the chat model: send messages to\n`/v1/chat/completions`. Its commands always pass `--trust-remote-code`\nand `--reasoning-parser ernie5`, so thinking lands in `reasoning_content`\nand the answer in `content`. Thinking is on by default; to turn it off\nfor a request, pass `enable_thinking: false` through\n`chat_template_kwargs` (the chat template reads `enable_thinking`, not\n`thinking`).\n\n```bash\n# Thinking is on by default.\ncurl http://localhost:8000/v1/chat/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"baidu/ERNIE-5.5-Flash-Preview\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is 15% of 240?\"}],\n    \"max_tokens\": 4096\n  }'\n\n# Turn it off for one request.\ncurl http://localhost:8000/v1/chat/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"baidu/ERNIE-5.5-Flash-Preview\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is 15% of 240?\"}],\n    \"max_tokens\": 4096,\n    \"chat_template_kwargs\": {\"enable_thinking\": false}\n  }'\n```\n\nFor the FP8 or BF16 checkpoint, set `\"model\"` to\n`baidu/ERNIE-5.5-Flash-Preview-FP8` or `baidu/ERNIE-5.5-Flash-Preview-BF16`.\nWith DSpark and the MXFP4 indexer, the FP4 checkpoint scored 0.9636 on\nchat GSM8K with thinking off, on GB200 at 1M context.\n\n### 3.3 Tool calling (ERNIE-5.5-Flash-Preview)\n\nThe Preview commands also pass `--tool-call-parser ernie5\n--enable-auto-tool-choice`. Tool calls are returned in\n`message.tool_calls`; `\"parallel_tool_calls\": false` limits a response to\none tool call.\n\n```bash\ncurl http://localhost:8000/v1/chat/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"baidu/ERNIE-5.5-Flash-Preview\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Beijing?\"}],\n    \"tools\": [{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"Get the current weather in a city\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}}],\n    \"max_tokens\": 4096\n  }'\n```\n\n### 3.4 KV cache offload\n\nLong shared prefixes (system prompts, agent histories) can stay outside\nGPU memory after they leave the GPU cache and be loaded back instead of\nrecomputed. Pick one on the **KV Offload** row:\n\n- **Simple.** Host memory per DP rank (`SimpleCPUOffloadConnector`).\n  `cpu_bytes_to_use_per_rank` is pinned per rank, so the rank count times\n  this value must stay below the node's RAM. On a GB200 tray (4 ranks) the\n  default 220 GiB per rank is too much; set it to 128 GiB\n  (`\"cpu_bytes_to_use_per_rank\": 137438953472`).\n- **CPU + Filesystem.** A small CPU staging tier in front of files under\n  `root_dir`. Point it at fast local NVMe with plenty of space: ERNIE 5.5's\n  KV blocks took about 280 KB per token on disk in our runs.\n- **Mooncake (Distributed).** Each GPU contributes host memory to a\n  Mooncake pool. Install `mooncake-transfer-engine-cuda13` (vLLM 0.32.0\n  ships CUDA 13), and set `MOONCAKE_DEVICE_NAME` to the InfiniBand HCAs only,\n  for example `mlx5_0,mlx5_1,mlx5_4,mlx5_5` (`ibdev2netdev` lists them);\n  with the empty default, Ethernet ports are picked too and transfers fail.\n\n### 3.5 Speculative decoding\n\n**ECHO (MTP).** The Base checkpoints carry one ECHO layer after the main stack:\nthe backbone's own final layer, trained to predict future tokens, doubles\nas the draft. vLLM runs it through its MTP path: pick **MTP, 1 / 2 / 3\nsteps** under the **Spec Decoding** toggle, which sets\n`--speculative-config '{\"method\":\"mtp\",\"num_speculative_tokens\":N}'`. The\nlayer was trained for one future token and can draft several steps by\nrunning again; the recipe defaults to 2 steps. Measured on GSM8K at\nbatch size 1 with greedy decoding, the mean accept length is\n1.98 / 2.39 / 2.49 tokens per step for 1 / 2 / 3 draft steps, with\nunchanged accuracy; 2 steps take most of the gain.\n\n**DSpark (ERNIE-5.5-Flash-Preview).** The Preview checkpoints bundle a\n3-layer DSpark draft, conditioned on the target's last 3 layers, that\nproposes a block of 7 tokens per step; the Base checkpoints carry none.\nPicking a **Preview** checkpoint above turns on the **DSpark** mode:\n`--speculative-config '{\"method\":\"dspark\",\"num_speculative_tokens\":7,\"draft_sample_method\":\"probabilistic\"}'`.\nvLLM's default `draft_sample_method` is `greedy`; the recipe uses\n`probabilistic`. The mean accept length was about 5.1 tokens per step on\nthe FP4 checkpoint (GB200, PD, 1M context). Turn **Spec Decoding** off to\nserve without a draft.\n\n### 3.6 FlashIndexer\n\nFlashIndexer attaches a lightweight head router to the DSA indexer of the\n6 MLA-DSA layers. For each token the router looks only at that token's own\nhidden state and selects 8 of the 64 indexer heads for sparse selection,\nwhich cuts sparse-indexing computation in prefill and keeps the routing\ncost independent of context length. The DSA interface and the downstream\nsparse attention are unchanged, and the MTP and DSpark drafts keep all\nheads. Add to any command:\n\n```bash\n--hf-overrides '{\"enable_flashindexer\": true}'\n```\n\nThe router weights are read from the checkpoint's `flashindexer/`\nsubfolder; a checkpoint without it exits at startup, so drop the flag\nthere to run all heads. FlashIndexer needs CUDA with vLLM's DeepGEMM\nindexer.\n\n### 3.7 Prefill / decode disaggregation\n\nPick **PD Cluster** as the strategy; on GB200 the 1P1D Mooncake preset\nis the default. The tested setup is one prefill and one decode GB200\ntray with `MooncakeConnector` over RDMA, each DP4 + EP4, with decode on\nvLLM's default CUDA graph mode. Install `mooncake-transfer-engine-cuda13`\non both trays, and set `device_name` in `--kv-transfer-config` to the\nInfiniBand HCAs only (`ibdev2netdev` lists them). Start\nprefill, then decode, then the router (tested with `vllm-router==0.1.16`),\nand send requests to the router. With speculative decoding, pass the same\n`--speculative-config` to the prefill and decode servers. For\nERNIE-5.5-Flash-Preview, both servers also get `--trust-remote-code` and\nthe parser flags; the builder adds them. The FP4 Preview checkpoint was\nalso run as 2P2D GB200 trays at 1M context, where needle retrieval at\n128K, 510K and 930K tokens found 9 of 9 needles.\n\n## References\n\n- [vLLM-ERNIE plugin](https://github.com/baidu/vLLM-ERNIE)\n- [Hugging Face: ERNIE-5.5-Flash-Base](https://huggingface.co/baidu/ERNIE-5.5-Flash-Base)\n- [Hugging Face: ERNIE-5.5-Flash-Preview](https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview)\n- [ModelScope](https://modelscope.cn/models/baidu/ERNIE-5.5-Flash-Base)\n- [Technical report](https://ernie.baidu.com/release/ernie-5-5-flash-base/)\n",
  "source": {
    "source": "vllm",
    "repo": "vllm-project/vllm",
    "ref": "main",
    "sha": "d51a5147112a31dfbed08cfa4b774c27c34ce90d",
    "path": "recipes/models/baidu/ERNIE-5.5-Flash.yaml",
    "edit_url": "https://github.com/vllm-project/vllm/edit/main/recipes/models/baidu/ERNIE-5.5-Flash.yaml",
    "overlays": []
  }
}