チュートリアル - LM Studioで任意の思考モデルに対して「Thinking」モードのオン/オフを直接切り替える方法

Reddit r/LocalLLaMA / 2026/4/4

💬 オピニオンDeveloper Stack & InfrastructureTools & Practical UsageModels & Research

要点

  • LM Studioの「Thinking」(推論)トグルは、通常LM Studioの自社インターフェースからダウンロードしたモデルでのみ自動的に表示されますが、外部出所のGGUFファイルでは非表示になっている場合があります。
  • 最も簡単な解決策は、推論モデルをLM Studioで直接ダウンロードし、使用前にモデル名の横に緑色の「Thinking」アイコンが表示されていることを確認することです。
  • 外部GGUFの場合の回避策は、`...User\.cache\lm-studio\hub\models\` 配下にLM Studioハブのキャッシュメタデータを追加してモデルIDを偽装し、プロバイダーフォルダ(小文字)とモデル固有のフォルダを用意することです。
  • この回避策では、モデルフォルダ内に `manifest.json` と `model.yaml` を作成する必要があり、それによってLM Studioがそのモデルを推論モデルとして認識し、チャットUIでThinkingスイッチが有効になります。
チュートリアル - LM Studioで任意の思考モデルの「Thinkingモード」をオン/オフ切り替えする方法

LM Studio はローカル LLM を実行するための非常に優れたツールですが、ひとつ癖があります。それは「Thinking」(推論)トグルが、LM Studio のインターフェースから直接ダウンロードしたモデルに対してだけ表示されることが多い点です。Unsloth や Bartowski のような提供元からの外部 GGUF を使う場合、この機能が隠れていることが頻繁にあります。

以下は、任意の推論モデルで Thinking スイッチを手動で有効化する方法です。

### 方法 1: ネイティブなやり方(いちばん簡単)

トグルが表示されることを確実にする最も簡単な方法は、LM Studio 内でモデルを直接ダウンロードすることです。ダウンロードする前に、モデル名の横に **Thinking アイコン**(緑色の脳のマーク)があるか確認してください。このアイコンが見えていれば、チャットウィンドウでトグルは自動的に動作します。

### 方法 2: 手動の回避策(外部モデル向け)

自分でモデルファイルを管理したい、または外部提供元から特定のクァントを使いたい場合は、LM Studio がそれを推論モデルとして認識できるように、モデルの「身元」を「偽装」する必要があります。これは、LM Studio のキャッシュ内にメタデータレジストリを作成することで実現します。

ここでは Gemma-4-31B を例として説明します。

#### 1. ディレクトリ設定

LM Studio のハブ内でフォルダ階層を作成する必要があります。次へ移動してください:

`...User\.cache\lm-studio\hub\models\`

https://preview.redd.it/yygd8eyue6tg1.png?width=689&format=png&auto=webp&s=3f328f59b10b9c527ffaafc736b9426f9e97042c

  1. プロバイダ用のフォルダを作成します(例:`google`)。**注意:** これは必ずすべて小文字である必要があります。

  2. そのフォルダ内に、モデル固有のフォルダを作成します(例:`gemma-4-31b-q6`)。

    * **フルパス例:** `...\.cache\lm-studio\hub\models\google\gemma-4-31b-q6\`

https://preview.redd.it/dcgomhm3f6tg1.png?width=724&format=png&auto=webp&s=ab143465e01b78c18400b946cf9381286cf606d3

#### 2. 設定ファイル

モデルフォルダの中に、次の 2 つのファイルを作成する必要があります:`manifest.json` と `model.yaml`。

https://preview.redd.it/l9o0tdv2f6tg1.png?width=738&format=png&auto=webp&s=8057ee17dc8ac1873f37387f0d113d09eb4defd6

https://preview.redd.it/nxtejuyeg6tg1.png?width=671&format=png&auto=webp&s=3b29553fb9b635a445f12b248f55c3a237cff58d

変更が特に重要な行は次のとおりです:
- モデル(作成したモデルフォルダと同じもの)
- そして Model Key(モデルへの相対パス)。このパスは、あなたがダウンロードしたモデルの場所であり、LM Studio が実際に使用している場所です。

**ファイル 1: `manifest.json`**

`"PATH_TO_MODEL"` を、GGUF ファイルが保存されている場所への実際の相対パスに置き換えてください。たとえば私の場合、モデルは Google/(Unsloth)_Gemma-4-31B-it-GGUF-Q6_K_XL にあり、ここで Google はモデルフォルダ内のサブフォルダです。

{ "type": "model", "owner": "google", "name": "gemma-4-31b-q6", "dependencies": [ { "type": "model", "purpose": "baseModel", "modelKeys": [ "PATH_TO_MODEL" ], "sources": [ { "type": "huggingface", "user": "Unsloth", "repo": "gemma-4-31B-it-GGUF" } ] } ], "revision": 1 } 

https://preview.redd.it/1opvhfm7f6tg1.png?width=591&format=png&auto=webp&s=78af2e66da5b7a513eea746fc6b446b66becbd6f

**ファイル 2: `model.yaml`**

このファイルは、推論トークン(「thought」ブロック)を LM Studio がどのように解釈するかを指示します。ここでも `"PATH_TO_MODEL"` を置き換えてください。

# model.yaml は、クロスプラットフォームの AI モデル設定を定義します model: google/gemma-4-31b-q6 base: - key: PATH_TO_MODEL sources: - type: huggingface user: Unsloth repo: gemma-4-31B-it-GGUF config: operation: fields: - key: llm.prediction.temperature value: 1.0 - key: llm.prediction.topPSampling value: checked: true value: 0.95 - key: llm.prediction.topKSampling value: 64 - key: llm.prediction.reasoning.parsing value: enabled: true startString: "<thought>" endString: "</thought>" customFields: - key: enableThinking displayName: Enable Thinking description: モデルが返信前に考えるかどうかを制御します type: boolean defaultValue: true effects: - type: setJinjaVariable variable: enable_thinking metadataOverrides: domain: llm architectures: - gemma4 compatibilityTypes: - gguf paramsStrings: - 31B minMemoryUsageBytes: 17000000000 contextLengths: - 262144 vision: true reasoning: true trainedForToolUse: true 

https://preview.redd.it/xx4r45xcf6tg1.png?width=742&format=png&auto=webp&s=652c89b6de550c92e34bedee9f540179abc8d405

GPT-OSS と Qwen 3.5 用の設定ファイル
OpenAI モデルの場合も同じ手順ですが、次の manifest と model.yaml を例として使用してください:

1- GPT-OSS ファイル 1: manifest.json

{ "type": "model", "owner": "openai", "name": "gpt-oss-120b", "dependencies": [ { "type": "model", "purpose": "baseModel", "modelKeys": [ "lmstudio-community/gpt-oss-120b-GGUF", "lmstudio-community/gpt-oss-120b-mlx-8bit" ], "sources": [ { "type": "huggingface", "user": "lmstudio-community", "repo": "gpt-oss-120b-GGUF" }, { "type": "huggingface", "user": "lmstudio-community", "repo": "gpt-oss-120b-mlx-8bit" } ] } ], "revision": 3 } 

2- GPT-OSS ファイル 2: model.yaml

# model.yaml は、クロスプラットフォームで合成可能な AI モデルを定義するためのオープン標準です # 詳しくは https://modelyaml.org で学べます model: openai/gpt-oss-120b base: - key: lmstudio-community/gpt-oss-120b-GGUF sources: - type: huggingface user: lmstudio-community repo: gpt-oss-120b-GGUF - key: lmstudio-community/gpt-oss-120b-mlx-8bit sources: - type: huggingface user: lmstudio-community repo: gpt-oss-120b-mlx-8bit customFields: - key: reasoningEffort displayName: 推論の労力 description: モデルにどれくらい推論を行わせるかを制御します。 type: select defaultValue: low options: - value: low label: 低 - value: medium label: 中 - value: high label: 高 effects: - type: setJinjaVariable variable: reasoning_effort metadataOverrides: domain: llm architectures: - gpt-oss compatibilityTypes: - gguf - safetensors paramsStrings: - 120B minMemoryUsageBytes: 65000000000 contextLengths: - 131072 vision: false reasoning: true trainedForToolUse: true config: operation: fields: - key: llm.prediction.temperature value: 0.8 - key: llm.prediction.topKSampling value: 40 - key: llm.prediction.topPSampling value: checked: true value: 0.8 - key: llm.prediction.repeatPenalty value: checked: true value: 1.1 - key: llm.prediction.minPSampling value: checked: true value: 0.05 

3- Qwen3.5 File 1: manifest.json

{ "type": "model", "owner": "qwen", "name": "qwen3.5-27b-q8", "dependencies": [ { "type": "model", "purpose": "baseModel", "modelKeys": [ "Qwen/(Unsloth)_Qwen3.5-27B-GGUF-Q8_0" ], "sources": [ { "type": "huggingface", "user": "unsloth", "repo": "Qwen3.5-27B" } ] } ], "revision": 1 } 

4- Qwen3.5 File 2: model.yaml

# model.yaml は、クロスプラットフォームで合成可能な AI モデルを定義するためのオープン標準です # 詳しくは https://modelyaml.org で学べます model: qwen/qwen3.5-27b-q8 base: - key: Qwen/(Unsloth)_Qwen3.5-27B-GGUF-Q8_0 sources: - type: huggingface user: unsloth repo: Qwen3.5-27B metadataOverrides: domain: llm architectures: - qwen27 compatibilityTypes: - gguf paramsStrings: - 27B minMemoryUsageBytes: 21000000000 contextLengths: - 262144 vision: true reasoning: true trainedForToolUse: true config: operation: fields: - key: llm.prediction.temperature value: 0.8 - key: llm.prediction.topKSampling value: 20 - key: llm.prediction.topPSampling value: checked: true value: 0.95 - key: llm.prediction.minPSampling value: checked: false value: 0 customFields: - key: enableThinking displayName: 思考を有効化 description: モデルが返信する前に考えるかどうかを制御します。 type: boolean defaultValue: false effects: - type: setJinjaVariable variable: enable_thinking 

お役に立てれば幸いです。

何か問題があれば教えてください。

追伸: このガイドは LM Studio 0.4.9 で問題なく動作します。

submitted by