Mr Fix It AMERICA
MrFixIt -MrFixItAmerica
www.MrFixIt.Ai
TJ@MrFixIt.Ai - 405-215-5985
DeepSeek Experts
TJ@MrFixIt.ai

Liang Wenfeng

 (Chinese梁文锋pinyinLiáng Wénfēng; born 1985) is a Chinese entrepreneur and businessman who is the co-founder of the quantitative hedge fund High-Flyer, as well as the founder and CEO of its artificial intelligence arm DeepSeek.
 
AFTER MEDIA is where...
 
  Mixture of experts (MoE) is a machine learning technique where multiple expert networks (learners) are used to divide a problem space into homogeneous regions.[1] MoE represents a form of ensemble learning.[2]

DeepSeek Janus Pro

Deep Seek V3 Team

DeepSeek R1 Explained by retired Microsoft Engineer

DeepSeek Explained to your GRANDMOTHER

Rise of DeepSeek and future impact on AI industry

EXPERTS :

Mixture of experts (MoE) is a machine learning technique where multiple expert networks (learners) are used to divide a problem space into homogeneous regions.[1] MoE represents a form of ensemble learning.[2]

Basic theory

[edit]

MoE always has the following components, but they are implemented and combined differently according to the problem being solved:

  • Experts , each taking the same input , and producing outputs .
  • A weighting function (also known as a gating function) , which takes input  and produces a vector of outputs .
  •  is the set of parameters. The parameter  is for the weighting function.
  • Given an input , the mixture of experts produces a single output by combining  according to the weights  in some way.

Both the experts and the weighting function are trained by minimizing some loss function, generally via gradient descent. There is much freedom in choosing the precise form of experts, the weighting function, and the loss function.

Meta-pi network

[edit]

The meta-pi network, reported by Hampshire and Waibel,[3] uses  as the output. The model is trained by performing gradient descent on the mean-squared error loss . The experts may be arbitrary functions.

In their original publication, they were solving the problem of classifying phonemes in speech signal from 6 different Japanese speakers, 2 females and 4 males. They trained 6 experts, each being a "time-delayed neural network"[4] (essentially a multilayered convolution network over the mel spectrogram). They found that the resulting mixture of experts dedicated 5 experts for 5 of the speakers, but the 6th (male) speaker does not have a dedicated expert, instead his voice was classified by a linear combination of the experts for the other 3 male speakers.

Adaptive mixtures of local experts

[edit]

The adaptive mixtures of local experts [5][6] uses a gaussian mixture model. Each expert simply predicts a gaussian distribution, and totally ignores the input. Specifically, the -th expert predicts that the output is , where  is a learnable parameter. The weighting function is a linear-softmax function:The mixture of experts predict that the output is distributed according to the probability density function:It is trained by maximal likelihood estimation, that is, gradient ascent on . The gradient for the -th expert is

and the gradient for the weighting function is

For each input-output pair , the weighting function is changed to increase the weight on all experts that performed above average, and decrease the weight on all experts that performed below average. This encourages the weighting function to learn to select only the experts that make the right predictions for each input.

The -th expert is changed to make its prediction closer to , but the amount of change is proportional to . This has a Bayesian interpretation. Given input , the prior probability that expert  is the right one is , and  is the likelihood of evidence . So,  is the posterior probability for expert , and so the rate of change for the -th expert is proportional to its posterior probability.

In words, the experts that, in hindsight, seemed like the good experts to consult, are asked to learn on the example. The experts that, in hindsight, were not, are left alone.

The combined effect is that the experts become specialized: Suppose two experts are both good at predicting a certain kind of input, but one is slightly better, then the weighting function would eventually learn to favor the better one. After that happens, the lesser expert is unable to obtain a high gradient signal, and becomes even worse at predicting such kind of input. Conversely, the lesser expert can become better at predicting other kinds of input, and increasingly pulled away into another region. This has a positive feedback effect, causing each expert to move apart from the rest and take care of a local region alone (thus the name "local experts").

Hierarchical MoE

[edit]

Hierarchical mixtures of experts[7][8] uses multiple levels of gating in a tree. Each gating is a probability distribution over the next level of gatings, and the experts are on the leaf nodes of the tree. They are similar to decision trees.

For example, a 2-level hierarchical MoE would have a first order gating function , and second order gating functions  and experts . The total prediction is then .

