# How to Self-Host ERNIE 5.5 Flash Preview with SGLang or vLLM

> Source: <https://www.mindstudio.ai/blog/ernie-5-5-flash-preview-local-deployment/>
> Published: 2026-11-25 00:00:00+00:00

**Key takeaway:** ERNIE 5.5 Flash Preview ships FP4, FP8 and BF16 weights, and Baidu recommends the FP8 repo when hardware lacks FP4 kernels, reserving BF16 for fine-tuning; the reference SGLang and vLLM commands use 4-GPU parallelism at a 131,072-token default context, raised by one flag toward the full 1,048,576-to

# How to Self-Host ERNIE 5.5 Flash Preview with SGLang or vLLM

A practical guide to deploying Baidu's ERNIE 5.5 Flash Preview MoE model locally, covering FP4/FP8/BF16 weights and server setup.

## What is ERNIE 5.5 Flash Preview and can you run it locally?

ERNIE 5.5 Flash Preview is Baidu’s open-weight Mixture-of-Experts language model, released under Apache 2.0 on Hugging Face. It has 280 billion total parameters with 14 billion active per token, a 1-million-token context window, and built-in support for agentic coding, 3D modeling, and document work. You can run it yourself using SGLang or vLLM, but it requires multi-GPU serving infrastructure: this is not a model you load on a single consumer card. Baidu ships three weight formats (FP4 experts, FP8, and BF16) so you can match the deployment to the hardware you have.

## TL;DR

- **ERNIE 5.5 Flash Preview** is a 280B-parameter MoE model with 14B active parameters per token, built on ERNIE 5.5 Flash Base, and licensed under Apache 2.0 for open use.
- **Three weight formats ship on Hugging Face** : the default repo uses FP4 expert weights for speed, a separate FP8 repo works on hardware without FP4 kernels, and a BF16 repo is the starting point for fine-tuning.
- **The architecture mixes attention types** across its 43 layers, with 37 layers using Heavily Compressed Attention (HCA) to shrink the KV cache and 6 layers using sparse attention (DSA) for long-context efficiency.
- **Speculative decoding via DSpark** is baked into the released weights, letting the server draft multiple tokens in parallel and verify them in one pass, which speeds up long agent sessions.
- **Deployment is officially supported through SGLang and vLLM** , both with documented Docker and command-line setups that scale from a single high-memory node to multi-GPU tensor/data parallel configs.
- **Context length defaults to 131,072 tokens in the example commands** but both servers support scaling up to the full 1,048,576-token window by raising a single flag.
- **Benchmark scores put it in competitive territory** among similarly sized open models on coding, knowledge-work, and agentic tasks, though Baidu is explicit that this Preview is an intermediate post-training checkpoint, not a finished release.

**›** Build a claims-review app for 400 adjusters.

*already included:*✓ HIPAA✓ access control✓ audit log✓ self-hosted

## What hardware does ERNIE 5.5 Flash Preview need?

The model’s size dictates the hardware floor. With 280B total parameters, even the compressed FP4 release requires serious multi-GPU memory, and the officially referenced deployment guide (the SGLang Cookbook) targets B300-class GPU nodes. The example server commands in Baidu’s own documentation use tensor parallelism and data parallelism across 4 GPUs (`--tp 4` in SGLang, `--data-parallel-size 4` in vLLM), which is a reasonable floor for a single-node deployment at reduced context length.

Three factors drive VRAM needs:

- **Weight format** : FP4 expert weights are the smallest footprint since the 512 routed experts hold most of the parameters. FP8 roughly doubles that, and BF16 roughly doubles it again.
- **KV cache size** : Both reference commands set`--kv-cache-dtype fp8` (vLLM) or rely on FP8 KV cache by default, which keeps memory overhead down even at long context.
- **Context length** : The documented commands default to 131,072 tokens. Pushing toward the full 1,048,576-token window multiplies the KV cache footprint substantially, even with the HCA compression that keeps 37 of the model’s 43 layers cheap to cache.

If you don’t have FP4-capable kernels, Baidu explicitly recommends falling back to the FP8 repository, and reserves the BF16 repository for anyone planning to fine-tune rather than just serve the model.

## How do you deploy it with SGLang?

SGLang is one of two officially documented serving paths. The workflow uses a prebuilt Docker image from the SGLang team (`lmsysorg/sglang:latest`), mounting your local Hugging Face cache so weights don’t need a separate download step inside the container.

Inside the running container, the server launches with:

```
sglang serve \
  --model-path baidu/ERNIE-5.5-Flash-Preview \
  --host 0.0.0.0 \
  --port 30000 \
  --tp 4 \
  --attn-dp-size 4 \
  --context-length 131072 \
  --max-running-requests 128 \
  --speculative-algorithm DSPARK \
  --reasoning-parser ernie55 \
  --tool-call-parser ernie55 \
  --enable-dp-lm-head \
  --trust-remote-code
```

A few flags are worth understanding before you copy-paste this. `--tp 4` splits the model across 4 GPUs via tensor parallelism, while `--attn-dp-size 4` applies data parallelism to the attention layers specifically. `--speculative-algorithm DSPARK` turns on the model’s built-in draft head for speculative decoding, which is where a lot of the serving speed comes from. The `--reasoning-parser` and `--tool-call-parser` flags set `ernie55`, telling SGLang how to parse the model’s chain-of-thought and function-calling output formats. To go beyond the default 131K context, raise `--context-length` up to the model’s full 1,048,576-token limit.

