Apps Artificial Intelligence CSS DevOps Go JavaScript Laravel Linux MongoDB MySQL PHP Python Rust Svelte Vue

Running LLMs on Your Local Computer

1 min read .
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:

  1. Open a terminal Open your preferred terminal application.

  2. Run the installation command Execute the following command:

curl -fsSL https://ollama.com/install.sh | sh

This downloads and runs Ollama’s official installation script.

Installing Ollama on macOS

On macOS:

  1. Download the installer Visit Ollama for macOS and download the ZIP file.

  2. Extract and install it Open the ZIP file and follow the normal installation steps.

Running Ollama

After installation, you can start working with models:

  1. Start the Ollama service

    ollama serve

    This starts the Ollama service so it is ready to accept requests.

  2. List installed models

    ollama list

    You can also browse the Ollama model library to find models to run.

  3. Run a model

    ollama run gemma2:2b

    Replace gemma2:2b with 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.

Related Posts

chevron-up