Run Large Language Models Locally on Windows 10: A Complete Practical Guide

    This guide walks through deploying a large language model locally on Windows 10, covering hardware and software baselines, VRAM-to-model-size matching, runtime installation, model storage path planning, model download and API calls, GPU acceleration verification, troubleshooting, and the path from single-machine validation to a service-oriented setup. It is intended for developers who need offline or intranet inference for development testing, internal knowledge base Q&A, and text preprocessing under low-to-moderate concurrency.

    1. Why Deploy Locally: Use Cases and Capability Limits

    Running a large language model on a local workstation is a common approach when data compliance requirements are strict, network access is restricted, or offline inference is required. Local deployment offers three core benefits: data never leaves the internal network, inference latency is controllable, and long-term usage costs are predictable. Its limits must be equally clear — a single local machine generally cannot serve very large parameter models under high concurrency, and is better suited to low-to-moderate concurrency tasks such as personal development and debugging, internal knowledge base Q&A, and text preprocessing.

    Before starting, settle three things: the model parameter scale (which determines VRAM requirements), the concurrency level (which determines whether multiple instances are needed), and the context length (which significantly affects VRAM usage and inference speed). These three factors directly drive the hardware and configuration choices that follow.

    2. Environment Preparation: Hardware and Software Baseline

    2.1 Hardware Assessment Principles

    • VRAM is the first constraint. As a rule of thumb, 6GB of VRAM covers quantized inference for models in the 0.6B to 4B range; running a 7B-class model calls for 8GB or more, together with 4-bit quantization.
    • VRAM is not the only factor. Memory capacity, disk I/O, and cooling conditions all affect load times and stability during long-running sessions.
    • With only integrated graphics, models still run, but fall back to CPU inference with a substantial drop in speed — acceptable for functional validation rather than daily use.

    2.2 Software Baseline

    • Operating system: Windows 10 / 11 (64-bit).
    • Python: 3.12 is the recommended version, which makes it easier to write calling scripts and data processing programs later.
    • GPU driver: install a driver that supports a recent CUDA version (CUDA 13.0 or later, for example). An outdated driver is the most common cause of failed acceleration.
    • Disk space: a single model’s weights typically range from a few hundred MB to several GB; reserve more than 20GB of headroom.

    2.3 VRAM and Model Size Matching Reference

    Model Size Minimum VRAM Recommended VRAM Typical Use Case
    0.6B 2GB 4GB Functional validation, lightweight classification
    1.8B 4GB 6GB Simple chat, summarization
    4B 6GB 8GB More complex Q&A
    7B 8GB 12GB+ High-quality generation tasks

    3. Installing and Initializing the Inference Runtime

    3.1 Installation Method

    On Windows, the simplest path to a local inference runtime is to download the official graphical installer and complete setup by double-clicking it, with no need to configure environment variables manually. The installer is about 1.4GB and takes roughly 2.7GB once unpacked, so leave enough disk space. After installation, the runtime usually registers as a background service and stays in the system tray, remaining resident so it can be called quickly from the command line.

    3.2 Understanding the Install Path

    The default installation directory is a hidden folder under the user directory. To locate it in File Explorer, type the environment variable directly into the address bar to jump there, without manually enabling “show hidden files.” In production, record the actual path to make it easier to inspect the service process and log locations later.

    3.3 Planning the Model Storage Path (Key Step)

    Models land on the system drive by default, which will quickly exhaust the C: drive over time. The recommended approach:

    1. Open the settings screen of the runtime application;
    2. Find the Model location configuration item;
    3. Use the browse button to specify a directory on a non-system drive, for example D:\llm\models;
    4. Restart the runtime so the configuration takes effect.

    If you manage this through environment variables instead, add a user-level variable in System Properties and point the model directory to the data drive, which has the same effect. Note: changing the path does not automatically migrate existing models — copy the directory contents manually or download them again.

    3.4 Verifying the Installation

    Open a command line and run the version query command. A version string in the output means the installation succeeded:

    1. ollama --version
    2. # Expected output: ollama version is 0.x.x

    If the command is not recognized, the terminal was usually not restarted after installation, or the installation directory is not in PATH.

    4. Getting and Running a Model

    4.1 Searching the Model Repository

    The mainstream approach is to search the model repository that ships with the runtime, with filtering by name, parameter size, and quantization precision. When choosing, pay attention to three things: parameter scale, quantization format, and context window length.

    4.2 Pulling and Starting a Chat

    A single command handles both download and loading; the first run pulls the weights automatically:

    1. ollama run qwen3:0.6b

    Once loading finishes, you enter an interactive chat interface and can type questions to test it directly. Common management commands include:

    1. ollama list # List models available locally
    2. ollama show <model> # Show detailed model information
    3. ollama rm <model> # Delete a model to free space

    4.3 Calling Through the API

    Besides interactive chat, the runtime usually exposes a local HTTP interface that is easy to integrate into Python scripts:

    1. import requests
    2. resp = requests.post(
    3. "http://127.0.0.1:11434/api/generate",
    4. json={"model": "qwen3:0.6b", "prompt": "Explain vector databases in one sentence", "stream": False}
    5. )
    6. print(resp.json()["response"])

    5. Verifying GPU Acceleration and Troubleshooting

    5.1 Confirming Whether the GPU Is Used

    • After starting the model, watch the Performance — GPU page in Task Manager to see whether VRAM usage rises;
    • If VRAM stays near 0 while memory usage spikes, inference has fallen back to the CPU;
    • Set the log level to debug mode and check whether a GPU device is detected during loading.

    5.2 Common Failures and Fixes

    Symptom Likely Cause Fix
    Message that the driver version is too old Driver does not support the required CUDA Update the GPU driver and restart
    Out-of-VRAM error at load time Model size exceeds available VRAM Switch to fewer parameters or lower quantization precision
    Extremely slow inference GPU not enabled Check the driver and runtime logs
    Command not recognized PATH not in effect Reopen the terminal or configure environment variables manually
    Download interrupted Network fluctuation Retry the pull, configure a proxy if necessary

    5.3 Stability Optimization Tips

    • Limit context length so VRAM is not held by long conversations;
    • Periodically clean up models that are no longer used;
    • Keep the model directory and log directory on the same data drive for easier capacity management;
    • When running as a long-term service, pair it with a logging service and monitoring alerts to catch abnormal exits promptly.

    6. Next Step: From Single-Machine Validation to a Service

    Once local validation passes, containerize the inference service if multiple people need to share it, and add load balancing and access authentication; model weights can be stored in object storage for version management; and the call path can be wired into logging and monitoring alerts to form an observable loop. If local resources are insufficient, evaluate elastic compute from cloud GPU instances or container platforms, and split workloads between local and cloud as needed to balance cost and performance.

    7. Summary

    The key path for local LLM deployment on Windows 10 comes down to: assess the VRAM-to-model-size match → install the runtime and plan a model directory on a non-system drive → verify the version and GPU acceleration → pull a model for chat and API calls → troubleshoot using logs and resource usage. With this workflow in hand, developers can obtain usable model inference in offline or intranet environments, and lay the groundwork for later service-oriented改造.