Manuscript Offprint

arXiv:2609.09748

Epoch: Compiling Diffusion Blocks for Sparse MoE Serving

Jianian Zhu, Hang Wu, Yinghui Li, Haojie Wang, Ruixuan Li, Jidong Zhai

Jianian Zhu Huazhong University of Science and Technology China

Haojie Wang Tsinghua University China

Hang Wu Xidian University China

Ruixuan Li Huazhong University of Science and Technology China

Yinghui Li Qiyuan Lab China

Jidong Zhai Tsinghua University China

Abstract

Diffusion language models generate text by refining a fixed-size block of token positions through many forward passes, a loop that does not match the per-forward execution unit used by most LLM serving systems. A dense MoE runtime binds all work to the refinement-iteration clock: it rebuilds similar routing structure on every forward, recomputes expert outputs for positions whose logits are already dead, and sends those positions through dense expert-parallel collectives. This paper presents Epoch, a serving system that treats the diffusion block as a compilation unit. Epoch compiles a small block plan for the block-clock structure of one diffusion block and refreshes every value that can affect a live decode decision on the iteration clock.

Epoch realizes this plan along three dense axes of an MoE forward: EXPERT ATLAS compiles a coverage-driven active expert support per layer while recomputing gate logits every iteration; LIVENESS-SHARD PARALLELISM keeps full sequence shards as model state but routes only live, newly decoded, and refresh-required positions through fresh routed-expert computation; FRESHLANE DISPATCH carries this fresh token-expert worklist through expert-parallel dispatch, kernels, and combine, then restores the dense logical shard at the layer boundary. We implement Epoch on 8 NVIDIA H100 GPUs and evaluate it on three open-weight block-diffusion MoE models (LLaDA-MoE, LLaDA2.0-mini, and LLaDA2.0-Flash, spanning 7B to 100B total parameters) across GSM8K, HumanEval, MGSM, and MT-Bench. Epoch improves end-to-end execution time by up to 2.7× over the strongest surviving baseline under the same 8-GPU placement and remains feasible at the largest batch sizes where multiple baselines run out of memory, while preserving task quality relative to the dense reference.

CCS Concepts: • Computer systems organization → Parallel architectures; Cloud computing; • Computing methodologies → Natural language generation.

Keywords: diffusion language models, LLM serving, mixture-of-experts, sparse communication

Figure

Figure 1. Autoregressive serving appends one token per forward. Block diffusion repeatedly refines a fixed set of positions and may commit multiple tokens per iteration. This repeated execution over the same positions is the structural opportunity that Epoch exploits.

1 Introduction

Most LLM serving systems assume that a request grows one token per forward pass [27, 50, 54]. This assumption fits autoregressive (AR) decoding of large language models [6, 47, 48]. Each forward extends the prefix. The KV cache stores the prefix state. Scheduling, batching, parallelism, and memory management are therefore built around the forward pass.

Diffusion language models (dLLMs) [2, 3, 37, 43] use a different loop. A dLLM initializes a block of positions as MASK tokens. It runs a full transformer forward over the block, commits high-confidence positions to concrete tokens, and repeats the loop until the block is complete. The next block then starts. Figure 1 shows the contrast. The key systems fact is simple: the same positions are processed by the full model many times before they are finalized.

A forward-scoped runtime misses this structure. It recomputes routing choices, dispatches every token through expert parallelism, runs expert kernels for every token, combines every output, and materializes logits for every position. This is costly because MoE is the main part of the dLLM forward path. Figure 2 shows our optimized LLaDA2.0-mini baseline. At batch size one, one forward takes 76.4 ms and the MoE path already accounts for 60% of latency. At batch size 32, the MoE path accounts for 77%. This baseline uses fused MoE kernels [19, 24], fused RMSNorm [51], FlashAttention [12, 13], and tuned collective parallelism. The waste is not an untuned kernel. It is redundant work that the runtime cannot name.

The systems issue is that a diffusion block has two clocks. The iteration clock advances after every refinement forward and changes hidden states, router logits, expert outputs, and decode decisions; values on this clock are unsafe to replay. The block clock advances only when the next block starts, so the active expert support, sequence-shard ownership, cache descriptors, and compact payload layouts can be planned once and amortized. Dense MoE runtimes bind everything to the iteration clock. Epoch separates the two: at block start it compiles a small block plan of block-clock structure, and on every refinement iteration it refreshes the iteration-clock values that can affect a live decode decision. The next block invalidates the plan. The contract is one line:

Cache stable block structure. Recompute every value that feeds a live decode decision.

This contract must hold on three dense axes of an MoE forward. Expert axis. Expert support is block-stable enough to plan, but routing values are not; the runtime needs an expert map, not a stale routing table. Token-state axis. Decoded positions no longer need logits, but bidirectional attention keeps them as model state; the runtime must avoid their fresh MoE work without dropping them from the model. Payload axis. Sparse token compute is not enough if dispatch, combine, and the output path remain dense; the runtime must make the fresh worklist the communication payload.

Epoch applies the same block-plan discipline along each axis. EXPERT ATLAS compiles an active expert support per MoE layer while every iteration recomputes gate logits inside that support. LIVENESS-SHARD PARALLELISM keeps full sequence-parallel shards as model state but builds a per-iteration liveness mask so only live, newly decoded, and refresh-required positions enter fresh routed-expert computation; stable decoded positions read a bounded-age cache. FRESHLANE DISPATCH carries this fresh token-expert worklist through expert-parallel dispatch, kernels, and combine, and merges fresh outputs with cached stable-decoded outputs at the layer boundary.

This paper makes three contributions. First, it identifies the diffusion block as a compilation unit and gives a block-plan abstraction that separates block-clock structure from iteration-clock decisions for sparse MoE inference in dLLMs. Second, it gives an execution invariant for block-plan reuse: cache stable structure, recompute live-decision values, and bound the only approximate decoded-token cache. Third, it designs and implements a sparse MoE pipeline (EXPERT ATLAS, LIVENESS-SHARD PARALLELISM, FRESHLANE DISPATCH) that applies the block-plan contract to the expert, token-state, and payload axes of an MoE forward. On 8 H100 GPUs and across three diffusion MoE models from 7B to 100B parameters, the prototype reaches 1.1–1.3× end-to-end speedup at batch size 128, 1.3–1.7× at batch size 256, and 1.7–2.7× at batch size 512 over the strongest surviving baseline under the same placement, while remaining feasible at batch size

Figure

Figure 2. MoE dominates dLLM inference latency in an optimized dense baseline. The MoE path includes expert compute, dispatch, and combine. Its share grows from 60% at batch size 1 to 77% at batch size 32. This makes block-internal MoE redundancy an end-to-end serving problem.

512 where multiple baselines run out of memory; the gap widens with model scale.