Variants

[edit]

The mixture of experts, being similar to the gaussian mixture model, can also be trained by the expectation-maximization algorithm, just like gaussian mixture models. Specifically, during the expectation step, the "burden" for explaining each data point is assigned over the experts, and during the maximization step, the experts are trained to improve the explanations they got a high burden for, while the gate is trained to improve its burden assignment. This can converge faster than gradient ascent on the log-likelihood.[8][9]

The choice of gating function is often softmax. Other than that, gating may use gaussian distributions[10] and exponential families.[9]

Instead of performing a weighted sum of all the experts, in hard MoE,[11] only the highest ranked expert is chosen. That is, . This can accelerate training and inference time.[12]

The experts can use more general forms of multivariant gaussian distributions. For example,[7] proposed , where  are learnable parameters. In words, each expert learns to do linear regression, with a learnable uncertainty estimate.

One can use different experts than gaussian distributions. For example, one can use Laplace distribution,[13] or Student's t-distribution.[14] For binary classification, it also proposed logistic regression experts, withwhere  are learnable parameters. This is later generalized for multi-class classification, with multinomial logistic regression experts.[15]

One paper proposed mixture of softmaxes for autoregressive language modelling.[16] Specifically, consider a language model that given a previous text , predicts the next word . The network encodes the text into a vector , and predicts the probability distribution of the next word as  for an embedding matrix . In mixture of softmaxes, the model outputs multiple vectors , and predict the next word as , where  is a probability distribution by a linear-softmax operation on the activations of the hidden neurons within the model. The original paper demonstrated its effectiveness for recurrent neural networks. This was later found to work for Transformers as well.[17]

Deep learning

[edit]

The previous section described MoE as it was used before the era of deep learning. After deep learning, MoE found applications in running the largest models, as a simple way to perform conditional computation: only parts of the model are used, the parts chosen according to what the input is.[18]

The earliest paper that applies MoE to deep learning dates back to 2013,[19] which proposed to use a different gating network at each layer in a deep neural network. Specifically, each gating is a linear-ReLU-linear-softmax network, and each expert is a linear-ReLU network. Since the output from the gating is not sparse, all expert outputs are needed, and no conditional computation is performed.

The key goal when using MoE in deep learning is to reduce computing cost. Consequently, for each query, only a small subset of the experts should be queried. This makes MoE in deep learning different from classical MoE. In classical MoE, the output for each query is a weighted sum of all experts' outputs. In deep learning MoE, the output for each query can only involve a few experts' outputs. Consequently, the key design choice in MoE becomes routing: given a batch of queries, how to route the queries to the best experts.

Sparsely-gated MoE layer

[edit]

The sparsely-gated MoE layer,[20] published by researchers from Google Brain, uses feedforward networks as experts, and linear-softmax gating. Similar to the previously proposed hard MoE, they achieve sparsity by a weighted sum of only the top-k experts, instead of the weighted sum of all of them. Specifically, in a MoE layer, there are feedforward networks , and a gating network . The gating network is defined by , where  is a function that keeps the top-k entries of a vector the same, but sets all other entries to . The addition of noise helps with load balancing.

The choice of  is a hyperparameter that is chosen according to application. Typical values are . The  version is also called the Switch Transformer. The original Switch Transformer was applied to a T5 language model.[21]

As demonstration, they trained a series of models for machine translation with alternating layers of MoE and LSTM, and compared with deep LSTM models.[22] Table 3 shows that the MoE models used less inference time compute, despite having 30x more parameters.

Vanilla MoE tend to have issues of load balancing: some experts are consulted often, while other experts rarely or not at all. To encourage the gate to select each expert with equal frequency (proper load balancing) within each batch, each MoE layer has two auxiliary loss functions. This is improved by [21] into a single auxiliary loss function. Specifically, let  be the number of experts, then for a given batch of queries , the auxiliary loss for the batch isHere,  is the fraction of time where expert  is ranked highest, and  is the fraction of weight on expert . This loss is minimized at , precisely when every expert has equal weight  in all situations.

Routing

[edit]

In sparsely-gated MoE, only the top-k experts are queried, and their outputs are weighted-summed. There are other methods.[23]

