Now that you understand the need for tools to manage local Large Language Models, let's look at one of the most straightforward options available: Ollama. Ollama simplifies running open-source LLMs on your personal computer. It packages the model weights, configuration, and the software needed to run the model into a single, easy-to-manage bundle. Think of it as a convenient command-line utility designed to get you started quickly.
Ollama is a popular choice, especially for beginners, because it streamlines many of the technical steps involved. It works across macOS, Windows, and Linux, and its simple commands make downloading and interacting with models quite accessible. While it primarily operates through the command line (Terminal on macOS/Linux, Command Prompt or PowerShell on Windows), its ease of installation makes it a great starting point.
Before proceeding, recall the hardware considerations discussed in Chapter 2. Ollama can run models using just your CPU and system RAM, but performance, especially inference speed (how quickly the model generates text), will be significantly better if you have a compatible GPU (Graphics Processing Unit) with sufficient VRAM (Video RAM). Ollama attempts to automatically detect and utilize compatible hardware.
The installation process varies slightly depending on your operating system. Follow the steps below for your specific system.
.zip
file containing the application..zip
file (usually by double-clicking). Drag the Ollama
application into your Applications
folder.Ollama
application from your Applications
folder. You might see a small icon appear in your menu bar, indicating Ollama is running in the background. The first launch may also prompt you to install its command-line tool. Allow this if requested..exe
installer file..exe
file to launch the installer. Follow the on-screen prompts. The installer will set up Ollama and add the necessary command-line tool to your system's PATH, making it accessible from Command Prompt or PowerShell.curl -fsSL https://ollama.com/install.sh | sh
This command downloads the installation script and executes it. The script will detect your system and install Ollama appropriately.apt
for Debian/Ubuntu, dnf
for Fedora). Refer to Ollama's documentation or NVIDIA's guides for specific instructions related to your Linux distribution.render
or docker
). The installation script or Ollama's documentation might provide guidance if you encounter permission issues.Once installed, Ollama typically runs as a background service. To confirm it's installed and accessible from your command line:
ollama
and press Enter.If the installation was successful, you should see a help message listing the available Ollama commands, similar to this:
Usage:
ollama [flags]
ollama [command]
Available Commands:
serve Start ollama
create Create a model from a Modelfile
show Show information for a model
run Run a model
pull Pull a model from a registry
push Push a model to a registry
list List models
cp Copy a model
rm Remove a model
help Help about any command
Flags:
-h, --help help for ollama
-v, --version version for ollama
Use "ollama [command] --help" for more information about a command.
Seeing this output confirms that your system recognizes the ollama
command and the application is ready to use. If you get a "command not found" error, double-check the installation steps, ensure Ollama is running (especially on macOS/Windows where it might be a menu bar/system tray application), and potentially restart your terminal or your computer.
With Ollama installed and verified, you now have the foundation needed to download and run LLMs directly from your terminal. The next sections will guide you through using the ollama
command to pull your first model and start interacting with it.
© 2025 ApX Machine Learning