> For the complete documentation index, see [llms.txt](https://ai-novel.gitbook.io/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-novel.gitbook.io/help/shiii/modtoha.md).

# MODとは？

AIをより細かくチューンできる機能がMODです。\
任意のコーパス（テキスト）を読み込み、その文章のテーマやスタイルを学習した**プロンプトAI**が入力と出力の間に入ることで、細かく設定しなくても思い通りの文章が出力されやすくなります。\
自分だけのMODを訓練すれば、ユーザー同士で自由に共有して楽しめます！

<img src="/files/7f3SGANWQrFnsoWX6heZ" alt="" width="563">

## **ポイント**

1. MODは入力した文章が短いときに最も効力を発揮します。新しい作品を開いて試してみましょう。
2. 反対に、2048トークンをフルに使ったプロンプトではあまり変化が感じられないことがあります。\
   作品の途中でMODを変更したい時は`@break`コマンドを活用するなどして、AIに読ませるトークン数を一時的に減らしてみましょう。
3. 最大100トークンがMOD用にリザーブ[^1]されます。

## **MOD訓練のポイント**

1. 用意するコーパスは**必ずプレーンテキスト（pdf、WordやiWorkのドキュメント形式には対応していません）**&#x304B;つノイズの少ないものが好ましいです。\
   過剰な改行や、行頭の空白などは自動で取り除かれますが、無関係な文章やhtmlタグが混ざっていると思ったような結果にならない可能性があります。
2. コーパスに使うテキストの文字コードはUTF-8のみ対応しています（Shift-JISやEUC-JPには対応していません）。\
   最近のテキストはほとんどの場合UTF-8でフォーマットされていますが、古いテキストを読み込む場合はご注意ください。
3. 基本的にはコーパスの量が多いほど高い精度が期待できますが、少なくとも10キロバイト程度のテキストがあれば訓練が可能です。\
   一度に読ませることができるサイズは最大で16MBです。iOSなど、一部の環境からは4MB以下をおすすめします。
4. lossの数値は低いほど精度が高いことを意味します。\
   小説的な自由度の高い文章のlossは高く、ソースコードなどフォーマットの決まっている文章のlossは低くなる傾向があります。\
   **2.91以下**であれば高精度のラーニングができています。
5. **訓練するステップ数に応じて**[<mark style="color:green;">**ルミナ**</mark>](broken://pages/FICivxt8DNVJWGs9HqmG)**を消費します。**\
   ステップ数はコーパスの量に合わせて自動的に調整されますが、極端に高い精度を求めないのであればステップ数を減らすこともできます（ステップ数を減らすと、処理時間もそれに応じて短くなります）。

## **プライバシーについて**

MOD訓練用にアップロードしたコーパスはトレーニング終了後にサーバーから削除されるほか、MODのユニークIDからはアップロードしたユーザーが推測できないようになっています。

***

[<mark style="color:green;">詳しい使い方</mark>](/help/shiii.md)

[<mark style="color:green;">よくある質問：全部</mark>](/help/yokuaru.md)

[^1]: 予約されること。

    本来2048トークンを使ったプロンプトでMODを併用した場合、プロンプトからは約1948トークンしか読み込まれない。


---

# 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://ai-novel.gitbook.io/help/shiii/modtoha.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.
