DeepSeek-R1 蒸留推論モデルのパフォーマンスとインテルのハードウェア上での動作を検証
DeepSeek は初代の推論モデルとなる Deepseek-R1 を、派生の「蒸留バージョン」とあわせてリリースしました。一見すると、あらゆる既存モデルを上回り複雑なタスクを解決できるパフォーマンスが売りの有能なモデルが現れただけのようにも思えますが、注目すべきは高度な推論能力を小規模言語モデル (SLM) に移植できる点にあります。
大規模言語モデル (LLM) の場合、演算負荷の高さと複雑なインフラストラクチャー要件に加え、高額なハードウェア・アクセラレーターの導入が必要といった理由から、エンタープライズ企業であってもローカル環境でのテストや実装にさまざまな課題が伴います。そのため、現実的な代替案として、幅広いユースケースに対応している外部 API に依存するケースが大半でした。また、運用上の制約や戦略面での優先事項、固有の実装要件から、モデルのローカル実行が必要となるケースもあります。こうしたケースに効率よく対処するには、パフォーマンス、拡張性、アクセス性を最適化できるソリューションが欠かせません。
このような課題の解決策として登場したのが、高度な推論能力を備えた SLM です。比較的手に入りやすい演算リソースを使用し、コストを抑えたローカル実装により、大規模モデルのパフォーマンスとのギャップを解消します。小規模モデルでありながらも機能は高く、効率性を維持しつつリソース消費を最適化し、複雑な推論を実行可能です。エンタープライズ企業が拡張性、コスト効率、信頼性の高い AI アプリケーションとして導入できる、期待のソリューションとなっています。
とはいえ、実際の効果はどうなのでしょう?
推論モデルが動作する仕組み
推論モデルは、LLM とは異なる方法で出力トークンを生成します。LLM は統計的な確率に基づいて最初のトークンを即座に生成し、重視するのは処理の流暢性とスピードです。対して推論モデルは、即時のレスポンスよりも論理的な正確さを優先して中間ステップを計画するため、生成が遅れることもあります。
特長 | LLM | 推論モデル |
---|---|---|
最初のトークンの生成速度 | 高速 | 遅れあり (中間ステップを計画するため) |
仕組み | 統計的な確率に基づきトークンを予測 | 中間の推論ステップを踏んでからトークンを選択 |
流暢性 vs 正確さ | 流暢性を重視 | 正確さを重視 |
パターン vs 論理ステップ | データからパターンを抽出 | 論理的なステップを踏む |
この違いは、SLM の推論能力が高まり、問題解決やコード生成の精度向上のほか、検索拡張生成 (RAG) などの手法による AI アシスタントの信頼性が高まるにつれて、強く影響してきます。
DeepSeek-R1 は、従来の外部報酬モデルを必要とせず、出力を自律的に評価して改善する、革新的なポリシー最適化の一手法 (GRPO) によって、この違いを例証しました。DeepSeek-R1 ではさらに連想的思考 (CoT) を取り入れ、モデルが複雑なタスクを小さい論理的ステップに分解できるようにし、透明性と精度の高い出力を可能にしています。
Llama 3.1 8B と DeepSeek 8B の比較検証
傍観しているだけではなく、実際にモデルを検証してみましたので、さっそくその結果を見ていきましょう。小規模モデルはノートブック PC でも実行できるため、テストでは AI 推論のワット当たりパフォーマンスが高いインテル® Core™ Ultra 7 プロセッサーを搭載した AI PC を使用しました。この AI PC には 32GB の RAM が備わっています。
モデルは DeepSeek の蒸留バージョン SLM である DeepSeek-R1-Distill-Llama-8B です。蒸留モデルは、大規模 AI モデルを小型化した最適化バージョンであり、演算リソースの要件を抑えながら、大部分の機能を保持するようにトレーニングされています。
テストの詳細は、こちらの動画 をご覧ください。
ナレッジの蒸留では、高性能の大規模な "教師" モデル (DeepSeek-R1) から抽出したナレッジを、小規模の "生徒" モデル (LLaMA アーキテクチャー) に移植します。このプロセスによって、モデルのサイズが縮小し、演算負荷が軽減されますが、推論能力は可能な限り保持されるため、ローカル実行が高速化して実践的になります。これを広く利用されている汎用 LLM Llama 3.1-8B (パラメーター規模が同等クラスなので必要な実装リソースもほぼ同様) と比較し、ロジックに基づく質問でパフォーマンスを検証しました。
質問:「1 ポンド (約 0.45kg) の水、2 ポンドのレンガ、1 ポンドの羽、3 ポンドの空気のうち、最も重いのは?」
正解:「3 ポンドの空気」
LLAMA 3.1 8B
A classic example of a trick question!
In each case, the answer is... they all weigh the same amount.
A pound of water weighs 1 pound.
Two pounds of bricks weigh 2 pounds.
A pound of feathers weighs 1 pound.
Three pounds of air also weigh 3 pounds (air is essentially weightless in this context).So, in each case, the answer is simply "a pound" or the number of pounds mentioned.
DeepSeek-R1-Distill-Llama-8B
<think>
Okay, so I'm trying to figure out which of these items weighs more. The options are: a pound of water, two pounds of bricks, a pound of feathers, and three pounds of air. Hmm, at first glance, it seems like some of these might be trickier than they look because they're not all physical objects you can easily compare.Let me start by breaking down each item. A "pound" is a unit of weight, so when someone says a pound of water, that's exactly 16 fluid ounces, right? Similarly, a pound of feathers would also be 16 fluid ounces since it's just the weight of the feathers in a pound. Two pounds of bricks sounds straightforward too; that's two times 16 ounces, so 32 ounces or 2 pounds.
Now, the tricky part might be with three pounds of air. Air is something you can't hold like a solid object, but in terms of weight, it does have mass. So, three pounds of air would actually be equivalent to three pounds in weight, even though it's not something you can physically pick up. But wait, sometimes when people talk about air weight, they might think of it differently, especially in things like airplane weighings where air is considered negligible because it's so light or maybe not counted at all.
Let me think about this again. A pound of water is 16 oz, two pounds of bricks would be 32 oz, a pound of feathers is also 16 oz. So far, two pounds of bricks seem to weigh the most in terms of ounces. But then there's three pounds of air, which would be 48 ounces if we're considering it as weight. Wait, that can't be right because three pounds is three times a pound, so each pound is 16 ounces. Therefore, three pounds would be 48 ounces.
But wait, I might be confusing fluid ounces with weight ounces here. Actually, when dealing with air, sometimes it's measured in different units like cubic feet or liters, but the question specifically mentions pounds, which are a unit of weight. So, if we're talking about weight, three pounds of air would indeed be 48 ounces. However, in reality, when measuring air for weight, things get tricky because air is compressible and its density changes with altitude and temperature.
In everyday terms, though, when someone talks about the weight of air, they might not mean it literally as a physical object but rather referring to atmospheric pressure or something else. But in this question, I think we're supposed to take "three pounds of air" at face value as 3 pounds, which would be 48 ounces.
So comparing all options: 16 oz (water) and 16 oz (feathers), 32 oz (bricks), and 48 oz (air). So three pounds of air is the heaviest. But wait, that seems counterintuitive because we can't feel the weight of air as much as a physical object.
Let me double-check. A pound of water is about 16 oz, which is roughly 0.45 kg. Two pounds of bricks would be 2 kg, and a pound of feathers is also 0.45 kg. Three pounds of air, if we consider standard conditions (like at sea level), the density of air is about 1.225 kg/m³. So three pounds in kilograms is 3 / 2.20462 ≈ 1.35 kg. Then, using density, volume would be mass divided by density: 1.35 / 1.225 ≈ 1.10 m³. But that's volume. Since we're comparing weights (mass), the air itself weighs 1.35 kg, which is about 3 pounds.
Wait, I'm getting confused here. If three pounds of air has a mass of three pounds, then it's equivalent in weight to three pounds. So when someone says "three pounds of air," they mean that the air itself weighs three pounds. Therefore, comparing all options, the three-pound air is the heaviest because it's 3 pounds versus the others being 1 pound each or two pounds.
But I might be overcomplicating this. The question is straightforward: which weighs more? So:
- A pound of water = 1 lb - Two pounds of bricks = 2 lb - A pound of feathers = 1 lb - Three pounds of air = 3 lb
So, the three-pound air would weigh the most at 3 lb.
Wait, but sometimes in physics, air is considered to have negligible weight because it's a gas, but that's more about its effect on objects. Here, the question is asking about the weight of the air itself, so it's three pounds versus others being less.
I think I've got it now. The three-pound air is the heaviest.
</think>----------------------------
The item that weighs the most is three pounds of air.
Step-by-Step Explanation:
Understanding Units: Each item is measured in pounds (lb), a unit of weight.
Convert Pounds to Ounces (if necessary):
1 pound = 16 ounces.
Calculate Each Item's Weight:
A pound of water = 1 lb.
Two pounds of bricks = 2 lb.
A pound of feathers = 1 lb.
Three pounds of air = 3 lb.
Comparison: Among the options, three pounds of air is the heaviest at 3 lb.----------------------------
Answer: Three pounds of air weighs more than the other items listed.
各モデルの推論プロセスを理解しやすいように、ここでは意図的に全解答を追加しました。
DeepSeek-R1 は慎重な推論から正解を導き出した一方で、Llama 3.1 8B は論理ステップを踏み誤り、間違った結論に至りました。DeepSeek-R1 は結論に達するまでが長く、レスポンス時間に影響します。これはエンタープライズのユースケースでは重要でしょう。文脈を踏まえてプロンプトを理解し、コンテキストを意識した正確なレスポンスを即座に返して、拡張性や効率を損なうことなく本番環境へシームレスに統合できるモデルが必要とされるからです。
小規模言語モデルを用いる理由
推論結果は目を見張るものでしたが、モデルは「論理的な問題」を解決するだけが目的ではありません。企業にとっての理想的なソリューションは、スピード、精度、推論パフォーマンスのバランスのとれたモデルです。アプリケーションの要件を満たしたうえで、CPU から専用アクセラレーターまで社内全体で利用可能な幅広い演算リソースを最大限に活用できる必要があります。企業がアプリケーションを展開する際にエンタープライズ AI 向けオープン・プラットフォーム (OPEA) のようなオープンソースのフレームワークを導入したい場合でも、オンプレミスのインフラストラクチャーからクラウドとエッジデバイスまで、多様な環境にわたって AI モデルをシームレスに実装、最適化、拡張できます。
エンタープライズ企業が注目するべき 2 つのポイント:
- 正確さ / 推論プロセス: 推論タスクを得意とする SLM は、一部のユースケースで、例えばパラメーター数が 700 億を超えるようなはるかに大規模なモデルに置き換り、AI アプリケーションを効率化することも可能。
- ハードウェア要件: SLM は軽量で標準的な PC でも動作。開発者が自分のノートブック PC で独自の AI アプリケーションをテストできるだけでなく、効率的な外部 API やローカル実装など、さらに幅広く展開できる可能性が広がります。
ただし、検討するべきことはまだまだあります。「自分の PC で動かせるのなら、もう GPU は必要ないのでは?」と思うかもしれません。部分的にはそのとおりで、SLM ならコストのかかるハードウェアを使わずにすみますが、検討しなければならない微妙な違いが存在します。
AI アプリケーションに独自のモデルを実装するなら、拡張性について検討しなければなりません。具体的に言い換えると、同時にインタラクションを行うユーザー数、処理するリクエスト数を考慮する必要があります。
AI アプリケーションの使用頻度が高くなれば、一層パワフルなハードウェアが必要になるでしょう。インテル® Xeon® スケーラブル・プロセッサーは、クラウド、オンサイトのデータセンター、外部 API のいずれでも幅広く適応し、SLM の推論処理を実行できます。拡張する場合には、インテル® Gaudi® アクセラレーターのような専用の AI アクセラレーターを追加することも可能です。シンプルに言えば、8B モデルの方が 70B モデルよりも同じハードウェアで多くのユーザーに対応できます。
ローカル実行の AI PC を使用して SLM を動かし、高性能 AI アプリケーションを開発 / テストできるなど、まさに画期的なことです。すぐに利用できるデータセンター環境や PC ベースの演算リソースにより、柔軟な実装が可能になります。
まとめ
このブログでは、複数の蒸留バージョン DeepSeek-R1 モデルで実施したテストの一例を紹介しました。さらに算術演算についても CHAMP データセットを用いてテストしています。大半のケースで DeepSeek-R1 がほかのモデルの推論パフォーマンスを上回る結果を示しました。
ただし、パフォーマンスはテストごとにばらつきがあり、さらなる改良の余地が浮き彫りになっています。こうした限界については、DeepSeek が論文 DeepSeek-R1:Incentivizing Reasoning Capability in LLMs via Reinforcement Learning で認めているとおりです。これを差し引いても、DeepSeek-R1 が実現した進歩は目覚ましく、コスト効率の高い AI を生み出して、開発者が最先端テクノロジーに近づくための前進を示しています。
まだ試していないのなら、インテルのハードウェアで DeepSeek を体験
最適なソリューションの前提として、速度、正確さ、推論能力のバランスを維持し、エンタープライズ要件を満たしたうえで処理時間とリソース使用率を最小限に抑えるには、インテルのプラットフォームを活用し、DeepSeek を自分で試してみることをおすすめします。
- AI PC: インテル® Tiber™ AI クラウドを通じて AI 対応 PC の機能を体験。オンデバイスの AI ワークロードを効率化し、パフォーマンスと応答性を引き上げます。
- インテル® Xeon® スケーラブル・プロセッサー: 高性能コンピューティングのために設計されたプロセッサー。複数のクラウド・サービス・プロバイダー経由で利用可能です。また、インテル® Tiber™ AI クラウドならば、インテル® Xeon® プロセッサーを搭載した最先端の AI インフラストラクチャーにアクセスし、拡張やワークロードの最適化が可能になります。
- インテル® Gaudi® 2 AI アクセラレーター: ディープラーニングの費用対効果を高める目的で構築されたアクセラレーター。大規模 AI モデルのトレーニングと推論に最適化されています。実装タイプと提供状況については、Denvr Dataworks を参照してください。
インテルが実施したその他のテスト:
- How Well Does DeepSeek Reason? I Put It to the Test on My AI PC (AI PC で DeepSeek の推論パフォーマンスを検証)
- How DeepSeek Applies Reasoning to Math Problems (DeepSeek が推論によって数学問題を解く仕組み)
元記事
筆者:Eze_Lanza
所属:インテル
投稿日:2025年2月5日