File size: 950 Bytes
851b203 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # 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:
```bash
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.
|