Run diffusion language models on the NPU: LLaDA2.2-mini and WeDLM-8B-Instruct
What
Decode on the NPU is limited by reading the weights, not by arithmetic: every new token reads the whole model once while the compute units mostly wait. A diffusion language model puts that idle compute to work. Instead of writing one token per forward pass, it fills a block of masked positions and keeps every position it is confident about, so one read of the weights can produce several tokens.
This issue tracks running two of them on the open engine:
- LLaDA2.2-mini (inclusionAI, Apache-2.0): a 16B mixture-of-experts model with 1.4B parameters active per token. It works in 32-token blocks, and as it refines a block it can delete and insert tokens to fix its own mistakes.
- WeDLM-8B-Instruct (Tencent, Apache-2.0): the same architecture and shapes as Qwen3-8B. It fills a small window of positions per pass and keeps ordinary causal attention.
Why these two
I ran both through llama.cpp with our own decoding loop, which I first checked against each model's original code, on a 60-prompt set covering math, code, instruction following and chat. Qwen3-8B ran alongside as the yardstick. On that small sample, LLaDA2.2-mini matched Qwen3-8B on math and code and came out a little ahead on instruction following, while producing about 9 tokens per pass on code, 4 on math and 1.5 on open chat. WeDLM matched on math and code, trailed a little on instruction following, and managed about 3 tokens per pass.
From today's kernel timings, that should put LLaDA2.2-mini at 2-3x Qwen3-8B's speed on math, 5x or more on code, and about even on open chat. That's an estimate, not a measurement.
Both models occasionally make a mistake Qwen3 doesn't: when several tokens are filled in at once, a multi-digit number or a piece of a word sometimes comes out wrong. A third candidate, SDAR-8B-Chat-b16, did clearly worse on instruction following and isn't a target.
What it needs
- A decode loop that runs one pass over many positions and commits several tokens from it. Both models share it; only the rule for which tokens to keep differs.
- WeDLM: a position for each row of a pass, because it feeds rows out of order. Beyond that it runs on the Qwen3-8B family kernels as they are.
- LLaDA2.2-mini: a new model family, attention that sees its whole 32-token block in both directions, and block routing. Block routing means each pass picks one pool of at most 48 experts for the whole block, so a 32-row pass reads far fewer experts than 32 separate tokens would.
Done when
oflm-addinstalls both models, and each passesoflm-test --llmthroughoflm serve.- The engine's decoding matches the reference loop on recorded fixtures (OPEN-DLLM-WEDLM and OPEN-DLLM-LLADA2).
- Tokens per pass on the NPU match the reference run.
Not in this issue
- Hosting the converted models under Atomic-Germ or adding them to
src/model_list.json. They'll sit on my Hugging Face account while this is in progress; where they go after that is your call. - Making wide passes fast. Today's GEMM is compute-bound past about 8 rows, and an 8-bit activation path is the fix. That's a follow-up once the models are correct.
Correction: I'm a member of the hf org now so I'll just push them there.