---
title: "What Is DSpark? How ERNIE 5.5 Flash Serves Cheaply"
url: "https://goremy.ai/blog/articles/ernie-5-5-flash-dspark-w4a8-inference-explained"
author: Luis Chavez-Mattos
editor: Luis Chavez-Mattos
editor_title: Director, Product
published: "2026-11-25T08:20:29.796Z"
updated: "2026-11-25T08:20:29.796Z"
topic: AI Models & Industry
description: "DSpark, W4A8 and compressed attention explained in plain words: how ERNIE 5.5 Flash Preview is built to be cheap to serve, including a 40% indexer speedup."
---

# What Is DSpark? How ERNIE 5.5 Flash Serves Cheaply

> DSpark, W4A8 and compressed attention explained in plain words: how ERNIE 5.5 Flash Preview is built to be cheap to serve, including a 40% indexer speedup.

Edited by Luis Chavez-Mattos, Director, Product · Published 2026-11-25

## What makes ERNIE 5.5 Flash Preview cheap to serve?

Baidu built ERNIE 5.5 Flash Preview to be inexpensive to run by cutting costs in three places: the architecture, the training, and the serving software. Most layers use compressed attention, so the model's working memory stays small. The biggest part of the model is stored in 4-bit numbers and trained to work that way. A small "draft head" called DSpark guesses several words ahead so the main model can check them in one step. Custom fused kernels trim the leftover overhead.

## TL;DR

- ERNIE 5.5 Flash Preview has **280B total parameters but only 14B active per token**, so each step does a fraction of the work the full size suggests.
- **37 of its 43 layers use Heavily Compressed Attention**, which stores one memory entry per 128 tokens, keeping the KV cache small even at a 1M-token context.
- The expert layers run in **W4A8 (4-bit weights, 8-bit activations)**, and the model was trained with that format in mind, so there is no extra conversion step and no accuracy gap from a mismatch.
- **DSpark is a draft head** that proposes a block of tokens in parallel, and the main model verifies them together. This speeds up long agent tasks.
- A **lightweight indexer with head routing** gives a 40% speedup at 1M context for the sparse attention layers.
- The release is a **Preview**, an intermediate checkpoint, and Baidu says post-training is still ongoing.

## What is ERNIE 5.5 Flash Preview?

It is an open-weight language model from Baidu, released under an Apache 2.0 license. It takes text in and gives text out. It is a Mixture-of-Experts (MoE) model, meaning it contains many specialist sub-networks ("experts") and only a few activate for each token. Here there are 512 routed experts plus 1 shared one, and 10 routed experts fire per token. That is how a 280B-parameter model only uses 14B parameters per token.

It has a 1M-token context window (1,048,576 tokens), and thinking is always on, with reasoning returned in a separate `reasoning_content` field. Baidu positions it for coding, 3D modeling, knowledge work like spreadsheets and slide decks, and video creation.

It is also labeled a Preview. Baidu describes it as an intermediate post-training checkpoint, so some capabilities may fall short of the final release.

## How does compressed attention keep memory small?

When a model reads a long document, it keeps a record of everything it has seen so it does not have to recompute it. That record is the KV cache. It grows with the length of the conversation, and at very long contexts it can take more memory than anything else. Memory is a major cost of serving a model.

ERNIE 5.5 Flash uses two kinds of attention layers:

| Layer type | Count | What it does |
| --- | --- | --- |
| Heavily Compressed Attention (HCA) | 37 | Caches one entry per 128 tokens of history |
| MLA-DSA (sparse attention) | 6 | Keeps token-level history, but each step looks only at selected positions |

Think of HCA as keeping chapter summaries instead of every sentence. The six sparse layers keep the full detail, but each step only reads the most relevant positions. Mixing the two means the model can have long memory without paying for full attention everywhere. The KV cache is also stored in FP8 (8-bit numbers) to shrink it further.

## What is W4A8 quantization-aware training?

Quantization means storing a model's numbers with fewer bits. The "W" is for weights (the model's learned values) and the "A" is for activations (the intermediate values computed as text flows through). W4A8 means 4-bit weights and 8-bit activations.

Why target the experts? The routed experts hold most of the model's parameters. Shrinking them from 8 bits to 4 roughly halves the memory they need, which means less data to move around for each token. Here they are stored in MXFP4, a 4-bit floating-point format. Everything else stays in blockwise FP8, and the sparse attention indexer runs in FP4.

The usual risk with squeezing a model is lost accuracy. Many models are trained at full precision and then compressed afterward, and the compressed version behaves slightly differently from what was trained. Baidu instead applied **quantization-aware training (QAT)** during post-training. The model practices with fake low-precision numbers while it learns, using the same granularity, scaling factors and rounding rules as inference. So training and serving agree numerically.

Practical results from the model card:

- Training throughput is largely unaffected.
- The released weights deploy directly in W4A8, with no extra conversion or calibration.
- On hardware without FP4 kernels, you use the FP8 or BF16 repositories instead. For fine-tuning, start from BF16.

## What is DSpark speculative decoding?

A language model normally writes one token (a word or word piece) at a time, and each token requires a full pass through the model. That is slow, and most of the cost is waiting.

Speculative decoding works around this. A small, fast **draft model** guesses the next several tokens. The main model then checks all of them in a single forward pass. Tokens that match what the main model would have produced are accepted, so you get several tokens for the price of one pass. The output is what the main model approves, which is why the quality holds.

**DSpark** is the draft head that ships inside the Preview's weights. Its distinguishing trait is that it proposes a whole block of tokens in parallel, rather than one after another. The metric to watch is acceptance length, the average number of drafted tokens that survive verification. Longer is better.

