Downloads · 30 days
36
30% of all-time downloads
Rarri/DeepSeek-V4-Flash-Hybrid-Vision-Reseek
DeepSeek-V4-Flash-Hybrid-Vision-Reseek is a image-text-to-text model from Rarri. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for vllm. The card lists the license as other.
A vision-enabled assembly of DeepSeek-V4-Flash-0731: the DeepSeek-V4 Flash text model (48 shards, FP8) joined to a MoonViT-style vision tower and multimodal projector, served through vLLM with DSpark speculative decod…
Downloads · 30 days
36
30% of all-time downloads
All-time downloads
122
Public
Parameters
305B
168 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors168 GB · 100%
How the weights are stored.
I8296B · 97%
From the Hugging Face model README
A vision-enabled assembly of DeepSeek-V4-Flash-0731: the DeepSeek-V4 Flash text model (48 shards, FP8) joined to a MoonViT-style vision tower and multimodal projector, served through vLLM with DSpark speculative decoding.
Built and benchmarked on 2× NVIDIA RTX PRO 6000 Blackwell Workstation Edition (96 GB each, SM120), tensor-parallel 2.
| Architecture | DeepSeekV4VisionForConditionalGeneration |
| Context length | 262,144 tokens |
| KV cache | fp8_ds_mla (656 B/token) |
| Vision encoder | MoonViT-style, patch 14, 2×2 merge |
| Speculative decoding | DSpark, 5 draft tokens |
| Tool calling | Yes (deepseek_v4 parser) |
All numbers produced with EleutherAI lm-evaluation-harness v0.4.12 against a
live vLLM endpoint. Raw result JSON is in benchmarks/.
Reproduction commands are in RECIPE.md.
| Benchmark | Metric | Score | n |
|---|---|---|---|
| GSM8K (5-shot) | exact_match, flexible | 96.5% | 200 |
| GSM8K (5-shot) | exact_match, strict | 69.0% | 200 |
| IFEval | inst-level loose | 84.0% | 200 |
| IFEval | inst-level strict | 81.5% | 200 |
| IFEval | prompt-level loose | 76.5% | 200 |
| IFEval | prompt-level strict | 73.5% | 200 |
| Benchmark | Metric | Score | n |
|---|---|---|---|
| PIQA | acc_norm | 87.7% | 300 |
| PIQA | acc | 83.0% | 300 |
| Winogrande | acc | 79.7% | 300 |
| HellaSwag | acc_norm | 71.3% | 300 |
| HellaSwag | acc | 57.0% | 300 |
| ARC-Challenge | acc_norm | 63.3% | 300 |
| ARC-Challenge | acc | 62.3% | 300 |
| TruthfulQA MC2 | acc | 54.9% | 300 |
| OpenBookQA | acc_norm | 51.3% | 300 |
| Benchmark | Metric | Score | n |
|---|---|---|---|
| HumanEval | pass@1 | 78.0% | 164 |
Note on HumanEval. The stock
lm-evalHumanEval task scores this model at 0.0 — an artifact, not a result. That task expects a raw completion, but a chat endpoint returns prose plus a```pythonblock, so the built-in filter extracts nothing. The 78.0% above comes frombenchmarks/humaneval_chat.py, which pulls the fenced code and runs the official unit tests in a sandboxed subprocess. If you benchmark any chat model on HumanEval, check for this first.
Measured on 2× RTX PRO 6000 Blackwell, TP=2, max_num_seqs=16:
| Load | Aggregate throughput | Tail latency |
|---|---|---|
| 1 concurrent | 305 tok/s | 0.39 s |
| 8 concurrent | 581 tok/s | 1.64 s |
| 16 concurrent | 1150 tok/s | 1.66 s |
Time to first token: 0.085 s median. Prefill: ~8,900 tok/s at 32k tokens. DSpark speculative decoding accepts 3.2–5.9 of 5 draft tokens in practice.
457M parameters total — roughly 0.1% of the assembled model:
| Component | Params | Shape |
|---|---|---|
| Vision tower (MoonViT-style) | 416.9M | 27 layers, width 1152, patch 14 |
| Multimodal projector | 40.1M | pre_norm → 4608×4608 → GELU → 4608×4096 |
Dimensions chain exactly: the tower emits 1152-wide patch embeddings, a 2×2 merge concatenates them to 4608, and the projector maps that to 4096 — the language model's hidden size. A 448×448 image becomes 256 patches → 64 tokens after merging, which is frugal next to tile-based encoders that spend thousands.
Preprocessing was verified numerically: the normalization LUT produces exactly ±1.0 at grey 0 and 255, with correct 16×16 spatial ordering.
Evaluation gap. The vision figures below come from hand-built probes over roughly ten images, not a standard benchmark. The text scores in this card are
lm-evalreproducible; the vision claims are not. Run MMMU, MMBench, or TextVQA before relying on them.
What works — images at or below 448 px on the longest side:
| Test | Result |
|---|---|
| Balanced yes/no on real photos | 9/10 |
| 4-way forced choice (correct answer listed last) | 4/5 (chance 25%) |
| Detail questions (water present? snow-capped? time of day?) | correct |
What fails:
Recommendations:
vllm serve /path/to/DeepSeek-V4-Flash-Hybrid-Vision-Reseek \
--served-model-name dsv4-hybrid-vision \
--tensor-parallel-size 2 \
--tokenizer-mode deepseek_v4 \
--kv-cache-dtype fp8_ds_mla \
--block-size 256 \
--max-model-len 262144 \
--max-num-seqs 16 \
--gpu-memory-utilization 0.968 \
--speculative-config '{"method":"dspark","model":"/path/to/model","num_speculative_tokens":5}' \
--enable-auto-tool-choice \
--tool-call-parser deepseek_v4
import base64, io, json, urllib.request
from PIL import Image
URL = "http://127.0.0.1:8000/v1/chat/completions"
def ask(messages, max_tokens=512):
body = {"model": "dsv4-hybrid-vision", "messages": messages,
"max_tokens": max_tokens, "temperature": 0.6, "top_p": 0.95}
req = urllib.request.Request(URL, data=json.dumps(body).encode(),
headers={"Content-Type": "application/json"})
return json.loads(urllib.request.urlopen(req).read())["choices"][0]["message"]["content"]
# Text
print(ask([{"role": "user", "content": "What port does SSH use?"}]))
# Vision -- downscale to 448 px first (see the vision notes above)
im = Image.open("photo.jpg").convert("RGB")
im.thumbnail((448, 448))
buf = io.BytesIO(); im.save(buf, "PNG")
b64 = base64.b64encode(buf.getvalue()).decode()
print(ask([{"role": "user", "content": [
{"type": "text", "text": "Is there a mountain in this image? Answer yes or no."},
{"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64}},
]}]))
The checkpoint's generation_config.json defaults to temperature=1.0,
top_p=1.0. At those settings the model pads its answers heavily — asked for
a single bash one-liner it returned five variants plus a bullet-point explainer
(347 tokens for a one-line question).
These settings were measured to fix that:
{"temperature": 0.6, "top_p": 0.95, "max_tokens": 1024}
Pair them with a concise system prompt for short answers. With both applied, the same one-liner question returns 29 tokens — one command, no menu.
Note that --generation-config vllm makes vLLM ignore the checkpoint's
generation_config.json; pass --override-generation-config to set defaults
server-side.
Chain-of-thought is off by default — the deepseek_v4 tokenizer sets
thinking=False unless a caller opts in with enable_thinking or
reasoning_effort. To pin it off server-side regardless of what clients send:
--default-chat-template-kwargs '{"thinking": false, "enable_thinking": false}'
fp8_ds_mla on SM120. nvfp4_ds_mla would cut
the record from 656 to 432 B/token (~1.52× more cache), and both the CLI and the
b12x backend advertise it — but every DeepSeek-V4 attention class reachable on
SM120 sets use_fp8_ds_mla_layout = True, which asserts the dtype starts with
fp8. Attempting it fails at load:
AssertionError: DeepseekV4 fp8_ds_mla layout only supports fp8 kv-cache.
The one class with the flag off is gated to compute capability 9/10 (Hopper).
The underlying FlashInfer kernel is a prebuilt cubin documented as 584 B/token,
BF16 or FP8 E4M3 only, so this needs upstream support — not a config change.max_model_len the KV cache holds
263,310 tokens — one maximum-length request. Ordinary workloads are unaffected
(16k tokens × 4 concurrent measured fine, KV usage under 1%), but simultaneous
full-context requests will queue.config.json model configuration
generation_config.json default sampling parameters
preprocessor_config.json vision preprocessing (MoonViT)
tokenizer.json tokenizer
tokenizer_config.json tokenizer configuration
model.safetensors.index.json weight shard index
provenance.json component checksums
benchmarks/ raw lm-eval results + HumanEval script
RECIPE.md step-by-step build and evaluation guide
Inherits the DeepSeek model licence from the base checkpoint. The vision tower and projector derive from their respective upstream sources. Verify licence compatibility for your use case before deploying commercially.