DeepSeek-V4.1-Flash
A 552B-parameter multimodal MoE model activating 8B/16B per token, with a 1M-token context for agentic workloads.
Model details
View repositoryDeepSeek-V4.1-Flash is a multimodal Mixture-of-Experts model with a 552B-parameter backbone, activating just 8B parameters per token during prefill and 16B during decoding. It natively processes images and text, supports a 1M-token context window, and introduces a Causal Encoder-Decoder architecture with Compressed Sparse Attention 2 to make long-context inference more efficient. Configurable reasoning-effort levels let developers trade latency and cost for deeper deliberation.
Compared with DeepSeek-V4-Flash-0731, DeepSeek-V4.1-Flash reduces the global KV-cache footprint by roughly 4× while delivering stronger coding, reasoning, and agentic performance. This makes it well suited to multimodal agents and input-heavy workloads that require long-context understanding without sacrificing inference efficiency.
1import os
2from openai import OpenAI
3
4client = OpenAI(
5 base_url="https://inference.baseten.co/v1",
6 api_key=os.environ["BASETEN_API_KEY"],
7)
8
9response = client.chat.completions.create(
10 model="deepseek-ai/DeepSeek-V4.1-Flash",
11 messages=[
12 {"role": "user", "content": "<PROMPT>"},
13 ],
14 max_tokens=4096,
15 temperature=1,
16 top_p=0.95,
17 extra_body={
18 "chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}
19 },
20)
21
22message = response.choices[0].message
23print(message.reasoning_content)
24print(message.content)1{
2 "id": "chatcmpl-7f3a9c2e14b84d1e9a0c5b2f8d6e1a37",
3 "object": "chat.completion",
4 "created": 1785600000,
5 "model": "deepseek-ai/DeepSeek-V4.1-Flash",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "reasoning_content": "<REASONING CONTENT>",
12 "content": "<RESPONSE CONTENT>"
13 },
14 "finish_reason": "stop"
15 }
16 ],
17 "usage": {
18 "prompt_tokens": 38,
19 "completion_tokens": 214,
20 "total_tokens": 252,
21 "completion_tokens_details": {
22 "reasoning_tokens": 61
23 }
24 }
25}