Skip to content

Save and load ollama models just like operating docker images.

Notifications You must be signed in to change notification settings

cgjosephlee/ollama-save-load

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Ollama save/load models

Save and load ollama models just like operating docker images.

Usage

ollama pull gemma2:2b-instruct-q4_K_M
ollama list
# NAME                         ID              SIZE      MODIFIED
# gemma2:2b-instruct-q4_K_M    cb2d06dce813    1.7 GB    30 seconds ago

# save to stdout
export OLLAMA_MODELS="/path/to/ollama/models"  # change this if you have alternative path
./ollama-save.py gemma2:2b-instruct-q4_K_M | gzip > gemma2.tar.gz

# load from filename
./ollama-load.py gemma2.tar.gz

FAQ

macOS tar version

macOS use BSD-tar so you may encounter the following error when loading tarball on a linux machine:

tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'

Use GNU-tar to fix this:

brew install gnu-tar

About

Save and load ollama models just like operating docker images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages