Models / DeepSeek
Chat
Reasoning
Vision

DeepSeek V4.1 Flash

Million-token multimodal intelligence with radically compressed KV cache

About model

DeepSeek V4.1 Flash is DeepSeek's multimodal Mixture-of-Experts model built around one idea pushed to its limit: compressing the KV cache. A Causal Encoder-Decoder architecture, 20 encoder layers followed by 20 decoder layers, lets the model activate just 8B of its 552B backbone parameters during prefill and 16B during decode, cutting cost on input-heavy agentic workloads. Compressed Sparse Attention 2 and FP4 KV caching shrink the global cache to 890 bytes per token, roughly a quarter of DeepSeek V4 Flash, across a 1M-token context. The model natively processes images and text, trained from scratch on 45T multimodal tokens, and reasoning effort is continuously adjustable from 1 to 100 per request. Across DeepSeek's published agentic suite it outperforms the far larger V4 Pro. Released under the MIT license. Available on Together AI.

‍

Backbone Parameters

552B

8B activated in prefill and 16B in decode, plus 196B of Engram lookup memory

Bytes of KV Cache per Token

890

Roughly one-quarter of DeepSeek V4 Flash, built for cheap million-token context

Reasoning Effort Range

1-100

Continuously adjustable per request, trading inference cost for accuracy

Model key capabilities
  • Input-Heavy Agentic Efficiency: Encoder-decoder design activates 8B parameters during prefill and 16B during decode, cutting cost where agent workloads are dominated by large inputs
  • Frontier Agentic Coding: Leads DeepSeek's published agentic suite, outperforming the much larger V4 Pro on terminal, repository, and automation tasks
  • Continuously Adjustable Reasoning: Effort set as an integer from 1 to 100 per request, trading inference cost against accuracy on a single deployment
  • Production-Ready Infrastructure: 99.9% SLA, available on serverless and dedicated infrastructure
Performance benchmarks

Model

FrontierMath Tier 4

GPQA Diamond

HLE

SciCode

GDPval-AA

Terminal-Bench 2.1

Agent Arena

FrontierCode

DeepSWE

90.9

36.8

Related open-source models

Competitor closed-source models

Claude Fable 5

87.8%

92.6%

53%

60%

62%

85%

53.5%

70%

Claude Opus 5

73.2%

93.2%

53%

56%

68%

89%

+16.4pp

53.4%

74%

GPT-5.6 Sol

82.9%

94.1%

47%

56%

61%

88%

47.5%

73%

Grok 4.5

24.4%

93.1%

40%

54%

51%

82%

+4.2pp

42.4%

54%

GPT-5.6 Luna

61.0%

91.1%

37%

53%

54%

81%

39.8%

