Practical, multilingual resource hub for DeepSeek V4.
🌍 Read in your language
English · 简体中文 · Français · العربية · 日本語 · Deutsch · हिन्दी
| DeepSeek-V4-Pro | DeepSeek-V4-Flash | |
|---|---|---|
| Total parameters | 1.6 T MoE | 284 B MoE |
| Activated per token | 49 B | 13 B |
| Experts (routed × active) | 384 × 6 | 256 × 6 |
| Context length | 1,000,000 tokens | 1,000,000 tokens |
| Training tokens | 33 T | 32 T |
| Precision | FP4 (experts) + FP8 | FP8 |
| API price — input | $1.74 / Mtok | $0.14 / Mtok |
| API price — output | $3.48 / Mtok | $0.28 / Mtok |
| Weights license | MIT — commercial use OK | MIT — commercial use OK |
| Reasoning modes | Thinking · Non-Thinking | Thinking · Non-Thinking |
Full spec: docs/architecture.md · Benchmarks: docs/benchmarks.md · Pricing: docs/pricing.md · Comparison tables: docs/comparison.md.
V4 speaks both OpenAI ChatCompletions and Anthropic Messages protocols.
# OpenAI SDK
from openai import OpenAI
client = OpenAI(api_key="sk-...", base_url="https://api.deepseek.com/v1")
resp = client.chat.completions.create(
model="deepseek-v4-pro", # or "deepseek-v4-flash"
messages=[{"role": "user", "content": "Prove √2 is irrational."}],
)
print(resp.choices[0].message.content)# Anthropic SDK
from anthropic import Anthropic
client = Anthropic(api_key="sk-...", base_url="https://api.deepseek.com/anthropic")
msg = client.messages.create(
model="deepseek-v4-pro", max_tokens=1024,
messages=[{"role": "user", "content": "Prove √2 is irrational."}],
)
print(msg.content[0].text)More: API quickstart · Thinking mode · Tool calling · Raw curl · Local vLLM.
- API quickstart — OpenAI / Anthropic compatible endpoints.
- Local deployment — vLLM, SGLang, transformers.
- Migration from DeepSeek V3 — the deprecation deadline and how to swap.
- Migration from OpenAI — drop-in, 2-line change.
- Migration from Anthropic Claude — drop-in, 2-line change.
- Benchmarks — headline scores with primary-source citations.
- Architecture — CSA+HCA attention, mHC, Muon, On-Policy Distillation.
- Pricing — API, managed hosts, self-hosting TCO.
- Comparison tables — V4 vs. Claude / GPT / Gemini / Qwen / Llama / Mistral / GLM.
- Recipes — 10 copy-paste patterns with cost estimates: whole-repo review, long-doc QA, coding agent, batch pipeline, math tutor, LiteLLM fallback, self-host, Aider, Cline, synthetic data.
- Prompting guide — temperature, Thinking mode, prompt style.
- Fine-tuning — LoRA / QLoRA / full fine-tune recipes and hardware.
- FAQ — the questions everyone asks.
- Official links — canonical URLs.
- Awesome community — tools, runtimes, hosts, fine-tunes.
- Related papers — V4 paper + upstream lineage.
OpenAI SDK · Anthropic SDK · Thinking mode · Tool calling · curl.
CLI tools (tools/)
Single-file Python CLIs. pip install openai is the only dependency.
- v4-cost-calc — compare monthly spend across V4, Claude, GPT, Gemini.
- v4-migrate-env — scan a codebase for OpenAI/Anthropic config and rewrite to V4.
- v4-repo-review — pack a repo into V4-Pro and get a structured code review.
- v4-chat — streaming terminal REPL with
/think,/model,/save.
Self-hosting (deploy/)
OpenAI-compatible endpoint on your own hardware.
- Docker Compose —
docker compose upand you're serving V4. - Kubernetes — production
Deployment+Service+ConfigMap. - systemd — bare-metal unit file.
Prompt library (prompts/)
Battle-tested system prompts. Each declares its recommended model and mode.
- Coding: code-reviewer, bug-hunter, refactor-planner, test-writer
- Agents: coding-agent, research-agent, planner
- Writing: technical-writer, translator
- Analysis: contract-reviewer, paper-summarizer
- Education: math-tutor
PRs welcome — corrections, translations, new benchmark reproductions, new community tools. See CONTRIBUTING.md.
Especially wanted: native-speaker review of Arabic, Hindi, Japanese, German, French pages; benchmark reproductions on your own data; deployment notes for non-Linux, AMD GPUs, Apple Silicon.
- Original content of this repository: MIT.
- DeepSeek V4 weights and technical report: MIT, © DeepSeek-AI.
- "DeepSeek" is a trademark of DeepSeek-AI. This project is not affiliated with DeepSeek-AI — see DISCLAIMER.
AI小蓝鲸 — I post about AI and open models in Chinese. Same handle across platforms:
| Platform | Handle |
|---|---|
| 📕 Xiaohongshu (小红书) | AI小蓝鲸 |
| 📺 Bilibili (B站) | AI小蓝鲸 |
| 🎵 Douyin (抖音) | AI小蓝鲸 |
| 🎬 WeChat Channels (视频号) | AI小蓝鲸 (search inside WeChat) |
PRs from everywhere are welcome regardless of platform.
Star ⭐ if this saves you time. Open an issue or PR if anything is wrong or missing.