0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ollamaでモデルの名前を変えて起動する

Posted at

Ollamaでモデルの名前を変えて起動する

表題の通り

経緯

Dify で Ollama モデルプロバイダーを使ってモデルを立ち上げようとした時に、とある理由で公式の名称以外のモデル名を使う必要があった

一応 OpenAI-API-compatible で別名で登録できるが、互換性がちょくちょく無かったので微妙だった(Function Calling 使えないとか普通に困る)

結論

Ollama のコピーコマンドを使って、同じモデルデータで別名のモデルを作成する
(下の例だと my-deepseek というモデル名になる)

shell
# Pull original model data
$ ollama pull deepseek-r1:8b

# Rename it
$ ollama cp deepseek-r1:8b my-deepseek

# Run
$ ollama run my-deepseek

試してないが、Modelfile でも同様のことはできると思う。Docker で動かすには ENTRYPOINT に仕込めば良い

Modelfile
FROM deepseek-r1:8b
shell
$ ollama create my-deepseek -f /Modelfile
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?