New to Rust? Grab our free Rust for Beginners eBook Get it free →
DeepSeek R1 Explained: How the Chain of Thought Model Works

DeepSeek-R1 can print a long reasoning trace before its answer, but that trace is not a dependable transcript of everything the model used. I checked that distinction against DeepSeek’s current documentation, the R1 paper, a local distilled-model run, and a faithfulness evaluation that included R1.
The result changes how you should use the model. Treat the final answer as something to verify, the visible reasoning as a debugging aid, and faithfulness as a separate property that needs its own test.
DeepSeek-R1 is a reasoning model family
DeepSeek-R1 is a large language model trained to spend extra inference tokens on difficult tasks such as mathematics, programming, and scientific reasoning. The model can produce intermediate text that looks like self-questioning, calculation, checking, and correction before it gives the final answer.
Calling R1 a “chain-of-thought model” is convenient but imprecise. Chain-of-thought describes the intermediate token sequence. The interesting part of R1 is how DeepSeek trained the model to discover and improve those sequences with reinforcement learning.
DeepSeek also released distilled models based on Qwen and Llama. Those smaller dense models learned from R1-generated reasoning data, but they are not compressed copies of the full R1 mixture-of-experts model. CodeForGeek’s guide to DeepSeek’s mixture-of-experts architecture explains that separate architectural layer.
R1-Zero learned reasoning from rewards
DeepSeek began with DeepSeek-R1-Zero, a version trained through reinforcement learning without supervised fine-tuning examples of worked solutions. The training task rewarded correct answers and properly formatted responses on problems with verifiable outcomes.
Group Relative Policy Optimization (GRPO) compared several answers produced for the same prompt. A group-relative score gave the model a learning signal without requiring a separate critic model for every update.
The R1 paper attributes the emerging longer reasoning, self-reflection, verification, and strategy changes to the reward signal rather than human-written intermediate steps.
R1-Zero also exposed a limit of reward-only training because its responses could mix languages and become difficult to read even when the answer was correct.
DeepSeek-R1 added readable training data
The released DeepSeek-R1 model used a longer pipeline:
- DeepSeek collected a small set of readable cold-start examples.
- The base model received supervised fine-tuning on those examples.
- Reinforcement learning improved reasoning on verifiable tasks.
- Rejection sampling kept useful model-generated solutions.
- A second supervised fine-tuning stage mixed reasoning and general-purpose data.
- A final reinforcement-learning stage improved helpfulness and safety alongside reasoning.
That distinction matters because R1 and R1-Zero support different claims. R1-Zero showed that reward signals can elicit reasoning behavior without human-written traces. DeepSeek-R1 combined that result with supervised data and a second reinforcement-learning stage to produce a model people could use more comfortably.
What happens when R1 answers a prompt
A reasoning request has two reader-visible parts. The model first generates intermediate reasoning tokens, then produces its final response.
DeepSeek’s current API documentation exposes these as reasoning_content and content. Current thinking-mode calls also treat conversation history differently depending on whether the model made a tool call. Reasoning content can be omitted from an ordinary follow-up, but it must be returned in the relevant context after a tool call.
The model is still predicting tokens throughout both phases. Words such as “wait,” “check,” or “another approach” can signal a useful correction, yet their presence alone does not prove that every causal factor behind the answer was verbalized.
My local test used a distilled R1 model
My CodeForGeek server test used deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B with Python 3.13.5 and llama-cpp-python 0.3.33. The saved command output below is the receipt. IQ2_M GGUF quantization kept the model within a server that has one CPU core and less than 1 GB of physical memory.
That hardware constraint is part of the result. A 1.5B distilled model can run locally after quantization, but it should not be used as a stand-in for benchmark claims about the full DeepSeek-R1 or R1-0528 models.
The environment used unpinned current packages:
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade llama-cpp-python huggingface-hub
The test asked the model to apply a 15 percent discount to $240 and then add 8 percent sales tax. The expected final price is $220.32.
from llama_cpp import Llama
model = Llama(
model_path="DeepSeek-R1-Distill-Qwen-1.5B-IQ2_M.gguf",
n_ctx=1024,
n_threads=1,
verbose=False,
)
response = model.create_chat_completion(
messages=[{
"role": "user",
"content": (
"A store discounts a $240 item by 15%, then adds 8% sales tax. "
"Calculate the final price in no more than four short lines. "
"Put only the dollar amount on the final line."
),
}],
temperature=0.6,
top_p=0.95,
max_tokens=512,
)
print(response["choices"][0]["message"]["content"])
My run returned $220.32, and the verifier matched that amount against the independent calculation. The model ignored the four-line limit and produced a long reasoning section before repeating the calculation in its final response. That instruction miss is useful evidence too: a correct answer does not guarantee format compliance.

The useful lesson is the boundary around the test. The output can show whether this quantized distilled model solved one arithmetic prompt. It cannot establish the full model’s accuracy, chain-of-thought faithfulness, or performance on coding benchmarks.
Visible chain-of-thought is not an audit log
A readable trace can help you spot an arithmetic slip, a misunderstood requirement, or an abandoned approach. It still cannot prove that the model disclosed every influence on its answer.
Anthropic tested that question by inserting hints into evaluation prompts and checking whether models admitted using them. DeepSeek R1 mentioned the injected hint in 39 percent of tested cases on average. The model often used information that its visible reasoning did not acknowledge.
I would therefore avoid using reasoning_content as a security boundary or compliance record. Save it for debugging and evaluation, then validate the final answer against tests, tools, or an external source.
R1-0528 improved depth and benchmark scores
DeepSeek’s official R1-0528 model card reports higher scores than the original R1 under the company’s stated evaluation settings. AIME 2025 Pass@1 rose from 70.0 to 87.5, and LiveCodeBench Pass@1 rose from 63.5 to 73.3.
The same model card says average reasoning length on AIME increased from about 12,000 tokens to 23,000 tokens. More test-time computation can help on difficult work, but longer reasoning also increases latency and token use. Length by itself is not a quality measure.
R1-0528 also changed usage guidance. System prompts became supported, and users no longer needed to force the thinking format with an opening think tag.
The current API has moved beyond the R1 name
DeepSeek’s current API documentation now demonstrates thinking mode with DeepSeek V4 model names. The R1 paper and model weights remain useful for understanding the training breakthrough, but a new integration should follow the current API documentation rather than copying an older deepseek-reasoner example unchanged.
If you want the hosted product rather than a local model, CodeForGeek’s current guide to using DeepSeek for free covers the available entry points. The DeepSeek versus ChatGPT comparison helps when the decision is about product fit rather than R1’s training method.
Evaluate the answer, trace, and cost separately
Use three checks when you evaluate a reasoning model:
- Score the final answer with a test, exact calculation, or task-specific grader.
- Inspect the visible trace for debugging clues without treating it as complete disclosure.
- Measure latency and token use on the workload you will run.
I would add a faithfulness test whenever the trace will influence a safety or governance decision. Inject a controlled hint or irrelevant feature, observe whether it changes the answer, and check whether the reasoning acknowledges that influence.
DeepSeek-R1 matters because reinforcement learning elicited useful reasoning behavior at scale and transferred some of that behavior to smaller models. The practical habit is simpler: verify the answer, inspect the trace, and never confuse readable reasoning with proof of how the answer was produced.
Sources
– DeepSeek-R1 paper – DeepSeek-R1-0528 model card – DeepSeek Thinking Mode documentation – Anthropic’s chain-of-thought faithfulness evaluation




