Deployment
Install SGLang
Install SGLang
MiniCPM-V 4.7 support comes from sgl-project/sglang#41993; both paths below use that PR’s code. For all methods and hardware platforms, see the official SGLang installation guide. The two paths below match the Python / Docker toggle in the command panel.Then run the Python output of the command panel below in that environment.
- Python (from source)
- Docker
Command
Playground
The Playground is where you experiment with SGLang features beyond the recipes above. The Deploy panel emits this model’s validated launch recipes; the Playground lets you turn on additional knobs on top of whichever cell the Deploy panel is currently showing.1. Model Introduction
MiniCPM-V 4.7 is the latest model in OpenBMB’s MiniCPM-V series, covering single-image, multi-image, and video understanding. It ships in two sizes: a 1B dense model and a 35B-A3B Mixture-of-Experts model, the series’ first MoE. Both sizes use a Qwen3.5-style hybrid language backbone in which every fourth layer is full attention and the rest are Gated DeltaNet linear attention: 24 layers for 1B, and 40 layers with 256 experts (8 active per token) for 35B-A3B. Native context length is 262,144 tokens. The vision encoder compresses visual tokens early inside the ViT, slices high-resolution images into up to 9 tiles, and supports mixed 4x/16x visual token compression (see §3.3). Thinking is on by default. License: Apache-2.0.| Checkpoint | Precision | Role on this page |
|---|---|---|
| openbmb/MiniCPM-V-4.7-1B | BF16 | 1B dense base (1.55B parameters including the vision encoder). |
| openbmb/MiniCPM-V-4.7-35B-A3B | BF16 | 35B-A3B MoE base (35.2B total parameters, about 3B active). |
| openbmb/MiniCPM-V-4.7-35B-A3B-FP8 | FP8 W8A8 (compressed-tensors) | 35B-A3B FP8. |
| openbmb/MiniCPM-V-4.7-35B-A3B-int4 | INT4 W4A16, group size 128 (compressed-tensors) | 35B-A3B INT4. |
| openbmb/MiniCPM-V-4.7-1B-DSpark | BF16 draft | Draft model for the 1B DSPARK row; not served on its own. |
| openbmb/MiniCPM-V-4.7-35B-A3B-DSpark | BF16 draft | Draft model for the 35B-A3B DSPARK row; not served on its own. |
temperature=1.0, top_p=0.95, top_k=20, from the 35B-A3B checkpoints’ generation_config.json. SGLang applies these defaults, so do not hardcode them in client code.
Resources: Hugging Face (1B) · Hugging Face (35B-A3B) · OpenBMB documentation · SGLang model support (#41993).
2. Configuration Tips
- Every generated command carries
--mamba-radix-cache-strategy extra_buffer, the radix-cache strategy for the Gated DeltaNet hybrid backbone. The FP8 and INT4 commands also carry--tokenizer-path openbmb/MiniCPM-V-4.7-35B-A3B(see the note below). - Every recipe runs on one GPU. On H100 the 35B-A3B BF16 checkpoint (about 66 GB of weights) does not fit the default static memory fraction of an 80 GB card; use FP8 or INT4 there.
- Pick the quantization by platform. On H200, quantization is a speed win: at concurrency 16, INT4 and FP8 reach 15,808 and 15,280 tokens/s per GPU against 12,103 for BF16, and INT4 has the fastest 35B-A3B decode (TPOT 3.47 ms at concurrency 1). On GB300, BF16 and FP8 decode at about the same speed at concurrency 1 (TPOT 4.36 vs 4.44 ms), and FP8 pulls ahead at concurrency 16 (16,059 vs 14,094 tokens/s per GPU). INT4 is slower on GB300 at every concurrency (TPOT 8.56 ms at concurrency 1), so use it there only to save memory.
- SGLang detects FP8 and INT4 from the checkpoint’s
quantization_config; no--quantizationflag is needed. - The DSPARK row adds
--speculative-algorithm DSPARKand--speculative-draft-model-pathpointing at the variant’s DSpark checkpoint. On GB300, turn it on only for 35B-A3B BF16 and FP8 at low concurrency; on H200, turn it on for 35B-A3B BF16 at both measured concurrencies and for FP8 and INT4 at low concurrency; leave it off for 1B. Matched sharegpt runs back this (TPOT ms, DSPARK off → on):
| Configuration | GB300, conc 1 | GB300, conc 16 | H200, conc 1 | H200, conc 16 |
|---|---|---|---|---|
| 1B BF16 | 1.75 → 2.02 | 4.00 → 5.73 | 1.56 → 1.65 | 4.43 → 6.27 |
| 35B-A3B BF16 | 2.99 → 2.80 | 11.17 → 13.69 | 3.56 → 3.02 | 13.51 → 11.92 |
| 35B-A3B FP8 | 3.08 → 2.76 | 10.53 → 12.60 | 3.42 → 2.61 | 11.11 → 12.40 |
| 35B-A3B INT4 | 7.19 → 11.05 | 47.92 → 54.80 | 3.34 → 2.38 | 9.33 → 11.20 |
- Benchmark speculative decoding on real text. Random-token prompts collapse draft acceptance, so they say nothing about DSPARK. For a real-workload reference, GSM8K accept length is about 2.6 on 1B, 4.1 on 35B-A3B BF16, 4.0 on FP8, and 3.8 on INT4.
- Every command carries
--reasoning-parser auto --tool-call-parser auto. SGLang resolves both from the chat template, toqwen3for reasoning andqwen3_coderfor tool calls, so the thinking trace lands inmessage.reasoning_contentand tool calls inmessage.tool_calls(see §3.1 and §3.2). To turn either off, toggle it in the Parsers card of the Playground. - Thinking is on by default. To get a direct answer for one request, pass
"chat_template_kwargs": {"enable_thinking": false}(in the OpenAI Python client,extra_body={"chat_template_kwargs": {"enable_thinking": False}});reasoning_contentthen comes back empty. - Image and video requests need no extra server flags.
The public FP8 and INT4 repos’
tokenizer_config.json declares auto_map.AutoProcessor = processing_minicpmv4_7.MiniCPMV4_7Processor, but the repos do not ship that file, so SGLang cannot load their processor. The FP8 and INT4 commands therefore load the tokenizer and processor from the base repo with --tokenizer-path openbmb/MiniCPM-V-4.7-35B-A3B, which has the same tokenizer.json and chat template. Keep the flag until OpenBMB updates the FP8 and INT4 repos to ship the file or drop the auto_map entry.3. Advanced Usage
3.1 Reasoning
MiniCPM-V 4.7 thinks by default. The reasoning parser in every generated command returns the thinking trace inmessage.reasoning_content and the final answer in message.content.
Reasoning (Python)
Reasoning (Python)
Example
Example Output
Example Output
Output
On GSM8K-style prompts that ask for the answer in
\boxed{}, the model can write the final answer inside the thinking block and stop without emitting </think>, so the reasoning parser leaves content empty. Clients that read only content, such as accuracy-eval harnesses, should either serve without --reasoning-parser or also read reasoning_content.3.2 Tool calling
The tool-call parser in every generated command returns calls inmessage.tool_calls, with the arguments as a JSON string. Because thinking is on, print reasoning_content and content alongside the calls.
Tool calling (Python)
Tool calling (Python)
Example
Example Output
Example Output
Output
tool role message with the tool’s result, then call the API again with the same tools list.
3.3 Per-request image processing
OpenAI-compatible/v1/chat/completions and /v1/completions requests accept mm_processor_kwargs, which overrides the image processor for that request only:
downsample_mode:"16x"(default) or"4x"."4x"keeps more visual tokens per tile.max_slice_nums: the maximum number of high-resolution slices.1sends the image without slicing.
Image token budget (Python)
Image token budget (Python)
Example
downsample_mode.
| Input | mm_processor_kwargs | Prompt tokens |
|---|---|---|
| One 1568×448 image | none (“16x”) | 355 |
| One 1568×448 image | 1291 | |
| Two images (1568×448 and 768×384) in one request | none (“16x”) | 556 |
| One 768×384 image | 93 |
"16x" and "4x" on the same image returns the matching token count and a correct answer each time.
For more API examples, see the SGLang Basic Usage Guide.