字幕表 動画を再生する
This new large-language model has taken the tech world by absolute storm and represents a big breakthrough in the AI research community.
この新しい大規模言語モデルは技術界に旋風を巻き起こし、AI研究界に大きなブレークスルーをもたらした。
Last Sunday, while TechTalk was banned for 12 hours, an AI research team from China released a new large-language model called DeepSeek R1.
先週日曜日、TechTalkが12時間にわたって禁止されている間に、中国のAI研究チームが新しい大規模言語モデル「DeepSeek R1」を発表した。
As you can see on the screen, DeepSeek R1's benchmark shows that it performs at a similar level to OpenAI's O1 model on reasoning problems like math, coding, and scientific reasoning.
画面にあるように、DeepSeek R1のベンチマークは、数学、コーディング、科学的推論などの推論問題において、OpenAIのO1モデルと同程度のパフォーマンスを示している。
And in this video, I'll talk about the three main takeaways from their paper, including how they use Chain of Thought in order to have the model self-evaluate its performance, how it uses pure reinforcement learning to have the model guide itself, and how they use model distillation to make DeepSeek and other LLMs more accessible to everyone.
このビデオでは、彼らの論文から得られた3つの主なポイントについて話す。その3つとは、モデルがパフォーマンスを自己評価するために「思考の連鎖(Chain of Thought)」をどのように使っているか、モデルが自分自身をガイドするために純粋な強化学習をどのように使っているか、そして、DeepSeekや他のLLMを誰でももっと利用しやすくするためにモデル蒸留をどのように使っているか、などである。
Chain of Thought is a very simple but effective prompt engineering technique where we pretty much ask the model to think out loud.
チェーン・オブ・ソート(思考の連鎖)とは、非常にシンプルだが効果的なプロンプト・エンジニアリングのテクニックで、モデルに声を出して考えてもらうというものだ。
Where we add to our prompts that we want the model to explain its reasoning step-by-step.
ここでは、プロンプトに、モデルがステップバイステップで推論を説明することを加える。
That way, if the model makes any mistakes, we can easily pinpoint where in its reasoning it was off so that we can re-prompt the model to not make the mistake again.
そうすれば、モデルが何かミスを犯した場合、推論のどこでミスを犯したかを簡単に特定することができ、二度とミスを犯さないようにモデルを再度促すことができる。
Here is an example from the paper, where if you give the model a question like this math problem, you can see that in its response, it actually reasons through it and gives you the steps to how it got to the solution.
この論文の例では、モデルにこの数学の問題のような問題を与えると、その答えの中で実際に理由付けを行い、どのように解答にたどり着いたかの手順を示しているのがわかる。
It showed its work.
その仕事を見せた。
You can see in red, it says, wait, wait, there's an aha moment, as well as, let's reevaluate this step-by-step.
赤字で、待て、待て、ハッとさせられる瞬間がある。
In doing so, the model is going to have a more accurate response than if you were to just give the response by itself without Chain of Thought reasoning.
そうすることで、Chain of Thought(思考の連鎖)の推論なしに、ただ単体で答えを出すよりも、モデルはより正確な答えを出せるようになる。
The way DeepSeek uses reinforcement learning is a little different how most AI models are We don't give it the question and answer, we kind of let it learn on its own.
ディープシークが強化学習を使用する方法は、ほとんどのAIモデルの方法とは少し異なります。 私たちはディープシークに質問と回答を与えるのではなく、ディープシーク自身に学習させるのです。
This is exactly the same way in how a baby learns how to walk for the first time.
これは、赤ちゃんが初めて歩き方を学ぶのとまったく同じ方法である。
If you notice, if you've ever seen a baby, it's actually pretty funny.
赤ちゃんを見たことがある人ならわかると思うけど、実はかなり面白いんだ。
They stumble around the environment, and they maybe hold on to things as they try to decide how to walk.
どう歩けばいいのかわからず、つまずき、物につかまってしまう。
In doing so, they're learning how to move and position their joints so that they don't fall.
そうすることで、転ばないための関節の動かし方や位置を学んでいるのだ。
In the same way, reinforcement learning allows us to train a model by optimizing its policy, aka how the model behaves, and it does so to maximize the reward.
同じように、強化学習では、モデルの方針、つまりモデルがどのように振る舞うかを最適化することによってモデルを訓練することができる。
As it explores its environment over time, it learns which policies maximize the reward.
時間をかけて環境を探索するうちに、どの方針が報酬を最大化するかを学習する。
Then it just probably picks the policy over here, or the policy over here.
そうすると、おそらくこっちのポリシーか、こっちのポリシーを選ぶんだ。
For example, if you're solving an equation like this, there's two or three different ways to solve it, but one of them is much shorter than the other way to solve it, and thus has a much higher reward than the other.
例えば、このような方程式を解く場合、2つか3つの解き方があるが、そのうちの1つは他の解き方よりもはるかに短時間で解けるので、他の解き方よりもはるかに高い報酬が得られる。
Reinforcement learning is exactly how most robots learn how to walk, and how Tesla's self-driving car learns how to drive through a city.
強化学習はまさに、多くのロボットが歩き方を学習する方法であり、テスラの自動運転車が街を走る方法を学習する方法である。
If we go to the paper and look at this graph, we can see how DeepSeek R1 improves how accurately it can answer questions if we train it over time.
論文を見て、このグラフを見ると、ディープシークR1が時間をかけて訓練することで、いかに正確に質問に答えられるようになるかがわかる。
Using reinforcement learning, instead of telling the model what a correct answer is to a question, since that kind of data is pretty expensive to obtain, we instead let it figure out on its own while measuring how accurate the model is.
強化学習を使用すると、質問に対する正解をモデルに指示する代わりに、そのようなデータを得るにはかなりコストがかかるため、モデルの精度を測定しながら、モデル自身に答えさせる。
You can see while OpenAI's O1 model is static, DeepSeek R1 eventually outperforms OpenAI's O1 model, and if we let it train for even longer, it looks like it's going to perform even more and get closer to 90 or even 100% accuracy if we kept training it.
OpenAIのO1モデルが静的であるのに対して、DeepSeek R1は最終的にOpenAIのO1モデルを凌駕していることがわかります。さらに長い時間トレーニングをさせ続ければ、さらにパフォーマンスが上がり、90%、あるいは100%の精度に近づきそうです。
You can see how the model uses chain-of-thought reasoning in order to improve its responses over time and self-reflect.
このモデルが、時間の経過とともに対応を改善し、自己反省するために、思考の連鎖推論をどのように使っているかがわかるだろう。
In reinforcement learning, we can't exactly tell the model how to change its policy, so that's why we use chain-of-thought reasoning to force the model to self-reflect and evaluate to change its behavior to get closer to a maximum reward.
強化学習では、モデルにどのように方針を変えるかを正確に指示することはできない。そのため、思考連鎖推論を使ってモデルに自己反省を促し、最大報酬に近づくように行動を変えるよう評価するのだ。
That way, we can give the model the right incentives using prompts, and the model can re-evaluate how it answers questions, and it can do so with an increasing accuracy.
そうすれば、プロンプトを使ってモデルに適切なインセンティブを与えることができ、モデルは質問への答え方を再評価し、その精度を高めていくことができる。
This equation is the key behind how DeepSeek uses reinforcement learning in order to optimize its policy.
この方程式が、ディープシークが強化学習を使って方針を最適化する鍵なのだ。
It uses group-relative policy optimization in order to essentially use this equation to score how well it answered a question without having the correct answer.
グループ相対的な方針最適化を使用することで、基本的にこの方程式を使用して、正解がなくても質問にどれだけうまく答えられたかを採点する。
This looks very, very complicated, and I'll just briefly explain the most important parts of it.
これはとてもとても複雑に見えるので、最も重要な部分だけを簡単に説明しよう。
What we do is we take pretty much the expectation of the old answers from the old policy the model has.
私たちがしていることは、モデルが持っている古い方針から、古い答えのほとんどを予想することです。
Remember, the policy pi, this is the key thing that we're trying to optimize with DeepSeek, where we want to change the policy so that DeepSeek can then output better and more correct answers.
ポリシーπは、DeepSeekで最適化しようとしている重要なもので、ポリシーを変更することで、DeepSeekがより良い、より正しい答えを出力できるようにするものです。
So what we do is we take a weighted average of how the model responded with its old policy and how it used its old policy to answer questions versus how the model's new policy answers questions as well.
そこで私たちが行うのは、モデルが旧ポリシーでどのように回答したか、旧ポリシーでどのように質問に回答したかと、モデルの新ポリシーでどのように質問に回答したかを加重平均することです。
And we also multiply it by some standardization value, ai.
さらに、これに標準化値aiを掛ける。
Ai is basically saying, compared to the average reward, how well does this new policy increase the reward?
アイは基本的に、平均的な報酬と比較して、この新しい政策がどれだけ報酬を増やすことができるかを言っているのだ。
And what we also want to do is we don't want to have the model's policy change too much because that can cause a lot of instability with model training.
また、モデルのトレーニングが不安定になる可能性があるため、モデルの方針が変わりすぎないようにしたい。
If you look at most reinforcement learning charts and graphs, or even the example of a baby, the baby's going to fall down unpredictably so many times.
強化学習の図表やグラフ、あるいは赤ん坊の例を見ても、赤ん坊は何度も予測不可能な転び方をする。
And what we want to do is we want to make sure our model is as stable as possible and we avoid a roller coaster of policy changes.
そして、私たちがしたいことは、私たちのモデルができるだけ安定したものであることを確認し、政策変更のジェットコースターを避けたいのです。
That's where this clipping comes in.
そこでこの切り抜きである。
Clipping essentially restricts how much our policy can change by 1 minus epsilon and 1 plus epsilon.
クリッピングは基本的に、1マイナスεと1プラスεによって、我々のポリシーがどれだけ変化するかを制限する。
And we also standardize that.
そして、それを標準化する。
So the weighted average is taking basically how small of a change can we change our policy in order to maximize the reward.
つまり、加重平均は基本的に、報酬を最大化するために、どれだけ小さな変更で方針を変えられるかを考慮している。
We also subtract it from this regularization term called KL divergence.
また、KLダイバージェンスと呼ばれる正則化項からも差し引く。
This pretty much also is another way for us to stabilize our model training by making sure it doesn't change too much.
これもまた、モデル・トレーニングがあまり変化しないようにすることで、モデル・トレーニングを安定させる方法のひとつだ。
And in short, all this is trying to say is that we don't want our policy for our model to change too much, but we want to do so in a way that we can compare our old answers with the new answers.
要するに、私たちが言おうとしているのは、私たちのモデルに対する方針はあまり変えたくないが、古い答えと新しい答えを比較できるようにしたい、ということだ。
And then we change our policy so that we can maximize, ultimately, the policy changes.
そして、最終的に最大化できるように方針を変える。
We can maximize the reward from the policy changes that are minimized.
我々は、最小化された政策変更から得られる報酬を最大化することができる。
It's like a min-max kind of situation here.
ここはミンマックスのような状況だ。
And that's what it's doing here with the weighted average.
そして、加重平均はここで行われている。
And so the third important technique that the DeepSeq researchers use with their R1 model is model distillation.
そして、DeepSeqの研究者がR1モデルで用いる3つ目の重要なテクニックが、モデルの蒸留である。
And the idea here is that the actual DeepSeq model is 671 billion parameters.
そしてここでの考え方は、実際のDeepSeqモデルは6710億のパラメータを持つということだ。
And to run this, you pretty much need a couple thousand dollar GPU at least, as well as a pretty expensive computer to actually run the full model.
そして、これを動かすには、少なくとも数千ドルのGPUと、実際にフルモデルを動かすためのかなり高価なコンピューターが必要になる。
So to make it more accessible, what they do is they take the larger LLM and then they use it to teach a smaller LLM how it reasons and how it answers questions so that the smaller LLM can actually perform on the same level as the bigger LLM, but at a magnitude of a smaller parameter size, like 7 billion parameters.
そこで、よりアクセスしやすくするために、より大きなLLMを使い、それを使ってより小さなLLMに理由付けや質問への答え方を教え、より小さなLLMが実際に大きなLLMと同じレベルのパフォーマンスを発揮できるようにする。
And in the paper, the DeepSeq researchers distilled from their DeepSeq model into LLAMA3 as well as QWEN.
この論文では、DeepSeqの研究者がDeepSeqモデルからLLAMA3とQWENを抽出した。
And the idea here is that the teacher uses, again, chain of thought reasoning in order to generate examples or generate a lot of examples of it answering questions.
そして、ここでの考え方は、教師が質問に答える例を生み出したり、多くの例を生み出したりするために、やはり思考連鎖推論を使うということである。
And then those examples, it just gives directly to the student as part of the prompt.
そしてそれらの例は、プロンプトの一部として生徒に直接与えられる。
And the student is supposed to answer the questions in a similar accuracy as the larger model.
そして、生徒は大きなモデルと同じような正確さで質問に答えることになっている。
And this makes the whole LLM ecosystem much more accessible to people who don't have as much resources.
これによって、LLMのエコシステム全体が、リソースをあまり持っていない人々にとってより利用しやすくなる。
And the key insight is that in this paper, they found that the student model during reinforcement learning training actually outperforms the teacher model just by a little bit.
そして重要な洞察は、この論文で、強化学習トレーニング中の生徒モデルが、実際にはほんの少し教師モデルを上回ることを発見したことだ。
But it's doing so, again, at a small fraction of the memory and storage required to use it.
しかし、そのために必要なメモリやストレージは、これまたごくわずかだ。
And in the experiments from the paper, the researchers actually found that these smaller distilled models from DeepSeq, as I said, outperform larger models like GPT-4.0 and CLOB 3.5 SONNET in these math, coding, and scientific reasoning tasks, as you can see in the table below right here.
この論文の実験では、研究者たちは、DeepSeqから抽出されたこれらの小規模なモデルが、GPT-4.0やCLOB 3.5 SONNETのような大規模なモデルよりも、数学、コーディング、科学的推論のタスクで優れていることを発見しました。
And from those three things, those are kind of the key concepts behind how DeepSeq works.
この3つから、DeepSeqがどのように機能するかの重要なコンセプトが見えてくる。
And hopefully you enjoyed this video.
そして、このビデオを楽しんでいただけたなら幸いだ。
And if you want to, you can go read the paper in the description below, as well as play around with DeepSeq on OLALMA yourself.
また、OLALMA上のDeepSeqで遊んでみることもできる。