モデル情報

  • このモデルはopenai/gpt-oss-20bllama.cppでGGUF化したものです。
  • 同じディレクトリに含まれる各種Modefileを利用して、ローカルのOllamaで利用することができます。
  • Modefleのシステムプロンプトや各種パラメーターを変更することで、高度な調整を反映できます。

オプション:簡単な調整方法

  • 高度な調整は不要だが、パラメーターの調整を実施したい場合は次のような流れで簡単に調整することができます。
# 通常のopenai/gpt-oss-20bをダウンロードして実行
ollama run gpt-oss:20b

# 例)コンテキスト長を64000に設定
/set parameter num_ctx 64000

# モデルを新しい名前で保存
/save gpt-oss:20b-64k

# Ollamaを終了
/bye

# 保存したモデルで実行
ollama run gpt-oss:20b-64k

パラメーターの設定例

/set parameter num_ctx 64000 # コンテキスト長を64000に設定
/set parameter temperature 0.5 # 温度を0.5に設定
/set parameter top_p 0.9 # top_pを0.9に設定
/set parameter top_k 40 # top_kを40に設定
/set parameter num_predict 4096 # 最大生成トークン数を4096に設定

使い方

ファイルのダウンロード

from huggingface_hub import snapshot_download
snapshot_download(repo_id="yasutoshi-lab/gpt-oss-20b-gguf", local_dir="./model")

ビルド

# コンテキスト長:120k, 温度:1, デフォルト推論モード:lowを作成する場合
ollama create gpt-oss-20b:120k-low-thinking -f ./model/gpt-oss-20b-120k-low-thinking.Modefile

# コンテキスト長:120k, 温度:1, デフォルト推論モード:mediumを作成する場合
ollama create gpt-oss-20b:120k-medium-thinking -f ./model/gpt-oss-20b-120k-medium-thinking.Modefile

# コンテキスト長:120k, 温度:1, デフォルト推論モード:highを作成する場合
ollama create gpt-oss-20b:120k-high-thinking -f ./model/gpt-oss-20b-120k-high-thinking.Modefile

推論実行

# コンテキスト長:120k, 温度:1, デフォルト推論モード:lowを実行する場合
ollama run gpt-oss-20b:120k-low-thinking

# コンテキスト長:120k, 温度:1, デフォルト推論モード:mediumを実行する場合
ollama run gpt-oss-20b:120k-medium-thinking

# コンテキスト長:120k, 温度:1, デフォルト推論モード:highを実行する場合
ollama run gpt-oss-20b:120k-high-thinking

トラブルシューティング

エラー

  • "toTypeScriptType"が発生
# ビルドコマンドの実行
ubuntu@ubuntu:~$ ollama create gpt-oss-20b:120k-low-thinking -f ./model/gpt-oss-20b-120k-low-thinking.Modefil

# ターミナルの出力
gathering model components
copying file sha256:7580f705e503c7a5a8a4cedc1d2bed8a3a1a4d5303190c63c7630f722f8c646f 100%
parsing GGUF
Error: template error: template: :109: function "toTypeScriptType" not defined

解決方法

  • 古いバージョンでは対応していないため、Ollamaのバージョンを最新にする

Download Ollama
Download Linux
Download windows

Downloads last month
211
GGUF
Model size
21B params
Architecture
gpt-oss
Hardware compatibility
Log In to view the estimation

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yasutoshi-lab/gpt-oss-20b-gguf

Base model

openai/gpt-oss-20b
Quantized
(141)
this model

Collection including yasutoshi-lab/gpt-oss-20b-gguf