In Hash MoE,[24] routing is performed deterministically by a hash function, fixed before learning begins. For example, if the model is a 4-layered Transformer, and input is a token for word "eat", and the hash of "eat" is , then the token would be routed to the 1st expert in layer 1, 4th expert in layer 2, etc. Despite its simplicity, it achieves competitive performance as sparsely gated MoE with .

In soft MoE, suppose in each batch, each expert can process  queries, then there are  queries that can be assigned per batch. Now for each batch of queries , the soft MoE layer computes an array , such that  is a probability distribution over queries, and the -th expert's -th query is .[25] However, this does not work with autoregressive modelling, since the weights  over one token depends on all other tokens'.[26]

Other approaches include solving it as a constrained linear programming problem,[27] making each expert choose the top-k queries it wants (instead of each query choosing the top-k experts for it),[28] using reinforcement learning to train the routing algorithm (since picking an expert is a discrete action, like in RL),[29] etc.

Capacity factor

[edit]

Suppose there are  experts in a layer. For a given batch of queries , each query is routed to one or more experts. For example, if each query is routed to one expert as in Switch Transformers, and if the experts are load-balanced, then each expert should expect on average  queries in a batch. In practice, the experts cannot expect perfect load balancing: in some batches, one expert might be underworked, while in other batches, it would be overworked.

Since the inputs cannot move through the layer until every expert in the layer has finished the queries it is assigned, load balancing is important. As a hard constraint on load balancing, there is the capacity factor: each expert is only allowed to process up to  queries in a batch.[23] found  to work in practice.

Applications to transformer models

[edit]

MoE layers are used in the largest transformer models, for which learning and inferring over the full model is too costly. They are typically sparsely-gated, with sparsity 1 or 2. In Transformer models, the MoE layers are often used to select the feedforward layers (typically a linear-ReLU-linear network), appearing in each Transformer block after the multiheaded attention. This is because the feedforward layers take up an increasing portion of the computing cost as models grow larger. For example, in the Palm-540B model, 90% of parameters are in its feedforward layers.[30]

A trained Transformer can be converted to a MoE by duplicating its feedforward layers, with randomly initialized gating, then trained further. This is a technique called "sparse upcycling".[31]

There are a large number of design choices involved in Transformer MoE that affect the training stability and final performance. The OLMoE report describes these in some detail.[32]

As of 2023, models large enough to use MoE tend to be large language models, where each expert has on the order of 10 billion parameters. Other than language models, Vision MoE[33] is a Transformer model with MoE layers. They demonstrated it by training a model with 15 billion parameters. MoE Transformer has also been applied for diffusion models.[34]

A series of large language models from Google used MoE. GShard[35] uses MoE with up to top-2 experts per layer. Specifically, the top-1 expert is always selected, and the top-2th expert is selected with probability proportional to that experts' weight according to the gating function. Later, GLaM[36] demonstrated a language model with 1.2 trillion parameters, each MoE layer using top-2 out of 64 experts. Switch Transformers[21] use top-1 in all MoE layers.

The NLLB-200 by Meta AI is a machine translation model for 200 languages.[37] Each MoE layer uses a hierarchical MoE with two levels. On the first level, the gating function chooses to use either a "shared" feedforward layer, or to use the experts. If using the experts, then another gating function computes the weights and chooses the top-2 experts.[38]

MoE large language models can be adapted for downstream tasks by instruction tuning.[39]

In December 2023, Mistral AI released Mixtral 8x7B under Apache 2.0 license. It is a MoE language model with 46.7B parameters, 8 experts, and sparsity 2. They also released a version finetuned for instruction following.[40][41]

In March 2024, Databricks released DBRX. It is a MoE language model with 132B parameters, 16 experts, and sparsity 4. They also released a version finetuned for instruction following.[42][43]

 

DeepSeek (Chinese深度求索pinyinShēndù Qiúsuǒ) is a Chinese artificial intelligence company that develops open-source large language models (LLM). Based in Hangzhou, Zhejiang, it is owned and solely funded by Chinese hedge fund High-Flyer, whose co-founder, Liang Wenfeng, established the company in 2023 and serves as its CEO.

