Bonus: Top up now and we'll double your first deposit — get x2 credits instantly.

DeepSeek V3.1: Self-Hosting & Deployment Guide

DeepSeek-V3.1 is a large hybrid reasoning model (671B parameters, 37B active) that supports both thinking and non-thinking modes via prompt templates.

What is DeepSeek V3.1?

DeepSeek-V3.1 is a large hybrid reasoning model (671B parameters, 37B active) that supports both thinking and non-thinking modes via prompt templates.

Developer: DeepSeek. Released 21 Aug 2025. Context window 163,840 tokens, up to 32,768 output tokens.


How to run DeepSeek V3.1 yourself

Open weights (mit), 684.5B parameters. Below: how much memory the weights need at each quantization, which hardware fits them, and the commands to serve it.

DeepSeek V3.1 VRAM requirements

Precision / quantizationWeightsFigureSource
BF16 (full precision)1369.1 GBEstimate684.5B params × 2 bytes
AWQ 4-bit398.1 GBFile sizeQuantTrio/DeepSeek-V3.1-AWQ
MLX 4-bit377.6 GBFile sizemlx-community/DeepSeek-V3.1-4bit
GGUF Q8_0713.3 GBFile sizebartowski/deepseek-ai_DeepSeek-V3.1-GGUF
GGUF Q4_K_M409.2 GBFile sizebartowski/deepseek-ai_DeepSeek-V3.1-GGUF
GGUF Q2_K237.8 GBFile sizebartowski/deepseek-ai_DeepSeek-V3.1-GGUF

File size = actual download size on Hugging Face. Estimate = parameter count × bytes per weight. Weights only — the KV cache for long contexts needs extra memory; the fit tables below add 15% headroom as a rule of thumb.

GPU requirements: deploy DeepSeek V3.1 on your hardware

HardwareBF16 (full precision)AWQ 4-bitMLX 4-bitGGUF Q8_0GGUF Q4_K_MGGUF Q2_K
NVIDIA H200141 GB
NVIDIA H10080 GB
NVIDIA A100 80GB80 GB
NVIDIA L40S48 GB

GPUs needed per variant.

HardwareGGUF Q8_0GGUF Q4_K_MGGUF Q2_K
RTX 509032 GB
RTX 409024 GB
RTX 309024 GB

GGUF via llama.cpp; more cards or CPU offload for larger files.

HardwareGGUF Q8_0GGUF Q4_K_MGGUF Q2_KMLX 4-bit
Mac, 512 GBM3 UltraFits
Mac, 192 GBM2 Ultra
Mac, 128 GBM4 Max / M3 Max
Mac, 64 GBM4 Pro / Max

Assumes ~75% of unified memory is usable by the GPU.

HardwareBF16 (full precision)AWQ 4-bitMLX 4-bitGGUF Q8_0GGUF Q4_K_MGGUF Q2_K
AWS p5.48xlarge8× H100 · 640 GBFitsFitsFitsFits
AWS p4de.24xlarge8× A100 80GB · 640 GBFitsFitsFitsFits
AWS g6e.12xlarge4× L40S · 192 GB
Google Cloud a3-highgpu-8g8× H100 · 640 GBFitsFitsFitsFits
Azure ND H100 v58× H100 · 640 GBFitsFitsFitsFits

Whole-instance GPU memory; public instance specs.

Serve it yourself

pip install -U vllm
vllm serve deepseek-ai/DeepSeek-V3.1
pip install 'sglang[all]'
python -m sglang.launch_server --model-path deepseek-ai/DeepSeek-V3.1
llama-server -hf bartowski/deepseek-ai_DeepSeek-V3.1-GGUF:Q4_K_M \
  --ctx-size 32768 --n-gpu-layers 99
pip install -U mlx-lm
mlx_lm.generate --model mlx-community/DeepSeek-V3.1-4bit --prompt "Hello"

Commands use the official repositories above; vLLM and SGLang expose an OpenAI-compatible endpoint.

Not on LLM.API yet

We do not route this model through our API at the moment. Browse the models you can call today — most workloads have a close match already live.

Providers

Companies that host this model today, with their public list prices. LLM API does not route this model yet.

List price by provider ($ / 1M tokens)

InputOutput
DeepInfra$0.25 in
$0.95 out
SiliconFlow$0.27 in
$1 out
Novita$0.27 in
$1 out
AtlasCloud$0.3 in
$0.95 out
CoreWeave$0.55 in
$1.65 out
Mara$0.6 in
$1.7 out
Google$0.6 in
$1.7 out
SambaNova$0.65 in
$1.5 out

Provider list prices from OpenRouter's public catalogue.

ProviderInput /MOutput /MCache read /MContextPrecisionUptime (24h)
DeepInfra$0.25$0.95$0.13163,840fp499.9%
SiliconFlow$0.27$1163,840fp897.7%
Novita$0.27$1$0.135131,072fp8100.0%
AtlasCloud$0.3$0.95$0.13131,072fp898.5%
CoreWeave$0.55$1.65$0.55161,000fp8100.0%
Mara$0.6$1.7131,07296.5%
Google$0.6$1.7163,8400.0%
SambaNova$0.65$1.5131,072fp899.7%

Source: OpenRouter public catalogue. Last updated 23 Sep 2026.

Not available on LLM API yet

We do not route this model through our API at the moment, so there is no endpoint or code snippet for it yet. Browse the models you can call today — most workloads have a close match already live.

