Getting Started with Ollama: A Complete Guide to Running Open-Source LLMs on Your PC

    Learn how to deploy an open-source large language model locally with Ollama. This guide covers hardware requirements, installation, model downloads, graphical clients, troubleshooting, storage management, and the basics of using Ollama as a local API service.

    Getting Started with Ollama: A Complete Guide to Running Open-Source LLMs on Your PC

    Open-source reasoning models have become increasingly popular. Many users have found that public cloud services may impose rate limits or queues during peak periods, affecting response speed and availability. As a result, more people are considering running models directly on their own computers. With a local deployment, data does not need to pass through a third-party server, and the model can continue to work even without an internet connection.

    This guide uses Ollama to explain the complete process of deploying an open-source large language model on a personal computer. Ollama is an open-source tool for running models locally. It supports Windows, macOS, and Linux, and can download, load, and call models while also providing a local API.

    1. Why Run an LLM Locally?

    Before getting started, it is useful to understand the main benefits of local deployment.

    1. Data privacy: Inputs and outputs are processed on your own computer, making local deployment suitable for internal documents, customer information, and personal data.
    2. Reliable operation: Inference does not depend on a network connection and is not affected by cloud-side rate limits or service interruptions.
    3. Flexible configuration: You can adjust generation parameters, context length, and quantization versions. Open-source models can also be fine-tuned.
    4. Predictable long-term costs: Local inference does not incur usage-based charges. After the initial hardware investment, the system can be used over the long term.

    Local deployment also has limitations. Inference speed depends on your hardware, and model capabilities are constrained by the model size you can run. Before deployment, you need to balance what is sufficient for your needs against what provides the best experience.

    2. Evaluate Your Hardware

    Hardware is the first major factor affecting the user experience. The following figures are general guidelines. Actual performance depends on the Ollama version, context length, and background applications.

    Hardware Minimum configuration to try More comfortable configuration
    GPU A dedicated GPU with 6 GB of VRAM; suitable for 1.5B to 7B quantized models 8 GB or more of VRAM; 7B quantized models run more comfortably
    Memory 8 GB, although CPU-only inference requires more 16 GB or more
    Storage At least 20 GB of free space At least 50 GB, allowing room for multiple models
    Operating system Windows 10/11, macOS, or a mainstream Linux distribution Keep the operating system and GPU drivers relatively up to date

    Keep the following points in mind:

    • VRAM is usually the main bottleneck. Larger models require more VRAM. Being able to load a model does not necessarily mean that response speed will be comfortable.
    • Quantized versions use fewer resources. Ollama’s default models are commonly available in 4-bit quantized versions. Quantization reduces weight precision and significantly lowers VRAM usage, with a slight reduction in output quality. For everyday question answering and writing, the impact is usually limited.
    • A dedicated GPU is not required. CPU-only inference can work, but it is significantly slower and is mainly suitable for trying out the deployment process.
    • Check support for non-NVIDIA GPUs. Support for AMD and Intel GPUs depends on the Ollama version. Review the compatibility information in the official documentation before installation.

    3. Install and Verify Ollama

    Step 1: Download the installer. Open the official Ollama website and select the installer for your operating system. Download Ollama only from the official website or official repository to avoid untrusted packages.

    Step 2: Complete the installation. The default installation options are generally sufficient. After installation, Ollama runs as a background service on Windows and macOS. Linux users can follow the official documentation to install it with the installation script or a system package manager.

    Step 3: Verify the version. Open a terminal and run:

    1. ollama --version

    If the terminal displays a version number, the installation was successful.

    Step 4: Check the service status. Open http://localhost:11434 in a browser. If the page displays “Ollama is running,” the service is operating normally. If it does not, run the following command in a terminal:

    1. ollama serve

    This command occupies the current terminal window, so the window must remain open while the service is running.

    By default, Ollama listens only on the local address 127.0.0.1 and port 11434. Client applications and API requests communicate with the model through this port.

    4. Download and Run a Model

    The Ollama model library includes models in various parameter sizes. Common categories include:

    • 1.5B: Very low resource usage, suitable for testing and simple questions.
    • 7B: A strong balance between resource requirements and capability, making it a common choice for personal users.
    • 14B and 32B: Generally more capable, but they require more VRAM or involve slower hybrid CPU/GPU inference.
    • 70B: Performance closer to commercial large models, but usually requiring multiple GPUs or a high-end workstation.

    This guide uses the open-source reasoning model deepseek-r1:7b as an example. To download the model without starting a conversation, run:

    1. ollama pull deepseek-r1:7b

    To download the model and enter an interactive conversation after the download completes, run:

    1. ollama run deepseek-r1:7b

    The default version of this model is approximately 4.7 GB. On a 100 Mbps connection, the theoretical download time is about six minutes, although the actual duration depends on server and network conditions.

    After the download finishes, enter the following prompt in the command line:

    1. Introduce yourself in one sentence.

    If the model returns a response token by token, the inference pipeline is working. Enter /bye to exit the conversation.

    After deployment, you can use the following commands to check the current status:

    1. ollama list
    2. ollama ps

    ollama list displays the models that have been downloaded. The PROCESSOR column in ollama ps shows where the model is running. A value of 100% GPU means that the model is running entirely on the GPU. If the output shows a CPU/GPU split, available VRAM is insufficient and some computation is being handled by the CPU, which can significantly reduce speed.

    5. Connect a Graphical Client

    The command line is useful for testing, but most users prefer a graphical interface for daily work. Common open-source clients include:

    • Chatbox: A desktop client that supports connections to Ollama.
    • Open WebUI: A web-based interface commonly deployed with Docker.
    • Cherry Studio: A desktop client that also supports local Ollama services.

    Interface layouts and menu names may change between versions, so consult each project’s official documentation when necessary. Configuration usually involves three steps:

    1. Install the client.
    2. In the settings, select Ollama as the model provider and enter http://localhost:11434 as the API address. The local Ollama service does not require an API key, although some clients may require any non-empty value in the key field.
    3. Select the downloaded deepseek-r1:7b model from the model list and start a conversation.

    Once connected, the client will typically provide features such as multi-turn conversations, chat history, system prompts, and Markdown rendering. If the client and Ollama are running on different computers, you need to configure the service to listen on an appropriate address. See the security notes in the next section.

    6. Troubleshooting Common Problems

    The following table covers several common deployment issues and possible solutions.

    Symptom Possible cause Recommended action
    The model download reports that a file cannot be found The model name or tag is misspelled Check the model name and tag in the Ollama model library
    The address is already in use Another Ollama process is using port 11434 Close duplicate processes or restart the Ollama service
    The download fails partway through Network instability Run ollama pull again; downloaded parts can usually be resumed
    Responses are very slow, and ollama ps shows both CPU and GPU usage Insufficient VRAM Switch to a smaller model or close applications using GPU memory
    The client cannot connect The service is not running or the API address is incorrect Visit http://localhost:11434 to check the service, then verify the address in the client
    Disk space is disappearing quickly Multiple large models have been downloaded and not removed Use ollama list to review the models, then remove unnecessary ones with ollama rm model-name

    When an error is difficult to identify, check the service logs. Linux users who installed Ollama with systemd can run:

    1. journalctl -u ollama

    Log locations on Windows and macOS may vary by version. Refer to the official documentation for the relevant platform.

    By default, models are stored in the .ollama/models directory under the user profile. If the system drive does not have enough space, set the OLLAMA_MODELS environment variable to specify another directory. Ollama must be restarted after changing the variable.

    7. Advanced Use: Calling the Local API

    Ollama provides a native API and is also compatible with the OpenAI API.