openai/gpt-oss
Collection
openai/gpt-oss-20b, converted from MXFP4 to BF16
•
3 items
•
Updated
# 通常の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
エラー
# ビルドコマンドの実行
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
解決方法
We're not able to determine the quantization variants.
Base model
openai/gpt-oss-20b