Ouzhang's picture
Add files using upload-large-folder tool
851b203 verified
|
Raw
History Blame Contribute Delete
950 Bytes

Block Diffusion Base Code

This is a small, shared implementation surface for comparing the reference methods without copying every paper's code structure.

Current scope:

  • Block-level masked diffusion decoding.
  • Confidence-based remasking.
  • Multi-block scheduling hooks.
  • DMax/TAD-style trajectory distillation hooks.
  • Fast-dLLM/DFlash/PRESTO-style cache and draft/verify hooks.
  • Common metrics: NFE, latency, tokens per forward, exact match.

Run a local smoke test:

python3 -m basecode.blockdiff.cli --method confidence --steps 6 --block-size 8
python3 -m basecode.blockdiff.cli --method multiblock --steps 6 --block-size 8 --num-blocks 4
python3 -m basecode.blockdiff.cli --method speculative --steps 6 --block-size 8

The toy adapter is deterministic and exists only to validate algorithmic plumbing. Real reproduction runs should add an adapter under basecode/blockdiff/adapters/ that wraps each paper's HF/model code.