The DeepSeek-R1 model provides responses comparable to other contemporary LLMs, such OpenAI's GPT-4o and o1,[1] despite being trained at a significantly lower cost—stated at US$6 million compared to $100 million for OpenAI's GPT-4 in 2023[2]—and requiring a tenth of the computing power of a comparable LLM.[2][3][4][5] DeepSeek's A.I. models were developed amid United States sanctions on China for Nvidia chips, which were intended to restrict the country's ability to develop advanced A.I. systems.[6][7]

On 10 January 2025, DeepSeek released its first free chatbot app, based on the DeepSeek-R1 model, for Apple IOS and Android; by 27 January, DeepSeek-R1 had surpassed ChatGPT as the most-downloaded free app on the iOS App Store in the United States,[8] causing Nvidia's share price to drop by 18%.[9][10] DeepSeek's success against larger and more established rivals has been described as "upending AI",[8] constituting "the first shot at what is emerging as a global AI space race",[11] and ushering in "a new era of A.I. brinkmanship".[12]

DeepSeek makes its generative artificial intelligence algorithms, models, and training details open-source, allowing its code to be freely available for use, modification, viewing, and designing documents for building purposes.[13] The company reportedly vigorously recruits young A.I. researchers from top Chinese universities,[8] and hires from outside the computer science field to diversify its models' knowledge and abilities.[4]

DeepSeek AI chatbot is developed entirely by Chinese software engineers, whereas AI models established in Silicon Valley are created by people of various nationalities, including H-1B visa holders from different countries working in the US. DeepSeek AI models can be seen as a significant step toward developing indigenous high-end technologies by Asian countries, helping to retain talent and reduce brain drain from nations like India and China.[14]

Background

In February 2016, High-Flyer was co-founded by AI enthusiast Liang Wenfeng, who had been trading since the 2007–2008 financial crisis while attending Zhejiang University.[15] By 2019, he established High-Flyer as a hedge fund focused on developing and using AI trading algorithms. By 2021, High-Flyer exclusively used AI in trading.[16] DeepSeek has made its generative artificial intelligence chatbot open source, meaning its code is freely available for use, modification, and viewing. This includes permission to access and utilize the source code, as well as design documents, for building purposes.[13]

Per 36Kr, Liang had built up a store of 10,000 Nvidia A100 GPUs before the United States federal government imposed AI chip restrictions on China.[16] Some estimates put the number as high as 50,000.[15]

In April 2023, High-Flyer started an artificial general intelligence lab dedicated to research developing AI tools separate from High-Flyer's financial business.[17][18] In May 2023, with High-Flyer as one of the investors, the lab became its own company, DeepSeek.[16][19][18] Venture capital firms were reluctant in providing funding as it was unlikely that it would be able to generate an exit in a short period of time.[16]

After releasing DeepSeek-V2 in May 2024, which offered strong performance for a low price, DeepSeek became known as the catalyst for China's AI model price war. It was quickly dubbed the "Pinduoduo of AI", and other major tech giants such as ByteDanceTencentBaidu, and Alibaba began to cut the price of their AI models to compete with the company. Despite the low price charged by DeepSeek, it was profitable compared to its rivals that were losing money.[20]

DeepSeek is focused solely on research and has no detailed plans for commercialization;[20] this also allows its technology to avoid the most stringent provisions of China's A.I. regulations, such as requiring consumer-facing technology to comply with the government’s controls on information.[4]

DeepSeek's hiring preferences target technical abilities rather than work experience, resulting in most new hires being either recent university graduates or developers whose AI careers are less established.[18][4] Likewise, the company recruits individuals without any computer science background to help its technology understand other topics and knowledge areas, including being able to generate poetry and perform well on the notoriously difficult Chinese college admissions exams (Gaokao).[4]

Release history

DeepSeek LLM

On 2 November 2023, DeepSeek released its first series of model, DeepSeek-Coder, which is available for free to both researchers and commercial users. The code for the model was made open-source under the MIT license, with an additional license agreement ("DeepSeek license") regarding "open and responsible downstream usage" for the model itself.[21]

They are of the same architecture as DeepSeek LLM detailed below. The series includes 8 models, 4 pretrained (Base) and 4 instruction-finetuned (Instruct). They all have 16K context lengths. The training was as follows:[22][23][24]

  1. Pretraining: 1.8T tokens (87% source code, 10% code-related English (GitHub markdown and Stack Exchange), and 3% code-unrelated Chinese).
  2. Long-context pretraining: 200B tokens. This extends the context length from 4K to 16K. This produced the Base models.
  3. Supervised finetuning (SFT): 2B tokens of instruction data. This produced the Instruct models.

