
Prototyping with a self-hosted LLM narrows the choice to models that fit a single consumer GPU, typically 8–16 GB of VRAM. Within the 7B–20B range, several open-weight releases now occupy distinct niches: sparse mixture-of-experts designs, hybrid reasoning modes, throughput-optimized dense models, tool-calling specialists, and vision-language variants. Each makes a different tradeoff between memory footprint, latency, context length, and task-specific accuracy. Choosing the wrong candidate wastes iteration time on quantization and serving problems unrelated to the prototype's core idea. This article compares gpt-oss-20b, Qwen3-8B, Meta-Llama-3.1-8B-Instruct, GLM-4-9B-0414, and Qwen2.5-VL-7B against documented specifications, benchmark data, and deployment requirements. The result is a task-to-model mapping that a developer can act on before downloading the first checkpoint.

VRAM budgeting is the first filter. In practice token generation on a single consumer GPU is limited by memory bandwidth; weights must reside in VRAM before any computation can start. A simple rule of thumb derived from measured footprints shows:
| Precision | Approx. VRAM per 1 B parameters |
|---|---|
| FP16 (16 bit) | ~ 2 GB |
| INT8 / FP8 (8 bit) | ~ 1 GB |
| 4‑bit (e.g., Q4_K_M) | ~ 0.5 GB |
These numbers match the observed sizes of dense models (e.g., a 7 B model needs ~14 GB in FP16, ~7 GB in INT8, and ~3.5 GB in 4‑bit)【source 2】.
Quantization drives the usable model class.
8 GB‑class GPUs can reliably host a 7–9 B dense model in a 4‑bit format. The default GGUF for Llama 3.1‑8B (Q4_K_M) occupies 4.92 GB; with an 8 K context window the total memory rises to roughly 7 GB, leaving a modest safety margin on an 8 GB card【source 3】【source 5】.
16 GB‑class cards can accommodate a 20 B‑class MoE model quantized to MXFP4 (a 4‑bit variant) or a dense 8 B model at higher precision.
Context length matters. The KV‑cache scales linearly with the number of tokens. A 128 K‑token window can nearly double the memory footprint of an 8‑B model, pushing an otherwise safe 8 GB configuration over the limit【source 1】.
Mixture‑of‑Experts (MoE) nuance. gpt‑oss‑20B exemplifies a sparse MoE architecture: the model stores ~21 B total parameters, but only ~3.6 B are active per token due to top‑k expert routing【source 6】【source 7】.
Decision flow. Choose the quantization level and GPU tier first:
All figures are minimum estimates; actual runtime memory includes activation buffers, KV‑cache, and a ~10 % headroom buffer to avoid out‑of‑memory crashes.

gpt‑oss‑20b is a 21 B‑parameter decoder‑only model that uses a Mixture‑of‑Experts (MoE) backbone. Only a subset of the network is active for each token: 32 experts are defined, with top‑4 routing selecting 3.6 B active parameters per token 【9†L1-L4】. The MXFP4 4‑bit quantization reduces the model’s memory footprint so that the MXFP4 representation fits in 16 GB of VRAM 【1†L1-L3】【1†L5-L8】. OpenAI’s claim applies to this specific quantized form; when longer contexts, KV‑cache, or runtime buffers are added, actual usage can exceed 16 GB, so developers should monitor memory on their target stack 【1†L5-L6】.
Key specifications
Reasoning‑effort knob
The model exposes a reasoning effort setting (low / medium / high) that is controlled via the system prompt. Higher effort increases the depth of chain‑of‑thought reasoning, which improves answer quality but also raises token consumption and latency 【9†L9-L12】.
Built‑in agentic features
gpt‑oss‑20b includes function‑calling and agentic primitives out‑of‑the‑box, allowing structured tool use without additional wrappers.
When to pick gpt‑oss‑20b
Known limitations
Version‑sensitivity
Expert count (32) and the 16 GB hardware claim stem from the original model card released in early 2024; subsequent patches may adjust routing logic or quantization details. Always cross‑check the current Hugging Face model card before finalising deployment 【1†L5-L7】.

