Choosing Open-Source LLMs by Compute Tier: A Practical Selection Guide

    This guide explains how to choose open-source large language models based on available compute. It compares small on-device models, mixture-of-experts models, and large dense models by deployment location, strengths, and constraints. It also covers how to engineer multi-step planning, code generation, and function calling so that errors are contained and checked.

    1. Why Model Selection Should Follow Compute Tiers

    The discussion around open-source large language models has shifted from “Can it run?” to “Which hardware does it need, what does it cost, and which kind of task does it solve?” A single model family often ships in several sizes. Small versions can run on mobile devices, while large versions need multiple accelerator cards. The core of model selection is aligning four factors: task requirements, latency budget, hardware conditions, and compliance requirements.

    Mis-selection usually shows up in two ways. In the first, a large model handles simple classification or extraction tasks, and its inference cost far exceeds the benefit. In the second, a small model handles complex planning tasks. Errors in multi-step tasks accumulate at each step and can eventually break the whole pipeline. The sections below first outline the typical use cases for each size category, then discuss the limits of each capability.

    2. Typical Use Cases for Three Model Categories

    Based on parameter scale and network architecture, open-source models can be roughly grouped into three categories:

    Category Typical deployment Main advantages Main constraints
    Small on-device models Phones, embedded devices, local terminals Low latency, data stays on the device, can run offline Limited capability for complex reasoning and long multi-step tasks
    Mid-sized mixture-of-experts (MoE) models A single machine or a few accelerator cards Only some experts are activated per inference, balancing quality and cost Total parameters occupy GPU memory, and routing adds engineering complexity
    Large dense models Workstations or multi-GPU servers All parameters take part in computation, giving a higher quality ceiling High memory and throughput costs, and concurrency requires careful scheduling

    The key to a mixture-of-experts architecture is the difference between total parameters and active parameters. Total parameters set the minimum memory footprint. Active parameters determine the computation required for each inference. As a result, when an MoE model and a dense model of similar scale are deployed in the same amount of memory, the MoE model usually delivers higher throughput. This holds only if all expert weights fit in memory, or if the inference framework supports weight offloading or on-demand loading.

    Dense models have a simpler structure and produce more stable outputs. They suit scenarios that require high consistency, such as contract clause extraction, code review suggestions, and report data validation.

    3. Engineering Views on Core Capabilities

    3.1 Multi-Step Planning and Complex Reasoning

    A model can break a goal into subtasks and execute them in order, but being able to plan does not mean the plans are reliable. In engineering practice, plans should be made explicit. Ask the model to output a structured list of steps, with each step specifying its expected output and how to verify it. An external program then checks each step in turn. This limits errors to a single step and makes it easier to locate the cause of a failure.

    3.2 Code Generation and Automated Verification

    Code generation should be paired with automated verification. After the model generates code, run unit tests, static analysis, and type checks in an isolated environment. Feed any failure messages back to the model so it can correct the code. Reading generated code by hand has limited coverage and cannot replace actual execution.

    3.3 Function Calling and Structured Output

    With function calling, the model generates arguments based on tool descriptions, and the host program then executes the matching function. Two points matter in implementation. First, the arguments the model generates are untrusted input and must pass allowlist validation and type checks. Second, structured output requires the model to follow predefined fields strictly. When parsing fails, the system should have a retry or fallback strategy.