## DSpark vs ECHO MTP: what is the difference?

ERNIE 5.5 Flash was pre-trained with single-step ECHO MTP (multi-token prediction), which drafts tokens sequentially, each guess building on the last. In post-training, ECHO can be extended into multi-step MTP with dynamic depth sampling. Baidu reports that with 7 draft steps it reaches an average acceptance length above 5.5 on real-world multi-turn conversations.

The two approaches suit different work. Baidu says autoregressive drafting (ECHO) and parallel drafting (DSpark) each do better depending on whether the output is high-entropy (unpredictable, like creative writing) or low-entropy (predictable, like boilerplate code). So post-training trains DSpark too, with a single setup that supports both.

Two details matter for anyone running it:

- DSpark is updated continuously as the main model changes, so the two stay aligned and the acceptance rate does not degrade. After training converges, online distillation adapts it to a broader range of data, raising production acceptance length by more than 10%.
- The Preview ships with **DSpark only**. Baidu says later releases will offer both DSpark and ECHO MTP.

### How big should the draft block be?

Baidu's guidance is to use larger blocks (up to 7 tokens) at low concurrency and smaller blocks (2 to 3 tokens) at high concurrency. Concurrency is how many requests a server handles at once. When the server is lightly loaded, there is spare compute for speculative guesses. When it is busy, wasted guesses cost more, so shorter blocks make sense.

## How does the indexer get a 40% speedup?

In the six sparse attention layers, a lightweight indexer scores past tokens and picks the 2,048 highest-scoring positions for the model to attend to. At 1M tokens, that scoring step becomes expensive. Baidu made two changes:

1. **Head routing.** A plug-in module picks a subset of the indexer's heads for each query, which cuts the cost of computing the scores.
2. **Threshold pre-filter.** Low-scoring candidates are dropped early. The filtering is exact, and even with TopK as large as 2,048 it removes much of the selection work.

The result is a 40% speedup at a 1M-token context. That figure applies to this indexer step in long-context use, not to the whole model on short prompts.

## What do the fused decoding kernels do?

A kernel is a small program that runs on the GPU. Launching many small ones adds overhead, so the Preview's serving code combines them. According to the model card:

- Mathematically equivalent rewrites of the Virtual Head Attention and mHC residual computations let fused "Mega Kernels" merge each operation with the lightweight steps around it.
- HCA compression runs on a separate side stream, since it does not need to happen at every decoding step.
- For the MoE layers, one Mega Kernel handles routing, expert computation and the projections in and out of the latent space.
- PDL (Programmatic Dependent Launch) and multi-stream scheduling reduce serving overhead further.

None of this changes what the model says. It removes idle time.

## Is it actually good, and how do you run it?

On Baidu's own evaluations, the Preview is competitive for its size. It scores 46.5 on Terminal-Bench 4.0 against 66.4 for Claude Opus 5.5 in the same table, so it does not lead everywhere. On MCP-Atlas it scores 84.6, and on BrowseComp 87.4. These are Baidu's evaluations, and the model is still in training, so test it on your own tasks.

For deployment, the model card says it can be served with SGLang or vLLM, with launch commands that enable DSpark. The commands shown use a 131,072-token context by default, and both servers accept up to 1,048,576.

## What does this mean for you?

Most readers will not host a 280B model. But these techniques decide what AI costs and how fast it feels, so they matter indirectly.

- **If you buy or choose AI tools at work:** ask about speed on long tasks and cost, not just benchmark scores. Techniques like these are why a model can handle an hours-long agent job without a huge bill.
- **If you run an IT or data team:** an open-weight model with Apache 2.0 licensing and direct W4A8 deployment is worth a pilot. Check your hardware first. Without FP4 kernels, you need the FP8 or BF16 versions.
- **If you are a regular user:** expect long-running assistants (spreadsheet building, coding, research) to get faster and cheaper as these methods spread.
- **What you can do now:** pick one repeatable task, run it on two or three models, and record time, cost and quality. Your own numbers beat any chart.

## Can you build your own tool to compare AI model costs?

If you are trying that comparison, a spreadsheet gets messy fast. With [Remy](https://goremy.ai), you can describe a small internal app in plain English: a form where teammates log a task, the model used, time taken, token cost and a quality rating, plus a dashboard that shows which model wins for which kind of work. Remy builds and deploys it with a database and sign-in included. AI tokens are billed at cost with no markup, and the platform is $99 per month, with a 7-day free trial.

## Frequently Asked Questions

### What is DSpark in simple terms?

DSpark is a small draft head attached to ERNIE 5.5 Flash Preview. It guesses a block of upcoming tokens in parallel, and the main model checks them all in one pass. Correct guesses are kept, so the model produces text faster without changing what it would have written.

### What does W4A8 mean?

It means 4-bit weights and 8-bit activations. In ERNIE 5.5 Flash Preview, the routed experts are stored in MXFP4 and run this way. Because the model was trained with the same format (quantization-aware training), Baidu says the released weights deploy directly with no extra conversion or calibration.

### Do I need special hardware to run ERNIE 5.5 Flash Preview?

The default repository holds FP4 expert weights. If your hardware lacks FP4 kernels, Baidu provides FP8 and BF16 repositories. The model card does not list a minimum hardware spec, so check the SGLang and vLLM guides it links before planning.

### Is ERNIE 5.5 Flash Preview a finished model?

No. Baidu calls it an intermediate checkpoint from post-training and says some capabilities may still fall short. It plans to address user feedback in the official release.

### Does the 40% speedup apply to everything?

No. The 40% figure is for the indexer step in the sparse attention layers at a 1M-token context. It will not translate into a 40% faster model overall, especially on short prompts.