Qwen3‑8B is a dense transformer model that packs 8.2 B parameters (6.95 B non‑embedding) into 36 layers. It uses grouped‑query attention with 32 query heads and 8 KV heads to keep the compute cost low while preserving strong representational power【1†https://openlaboratory.com/models/qwen3-8b/】. The native context window is 32,768 tokens, which can be stretched to 131,072 tokens with the YaRN extension【1†https://openlaboratory.com/models/qwen3-8b/】.
The model was trained on roughly 36 trillion tokens drawn from web and document corpora covering 119 languages and dialects【2†https://openlaboratory.com/models/qwen3-8b/】 and is released under the permissive Apache 2.0 license【2†https://openlaboratory.com/models/qwen3-8b/】.
Qwen3‑8B ships with a single checkpoint that can operate in two distinct modes:
| Mode | Behaviour | Typical latency impact |
|---|---|---|
| Non‑thinking (fast chat) | Direct answer generation; no intermediate chain‑of‑thought steps. | Baseline latency (≈ 200‑300 ms for sub‑1 k tokens). |
| Thinking (chain‑of‑thought) | The model first emits a reasoning trace (<think> … </think>) before the final answer. | ~15 % higher latency due to extra tokens and processing【5†https://codetocloud.io/blog/open-source-llms-developers/】. |
Both modes share the same weight set; the switch is controlled via the chat template’s enable_thinking flag (or an equivalent runtime parameter). Because the checkpoint is identical, deployments do not need to host two separate binaries, simplifying container images and GPU memory planning.
When thinking mode is enabled, Qwen3‑8B reaches AIME‑24 scores on par with many 14 B‑class models and delivers competitive results on LiveCodeBench, indicating strong multi‑step math and code reasoning abilities【1†https://openlaboratory.com/models/qwen3-8b/】. The accuracy boost comes at the cost of the ~15 % latency premium mentioned above.
A subtle but important limitation appears in multi‑turn agent loops. Shallow reasoning (i.e., always using non‑thinking mode) can cause poor tool‑call decisions, which in turn trigger additional agent rounds to recover from failures. Empirical tests on similar Qwen‑3 models showed that low‑effort reasoning led to ~6 extra rounds on two‑thirds of tasks, inflating median latency by ≈ 19 s【4†https://kodesage.ai/blog/qwen-3-8-27b-llm-model-review】. Thus, indiscriminately disabling reasoning may increase overall latency through retries rather than decrease it.
enable_thinking false to enjoy low latency and minimal token usage.By toggling a single flag, developers can balance speed and correctness without swapping model files, making Qwen3‑8B a versatile choice for small‑scale local prototypes.

Meta‑Llama‑3.1‑8B‑Instruct is positioned as the speed reference for the other small open‑weight models. It was pretrained on over 15 trillion tokens — roughly seven times more data than Llama 2 Meta LLama‑3 blog — giving it a strong baseline of language understanding while retaining a modest 8 B‑parameter dense architecture.
The model’s weight size scales linearly with the chosen GGUF quantisation. For an 8 000‑token KV‑cache the approximate VRAM requirements are:
| Quantisation | GGUF file size | Approx. VRAM (8 K context) |
|---|---|---|
| Q2_K | 3.18 GB | ~5.3 GB |
| Q3_K_M | 4.02 GB | ~6.1 GB |
| Q4_K_S | 4.69 GB | ~6.8 GB |
| Q4_K_M (default) | 4.92 GB | ~7.0 GB |
| Q5_K_M | 5.73 GB | ~7.8 GB |
| Q6_K | 6.60 GB | ~8.7 GB |
| Q8_0 | 8.54 GB | ~10.6 GB |
| fp16 | 16.07 GB | ~18.1 GB |
These figures include the weight file, the 8 K KV‑cache, and runtime buffers — an 8 GB GPU can comfortably host the default Q4_K_M build, while fp16 demands a high‑memory card (≥ 24 GB) localaimaster.com.
Single‑user generation on a typical consumer GPU is bandwidth‑bound. In FP16 the model occupies 14.96 GiB and yields about 29 tokens / s. Switching to the 4‑bit Q4_K_M format drops memory use to 4.58 GiB and lifts throughput to roughly 72 tokens / s, a 2.5× speed gain caused by reduced memory‑bandwidth pressure slash‑digital.io .
Exact token‑per‑second numbers vary with GPU architecture, driver version, and runtime (e.g., vLLM vs. Ollama), so treat them as indicative rather than absolute.
The instruction‑tuned checkpoint improves on most standard benchmarks while maintaining the same parameter count:
| Benchmark | Llama 3.1 8B‑Instruct | Llama 3 8B |
|---|---|---|
| MMLU (5‑shot) | 69.4 | 68.5 |
| MMLU (0‑shot CoT) | 73.0 | 65.3 |
| HumanEval (pass@1) | 72.6 | 60.4 |
| API‑Bank (tool use) | 82.6 | 48.3 |
| MATH (0‑shot CoT) | 51.9 | 29.1 |
| GPQA (0‑shot) | 30.4 | 34.6 |
All scores improve except GPQA, where the newer model lags slightly localaimaster.com .
llama3.1:8b Ollama tag already quantised to Q4_K_M, letting developers start inference without extra conversion.In practice, if your prototype fits on a single 8‑16 GB GPU and you need the fastest turnaround for prompt‑engineering cycles, Meta‑Llama‑3.1‑8B‑Instruct serves as a reliable, well‑supported baseline against which the more specialised candidates can be evaluated.

