Windows でollama GPU を使ってモデルパスを変更する

ダウンロード

https://github.com/ollama/ollama/releases

ollama-windows-amd64.zip

バッチファイル

set OLLAMA_GPU_LAYER=cuda 
set OLLAMA_MODELS=E:\ollama\models
E:\ollama\ollama.exe
cmd/k

コマンドラインオプション

Usage:
  ollama [flags]
  ollama [command]

Available Commands:
  serve       Start Ollama
  create      Create a model
  show        Show information for a model
  run         Run a model
  stop        Stop a running model
  pull        Pull a model from a registry
  push        Push a model to a registry
  signin      Sign in to ollama.com
  signout     Sign out from ollama.com
  list        List models
  ps          List running models
  cp          Copy a model
  rm          Remove a model
  launch      Launch the Ollama menu or an integration
  help        Help about any command

Flags:
  -h, --help         help for ollama
      --nowordwrap   Don't wrap words to the next line automatically
      --verbose      Show timings for response
  -v, --version      Show version information

Use "ollama [command] --help" for more information about a command.

コマンド

ollama ps
ollama list        
ollama run model
ollama stop model
ollama rm model
ollama ps

Error: could not locate ollama app

ollamaだけのパラメーターを指定しないで実行しエスケープで終了してください

モデルの検索

https://ollama.com/search

gemma2

set OLLAMA_GPU_LAYER=cuda 
set OLLAMA_MODELS=E:\ollama\models

"E:\ollama\ollama.exe"  run gemma2:2b

timeout /t 5
ollama ps
cmd/k

会話モード終わり

/bye 

ollama

Posted by eightban