67%

  • API usage

    • cURL
    • Python
    • Typescript

    Endpoint:

    deepseek-ai/DeepSeek-V4.1-Flash

    curl -X POST "https://api.together.xyz/v1/chat/completions" \
      -H "Authorization: Bearer $TOGETHER_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "deepseek-ai/DeepSeek-V4.1-Flash",
        "messages": [
          {
            "role": "user",
            "content": "What are some fun things to do in New York?"
          }
        ]
    }'
    
    from together import Together
    
    client = Together()
    
    response = client.chat.completions.create(
      model="deepseek-ai/DeepSeek-V4.1-Flash",
      messages=[
        {
          "role": "user",
          "content": "What are some fun things to do in New York?"
        }
      ]
    )
    print(response.choices[0].message.content)
    
    import Together from 'together-ai';
    const together = new Together();
    
    const completion = await together.chat.completions.create({
      model: 'deepseek-ai/DeepSeek-V4.1-Flash',
      messages: [
        {
          role: 'user',
          content: 'What are some fun things to do in New York?'
         }
      ],
    });
    
    console.log(completion.choices[0].message.content);
    
  • Model card

    Architecture Overview:
    • Causal Encoder-Decoder (CED): a 40-layer Transformer organized as a 20-layer causal encoder followed by a 20-layer decoder, with the decoder's global KV cache projected from the final encoder hidden states
    • 552B backbone parameters activating 8B per token in prefill and 16B in decode, with 1 shared and 384 routed experts per MoE layer (6 routed active per token), plus 196B parameters of sparsely accessed Engram conditional memory
    • Compressed Sparse Attention 2 (CSA2) assigns each attention layer a Full, Reindex, or Reuse mode to share KV and indices across layers, with a Hierarchical Sparse Indexer bounding deeper indexing cost independently of context length
    • FP4 main KV caching and SWA Bounded Replay compress the global KV cache to 890 bytes per token, roughly one-quarter of DeepSeek V4 Flash and a 437-fold reduction versus DeepSeek V1
    • DeepSeek-ViT vision encoder trained from scratch with 2D-RoPE, processing images jointly with text from the start of pre-training; Single-Pass mHC residual mixing; DSpark speculative decoding
    • 1M-token context window

    Training Methodology:
    • Trained from scratch on a 45T-token multimodal corpus, with sparse attention trained at 64K sequence length and context extended to 1M tokens at 34T tokens
    • Post-training follows SFT, RL, and on-policy distillation, with the substantive changes in the data pipeline: large-scale automated synthesis of agent tasks and environments with progressive scaling
    • Published instruct results evaluated at maximum reasoning effort (100) with temperature 1.0 and top-p 0.95

    Performance Characteristics:
    • Terminal coding (Terminal Bench 2.1 / 3.0 / 4.0): 90.6 / 30.0 / 31.2, versus 82.7 / 7.6 / 7.0 for DeepSeek V4 Flash
    • Repository-scale engineering (DeepSWE v1.1): 74.2, versus 54.4 for V4 Flash and 62.7 for V4 Pro; repository generation (NL2Repo-Bench): 64.0
    • Agent tasks (AutomationBench: 54.8; Agents' Last Exam: 31.8; Humanity's Last Exam with tools: 63.9 — each above both V4 Flash and V4 Pro)
    • Reasoning (GPQA Diamond: 90.9; Humanity's Last Exam: 36.8; Codeforces rating: 3471; MathArena Apex: 65.6)
    • Security research (CyberGym vulnerability discovery: 88.1, up from 76.7 for V4 Flash; SEC-Bench Pro: 62.8)
    • Vision with tools (Chartography: 78.9; BabyVision: 89.6; ZeroBench-main: 49.0)
    • Consistent results across agent scaffolds, with DeepSWE v1.1 ranging 65.5 to 74.2 across Claude Code, Codex, OpenCode, and other major harnesses

    ‍

  • Prompting

    Together AI API Access:
    • Access DeepSeek V4.1 Flash via Together AI APIs using the endpoint deepseek-ai/DeepSeek-V4.1-Flash
    • Authenticate using your Together AI API key in request headers
    • Set reasoning_effort as an integer from 1 to 100 to continuously trade inference cost for accuracy; published results use 100
    • Recommended sampling: temperature 1.0 with top-p 0.95 or 1.0
    • Allow generous output budgets: DeepSeek recommends max_tokens of 256K or more within the 1M-token context
    • Supports text and image input in a single request
    • Available on Together AI serverless and dedicated infrastructure

    ‍

  • Applications & use cases

    Input-Heavy Agent Systems:
    • Run agents whose costs are dominated by large inputs: codebases, logs, and document sets
    • Sustain long trajectories cheaply with the compressed KV cache across 1M-token sessions
    • Tune reasoning effort per step, from quick tool routing to maximum-effort planning

    Frontier Software Engineering:
    • Resolve repository-scale engineering tasks at the top of DeepSeek's published range
    • Run terminal-based agent sessions that complete real environment tasks end to end
    • Apply the model to authorized security research, from vulnerability discovery to code audit

    Multimodal & Long-Context Analysis:
    • Reason over charts, documents, and images natively alongside text
    • Cross-reference million-token working sets in a single request
    • Combine visual understanding with tool use for chart and document workflows

    ‍

  • Model provider
    DeepSeek
  • Type
    Chat
    Reasoning
    Vision
  • Deployment
    Serverless
    Dedicated
  • Parameters
    552B
  • Activated parameters
    8B / 16B
  • Context length
    1M
  • Input price

    $0.30 / 1M tokens

    $0.006 (cached)/1M

  • Output price

    $1.20 / 1M tokens

  • Input modalities
    Text
    Image
  • Output modalities
    Text