Running LLMs on Your Local Computer
Have you ever wanted to run a large language model (LLM) directly on your own computer without depending on a cloud service? Tools such as Ollama make it possible to manage and run language models locally from a laptop or desktop.
This article walks through the basic setup and shows how to run a model on Linux and macOS.
Installing Ollama on Linux
For Linux, the installation process is straightforward:
-
Open a terminal Open your preferred terminal application.
-
Run the installation command Execute the following command:
curl -fsSL https://ollama.com/install.sh | shThis downloads and runs Ollama’s official installation script.
Installing Ollama on macOS
On macOS:
-
Download the installer Visit Ollama for macOS and download the ZIP file.
-
Extract and install it Open the ZIP file and follow the normal installation steps.
Running Ollama
After installation, you can start working with models:
-
Start the Ollama service
ollama serveThis starts the Ollama service so it is ready to accept requests.
-
List installed models
ollama listYou can also browse the Ollama model library to find models to run.
-
Run a model
ollama run gemma2:2bReplace
gemma2:2bwith another model name when needed.
Conclusion
Ollama provides a convenient way to experiment with LLMs on your own machine. Local execution can improve privacy, give you more control over the runtime environment, and avoid relying on a remote service for every request.
For additional models and features, visit the official Ollama website.