Local LLM Deployment with Ollama: Installation, VRAM Sizing, and Chat

    This guide explains how to run large language models locally with Ollama. It covers the tradeoffs of local deployment, estimating whether your VRAM or unified memory is sufficient, choosing a quantized model, installing Ollama on Windows, macOS, or Linux, verifying the service, and downloading and running a model for chat.

    Why Choose Local Deployment

    Running an LLM on your own computer offers three main benefits. First, conversations and documents do not pass through external servers, which is suitable for contracts, medical records, or internal materials. Second, the model remains usable when offline, and response speed is not affected by cloud congestion. Third, you can freely choose models, adjust inference parameters, and even connect the model to your own scripts or development environment.

    Local deployment also has costs. Models have relatively high VRAM and memory requirements, downloads and updates consume disk space, and parameter tuning requires some conceptual background. Before starting, confirm your needs and device conditions, then decide how much resources to invest.

    Check VRAM Before You Start

    Whether a model can run mainly depends on whether VRAM or unified memory can hold the model weights. Weight footprint can be estimated with a rough formula:

    Weight footprint ≈ parameter count (in billions, B) × bytes per parameter

    The number of bytes per parameter depends on quantization precision. Quantization stores weights in a compressed form. Lower precision reduces footprint, but answer quality may decrease slightly.

    Precision Bytes per parameter 7B model weights 13B model weights
    FP16 (unquantized) 2 bytes ~14GB ~26GB
    8-bit ~1 byte ~7GB ~13GB
    4-bit (common default format in Ollama) ~0.5 byte ~4GB–5GB ~7GB–8GB

    The values in the table represent model weights only. At runtime, additional space is needed for the context cache (KV Cache). The longer the context, the more memory it consumes. In practice, actual VRAM requirements are 1GB to 3GB higher than the weight footprint, depending on context length and framework. For example, a 13B model running in FP16 requires at least 26GB of VRAM, and a 12GB GPU alone cannot fully load it.

    Based on this estimate, you can choose models by device tier:

    Tier VRAM or unified memory System memory Suitable models
    Entry 8GB 16GB Models around 3B, 4-bit versions of 7B
    Mainstream 12GB–16GB 32GB 4-bit versions of 7B–14B
    High-end 24GB+ 64GB 4-bit 30B-class models, or 8-bit 13B

    Additional notes:

    • Without a discrete GPU, models can run on CPU inference, but speed is usually a fraction of GPU inference. This is suitable for testing or short text processing.
    • Apple Silicon Macs use unified memory, where CPU and GPU share the same memory. Memory capacity directly determines how large a model can run.
    • NVIDIA GPUs require official drivers. Support for AMD and Intel GPUs changes quickly; refer to the official Ollama documentation.
    • For disk space, a 7B 4-bit model takes about 4GB–5GB. If you plan to keep several models, reserve 30GB or more of free space.

    Install Ollama and Verify It

    Download and Install

    Open the download page on the official Ollama website (ollama.com) and choose the version that matches your system.

    • Windows: Run OllamaSetup.exe and install with the default options. The default path is under the user directory at %LOCALAPPDATA%\Programs\Ollama, and usually does not need to be changed. If the system drive is short on space, choose another directory with enough space and write permissions. Do not install to a protected directory that requires administrator permissions.
    • macOS: Open the downloaded package, drag Ollama into the Applications folder, and launch it.
    • Linux: Run the official installation script in a terminal, for example curl -fsSL https://ollama.com/install.sh | sh. Before executing it, consider opening that address in a browser to inspect the script contents.

    Verify Installation

    Open a terminal and run the following command to check the version:

    1. ollama --version

    If the output is similar to ollama version is 0.x.x, installation succeeded. If the command is not recognized, close and reopen the terminal. If it still does not work on Windows, check whether the installation directory has been added to the user’s PATH environment variable, then restart the terminal.

    After installation, Ollama runs as a background service and listens on 127.0.0.1:11434 by default. Visit http://localhost:11434 in a browser. If the page shows “Ollama is running,” the service is ready.

    Download and Run a Model

    Choose a Model

    Model names usually consist of “model family:parameter size.” Based on the VRAM estimate in the previous section, choose a version that fits your device. For example, a mainstream configuration can start with:

    1. ollama pull qwen2.5:7b

    The pull command only downloads the model; it does not start a conversation. After the download is complete, run the following command to enter a chat:

    1. ollama run qwen2.5:7b

    If the model is not available locally, the run command will download it automatically and then start the chat.