> 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-ben/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キャッシュも有効にするにはfp8を使用します。</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の数。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>Cascade AttentionがA100 GPUでやや不安定だったため、vLLM &#x3C; 0.11.0 の強化学習実行で便利です（Unslothがこれを修正しています）</td></tr></tbody></table>

### :tada:Float8量子化

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

```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-ben/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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