## How do you deploy it with vLLM?

The vLLM path requires an extra plugin package on top of the base vLLM install, since ERNIE’s architecture (Multi-Router Latent MoE, mixed HCA/DSA attention, the DSpark draft head) needs model-specific support code that isn’t in vanilla vLLM yet.

```
uv venv --python 3.12 ernie5-venv
source ernie5-venv/bin/activate

uv pip install vllm==0.32.0
uv pip install git+https://github.com/baidu/vLLM-ERNIE.git
```

Then the server starts with:

```
export VLLM_ENGINE_READY_TIMEOUT_S=3600
vllm serve baidu/ERNIE-5.5-Flash-Preview \
    --trust-remote-code \
    --host 0.0.0.0 \
    --port 30000 \
    --data-parallel-size 4 \
    --enable-expert-parallel \
    --kv-cache-dtype fp8 \
    --max-model-len 131072 \
    --reasoning-parser ernie5 \
    --tool-call-parser ernie5 \
    --enable-auto-tool-choice \
    --attention-config '{"indexer_kv_dtype":"mxfp4"}' \
    --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"probabilistic"}'
```

**›** Build a shift-handoff app for 900 nurses.

*already included:*✓ HIPAA✓ access control✓ audit log✓ self-hosted

The long engine-ready timeout (`VLLM_ENGINE_READY_TIMEOUT_S=3600`) is a practical hint about reality: loading a 280B-parameter MoE model across multiple GPUs takes time, and the default vLLM startup timeout isn’t generous enough. `--enable-expert-parallel` distributes the 512 routed experts across GPUs rather than replicating them, which is essential at this scale. The `--speculative-config` JSON sets DSpark to propose up to 7 tokens at a time using probabilistic sampling, matching Baidu’s guidance to use larger draft blocks at low concurrency and smaller ones (2-3 tokens) under heavy load.

## What quantization format should you pick?

This comes down to what your GPUs support and what you’re trying to do.

- **FP4 (default repo)** : Routed experts run as W4A8 (4-bit weights, 8-bit activations) using MXFP4, trained with quantization-aware training so the numerics match what the model saw during post-training. This is the fastest and smallest option, and Baidu says it comes with little accuracy loss because training and inference use identical quantization rules. It requires hardware with FP4 kernel support.
- **FP8 (blockwise)** : Used for all non-expert weights regardless of which repo you pick, and available as a full repo for hardware that lacks FP4 support. This is the safer default if you’re unsure about kernel compatibility.
- **BF16** : The uncompressed option, recommended specifically as the starting point if you plan to fine-tune the model rather than just serve it.

The KV cache runs in FP8 across all variants, and the DSA indexer (used in the 6 sparse-attention layers) runs in FP4 regardless of which main weight format you choose.

## Is ERNIE 5.5 Flash Preview worth deploying right now?

It depends on what you need. Baidu is upfront that this release is an intermediate post-training checkpoint, not the finished ERNIE 5.5 Flash. Some capabilities may still be rough because training isn’t complete, and the company says it’s watching real-world usage before finalizing the official release. On benchmarks spanning agentic coding, knowledge work, and reasoning, it performs competitively against similarly sized open models, though larger frontier models still lead on several reasoning-heavy tests.

For teams already running multi-GPU inference infrastructure and wanting to experiment with an open, Apache 2.0-licensed MoE model with long context and built-in speculative decoding, it’s a reasonable candidate to test now. For anyone wanting a finished, stable model to build production agents on, it may be worth waiting for the full release Baidu has signaled is coming.

## Frequently Asked Questions

### How much VRAM does ERNIE 5.5 Flash Preview need?

Baidu doesn’t publish an exact VRAM figure, but the reference deployment commands use 4-GPU tensor/data parallel setups at a reduced 131,072-token context, and the officially linked cookbook targets B300-class GPU nodes. Actual requirements scale with which weight format (FP4, FP8, or BF16) and how much context length you configure.

### What’s the difference between the FP4, FP8, and BF16 repositories?

The default repository uses FP4 expert weights for the smallest footprint and fastest serving, requiring FP4-capable kernels. The FP8 repository is the fallback for hardware without FP4 support. The BF16 repository is uncompressed and recommended as the base for fine-tuning rather than serving.

### Can I run ERNIE 5.5 Flash Preview with its full 1-million-token context?

Yes. Both SGLang and vLLM support up to the full 1,048,576-token context window; the documented example commands default to 131,072 tokens to keep memory requirements lower, but you raise `--context-length` (SGLang) or `--max-model-len` (vLLM) to scale up.

### What is DSpark and why does it matter for serving speed?

Build an onboarding app for 4,000 new hires.

Build ↵
**Self-hosted**

**SOC 2**

**Role-based access**

**Audit log**

DSpark is a draft head trained alongside the main model that proposes a block of tokens in parallel for speculative decoding, which the main model then verifies in a single pass. It’s included in the released weights and enabled via `--speculative-algorithm DSPARK` (SGLang) or a `--speculative-config` block (vLLM), and Baidu recommends larger draft blocks at low concurrency and smaller ones at high concurrency.

### Is ERNIE 5.5 Flash Preview production-ready?

Baidu describes it as an intermediate checkpoint from an ongoing post-training process, not a finished model. It performs competitively on benchmarks against similarly sized open models, but the company says some capabilities may still fall short and that it’s using real-world feedback to inform the final release.
