How to Change Ollama Model Path

I’m not particularly a big fan of having a big system storage. Most of my machines usually have 1 TB or less, and when needed, I use external drives or NAS. If you are interested in playing with Ollama, especially with the new Mac Studio, one of the missing key features of Ollama is to change path of where the LLM models will be saved or loaded from. As far as I could see, there were no verbs to do it on CLI or GUI.

The simplest solution on POSIX would be to use symlink. Ollama saves the LLM models in the user folder. After moving the contents of ~/.ollama/model to the desired location, run the following command, with the bracketed path replaced to the new location:

ln -s "[path/to/folder]" "~/.ollama/model"

Running and developing LLMs in the garage —as we used to call it— has its merits, but I think we are at a point where cloud services are likely to make a come back. One of the reviewers for Mac Studio did bring up that comparison; M3 Ultra might make LLMs more affordable, but $14k budget can go long way when it’s put to cloud services. Some even speculated M3 Ultra is more practical in closed environment, where sensitive data stay on local machines. Having said all that, if you need more storage for the local LLM machine, it might not be a bad time to reconsider the storage configurations.

Leave a comment