Wish to run generative AI proper in your Mac? There’s the place Ollama is available in. However there’s an issue – fashionable LLMs can devour up any place from 4GB to 40GB every, temporarily filling up your interior force.

Setup Ollama LLM

That’s the place this information is available in – I’ll display you find out how to set up and run Ollama in your exterior force, with the entire LLMs you obtain saved proper in your exterior force so that they don’t absorb house in your Mac’s interior exhausting force.

On this step by step information, I’ll stroll you thru the entirety from putting in Ollama to shifting it for your exterior force. Let’s get began!

Putting in Homebrew

First, let’s get Homebrew put in (skip this if you have already got it).

Homebrew makes putting in Ollama tremendous simple, plus it’s at hand when you ever need to uninstall Ollama later.

  1. Open Terminal (hit Cmd + House, kind “Terminal,” press Input)
  2. Replica and paste this command:
    /bin/bash -c "$(curl -fsSL https://uncooked.githubusercontent.com/Homebrew/set up/HEAD/set up.sh)"
  3. Take a look at if it labored:
    brew --version

Putting in Ollama

Now that we’ve got Homebrew able, putting in Ollama is simply two instructions away:

  1. Set up it:
    brew set up ollama
  2. Test it’s put in:
    ollama --version

Be aware: For those who see a message pronouncing “Caution: may just now not connect with a operating Ollama example” – don’t concern! That’s commonplace since we haven’t began Ollama but. So long as you spot one thing like “shopper edition 0.5.7“, you’re excellent to head.

Check Ollama version

Environment Up Ollama on Your Exterior Power

Via default, Ollama retail outlets the entirety in a ~/.ollama folder in your Mac’s interior force. Let’s transfer it for your exterior force as a substitute:

  1. Attach your exterior force for your Mac
  2. Create an Ollama folder in your exterior force:
    mkdir /Volumes/YourDriveName/.ollama

    As an example, in case your force is known as “MyDrive”:

    mkdir /Volumes/MyDrive/.ollama
  3. Transfer present Ollama information to exterior force:
    mv ~/.ollama /Volumes/YourDriveName/.ollama
  4. Create a hyperlink so Ollama is aware of the place to seem:
    ln -s /Volumes/YourDriveName/.ollama ~/.ollama

Obtain and Run Your First LLM

Time to get your first LLM operating! Open Terminal and:

  1. Get started Ollama:
    ollama serve
  2. Open a brand new Terminal window and obtain an LLM (let’s check out Llama 2):
    ollama pull llama2

    The obtain will take a little time since LLMs are lovely giant information – may well be a number of mins or longer relying in your web pace.

    Downloading LLM
  3. As soon as downloaded, run it:
    ollama run llama2
    Running llama2 LLM

That’s it! You’ll now get started talking to Llama 2 by way of Ollama, all operating out of your exterior force.

FAQ

How do I test the place my Ollama information are at the exterior force?

The whole lot’s saved on your /Volumes/YourDriveName/.ollama folder. Fashions are within the fashions/blobs subfolder.

Sort ls /Volumes/YourDriveName/.ollama/fashions/blobs/ in Terminal to peer your entire downloaded fashions.

How do I uninstall Ollama?

Since we put in by way of Homebrew, simply run:

brew uninstall ollama

Then delete the .ollama folder out of your exterior force.

How do I set up extra LLMs?

In finding extra LLM you’ll be able to obtain on Ollama’s library web page, then use the pull command:

ollama pull modelname

As an example: ollama pull deepseek-r1 or ollama pull llama3.3

How do I see all LLMs I’ve downloaded?

Run this command:

ollama record

This presentations your entire put in fashions with their sizes.

How do I delete an LLM I don’t use anymore?

Use the take away command:

ollama rm modelname

As an example: ollama rm llama2

Can I take advantage of my exterior force with Ollama on any other Mac?

Sure. Apply the stairs above to put in Ollama at the different Mac, then create the symbolic hyperlink pointing for your exterior force’s .ollama folder and fix your exterior force. Your fashions will likely be able to make use of with out downloading them once more.

The publish How one can Run LLM from Exterior Arduous Power with Ollama gave the impression first on Hongkiat.

WordPress Website Development Source: https://www.hongkiat.com/blog/ollama-llm-from-external-drive/

[ continue ]