GLM‑4‑9B‑0414 is the 9 B‑parameter “lite” variant of the GLM‑4 family, inheriting the same transformer architecture as the larger GLM‑4‑32B but trimmed for a mid‑range GPU (≈8 GB VRAM). The model is released under a permissive MIT license, allowing unrestricted commercial use and redistribution Source 1.
GLM‑4‑9B‑0414 includes built‑in function‑calling support that removes much of the glue code traditionally required for tool‑augmented agents Source 4. The workflow is:
This capability is especially valuable for prototypes that revolve around autonomous agents, data‑driven code generation, or any workflow where the model must trigger external services on‑the‑fly.
Overall, GLM‑4‑9B‑0414 offers a balanced mix of code‑centric generation, built‑in tool orchestration, and low hardware requirements, positioning it as a strong candidate for rapid, agent‑driven prototyping on a single consumer GPU.

Qwen2.5‑VL entered the open‑source landscape in January 2025 with 3 B, 7 B, 32 B and 72 B variants [2]. The 7 B‑Instruct checkpoint is released under the permissive Apache 2.0 license, making it the only vision‑language model in the 7 B range that can be freely integrated into commercial prototypes [2].
The larger 32 B and 72 B variants extend these abilities to hour‑long video comprehension, but the 7 B model focuses on image‑ and frame‑level document processing, which covers most prototype needs such as screenshots, PDFs, and diagrams [2].
pdf2image).image-text-to-text pipeline.transformers library in float16 on CUDA. A single RTX 3080 (10 GB VRAM) can run the model, although the vision encoder adds roughly 2–3 GB beyond a text‑only 7 B model [5].In summary, Qwen2.5‑VL‑7B occupies the multimodal niche for local prototyping: it provides reliable object and layout detection, structured outputs, and lightweight visual‑agent capabilities while remaining small enough to run on a consumer‑grade GPU, provided the additional vision memory is accounted for.
References

