← Master Index
Vol. 22 Module 22.1 Lecture

DeepSeek

Frontier LLM Providers

How This Lesson Fits the Module & Volume

Vol. 11.5 DeepSeek introduced the family: open weights + API, coding/reasoning narrative, efficiency claims. This Vol. 22 card is for engineers picking a vendor after Meta and Mistral. DeepSeek became a shortlist staple because hosted API prices and reasoning models (R1-class) disrupted “only the US labs can do hard math/code”—still without inventing secret training recipes or fake leaderboard numbers.

Procurement is not only quality: data residency, export controls, and ToS for a China-based lab matter for many Vol. 21 regulated products. Treat public papers and model cards as the ceiling of what you may claim. Next: Alibaba Qwen, another major open multilingual line.

Learning Objectives

By the end of this lesson, students should be able to:

  • Identify DeepSeek as a dual-track (open weights + API) lab strong on coding/reasoning SKUs.
  • Separate chat/coder models from reasoning (R1-class) SKUs qualitatively.
  • Fill Pricing / Strengths / Weaknesses without fake dollar prices or invented benches.
  • List non-quality risks: data path, jurisdictional policy, version churn.
  • Sketch an OpenAI-compatible DeepSeek API call and a self-host alternative.
  • Decide when DeepSeek is a primary vendor, a cheap reasoning failover, or off-limits.
Definition

DeepSeek (DeepSeek AI) is a lab that releases open-weight LLMs (general, coder, and reasoning-oriented lines—names churn) and operates a hosted API plus consumer chat. Public positioning emphasizes competitive coding/math/reasoning and cost-efficient training/serving. Reasoning SKUs (often discussed as DeepSeek-R1 and successors) use extra test-time compute. Licenses and endpoints differ by release—read the card. This lecture does not assert unpublished internals.

Product Surfaces

SurfaceJobWatch-out
Chat / general open weights + APIAssistants, RAG, agents at aggressive price/performanceRapid version churn; pin IDs
Coder-oriented SKUsCompletion and coding chat (Vol. 21 coding assistants)Still HITL + tests; not malware help
Reasoning (R1-class)Hard multi-step math/code/planning with thinking tracesLatency + token blow-ups if used on every turn
Consumer DeepSeek chatExploration UINot your production DPA
Third-party hostsSame weights on Together/Fireworks/Groq/HF etc.Host ToS + quantization variant ≠ DeepSeek’s own API policy

Pricing / Strengths / Weaknesses

AxisPricing (qualitative)StrengthsWeaknesses
Hosted chat API Token-metered; publicly positioned as aggressive vs US flagship list prices. Cache / off-peak / context-caching promotions appear—read the live page. Consumer chat ≠ API invoice. Fast time-to-spike via OpenAI-compatible endpoints; strong coding/reasoning reputation on many public evals (still run yours). Jurisdictional/data-path review for regulated Vol. 21 verticals; less mature Western enterprise control plane than Azure/Vertex.
Reasoning SKUs Thinking tokens can dominate the bill; cheaper unit price × long traces may still rival a mid-tier GPT/Claude call. Measure. Often the reason DeepSeek enters an RFP at all. Not a replacement for tools+RAG; traces may leak chain-of-thought into logs (privacy).
Open weights / self-host GPU/ops or third-party host. Large MoE/reasoning distill variants have very different VRAM needs—use Vol. 18.4, not folklore. Reproduce and fine-tune; run in your VPC if license allows. Serving complexity; distill ≠ full R1; license + export rules still apply.
Enterprise / compliance Whatever DPA/region options DeepSeek or a host currently offers—do not invent US-only regions. Some teams accept DeepSeek only via a Western host of the open weights. Policy blockers can outweigh token savings. Document the decision.

Vs Llama / Mistral / Qwen

  • Reasoning SKUs are a sharper product line
  • API price narrative is often more aggressive
  • Ecosystem/fine-tune volume still usually trails Llama

Vs OpenAI / Anthropic reasoning

  • Possible cost win on hard tasks—only if eval + latency agree
  • Weaker first-party multimodal/cloud estate
  • Different trust/jurisdiction conversation

Pick DeepSeek when

  • Coding/reasoning eval wins at acceptable risk
  • You can self-host or use an approved host
  • You need a cheap reasoning failover in a router

Why DeepSeek disrupted shortlists

  • Open + API dual track with reasoning focus
  • Compatible client = low integration cost
  • Forces US labs to compete on price