They were trained on clusters of A100 and H800 Nvidia GPUs, connected by InfiniBandNVLinkNVSwitch.[22]

DeepSeek Coder properties[22]: Table 2 [25]
Params.
1.3B 24 2048 5504 16 16
5.7B 32 4096 11008 32 1[note 1]
6.7B 32 4096 11008 32 32
33B 62 7168 19200 56 7[note 2]

On 29 November 2023, DeepSeek released the DeepSeek-LLM series of models, with 7B and 67B parameters in both Base and Chat forms (no Instruct was released). It was developed to compete with other LLMs available at the time. The paper claimed benchmark results higher than most open source LLMs at the time, especially Llama 2.[26]: section 5  Like DeepSeek Coder, the code for the model was under MIT license, with DeepSeek license for the model itself.[27]

The architecture was essentially the same as those of the Llama series. They used the pre-norm decoder-only Transformer with RMSNorm as the normalization, SwiGLU in the feedforward layers, rotary positional embedding (RoPE), and grouped-query attention (GQA). Both had vocabulary size 102400 (byte-level BPE) and context length of 4096. They trained on 2 trillion tokens of English and Chinese text obtained by deduplicating the Common Crawl.[26]

DeepSeek LLM properties[26]: Table 2 
Params.
7B 30 4096 11008 32 32
67B 95 8192 22016 64 8[note 3]

The Chat versions of the two Base models was also released concurrently, obtained by training Base by supervised finetuning (SFT) followed by direct policy optimization (DPO).[26]

In April 2024, they released 3 DeepSeek-Math models specialized for doing math: BaseInstructRL. It was trained as follows:[28]

  1. Initialize with a previously pretrained DeepSeek-Coder-Base-v1.5 7B.
  2. Further pretrain with 500B tokens (6% DeepSeekMath Corpus, 4% AlgebraicStack, 10% arXiv, 20% GitHub code, 10% Common Crawl). This produced the Base model.
  3. Train an instruction-following model by SFT Base with 776K math problems and their tool-use-integrated step-by-step solutions. This produced the Instruct model.
  4. Reinforcement learning (RL): The reward model was a process reward model (PRM) trained from Base according to the Math-Shepherd method.[29] This reward model was then used to train Instruct using group relative policy optimization (GRPO) on a dataset of 144K math questions "related to GSM8K and MATH". The reward model was continuously updated during training to avoid reward hacking. This resulted in the RL model.

V2

In May 2024, they released the DeepSeek-V2 series. The series includes 4 models, 2 base models (DeepSeek-V2DeepSeek-V2-Lite) and 2 chatbots (-Chat). The two larger models were trained as follows:[30]

  1. Pretrain on a dataset of 8.1T tokens, where Chinese tokens are 12% more than English ones.
  2. Extend context length from 4K to 128K using YaRN.[31] This resulted in DeepSeek-V2.
  3. SFT with 1.2M instances for helpfulness and 0.3M for safety. This resulted in DeepSeek-V2-Chat (SFT) which was not released.
  4. RL using GRPO in two stages. The first stage was trained to solve math and coding problems. This stage used 1 reward model, trained on compiler feedback (for coding) and ground-truth labels (for math). The second stage was trained to be helpful, safe, and follow rules. This stage used 3 reward models. The helpfulness and safety reward models were trained on human preference data. The rule-based reward model was manually programmed. All trained reward models were initialized from DeepSeek-V2-Chat (SFT). This resulted in the released version of DeepSeek-V2-Chat.

They opted for 2-staged RL, because they found that RL on reasoning data had "unique characteristics" different from RL on general data. For example, RL on reasoning could improve over more training steps.[30]

The two V2-Lite models were smaller, and trained similarly, though DeepSeek-V2-Lite-Chat only underwent SFT, not RL. They trained the Lite version to help "further research and development on MLA and DeepSeekMoE".[30]

Architecturally, the V2 models were significantly modified from the DeepSeek LLM series. They changed the standard attention mechanism by a low-rank approximation called multi-head latent attention (MLA), and used the mixture of experts (MoE) variant previously published in January. Compared to the standard sparsely-gated MoE, their variant had "shared experts" that are always queried, and "routed experts" that might not be.[32]