| Prototype pattern | Recommended checkpoint (quantized) | Why it fits |
|---|---|---|
| Latency‑first interactive loops (chat, UI‑assistant) | Meta Llama‑3.1‑8B‑Instruct @ Q4_K_M | Small weight footprint (~5 GB) comfortably fits 8 GB VRAM; vLLM supports Llama 3.1 and the KV cache stays within the budget for typical 4 k‑token dialogs【8†L1-L4】. |
| Correctness‑first reasoning (single‑file code generation, unit‑test creation) | Qwen 3‑8B (thinking mode) or gpt‑oss‑20B (high‑effort prompt) | Benchmarks show local models achieve parity with cloud services on bounded tasks such as single‑file generation and unit‑test writing, while larger contexts expose failure modes like “confidently reported work that never happened”【1†L1-L9】. Qwen 3‑8B’s dedicated thinking mode improves logical consistency; gpt‑oss‑20B offers higher raw capacity when quantization overhead is acceptable. |
| Tool‑augmented agents (search, calculator, database calls) | GLM‑4‑9B‑0414 (native function‑calling) or gpt‑oss‑20B (MoE with tool support) | GLM‑4‑9B‑0414 explicitly supports structured JSON tool calls, enabling autonomous loops without extra parsing logic【5†L1-L8】. gpt‑oss‑20B’s MoE architecture is also listed under vLLM’s supported MoE models【8†L1-L4】, allowing similar agentic patterns. |
| Document and image intake (OCR, layout extraction) | Qwen2.5‑VL‑7B‑Instruct | The model integrates OCR directly, handling 32+ languages and preserving layout information, making it a single‑step solution for scanned forms and multi‑page PDFs【9†L1-L9】. |
| Multimodal reasoning with images + text (visual assistants) | Qwen2.5‑VL‑7B‑Instruct (same checkpoint) | Apart from OCR, the vision‑language backbone can reason over images and generate structured outputs (e.g., JSON) suitable for downstream pipelines【9†L1-L9】. |
Even after selecting a checkpoint, run a small, task‑specific eval set on your target hardware. Provider‑published numbers are usually based on unquantized checkpoints and may not reflect the latency or accuracy of the quantized model you will actually serve. This final sanity check prevents surprises when scaling prototypes to real‑world workloads.

Memory footprint
An 8 B model loaded with Ollama’s 4‑bit GGUF format (typically Q4_K_M) consumes about 5 GB of VRAM 【0†url】. The same model run in vLLM with FP16 safetensors needs roughly 16 GB of VRAM for the weights alone, i.e. ≈ 3× more before KV‑cache and other overhead 【0†url】. This difference is why Ollama can fit many 8‑20 B checkpoints on a single consumer GPU (8‑16 GB), while vLLM generally requires a higher‑end card or multiple GPUs.
Quantisation recommendation
Q4_K_M is widely regarded as the sweet‑spot: it shrinks the model to ≈ 30 % of FP16 size (≈ 5 GB vs ≈ 16 GB for an 8 B checkpoint) while raising perplexity by only 1‑3 %, a loss most users cannot perceive in practice 【1†url】【2†url】. Consequently, it is the default choice for anyone needing to stay under a tight VRAM budget.
Context length impact
The KV‑cache grows linearly with the context window. Switching from a 4 K token context to a 128 K context can add several gigabytes of VRAM on top of the base model size 【2†url】. A practical rule is to allocate an extra 10–20 % of the model’s VRAM for a modest 4 K window, and increase that proportion for longer contexts.
MoE and newer architectures
Mixture‑of‑Expert (MoE) models (e.g., Mixtral, Qwen‑MoE) require recent builds of vLLM, SGLang, or llama.cpp that include expert‑routing kernels and sometimes custom chat tokenisation 【3†url】. Using an older runtime can lead to memory‑allocation errors or dramatically slower decode.
Ollama diagnostics
After launching a model, ollama ps (or the show command) displays the current VRAM consumption, reflecting both the quantised weights and the live KV‑cache size 【4†url】. This lets you verify that your chosen context length stays within limits before running heavy workloads.
Throughput measurement
Ollama’s API returns an eval_count field (tokens generated) and eval_duration (nanoseconds spent decoding). Tokens‑per‑second can be computed as:
tps = eval_count / (eval_duration / 1e9)
This gives a concrete, per‑prompt throughput number 【5†url】. vLLM, by contrast, exposes Prometheus metrics such as request latency and KV‑cache usage, but lacks a built‑in token counter per response 【5†url】.
Estimating theoretical speed
Decoding is typically memory‑bandwidth bound. A quick heuristic is:
tokens_per_sec ≈ (memory_bandwidth_GB/s × 0.65) / bytes_per_token
where bytes_per_token is the active weight size for the chosen quantisation (≈ 5 GB per token for an 8 B model at Q4_K_M) 【6†url】. For a GPU with 1000 GB/s bandwidth, the ceiling is roughly 200 tok/s, but real‑world figures settle around 90‑140 tok/s after accounting for engine inefficiencies 【6†url】.
Decision guidance
ollama ps.Always add a buffer of ~10 % VRAM, verify throughput on representative prompts, and remember that actual numbers vary with context length, batch size, and the specific runtime version.