# ハイパーパラメータの設定

<figure><img src="/files/F6EBUPtxyGozh8Ut2b6k" alt=""><figcaption></figcaption></figure>

ハイパーパラメータは、トレーニングプロセス中にモデルの重みがどのように更新されるかを制御します。設定を容易にするため、ハイパーパラメータを機能と関連性に基づいて**5つの明確なグループ**に分類します：

#### グループ1 - 全般 <a href="#contentify_0" id="contentify_0"></a>

トレーニングプロセスのコア設定。

<table><thead><tr><th>名称</th><th width="370.2000732421875">説明</th><th>タイ プ</th><th>サポートされる値</th></tr></thead><tbody><tr><td><strong>バッチサイズ</strong></td><td>モデルが重みを更新する前に、1回の順伝播と逆<br>伝播で処理する例の数。大きなバッチはトレーニングを遅くしますが、より安定した結果を生む可能性があります。分散トレーニングの 場合、これは各デバイス上のバッチサイズです。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>エポック</strong></td><td>エポックとは、モデルトレーニング中に全トレ<br>ーニングデータを一度完全に処理する単位です。通常は複数のエポックを実行し、モデル<br>が反復的に重みを最適化できるようにします。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>学習率</strong></td><td>モデルの学習済みパラメータに対する変更の<br>大きさを調整します。</td><td>浮動小数点</td><td>(0, 1)</td></tr><tr><td><strong>最大シーケンス長</strong></td><td>最大入力長。これより長いシーケンスはこの<br>値で切り詰められます。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>分散バックエンド</strong></td><td>分散トレーニングに使用するバックエンド。</td><td>列挙型[文字列]</td><td>DDP, DeepSpeed</td></tr><tr><td><strong>ZeROステージ</strong></td><td>DeepSpeed ZeROアルゴリズムを適用するス<br>テージ。分散バックエンドの場合にのみ適用<br>= DeepSpeed の場合のみ適用。</td><td>列挙型[整数]</td><td>1, 2, 3</td></tr><tr><td><strong>トレーニングタイプ</strong></td><td>使用するパラメータモード。</td><td>列挙型[文字列]</td><td>フル、LoRA</td></tr><tr><td><strong>チェックポイントからの再</strong><br><strong>開</strong></td><td>トレーニングエンジンが再開するチェックポ<br>イントの相対パス。</td><td>Union[bool, string]</td><td>いいえ, 最後のチェック<br>ポイント, チェックポイ<br>ントへのパス</td></tr></tbody></table>

#### グループ 2 - トレーニング実行環境 <a href="#contentify_1" id="contentify_1"></a>

トレーニングの効率とパフォーマンスを最適化します。

<table><thead><tr><th>名前</th><th width="370.2000732421875">説明 </th><th width="128">タイ プ</th><th>サポートされる値</th></tr></thead><tbody><tr><td><strong>勾配蓄積ステップ数</strong></td><td>後方伝播/更新パスを実行する前に勾配を蓄積<br>するための更新ステップ数。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>混合精度</strong></td><td>使用する混合精度の種類。</td><td>列挙型[文字列]</td><td>Bf16, Fp16, None</td></tr><tr><td><strong>量子化ビット</strong></td><td>オンザフライ量子化でモデルを量子化するビット数。現在、トレーニングタイプ = LoRA の場合にのみ適用可能。</td><td>列挙型[文字列]</td><td>なし</td></tr><tr><td><strong>オプティマイザー</strong></td><td>トレーニングに使用するオプティマイザー。</td><td>列挙型[文字列]</td><td>Adamw, Sgd</td></tr><tr><td><strong>重みの減衰</strong></td><td>オプティマイザーに適用する重み減衰。</td><td>浮動小数点</td><td>[0, +∞)</td></tr><tr><td><strong>最大勾配ノルム</strong></td><td>勾配クリッピングの最大ノルム。</td><td>浮動小数点</td><td>[0, +∞)</td></tr><tr><td><strong>勾配チェックポイント機能</strong><br><strong>を無効化</strong></td><td>勾配チェックポイントの無効化を行うかどうか。</td><td>Bool</td><td>True, False</td></tr><tr><td><strong>フラッシュアテンション v2</strong></td><td>フラッシュアテンションバージョン2を使用す<br>るかどうか。</td><td>Bool</td><td>True, False</td></tr><tr><td><strong>LRウォームアップ手順</strong></td><td>学習率0から学習率までの線形ウォームアップに使用されるステップ数。</td><td>整数</td><td>[0, +∞)</td></tr><tr><td><strong>LRウォームアップ比率</strong></td><td>線形ウォームアップに使用される総トレーニングステップ数の比率。</td><td>フロート</td><td>[0, 1)</td></tr><tr><td><strong>LR スケジューラ</strong></td><td>使用する学習率スケジューラ。</td><td>列挙型[文字列]</td><td>Linear, Cosine, Constant</td></tr><tr><td><strong>完全決定論</strong></td><td>分散トレーニングで再現可能な結果を確保します。<strong>重要</strong>: これはパフォーマンスに悪影響を与えるため、デバッグ時のみ使用してください。<br>Trueの場合、Seedの設定は効果を持ちません。</td><td>Bool</td><td>True, False</td></tr><tr><td><strong>Seed</strong></td><td>再現性のための乱数シード。</td><td>整数</td><td>[0, +∞)</td></tr></tbody></table>

