Local Deployment Guide for New-Generation Open-Source LLMs: Model Selection and Quantization

    A practical guide to running new-generation open-source LLMs on your own hardware. This article covers how these models differ from earlier releases, how to choose the right model size based on your available memory, how 4-bit and 8-bit quantization affect memory usage and quality, and how to set up a local inference environment with Ollama, including troubleshooting CPU/GPU offloading issues.

    What’s New in New-Generation Open-Source Models

    Over the past two years, leading AI companies have released high-quality open-weight models to the public. Compared with earlier releases that came with restrictive terms, newer models generally ship under more permissive licenses. However, “open” does not mean “free for any commercial use.” License terms vary widely: some allow commercial use, modification, and redistribution; some are research-only; and others add conditions around user scale, usage domains, or attribution. Before deploying in production, verify each model’s license text directly—do not assume the terms of one model apply to all.

    Four key capability changes define this generation of models.

    1. Native multimodal input in some variants. Some models can accept images directly, and a few also support audio. Which variant supports which capability depends on the model documentation. Integration also varies by tool—some require loading additional vision components, so test in your target environment before committing.

    2. Much longer context windows. Some models support 128K tokens of context or more, allowing long technical documents or conversation histories to be loaded at once. Keep in mind that longer contexts consume more memory during inference, so the usable length depends on your hardware.

    3. Native function calling. Models can emit structured tool-call requests that external programs execute—running local scripts, querying local databases, and so on. The model itself never performs any action; what it can do is entirely determined by the program the developer writes.

    4. Mixture-of-Experts (MoE) architectures are more common. MoE models have large total parameter counts but activate only a subset of experts per inference, so compute cost resembles a much smaller model. However, all expert weights must still fit in memory—estimate memory requirements by total parameters, not active parameters. This is a frequently overlooked point during model selection.

    Choosing a Model Based on Your Hardware

    The first step in selection is determining how much memory your machine has available. On machines with a discrete GPU, focus on VRAM; without one, models typically run in system memory or unified memory. The table below offers rough estimates for 4-bit quantized versions:

    Model Tier Parameter Scale 4-bit Memory Footprint Typical Use Case
    Micro ~2B ~4 GB Phones, embedded devices, lightweight offline assistants
    Lightweight ~4B ~5.5 GB Everyday Q&A, personal assistants
    Mid-range MoE ~25B total, ~3.8B active 16–18 GB Cost-effective general-purpose workhorse
    Full-scale ~30B, all active 17–20 GB Demanding tasks like math reasoning and code generation

    These figures cover model weights only. Actual runtime usage also includes inference framework overhead, cache that grows with context length, and whatever the OS and other applications consume. Treat the table as a lower bound, not a precise threshold.

    A practical approach: check available memory first, then pick the model. If your available memory just barely meets a tier’s requirement, step down one tier to leave headroom for the system and other programs. When memory runs out, the system starts swapping data to disk, and performance can drop to the point of being unusable.

    On quantization: 4-bit quantization compresses 16-bit floating-point weights into 4-bit integers, reducing size to roughly a quarter of the original. For everyday tasks like Q&A, rewriting, and summarization, the accuracy loss is usually hard to notice. But for precision-sensitive tasks like mathematical reasoning and code generation, the difference becomes more apparent. If you have hardware headroom, 8-bit quantization is a reasonable middle ground—it uses more memory but stays closer to the original model’s quality.

    Setting Up a Local Inference Environment

    Tools for running models locally are now quite mature. Many bundle model downloading, an inference engine, and an API server into a single program. Below, Ollama illustrates the general workflow; other tools use different commands, so consult their documentation.

    Step 1: Install the runtime. Windows and macOS users can download a graphical installer from the official website. Linux users can use the official install script, for example curl -fsSL https://ollama.com/install.sh | sh. Before running any installation script downloaded from the internet, verify that its source is trustworthy. After installation, the service typically starts running in the background automatically.

    Step 2: Pull and run a model. Download the model using this command format:

    1. ollama pull <model-name>:<size-tag>

    For example, ollama pull qwen2.5:7b downloads a roughly 7B-parameter model. Model names and tags follow the tool’s model library, and download sizes vary by version—allow time for the first download. Once complete, run ollama run qwen2.5:7b to start an interactive chat. If you ask a few simple questions and get normal responses, the deployment is basically working.

    Step 3: Check resource allocation. While the model is running, ollama ps shows which models are currently loaded and how compute is split between CPU and GPU. The PROCESSOR column displays something like “100% GPU” or “14%/86% CPU/GPU”—the latter means most compute runs on the GPU with a small portion on the CPU. The higher the GPU share, the faster generation usually is.

    If the output shows the model running entirely on CPU, troubleshoot in this order:

    • Confirm the GPU driver is installed correctly and the runtime can detect the GPU.
    • Close other programs occupying VRAM, such as games, video editing software, or other model services.
    • Switch to a smaller model tier or a lower quantization level.
    • Check the tool’s runtime logs to see whether it fell back to CPU due to insufficient VRAM.