Skip to content

Add Dream-7B model support #1

Description

@iOptimizeThings

Background

Dream-7B is a 7B-parameter diffusion language model from the Dream team (HKUST + Huawei). Architecturally similar to LLaDA - masked diffusion, bidirectional attention, parallel commit - but uses a different commit policy: entropy-based rather than confidence top-k.

Investigation during v0.1 development found that the default top-k confidence commit causes Dream to emit empty strings (content: "") when max_tokens ≥ 256. The model's confidence distribution doesn't match LLaDA's: high-entropy positions dominate and the top-k selection picks EOS cascades. At max_tokens ≤ 128, temperature=0, Dream works correctly.

Acceptance criteria

  • Add dlmserve/models/dream.py loader (analogous to llada.py)
  • Add entropy-based commit policy: commit_top_k_by_negative_entropy() in sampler.py
  • Engine dispatches commit policy by model family (dlmserve/engine.py)
  • All 4 LocalLeap quality gates pass for Dream (or document why a gate is skipped)
  • Quality re-verification (MMLU, BLEU, determinism) - per CLAUDE.md rule about quality after acceleration
  • README "Supported models" table updates to ✓ v0.1.1
  • examples/chat.py --model Dream-org/Dream-v0-Instruct-7B produces coherent output at max_tokens=256

References

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions