Carmen Esteban and Claude Opus 4.6
dd6aca0fba
Fix model loading for llama.cpp GGUF files
...
- Infer n_vocab from token_embd tensor when not in metadata
- Fix default rope_theta (1e6) and rms_norm_eps (1e-6) for Qwen2.5
- vocab_size key is optional (absent in llama.cpp GGUF files)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-05 17:52:59 +02:00
Carmen Esteban and Claude Opus 4.6
2b8ead2fb6
Add autoregressive inference engine for Qwen2.5/Llama models
...
- ar-cache.h: append-only KV cache (stores KV heads without GQA expansion)
- ar-graph.cpp: forward pass with causal mask (ggml_soft_max_ext) and KV cache
- ar-sampler.cpp: token-by-token generation with temp/top-p/top-k/repeat penalty
- ar-cli.cpp: CLI tool (diffuse-ar) for autoregressive inference
- diffuse-model.cpp: multi-arch GGUF loading (diffuse/qwen2/llama prefixes)
- diffuse.h: extended public API with ar_sampler_params and ar_generate()
Enables loading llama.cpp GGUF files directly (e.g. Thrombia-32B Q4_K_M).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-05 17:49:37 +02:00
iafiscal1212 and Claude 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
iafiscal1212 and Claude 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
iafiscal1212 and Claude 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