Commit Graph
13 Commits
Author SHA1 Message Date
iafiscal1212andClaude Opus 4.6 531ef58222 fix(dream): add QKV bias support for Qwen2.5 backbone
Dream/Qwen2.5 uses biases on Q, K, V projections. Without them,
attention is fundamentally incorrect producing garbage output.

Changes:
- diffuse_layer: add optional bq, bk, bv bias tensor pointers
- diffuse-model: load bias tensors from GGUF (nullptr if absent)
- diffuse-graph: apply ggml_add after QKV projection in all 3 graph builders
- convert-dream.py: include QKV bias tensors instead of skipping them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:28:50 +01:00
iafiscal1212andClaude Opus 4.6 3f6aa5597a feat: add Dream-7B model support (Qwen2.5 backbone, GQA)
- New converter: tools/convert-dream.py (Qwen2.5 tensor mapping)
- Multi-model loader: reads diffuse.model_type from GGUF metadata
- GQA support verified (28 query heads, 4 KV heads)
- New remasking strategies: maskgit_plus, topk_margin (from Dream paper)
- Updated CLI, benchmark, and generate.py with new remasking options
- README: supported models table, Dream conversion example
- Zero breaking changes for existing LLaDA GGUF files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:03:30 +01:00
iafiscal1212andClaude Opus 4.6 8c10a8cb44 feat: inter-step KV cache + updated documentation (v0.2.0)
- Inter-step cache: 1.6x average speedup (15-28 tok/s on easy prompts)
- 6 of 8 prompts now outperform llama.cpp (up to 3.2x)
- New flags: --no-cache, --cache-refresh, --cache-keep-active
- Updated paper, README, RESULTS, .zenodo.json
- Cache improves quality on 3/8 prompts (regularization effect)
- New paper.tex source with cache results (Section 4.1, 6.7)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:20:32 +01:00
iafiscal1212andClaude Opus 4.6 04ad24946a Increase default generation buffer from 64 to 256 tokens
Benchmark shows 2.7-3x throughput improvement per token (sub-linear
time scaling), with entropy_exit reaching 4.82 tok/s at n=256.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:12:12 +01:00
iafiscal1212andClaude Opus 4.6 bfc71d1b28 Prepare for public release: rigorous benchmarks + cleanup
- Replace benchmark JSONs with rigorous 6.5h results (288 configs, 3 reps each)
- Update README and RESULTS.md with verified numbers
- Remove research/fase4.2/ (internal notes)
- Sanitize server paths in run-benchmark.sh and JSON files
- Add real_prompts.txt used in benchmarks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:29:27 +01:00
iafiscal1212andClaude Opus 4.6 00243730eb Prepare for public release: AGPL-3.0 license + README overhaul
- Change license from MIT to AGPL-3.0 with commercial licensing option
- Expand README with full benchmarks, API docs, and entropy_exit documentation
- Fix build instructions (DIFFUSE_BUILD_TOOLS, not BUILD_BENCH)
- Remove TODO comment from main-cli.cpp

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:23:26 +01:00
iafiscal1212andClaude Opus 4.6 bbab396d89 Add exhaustive benchmark results: F16/Q8_0/Q4_K_M × steps × threads × schedulers
3 quantization levels × 3 step counts × 3-4 thread counts × 2 schedulers.
Key result: Q4_K_M + entropy_exit + 12 threads = 13.59 tok/s (1.6x llama.cpp).
Includes format-benchmark.py for publication-ready table generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 13:27:26 +01:00
iafiscal1212andClaude Opus 4.6 4a10d3574b Rewrite diffuse-bench for exhaustive benchmarking
Supports: steps/threads/schedulers sweep, JSON+markdown output,
warmup runs, actual step counting for entropy_exit.
Add run-benchmark.sh wrapper for F16/Q8_0/Q4_K_M comparison.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 07:01:45 +01:00
iafiscal1212andClaude Opus 4.6 909dba237a Add diffuse-quantize tool: F16 → Q4_K_M/Q8_0/Q6_K quantization
Mixed quantization strategy (Q4_K_M):
- Attention weights: Q4_K
- FFN weights: Q4_K (Q6_K for first/last layers)
- Norms: F32
- Embeddings: F16 (preserved)
- Output head: Q6_K

Results: 15GB → 5.1GB (2.9x), 1.6x faster inference, quality preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 06:48:00 +01:00
iafiscal1212andClaude Opus 4.6 627b45891d Add entropy_exit semantic scheduler + research findings
- ENTROPY_EXIT remasking: unmask all low-entropy tokens early, spend
  steps only on difficult tokens. 5-8x speedup on structured tasks
  (translation, factual QA) with no quality loss.
- Add entropy_threshold parameter (default 1.5)
- Research doc: prior art survey (EAGS, Fast-dLLM, WavefrontDiffusion,
  DOS, LoPA) + empirical results on 5 prompts
- Python semantic_scheduler.py experiment framework

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 05:19:52 +01:00
iafiscal1212andClaude Opus 4.6 2bb4358450 Fix compute buffer sizing + add generate.py wrapper
- Increase base buffer from 256MB to 512MB for graph node overhead
- Better per-layer intermediate estimation (16× instead of 4×)
- Add generate.py: tokenize→diffuse-cli→detokenize pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 05:06:32 +01:00
iafiscal1212andClaude Opus 4.6 4d6bd72d4e Fix forward pass for real LLaDA-8B F16 model
- Add ggml_cast for norm weights (F16→F32) to fix ggml_mul type mismatch
- Switch RoPE from NORMAL to NEOX style (non-interleaved, matching LLaDA/OLMo)
- Use PyTorch framework in converter for BF16 safetensors support
- Add validation tools: validate-gguf.py, compare-logits.py, dump-logits
- Result: 100% argmax match vs PyTorch, cos_sim >0.993

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 05:03:11 +01:00
iafiscal1212andClaude Opus 4.6 6022454e29 Initial scaffold: diffuse-cpp inference engine for Diffusion LLMs
- Project structure with CMake build system, GGML submodule
- Core library: model loader (GGUF), transformer forward pass, diffusion sampler
- CLI tools: diffuse-cli (generation) and diffuse-bench (benchmarks)
- Converter: convert-llada.py (SafeTensors → GGUF with tensor name mapping)
- Tests: unit tests, converter roundtrip test, end-to-end forward pass test
- Bidirectional attention (no causal mask, no KV cache)
- SwiGLU FFN, RoPE, RMSNorm — full LLaDA-8B Llama backbone
- Verified: compiles clean, forward pass produces valid logits on tiny model

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 21:43:36 +01:00