Repository navigation
feat(gguf): serve image input on deepseek4 ggufs from a deepseek4v mmproj - #816
Conversation
|
Thanks! Checked against the HF Vision-Exp checkpoint: every BF16 mmproj tower is bit-exact (split and fused qkv),
The ggml-org template gap is fine to leave documented here. |
|
Both fixed in 3304d95: the exp_probs_b_vl check moved into |
jason-fxz
left a comment
There was a problem hiding this comment.
Re-checked 3304d95: the BahamutRU file now skips its mmproj with a warning and serves text (default, --mm-disable vision, --text-model-only), and --mmproj with it fails at startup. The 16 image probes still give the same prompt tokens and answers as the HF checkpoint. LGTM, thanks!
Part of #671 (the DeepSeek-V4 item in #794). The Vision-Exp text trunk pairs with its mmproj; the 0731 text-only release has no image token and refuses the pairing.
What it does
gguf_mm_configderives the flat vision fields from the mmproj (this family has novision_configsection); rope theta 10000 / max_n_token 384 / max_wh_ratio 8 are family constants llama.cpp hardcodes in clip.cpp and its converter asserts.iter_mmproj_weightsloads the tower undervisual.: q|k|v cat (ggml-org ships the attention block fused, unsloth split; both dialects load), gate-before-up w1 cat, the patch embedding flattened back to the Linear kernel.exp_probs_b_vlbiases feed the gate's image-row routing; the hash layers' converter-dropped text bias zero-fills (never applied by the reference or FreeToken's Gate).DSV4MMProcessor._image_processor()returns None: no transformers class exists, the preprocessing is FreeToken-local.exp_probs_b_vl(converted before llama.cpp #28154), eps other than 1e-6.tok_compare
unsloth UD-Q2_K_XL vs the HF Vision-Exp tokenizer: 0/13 edge cases, 0/126,527 vocab texts, 0/20,000 combos.
Check sweep (scripts/gguf_check, header stubs of every Vision-Exp GGUF repo on HF: 19 repos, 109 split sets)
Each repo checked with its own mmproj via
FREETOKEN_MMPROJ(quants sit in subfolders next to a root mmproj, so folder-local auto-discovery cannot fire in that layout).deepseek4_vision, unknown to llama.cpp tooNothing crashes and nothing mis-loads silently.
Real-file verification (RTX 5090 32 GB, Ryzen 9 7950X3D, 187 GiB RAM, driver 580.95.05)
unsloth
DeepSeek-V4-Flash-Vision-Exp-UD-Q2_K_XL+mmproj-BF16.gguf: tower bit-exact against the HF checkpoint (267/267 tensors, 43/43bias_vl, 3/3tid2eid). Served end to end withReads OCR text out of a probe image, answers two images in order, a repeated image prompt hits the radix (512 cached tokens), 0 errors in the log. Through the real processor, the image block's length cycles 114-117 tokens with its insertion offset (lead pads to the 4-token compression stride) and the offset enters the radix hash, so the same image at a shifted position is another sequence. The ggml-org pairing passes the full gguf_check dry load reporting only its template gap (not served live; its text path is the code the unsloth run exercised);
--mmprojon the 0731 trunk stops startup with the pairing error.