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>
This commit is contained in:
iafiscal1212andClaude Opus 4.6 committed 2026-03-22 13:03:30 +01:00
1 parent 9b76ba9bc3
commit 3f6aa5597a
9 files changed
+376 -18

No files matched your search

+3 -1
View File
@@ -17,7 +17,7 @@ static void print_usage(const char * prog) {
fprintf(stderr, " --temp F Temperature (default: 0 = argmax)\n");
fprintf(stderr, " --seed INT Random seed (default: 42)\n");
fprintf(stderr, " --schedule cosine|linear (default: cosine)\n");
fprintf(stderr, " --remasking low_confidence|random|entropy_exit (default: low_confidence)\n");
fprintf(stderr, " --remasking low_confidence|random|entropy_exit|maskgit_plus|topk_margin (default: low_confidence)\n");
fprintf(stderr, " --entropy-threshold F Entropy threshold for entropy_exit (default: 1.5)\n");
fprintf(stderr, " --cache-refresh INT Force full forward every N steps (default: 0 = never)\n");
fprintf(stderr, " --cache-keep-active INT Keep recently-changed positions active N extra steps (default: 0)\n");
@@ -79,6 +79,8 @@ int main(int argc, char ** argv) {
i++;
if (strcmp(argv[i], "random") == 0) remasking = diffuse_remasking::RANDOM;
else if (strcmp(argv[i], "entropy_exit") == 0) remasking = diffuse_remasking::ENTROPY_EXIT;
else if (strcmp(argv[i], "maskgit_plus") == 0) remasking = diffuse_remasking::MASKGIT_PLUS;
else if (strcmp(argv[i], "topk_margin") == 0) remasking = diffuse_remasking::TOPK_MARGIN;
} else if (strcmp(argv[i], "--no-cache") == 0) {
use_cache = false;
} else if (strcmp(argv[i], "--cache-refresh") == 0 && i + 1 < argc) {