Why RFPs still say no

  • Data residency / geopolitics / vendor risk
  • Churn and eval hygiene (Vol. 19)
  • Thinking traces in logs (Vol. 20)

Practical API Sketch

DeepSeek’s API has been documented as OpenAI-compatible. Confirm base URL and model IDs. Route reasoning SKUs only to hard intents.

# DeepSeek API — OpenAI-compatible sketch (verify base_url + IDs). # pip install openai # export DEEPSEEK_API_KEY=... from openai import OpenAI client = OpenAI( api_key=__import__("os").environ["DEEPSEEK_API_KEY"], base_url="https://api.deepseek.com", # confirm current docs ) def complete(model: str, user: str) -> str: r = client.chat.completions.create( model=model, messages=[ {"role": "system", "content": "Scoped coding assistant. HITL required. No exploit/malware help."}, {"role": "user", "content": user}, ], temperature=0.2, ) print(r.usage) return r.choices[0].message.content # Router (Vol. 21): cheap chat vs reasoning SKU — names are stand-ins. FAST = "deepseek-chat" REASON = "deepseek-reasoner" # R1-class; pin real IDs intent = "hard_math" # from your classifier model = REASON if intent == "hard_math" else FAST print(complete(model, "Outline when DeepSeek reasoning is worth the extra tokens.")) # Self-host: vLLM/HF on approved hardware. Third-party host ≠ DeepSeek ToS. # Do not log full thinking traces if they contain sensitive user data (Vol. 20).

Related Lectures

LectureRole
Mistral AIPrevious European dual-track lab
DeepSeek (11.5)Family lineage
OpenAI SDKCompatible client
Coding assistantsHITL coding product DeepSeek often powers
Privacy / SecurityData path + defensive use only
Alibaba Cloud (Qwen)Next multilingual open family + cloud
Common Misconception

DeepSeek is always cheaper once you enable reasoning on every turn. Second: blog benches replace Vol. 19. Third: open weights mean there is no license or export issue. Fourth: this lecture reveals secret training recipes. Fifth: DeepSeek chat app ToS equals the API and equals a Western host of the same weights. Sixth: coding SKUs authorize exploit or malware generation (they do not; Vol. 20 stays defensive).

Knowledge Check

  1. Short Answer: What dual track does DeepSeek share with Mistral? Answer: Open weights plus a hosted API (and consumer chat).
  2. True/False: Reasoning SKUs are free and add no latency. Answer: False.
  3. Multiple Choice: A non-quality reason a bank might reject DeepSeek’s own API is: (a) jurisdictional/data-path policy, (b) it cannot do math, (c) it is only a still-image model. Answer: (a).
  4. Short Answer: Name one DeepSeek SKU theme besides general chat. Answer: Coder-oriented and/or reasoning (R1-class).
  5. True/False: This page publishes fake DeepSeek dollar prices to memorize. Answer: False.
  6. Multiple Choice: Thinking traces in logs are mainly a: (a) Vol. 20 privacy concern, (b) GPU driver issue, (c) SAM mask issue. Answer: (a).
  7. Short Answer: Which Vol. 11.5 lecture is the DeepSeek family home? Answer: DeepSeek.
  8. True/False: A Western host serving DeepSeek weights has identical ToS to DeepSeek’s API. Answer: False.
  9. Multiple Choice: Best routing practice: (a) fast SKU by default, reasoning for hard intents, (b) reasoner on every greeting, (c) no eval. Answer: (a).
  10. Short Answer: Which provider lecture follows DeepSeek? Answer: Alibaba Cloud (Qwen).

Key Takeaways

  • DeepSeek: open + API lab with chat, coder, and reasoning (R1-class) SKUs.
  • Qualitative pricing can look aggressive; reasoning traces can erase the savings.
  • Strength: coding/reasoning + compatible API. Weakness: jurisdiction/churn/privacy of traces.
  • Self-host or approved host may be the only path some Vol. 21 verticals allow.
  • Next: Alibaba Cloud (Qwen).
Trainer’s Guide

Lab: Students write a go/no-go memo for DeepSeek on a fictional regulated product: quality hypothesis, data path, host vs official API, reasoning routing, logging of traces. Optional compatible spike. No exploit tasks.

Whiteboard: Router diagram: intent → fast Llama/Mistral/Qwen vs DeepSeek reasoner vs GPT/Claude flagship.

Recap: DeepSeek is the coding/reasoning dual-track card—with policy as important as price. Next is Qwen.