DeepSeek V2 properties[30]: Section 3.1.2, Appendix B [33][34]
Name Params. Active params Context length
V2-Lite 15.7B 2.4B 27 32K 2 64
V2 236B 21B 60 128K 2 160

The Financial Times reported that it was cheaper than its peers with a price of 2 RMB for every million output tokens. The University of Waterloo Tiger Lab's leaderboard ranked DeepSeek-V2 seventh on its LLM ranking.[19]

In June, they released 4 models in the DeepSeek-Coder-V2 series: V2-BaseV2-Lite-BaseV2-InstructV2-Lite-Instruct. They were trained as follows:[35][note 4]

  1. The Base models were initialized from corresponding intermediate checkpoints after pretraining on 4.2T tokens (not the version at the end of pretraining), then pretrained further for 6T tokens, then context-extended to 128K context length. This produced the Base models.
  2. DeepSeek-Coder and DeepSeek-Math were used to generate 20K code-related and 30K math-related instruction data, then combined with an instruction dataset of 300M tokens. This was used for SFT.
  3. RL with GRPO. The reward for math problems was computed by comparing with the ground-truth label. The reward for code problems was generated by a reward model trained to predict whether a program would pass the unit tests.

DeepSeek-V2.5 was released in September and updated in December. It was made by combining DeepSeek-V2-Chat and DeepSeek-Coder-V2-Instruct.[36]

V3

In December 2024, they released a base model DeepSeek-V3-Base and a chat model DeepSeek-V3. The model architecture is essentially the same as V2. They were trained as follows:[37]

  1. Pretraining on 14.8T tokens of a multilingual corpus, mostly English and Chinese. It contained a higher ratio of math and programming than the pretraining dataset of V2.
  2. Extend context length twice, from 4K to 32K and then to 128K, using YaRN.[31] This produced DeepSeek-V3-Base.
  3. SFT for 2 epochs on 1.5M samples of reasoning (math, programming, logic) and non-reasoning (creative writing, roleplay, simple question answering) data. Reasoning data was generated by "expert models". Non-reasoning data was generated by DeepSeek-V2.5 and checked by humans.
    • The "expert models" were trained by starting with an unspecified base model, then SFT on both <problem, original response> data, and synthetic <system prompt, problem, R1 response> data generated by an internal DeepSeek-R1 model. The system prompt asked the R1 to reflect and verify during thinking. Then the expert models were RL using an unspecified reward function.
    • Each expert model was trained to generate just synthetic reasoning data in one specific domain (math, programming, logic).
    • Expert models were used, instead of R1 itself, since the output from R1 itself suffered "overthinking, poor formatting, and excessive length".
  4. Model-based reward models were made by starting with a SFT checkpoint of V3, then finetuning on human preference data containing both final reward and chain-of-thought leading to the final reward. The reward model produced reward signals for both questions with objective but free-form answers, and questions without objective answers (such as creative writing).
  5. A SFT checkpoint of V3 was trained by GRPO using both reward models and rule-based reward. The rule-based reward was computed for math problems with a final answer (put in a box), and for programming problems by unit tests. This produced DeepSeek-V3.
DeepSeek V3 properties[37]: Section 4.2 [38]
Name Params. Active params Context length
V3 671B 37B 61 128K 1 256

They performed extensive low-level engineering to achieve efficiency. They used mixed-precision arithmetic. Much of the forward pass was performed in 8-bit floating point numbers (5E2M: 5-bit exponent and 2-bit mantissa) rather than the standard 32-bit, requiring special GEMM routines to accumulate accurately. They used a custom 12-bit float (E5M6) for only the inputs to the linear layers after the attention modules. Optimizer states were in 16-bit (BF16). They minimized the communication latency by overlapping extensively computation and communication, such as dedicating 20 streaming multiprocessors out of 132 per H800 for just inter-GPU communication. They lowered communication by rearranging (every 10 minutes) the exact machine each expert was on in order to avoid certain machines being queried more often than the others, adding auxiliary load-balancing losses to the training loss function, and other load-balancing techniques.[37]

After training, it was deployed on H800 clusters. The H800 within a cluster are connected by NVLink. The clusters are connected by InfiniBand.[37]

