Family Granite · 20B parameters

Granite Code 20B (Mixed Precision)

IBM's dense Granite Code 20B in mixed precision, dedicated to code generation and completion. 128k context, 12 GB VRAM Q4. Apache 2.0.

🇺🇸 IBM·License Apache 2.0·Context 125k tokens·Output 2024·Fits within the 128 GB of the GIGABYTE AI TOP ATOM← Catalog

01What it can do

Strengths
  • Apache 2.0 (free for commercial use)
  • 20B dense, code-focused
  • 128k native context
  • Clear code specialization
Limitations to know
  • —Gated on Hugging Face (click-through)
  • —No official Ollama tag — install via Hugging Face
  • —Mixed precision: runtime compatibility must be verified
Architecture
Dense 20B · code-specialized · mixed-precision checkpoint
Training
IBM Granite Code: an open-source family dedicated to code, trained on 116 programming languages. Mixed-precision variant to optimize the memory footprint during inference.
Ideal for
Code generationIDE completionDeveloper assistant

04Install

Install Ollama for your OS. Check the model and its quantization before downloading. Start with 4096 tokens of context, then check placement with ollama ps. A command below is not proof that a test was run on your machine.

$# HuggingFace: ibm-granite/granite-code-20b-mixed-precision
⚠
First download: between 2 and 40 GB depending on the selected quantization. Plan for sufficient disk space; a stable connection is recommended. Subsequent launches are instant.

02Required memory

Approximate GPU VRAM required to run this model, including 4k tokens of context overhead. For a longer context, add ~1 GB per 8k-token increment.

Q4_K_M
The lightest, ~5% loss
12 GB
Q5_K_M
Good quality/size compromise
14 GB
Q8_0
Nearly indistinguishable from FP16
21 GB
FP16
Full precision — server use
40 GB
Fallback CPU · If you don't have a GPU, allow 26 GB of RAM minimum to run this model at reduced speed.

What hardware do you need for Granite Code 20B (Mixed Precision)?

To run Granite Code 20B (Mixed Precision) locally with Q4 quantization, you need about 12 GB of VRAM. An option to compare: GMKtec EVO-X2 — Amazon may show another configuration; check before buying — leave some headroom for the system and context; check engine compatibility with the GPU. Amazon may redirect you to a local store or show another configuration. Check the listing before buying; this link does not guarantee the destination or configuration.

Current offer: GMKtec EVO-X2 — Amazon may show another configuration; check before buying
AmazonCheck Amazon listing →

Why this choice? Our complete guide on GMKtec EVO-X2 — Amazon may show another configuration; check before buying →

Affiliate links — commission possible at no extra cost to you; independent recommendation. As an Amazon Associate, BestLLMfor earns from qualifying purchases.

Amazon may redirect you to a local store or show another configuration. Check the listing before buying; this link does not guarantee the destination or configuration.

On the go: Granite Code 20B (Mixed Precision) also runs on a RTX laptop PC (16 GB of VRAM) →

03Expected speed

Tokens generated per second in Q4_K_M, 4k context. Beyond 20 t/s, reading is comfortable. Below 10 t/s, that's just for testing.

Entry-level
~9t/s
GTX 1650, RX 6600, MBA M2 8GB
Mid-range
~14t/s
RTX 4060, 4070, MBP M3 Pro
High-end
~22t/s
RTX 4090, M4 Max, Radeon 7900