Paper Feed

Issue 44 · Project 01 HF model AI / ML trending #18 ✓ read

Diffuspace/Clover-35B-A3B-Preview

text-generation · transformers

TL;DR: Clover-35B-A3B-Preview is an open-weight (Apache-2.0) 35B mixture-of-experts language model that generates text via block diffusion instead of token-by-token autoregression — one of the first attempts to ship the diffusion-LM paradigm at a genuinely useful scale, with 128K context and real inference code. It's a conversion of Qwen3.6-35B-A3B (hybrid Gated DeltaNet / attention MoE, ~3B active params/token), and the interesting parts are the engineering details: confidence-gated parallel decoding within blocks, bidirectional attention over the noisy block, and a per-block expert "coreset" trick. Benchmarks live only in an external launch blog, so treat quality claims as unverified.

What it is and why it matters

Diffusion language models have been a promising-but-marginal research thread (LLaDA, Mercury, Gemini Diffusion) with the pitch of parallel token generation and better infilling. What's been missing is an open model at competitive scale with the serving story worked out. Clover is a credible stab at exactly that: a 35B/A3B MoE retrofitted from a strong autoregressive base, with released weights, a Transformers custom_code path, and separate SGLang and llama.cpp backends including self-speculative decoding.

The claim is "state-of-the-art among open-source diffusion LMs at release" — a narrow and plausible claim, but the README contains zero numbers; everything points to the launch blog. The honest read: the architecture and inference machinery are documented in detail, the evidence is not.

How generation works

Clover uses block diffusion: the sequence is generated in blocks of 32 tokens. Each block starts fully masked; within it, attention is bidirectional (via added learned GDN parameters — right-convolution weights and softmax controls bolted onto Qwen's hybrid backbone), while everything before the block remains a frozen causal prefix. The "LowConfidence" decoder then iterates: any masked position whose prediction exceeds confidence 0.95 is committed in parallel; if none qualify, the single most confident position is committed to guarantee progress. Once a block is fully resolved it joins the prefix and the next block begins.

Block diffusion with LowConfidence decoding causal prefix (frozen) block of 32 masked tokens bidirectional attn inside iter 1: commit all tokens with conf > 0.95 iter k: none confident → commit top-1 block resolved → joins prefix, next block MoE routing restricted to per-block expert coreset (90% routing mass)
Parallelism comes from committing multiple confident positions per denoising step; the top-1 fallback guarantees termination. The prefix stays causal, so KV/state caching still works block-to-block.

Two details worth noting:

Per-block expert coresets. During denoising, MoE routing can be restricted to a shared expert subset per block: aggregate every token's top-8 routing scores across the block, keep experts covering 90% of the mass (moe_block_coreset_top_p=0.9, on by default). This is a clever memory-locality play — with 256 routed experts, repeated denoising passes over the same block would otherwise thrash expert weights. It doesn't shrink the model on disk, but should matter a lot for offloaded/local inference.

Soft length and anti-repetition machinery. The README openly admits long generations drift into repetition — a known diffusion-LM failure mode — and ships default mitigations: presence_penalty=0.9, repetition_penalty=1.05, plus dllm_length_penalty and dllm_think_end_bias that gradually bias toward closing the response/thinking phase starting at 8192/4096 tokens. That these are needed by default, even under greedy decoding tells you something about raw model behavior.

What's actually there

  • BF16 safetensors weights (~69 GB), Apache-2.0, upstream Qwen attribution preserved.
  • Standalone Transformers inference path (trust_remote_code, needs Transformers 5.19.0, PyTorch 2.10+).
  • Separate official repo with SGLang and llama.cpp backends, including self-speculative decoding — the recommended path, since the HF path diverges numerically from SGLang kernels.
  • A GGUF build exists for local testing.
  • No benchmark numbers in the card, no throughput/latency figures, no training details on how the autoregressive→diffusion conversion was done. "Preview" in the name is accurate.

Expectations and caveats

The two questions that decide whether this matters — is quality competitive with the autoregressive Qwen3.6 base it came from? and is wall-clock decoding actually faster? — are both unanswered here. Diffusion LMs historically pay a quality tax for parallelism, and with threshold=0.95 the effective tokens-per-step may be modest. The elaborate repetition controls are a yellow flag. On the other hand, the engineering is unusually complete for a paradigm-shift release: caching-compatible blocks, MoE-aware denoising, three inference backends, long context. If the blog numbers hold up under independent eval, this is the open reference point for diffusion decoding at scale.

Hardware: ~69 GB BF16 plus inference state, so an 80GB card for the HF path, or the GGUF route locally.

Try it

pip install "transformers==5.19.0" accelerate safetensors
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Diffuspace/Clover-35B-A3B-Preview"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id, trust_remote_code=True, dtype=torch.bfloat16, device_map="cuda:0"
).eval()

prompt = tok.apply_chat_template(
    [{"role": "user", "content": "What is diffusion?"}],
    tokenize=False, add_generation_prompt=True, enable_thinking=True)
inputs = tok(prompt, add_special_tokens=False, return_tensors="pt").to("cuda:0")
out = model.generate(**inputs, max_new_tokens=24576, block_size=32, threshold=0.95)
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Model card: https://huggingface.co/Diffuspace/Clover-35B-A3B-Preview — for serving/eval, use their SGLang backend from the official repo.