Total cost of training the DeepSeek-V3 model[37]: Table 1 
Stage Cost (in one thousand GPU hours) Cost (in one million USD$)
Pre-training 2,664 5.328
Context extension 119 0.24
Fine-tuning 5 0.01
Total 2,788 5.576

Benchmark tests show that DeepSeek-V3 outperformed Llama 3.1 and Qwen 2.5 whilst matching GPT-4o and Claude 3.5 Sonnet.[18][39][40][41]

R1

On 20 November 2024, DeepSeek-R1-Lite-Preview became accessible via DeepSeek's API and chat.deepseek.com.[42] It was trained for logical inference, mathematical reasoning, and real-time problem-solving. DeepSeek claimed that it exceeded performance of OpenAI o1 on benchmarks such as American Invitational Mathematics Examination (AIME) and MATH.[43] However, The Wall Street Journal stated when it used 15 problems from the 2024 edition of AIME, the o1 model reached a solution faster than DeepSeek-R1-Lite-Preview.[44]

On 20 January 2025, DeepSeek-R1 and DeepSeek-R1-Zero were released.[45] Both were initialized from DeepSeek-V3-Base, and share its architecture. The company also released some "DeepSeek-R1-Distill" models, which are not initialized on V3-Base, but instead are initialized from other pretrained open-weight models, including LLaMA and Qwen, then fine-tuned on synthetic data generated by R1.[46]

Template for DeepSeek-R1-Zero

A conversation between User and Assistant. The user asks a question, and the Assistant solves it. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>. User: <prompt>. Assistant:

– <prompt> is replaced with the specific reasoning question during training.

DeepSeek-R1-Zero was trained exclusively using GRPO RL without SFT. Unlike previous versions, they used no model-based reward. All reward functions were rule-based, "mainly" of two types (other types were not specified): accuracy rewards and format rewards. Accuracy reward was checking whether a boxed answer is correct (for math) or whether a code passes tests (for programming). Format reward was checking whether the model puts its thinking trace within <think>...</think>.[46]

As R1-Zero has issues with readability and mixing languages, R1 was trained to address these issues and further improve reasoning:[46]

  1. SFT DeepSeek-V3-Base on "thousands" of "cold-start" data all with the standard format of |special_token|<reasoning_process>|special_token|summary>.
  2. Apply the same RL process as R1-Zero, but also with a "language consistency reward" to encourage it to respond monolingually. This produced an internal model not released.
  3. Synthesize 600K reasoning data from the internal model, with rejection sampling (i.e. if the generated reasoning had a wrong final answer, then it is removed). Synthesize 200K non-reasoning data (writing, factual QA, self-cognition, translation) using DeepSeek-V3.
  4. SFT DeepSeek-V3-Base on the 800K synthetic data for 2 epochs.
  5. GRPO RL with both rule-based reward (for reasoning tasks) and model-based reward (for non-reasoning tasks, helpfulness, and harmlessness). This produced DeepSeek-R1.

Distilled models were trained by SFT on 800K data synthesized from DeepSeek-R1, in a similar way as step 3 above. They were not trained with RL.[46]

Assessment and reactions

DeepSeek released its A.I. Assistant, which utilizes the V3 model as a chatbot app for Apple IOS and Android. By 27 January 2025 the app had surpassed ChatGPT as the highest-rated free app on the iOS App Store in the United States; its chatbot reportedly answers questions, solves logic problems and writes computer programs on par with other chatbots on the market, according to benchmark tests used by American A.I. companies.[4]

DeepSeek-V3 uses significantly fewer resources compared to its peers; for example, whereas the world's leading A.I. companies train their chatbots with supercomputers using as many as 16,000 graphics processing units (GPUs), if not more, DeepSeek claims to have needed only about 2,000 GPUs, namely the H800 series chip from Nvidia. It was trained in around 55 days at a cost of US$5.58 million,[37] which is roughly 10 times less than what U.S. tech giant Meta spent building its latest A.I. technology.[4]

DeepSeek's competitive performance at relatively minimal cost has been recognized as potentially challenging the global dominance of American A.I. models.[47] Various publications and news media, such as The Hill and The Guardian, described the release of its chatbot as a "Sputnik moment" for American A.I.[48][49] The performance of its R1 model was reportedly "on par with" one of OpenAI's latest models when used for tasks such as mathematics, coding, and natural language reasoning;[50] echoing other commentators, American Silicon Valley venture capitalist Marc Andreessen likewise described R1 as "AI's Sputnik moment".[50]

