ドキュメント
インテグレーション
Model Context Protocol (MCP)
モデル (model.yaml)
API
インテグレーション
Model Context Protocol (MCP)
モデル (model.yaml)
API
モデル (model.yaml)
model.yamlの紹介
プラットフォーム横断的な model.yaml 仕様でモデルを記述します。
ドラフト
model.yaml は、単一のポータブルファイルでモデルとそのすべてのバリアントを記述します。LM Studio の モデルカタログ のモデルはすべて model.yaml を使用して実装されています。
これにより、基盤となるフォーマット (GGUF、MLX など) を抽象化し、特定のモデルに対して単一のエントリポイントを提供できます。さらに、model.yaml ファイルは、追加のメタデータ、ロードおよび推論オプション、さらにはカスタムロジック (例: 考えさせる/考えさせないを有効にする) を組み込むことをサポートします。
LM Studio Hub で既存の model.yaml ファイルをクローンしたり、独自のファイルを公開したりすることもできます!
model形式 publisher/model の正規化された識別子。
model: qwen/qwen3-8b
base「実際の」モデルファイルまたはその他の仮想モデルを指します。各エントリは、一意の key と、ファイルを取得できる 1 つ以上の sources を使用します。
以下のスニペットは、モデル (qwen/qwen3-8b) が 3 つの異なる実際のモデルのいずれかに解決できるケースを示しています。
model: qwen/qwen3-8b base: - key: lmstudio-community/qwen3-8b-gguf sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-GGUF - key: lmstudio-community/qwen3-8b-mlx-4bit sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-MLX-4bit - key: lmstudio-community/qwen3-8b-mlx-8bit sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-MLX-8bit
実際のモデルファイルは、実際の重みを指します。
metadataOverridesベースモデルのメタデータを上書きします。これは、LM Studio のモデルカタログやアプリのモデル検索など、表示目的で役立ちます。モデルの機能的な変更には使用されません。
metadataOverrides: domain: llm architectures: - qwen3 compatibilityTypes: - gguf - safetensors paramsStrings: - 8B minMemoryUsageBytes: 4600000000 contextLengths: - 40960 vision: false reasoning: true trainedForToolUse: true
configデフォルトのランタイム設定 (サンプリングパラメータなど) やロード時のオプションを組み込むために使用します。モデルごとのデフォルトと同様に機能します。
operation: 推論時間パラメータload: ロード時間パラメータconfig: operation: fields: - key: llm.prediction.topKSampling value: 20 - key: llm.prediction.temperature value: 0.7 load: fields: - key: llm.load.contextLength value: 42690
customFieldsモデル固有のカスタムフィールドを定義します。
customFields: - key: enableThinking displayName: Enable Thinking description: Controls whether the model will think before replying type: boolean defaultValue: true effects: - type: setJinjaVariable variable: enable_thinking
上記の例を機能させるためには、jinja テンプレートに enable_thinking という名前の変数が必要です。
https://lmstudio.dokyumento.jp/models/qwen/qwen3-8b から取得
# model.yaml is an open standard for defining cross-platform, composable AI models # Learn more at https://modelyaml.org model: qwen/qwen3-8b base: - key: lmstudio-community/qwen3-8b-gguf sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-GGUF - key: lmstudio-community/qwen3-8b-mlx-4bit sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-MLX-4bit - key: lmstudio-community/qwen3-8b-mlx-8bit sources: - type: huggingface user: lmstudio-community repo: Qwen3-8B-MLX-8bit metadataOverrides: domain: llm architectures: - qwen3 compatibilityTypes: - gguf - safetensors paramsStrings: - 8B minMemoryUsageBytes: 4600000000 contextLengths: - 40960 vision: false reasoning: true trainedForToolUse: true config: operation: fields: - key: llm.prediction.topKSampling value: 20 - key: llm.prediction.minPSampling value: checked: true value: 0 customFields: - key: enableThinking displayName: Enable Thinking description: Controls whether the model will think before replying type: boolean defaultValue: true effects: - type: setJinjaVariable variable: enable_thinking
GitHub 仕様 には、詳細情報と最新のスキーマが含まれています。
このページのソースは GitHub で入手できます。