#### グループ3 - DPO <a href="#contentify_2" id="contentify_2"></a>

**トレーナー = DPO** を使用する場合にこのグループを有効にしてください。

<table><thead><tr><th>名前 </th><th width="370.2000732421875">説明 </th><th>値 </th><th>サポートされる値</th></tr></thead><tbody><tr><td><strong>DPOラベル平滑化</strong></td><td>DPO の堅牢な DPO ラベル平滑化パラメータは 0 から 0.5 の間でなければなりません。</td><td>浮動小数点</td><td>[0, 0.5]</td></tr><tr><td><strong>優先度ベータ</strong></td><td>優先度損失におけるベータパラメータ。</td><td>浮動小数点</td><td>[0, 1]</td></tr><tr><td><strong>選好微調整混合率</strong></td><td>DPOトレーニングにおけるSFT損失係数。</td><td>浮動小数点</td><td>[0, 10]</td></tr><tr><td><strong>選好損失</strong></td><td>使用するDPO損失の種類。</td><td>列挙型[文字列]</td><td>シグモイド、ヒンジ、Ipo<br>、Ktoペア、Orpo、<br>Simpo</td></tr><tr><td><strong>SimPO gamma</strong></td><td>SimPO損失における目標報酬マージン。該当す<br>る場合にのみ使用される。</td><td>浮動小数点</td><td>(0, +∞)</td></tr></tbody></table>

#### グループ4 - LoRA <a href="#contentify_3" id="contentify_3"></a>

**トレーニングタイプ = LoRA** を使用する場合にこのグループを有効にします。

<table><thead><tr><th>名前 </th><th width="370.199951171875">説明 </th><th>値 </th><th>サポートされる値</th></tr></thead><tbody><tr><td><strong>マージアダプター</strong></td><td>LoRAアダプターをベースモデルにマージして最<br>終モデルを提供するかどうか。マージしない場合、トレーニング終了後はLoRAアダプターのみが保存される。</td><td>Bool</td><td>True, False</td></tr><tr><td><strong>LoRAアルファ</strong></td><td>LoRA のアルファパラメータ。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>LoRAのドロップアウト</strong></td><td>LoRA のドロップアウト率。</td><td>浮動小数点</td><td>[0, 1]</td></tr><tr><td><strong>LoRAランク</strong></td><td>LoRA行列のランク。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>ターゲットモジュール</strong></td><td>量子化または微調整の対象となるモジュール。</td><td>文字列</td><td>全線形</td></tr></tbody></table>

#### グループ 5 - その他 <a href="#contentify_4" id="contentify_4"></a>

微調整の進捗状況の追跡および保存方法を制御します。

<table><thead><tr><th>名前 </th><th width="370.199951171875">説明 </th><th>値 </th><th>サポートされる値</th></tr></thead><tbody><tr><td><strong>チェックポイント戦略</strong></td><td>トレーニング中に採用するチェック<br>ポイント保存戦略。「best」のみ評価戦略が「no」でない場合にのみ適用可能。</td><td>列挙型[文字列]</td><td>いいえ、エポック、ステッ<br>プ数</td></tr><tr><td><strong>チェックポイントステップ数</strong></td><td>チェックポイント戦略が有効な場合、2回のチェ<br>ックポイント保存までのトレーニングステッ<br>プ数= stepの場合に2回のチェックポイント保存が行われるまでのトレーニングステップ数。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>評価戦略</strong></td><td>トレーニング中に採用する評価戦略。</td><td>列挙型[文字列]</td><td>いいえ、エポック、ステッ<br>プ</td></tr><tr><td><strong>評価ステップ</strong></td><td>評価戦略がステップの場合、2回の評価間の<br>更新ステップ数= steps の場合。設定されていない場合、デフォルトでは「ロギングステップ数」と<br>同じ値になります。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>チェックポイント数</strong></td><td>値が渡された場合、チェックポイントの総数を<br>制限します。</td><td>整数</td><td>[1, +∞)</td></tr><tr><td><strong>ベストチェックポイントの保存</strong></td><td>最良のチェックポイントをトラッキングして<br>保持するかどうか。現在はFalseのみをサポート。</td><td>Bool</td><td>False</td></tr><tr><td><strong>ロギングステップ</strong></td><td>標準出力ログやMLflowデータポイントを含む、イベント間のステップ数。logging_steps = -1は全ステップでログを記録することを意味します。</td><td>整数</td><td>[0, +∞)</td></tr></tbody></table>

または、**トグルJSONを**切り替えることでハイパーパラメータを素早く設定できます:

<figure><img src="/files/XcN9e6ffE3AFywyyvCJZ" alt=""><figcaption></figcaption></figure>


---

# 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://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-ai-studio/sbisu/moderuno/chtoriaru/paipurainno/haipparamtano.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.
