# Unslothベンチマーク

* より詳細なベンチマークについては、こちらをご覧ください [Llama 3.3 ブログ](https://unsloth.ai/blog/llama3-3).
* Unsloth のベンチマークも次によって実施されました [🤗Hugging Face](https://huggingface.co/blog/unsloth-trl).

{% hint style="warning" %}
最初は速度が遅く見える場合、それはおそらく `torch.compile` がウォームアップしてコンパイルを完了するのに通常約5分（またはそれ以上）かかるためです。スループットは必ず測定してください **後で** 完全に読み込まれた後は、長時間の実行では Unsloth のほうがはるかに高速であるはずです。
{% endhint %}

H100 と [Blackwell](/docs/jp/burogu/fine-tuning-llms-with-blackwell-rtx-50-series-and-unsloth.md) GPU でテストしました。Alpaca データセットを使用し、バッチサイズ 2、勾配累積ステップ 4、rank = 32 でテストし、すべての線形層（q, k, v, o, gate, up, down）に QLoRA を適用しました:

<table data-full-width="false"><thead><tr><th>モデル</th><th>VRAM</th><th>🦥Unsloth の速度</th><th>🦥VRAM 削減</th><th>🦥より長いコンテキスト</th><th>😊Hugging Face + FA2</th></tr></thead><tbody><tr><td>Llama 3.3 (70B)</td><td>80GB</td><td>2倍</td><td>>75%</td><td>13倍長い</td><td>1倍</td></tr><tr><td>Llama 3.1 (8B)</td><td>80GB</td><td>2倍</td><td>>70%</td><td>12倍長い</td><td>1倍</td></tr></tbody></table>

## コンテキスト長のベンチマーク

{% hint style="info" %}
データが多いほど、Unsloth が使用する VRAM は少なくなります。これは私たちの [勾配チェックポイント](https://unsloth.ai/blog/long-context) アルゴリズム + Apple の CCE アルゴリズムのおかげです！
{% endhint %}

### **Llama 3.1 (8B) の最大コンテキスト長**

Llama 3.1 (8B) Instruct をテストし、バッチサイズ 1 で、すべての線形層（Q, K, V, O, gate, up, down）に対して rank = 32 の 4bit QLoRA を実施しました。長文コンテキストのファインチューニング作業を模擬するため、すべてのシーケンスを特定の最大シーケンス長までパディングしました。

| GPU VRAM | 🦥Unsloth のコンテキスト長 | Hugging Face + FA2 |
| -------- | ------------------ | ------------------ |
| 8 GB     | 2,972              | OOM                |
| 12 GB    | 21,848             | 932                |
| 16 GB    | 40,724             | 2,551              |
| 24 GB    | 78,475             | 5,789              |
| 40 GB    | 153,977            | 12,264             |
| 48 GB    | 191,728            | 15,502             |
| 80 GB    | 342,733            | 28,454             |

### **Llama 3.3 (70B) の最大コンテキスト長**

Llama 3.3 (70B) Instruct を 80GB の A100 でテストし、バッチサイズ 1 で、すべての線形層（Q, K, V, O, gate, up, down）に対して rank = 32 の 4bit QLoRA を実施しました。長文コンテキストのファインチューニング作業を模擬するため、すべてのシーケンスを特定の最大シーケンス長までパディングしました。

| GPU VRAM | 🦥Unsloth のコンテキスト長 | Hugging Face + FA2 |
| -------- | ------------------ | ------------------ |
| 48 GB    | 12,106             | OOM                |
| 80 GB    | 89,389             | 6,916              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://unsloth.ai/docs/jp/ji-ben/unsloth-benchmarks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