Browse available models

Why Build on LLM.API?

One unified API. Every major model. Built-in reliability, cost control, and observability.

  • Intelligent Model Routing

    Dynamically route each request to the optimal model across providers based on latency, price, and quality—without changing your integration or redeploying code.

    One API, many models
  • Cost-Aware Orchestration

    Automatically balance premium and budget models with per-call controls, caps, and policies so you can ship fast while keeping AI spend predictable and optimized.

    Control spend by design
  • Resilient Fallback Flows

    Define cascading provider and model fallbacks so timeouts, quota limits, or regional outages transparently fail over—maintaining uptime without custom retry logic.

    Fail soft, not hard
  • End-to-End Observability

    Trace every request across providers with logs, metrics, and structured payloads to debug prompts, compare models, and tune performance from a single dashboard.

    See every token
  • Task-Level Abstractions

    Call high-level tasks like chat, generate, extract, or rank instead of vendor-specific APIs, so you can swap models without rewriting business logic.

    Code to tasks, not vendors
  • High-Throughput Batch Jobs

    Run large-scale inference workloads as managed batches with concurrency, retries, and progress tracking built in—perfect for backfills, evaluations, and data processing.

    Crush your backlogs

5 Core Capabilities

  • Hybrid thinking and non-thinking modes

    One set of weights serves both a direct chat mode and a deliberate reasoning mode, selected by the prompt template rather than by switching model.

  • Agentic tool use

    Post-training focused on multi-step tool calling, which lifted its reported SWE-bench Verified agent score to 66.0 from 45.4 on V3-0324.

  • 128K context handling

    Context was extended to 128,000 tokens through an added long-context pre-training phase, enough for large codebases and long documents.

  • Code generation and repair

    Reported 71.6% on the Aider polyglot coding benchmark, the result that moved the V3 family into production coding work.

  • Open weights under MIT

    671B total parameters with 37B active per token, published openly so any provider can host it and you can self-host the same checkpoint.

6 Most Valuable Use Cases

  • Coding agents that plan, edit files and re-run tests across a repository
  • Whole-repository review and refactoring inside a 128K context window
  • Cost-sensitive batch reasoning where a frontier model is too expensive per task
  • Tool-calling backends that chain search, database and API steps
  • Bilingual Chinese and English drafting, translation and summarisation
  • Self-hosted deployments that need open weights under a permissive licence

When to Use — When NOT to Use

Use it if...

  • You want near-frontier coding quality at open-weight pricing
  • Your workload benefits from switching between fast replies and deeper reasoning
  • You run multi-step agents that depend on reliable tool calling
  • You need the option to self-host the same checkpoint later

Avoid if...

  • You need image, audio or video input — this model is text in, text out
  • Your prompts exceed 128,000 tokens
  • You want the newest DeepSeek generation: V3.2 and V4 supersede it on maths, context and coding
  • You need a hard latency guarantee without benchmarking a specific host first

DeepSeek V3.1 benchmark scores

Intelligence index

This model14
Tracked median12

Scale: 0-100 index points

Reference price per 1M tokens

Input$0.57
Output$1.68

Bars compare published reference list prices, not LLM.API pricing.

Artificial Analysis Intelligence Index14
Median index across all tracked models12
SWE-bench Verified (official model card)66.0
Aider polyglot (published evaluation)71.6%
Reference input price$0.57 / 1M tokens
Reference output price$1.68 / 1M tokens

Scores as published by Artificial Analysis and the official model card (source). Reference prices are provider list prices, not LLM.API pricing. Figures with no published value are omitted.

What developers say about DeepSeek V3.1

Summarised from publicly published developer write-ups and the model's own documentation. Opinions are the sources’, not LLM.API’s.

  • Reviewers treat V3.1 as the release where DeepSeek became a credible agent backbone, thanks to the jump in SWE-bench Verified.
  • The hybrid think / non-think toggle is repeatedly called the practical headline feature, because it removes the need to route between two models.
  • Cost is the recurring theme: testers report frontier-adjacent coding results at a small fraction of proprietary pricing.
  • By 2026 it is described as the stable, well-understood fallback rather than the leading choice, superseded by later DeepSeek releases.

Frequently Asked Questions

  • What is DeepSeek V3.1?

    DeepSeek-V3.1 is a large hybrid reasoning model (671B parameters, 37B active) that supports both thinking and non-thinking modes via prompt templates.

  • Who makes DeepSeek V3.1?

    DeepSeek V3.1 is developed by DeepSeek. It was released on 21 Aug 2025.

  • What is the context window of DeepSeek V3.1?

    163,840 tokens, with up to 32,768 output tokens per response.

  • How much does DeepSeek V3.1 cost?

    The reference list price is $0.25 per 1M input tokens and $0.95 per 1M output tokens. The cheapest host right now is DeepInfra at $0.25 / $0.95 per 1M tokens.

  • Which providers host DeepSeek V3.1?

    DeepInfra, SiliconFlow, Novita, AtlasCloud, CoreWeave, Mara, Google, SambaNova.

  • What modalities does DeepSeek V3.1 support?

    Text input and text output. It supports tool calling, structured outputs, JSON mode, reasoning.

  • Can I use DeepSeek V3.1 through LLM API?

    Not yet. LLM API does not route this model at the moment. Browse the models page for close alternatives you can call today with one API key.

Get one key to every model

Swap your API key. Keep your code.