Deepseek's founder, Liang Wenfeng has been compared to Open AI CEO Sam Altman. With CNN calling him the Sam Altman of China and an evangelist for AI.[51]

 

 

 

 

 

 

The login error DeepSeek gave on 28 Jan 2025 following a cyberattack

 

 

 

 

 

 

DeepSeek's optimization of limited resources has highlighted potential limits of U.S. sanctions on China's A.I. development, which include export restrictions on advanced A.I. chips to China.[18][52] The success of the company's A.I. models consequently "sparked market turmoil" [53] and caused shares in major global technology companies to plunge on 27 January: Nvidia's stock fell by as much as 17–18%,[54] as did the stock of rival Broadcom. Other tech firms also sank, including Microsoft (down 2.5%), Google's owner Alphabet (down over 4%), and Dutch chip equipment maker ASML (down over 7%).[50] A global selloff of technology stocks on Nasdaq, prompted by the release of the R1 model, had led to record losses of about $593 billion in the market capitalizations of AI and computer hardware companies;[55] by 28 January, a total of $1 trillion of value was wiped off American stocks.[49]

Leading figures in the American A.I. sector had mixed reactions to DeepSeek's success and performance.[56] Microsoft CEO Satya Nadella and OpenAI CEO Sam Altman—whose companies are involved in the U.S. government-backed "Stargate Project" to develop American A.I. infrastructure—both called DeepSeek "super impressive".[57][58] American President Donald Trump, who announced The Stargate Project, called DeepSeek a wake-up call[59] and a positive development.[60][49][61][62] Other leaders in the field, including Scale AI CEO Alexandr Wang, Anthropic cofounder and CEO Dario Amodei, and Elon Musk expressed skepticism of the app's performance or of the sustainability of its success.[56][63][64] Various companies, including Amazon Web ServicesToyota and Stripe, are seeking to use the model in their program.[65]

On 27 January, DeepSeek limited its new user registration to Chinese mainland phone numbers, email, and Google login after a reported cyberattack that caused a slowdown to its servers and services.[66][67][68]

Concerns

Censorship

 

 

 

 

 

 

DeepSeek responses when asked about Xi Jinping and Narendra Modi

 

 

 

 

 

 

Some sources have observed that the official API version of R1 uses censorship mechanisms for topics that are considered politically sensitive for the government of the People's Republic of China. For example, the model refuses to answer questions about the 1989 Tiananmen Square protests and massacrepersecution of Uyghurs, or human rights in China.[69][70] The AI may initially generate an answer, but then deletes it shortly afterwards and replaces it with a message such as: "Sorry, that's beyond my current scope. Let's talk about something else."[70] The integrated censorship mechanisms and restrictions can only be removed to a limited extent in the open-source version of the R1 model. If the "core socialist values" defined by the Chinese Internet regulatory authorities are touched upon or the political status of Taiwan is raised, discussions are terminated.[71] When tested by NBC News, DeepSeek's R1 described Taiwan as "an inalienable part of China's territory," and stated: "We firmly oppose any form of 'Taiwan independence' separatist activities and are committed to achieving the complete reunification of the motherland through peaceful means."[72] Western researchers were able in January 2025 to trick DeepSeek into giving accurate answers to some of these topics by tailoring the question asked.[73]

Security and privacy

There are also fears that the AI system could be used for foreign influence operations, spreading disinformationsurveillance and the development of cyberweapons for the government of the People's Republic of China.[74][75][76] DeepSeek's privacy terms and conditions say "We store the information we collect in secure servers located in the People's Republic of China... We may collect your text or audio input, prompt, uploaded files, feedback, chat history, or other content that you provide to our model and Services". Although the data storage and collection policy is consistent with ChatGPT's privacy policy,[77] a media article reports this as security concerns.[78] In response, the Italian data protection authority is seeking additional information on DeepSeek's collection and use of personal data and the United States National Security Council announced that it had started a national security review.[79][80] However, when using DeepSeek AI locally, data is not shared publicly.[81]

MrFixIt.ai

Can't fixstupid  but  MrFixIt  does  FIX  the  PROBLEM !

TJ@MrFixIt.ai

TJ Hammons