> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/jp/ji-chu/inference-and-deployment/vllm-guide/vllm-engine-arguments.md).

# vLLMエンジン引数

vLLM 上でモデルを提供するための vLLM エンジンの引数、フラグ、オプション。

<table><thead><tr><th width="212.9000244140625">引数</th><th>例とユースケース</th></tr></thead><tbody><tr><td><strong><code>--gpu-memory-utilization</code></strong></td><td>デフォルトは 0.9。vLLM が使用できる VRAM 使用量。メモリ不足になる場合は減らしてください。0.95 または 0.97 に設定してみてください。</td></tr><tr><td><strong><code>--max-model-len</code></strong></td><td>最大シーケンス長を設定します。メモリ不足になる場合はこれを減らしてください！ 例えば、 <strong><code>--max-model-len 32768</code></strong> とすると、32K のシーケンス長のみを使用します。</td></tr><tr><td><strong><code>--quantization</code></strong></td><td>動的 float8 量子化には fp8 を使用します。これを <strong><code>--kv-cache-dtype</code></strong> と併用して、float8 KV キャッシュも有効にします。</td></tr><tr><td><strong><code>--kv-cache-dtype</code></strong></td><td>次を使います: <code>fp8</code> を使用すると、float8 KV キャッシュによりメモリ使用量を 50% 削減できます。</td></tr><tr><td><strong><code>--port</code></strong></td><td>デフォルトは 8000 です。vLLM の localhost にアクセスする方法、つまり http://localhost:8000</td></tr><tr><td><strong><code>--api-key</code></strong></td><td>任意 - モデルにアクセスするためのパスワード（またはパスワードなし）を設定します。</td></tr><tr><td><strong><code>--tensor-parallel-size</code></strong></td><td>デフォルトは 1 です。モデルをテンソル間で分割します。使用している GPU の数に合わせて設定してください。4 台あるなら 4、8 台なら 8 です。NCCL が必要です。そうでない場合、遅くなることがあります。</td></tr><tr><td><strong><code>--pipeline-parallel-size</code></strong></td><td>デフォルトは 1 です。モデルをレイヤー間で分割します。これを <strong><code>--pipeline-parallel-size</code></strong> と併用します。TP は各ノード内で使用され、PP は複数ノード構成全体で使用されます（PP はノード数に設定します）</td></tr><tr><td><strong><code>--enable-lora</code></strong></td><td>LoRA の提供を有効にします。Unsloth でファインチューニングされた LoRA の提供に便利です。</td></tr><tr><td><strong><code>--max-loras</code></strong></td><td>一度に提供したい LoRA の数です。1 つなら 1、あるいは 16 などに設定します。これはキューなので、LoRA をホットスワップできます。</td></tr><tr><td><strong><code>--max-lora-rank</code></strong></td><td>すべての LoRA の最大ランク。選択可能な値は <code>8</code>, <code>16</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>320</code>, <code>512</code></td></tr><tr><td><strong><code>--dtype</code></strong></td><td>を許可します <code>auto</code>, <code>bfloat16</code>, <code>float16</code> Float8 やその他の量子化には別のフラグを使用します - こちらを参照 <code>--quantization</code></td></tr><tr><td><strong><code>--tokenizer</code></strong></td><td>次のようにトークナイザーのパスを指定します <code>unsloth/gpt-oss-20b</code> 提供するモデルのトークナイザーが異なる場合。</td></tr><tr><td><strong><code>--hf-token</code></strong></td><td>ガード付きモデルが必要な場合は、HuggingFace トークンを追加してください</td></tr><tr><td><strong><code>--swap-space</code></strong></td><td>デフォルトは 4GB です。CPU オフロード用の領域です。VRAM に余裕がある場合は減らし、低メモリ GPU では増やしてください。</td></tr><tr><td><strong><code>--seed</code></strong></td><td>vLLM のデフォルトは 0 です</td></tr><tr><td><strong><code>--disable-log-stats</code></strong></td><td>スループットやサーバーリクエストなどのログ記録を無効にします。</td></tr><tr><td><strong><code>--enforce-eager</code></strong></td><td>コンパイルを無効にします。読み込みは速くなりますが、推論は遅くなります。</td></tr><tr><td><strong><code>--disable-cascade-attn</code></strong></td><td>vLLM &#x3C; 0.11.0 の強化学習実行では有用です。Cascade Attention は A100 GPU で少し不安定だったためです（Unsloth がこれを修正します）</td></tr></tbody></table>

### :tada:Float8 量子化

たとえば、Llama 3.3 70B Instruct（128K のコンテキスト長をサポート）を Float8 KV キャッシュと量子化でホストするには、次を試してください：

```bash
vllm serve unsloth/Llama-3.3-70B-Instruct \
    --quantization fp8 \
    --kv-cache-dtype fp8 \\
    --gpu-memory-utilization 0.97 \
    --max-model-len 65536
```

### :shaved\_ice:LoRA のホットスワップ / 動的 LoRA

一度に最大 4 つの LoRA の LoRA サービスを有効にするには（これらはホットスワップ／変更されます）、まずホットスワッピングを許可するための環境フラグを設定します:

こちらをご覧ください [LoRAホットスワップガイド](/docs/jp/ji-chu/inference-and-deployment/vllm-guide/lora-hot-swapping-guide.md) を参照してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/jp/ji-chu/inference-and-deployment/vllm-guide/vllm-engine-arguments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
