whatmodel.sh / Granite 20B Code Instruct (8K)

Granite 20B Code Instruct (8K) is an open-weights language model from IBM, released April 2024. Its published size is 20.07B parameters. Licence: apache-2.0.

Catalogue identity notes

Comparison-only. Maker repo ibm-granite/granite-20b-code-instruct-8k @03d2f36: licence tag apache-2.0. 20,066,993,152 parameters from the Hugging Face safetensors metadata (dense, so active = total). Released 2024-04: month the maker's Hugging Face repo was created (createdAt 2024-04-26). May 2024 Granite Code release; not r1.1.

44.0±1.2#460 of 719 LLMsfrom 7 benchmark results across 3 sources

$ how it compares

The LLMs ranked either side of Granite 20B Code Instruct (8K), out of 828 with a score, then more from IBM.

#modelscorewhereRAMreleased
547Qwen2.5-VL 3B Instruct Alibaba44±1local~3.5GB2025-01
548Qwen1.5 32B Chat Alibaba44±1local~22GB2024-04
549Granite 20B Code Instruct (8K) IBM44±1local~14GB2024-04
550Qwen2 7B Instruct Alibaba44±1local~6GB2024-06
551Falcon3 7B Instruct TII44±3local~5.9GB2024-11
more from IBM
192Granite 4.2 30B IBM63±1api $0.28/M +local~19GB2026-08
239Granite 4.2 8B IBM60±1api $0.11/M +local~6.6GB2026-08
276Granite 4.2 3B IBM57±1api $0.052/M +local~3.7GB2026-08

see all LLMs · find the ones that fit your machine

$ what it's good at

coding▁▁▁▃▆██▇▆▄▃▁ #329 of 458 · 63% of its score · 3 tests

Beats GLM-4.7-Flash, Qwen3-VL 4B Instruct, LFM2.5 2.6B here, though they rank higher overall. Trails Phi-3-mini-128k-instruct (Apr 2024), DeepSeek LLM 67B Chat, WizardLM 70B V1.0 here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
HumanEvalSynthesize (HumanEvalPack, 6-language average) lab50.5% ✎▁·▂▁▂▆▅█▄▄▁▂ beats 30/35medium · avg 64%▇▇▇▇▇▇▇▇▇▇ 26%at its level
HumanEvalExplain (HumanEvalPack, 6-language average) lab38.2% ✎▄▇█▃▄▇▄▁▇▃·▁ beats 29/35medium · avg 49%▇▇▇▇▇▇▇ 18%at its level
HumanEvalFix (HumanEvalPack, 6-language average) lab41.1% ✎▁·▁▁▄██▄█▁▅▅ beats 30/35medium · avg 56%▇▇▇▇▇▇▇ 18%sharp · at its level
other tests4 not in a task · 37% of its score
testresultvs the others in its rundifficultycountswhy
BigCodeBench (Complete)42.1% ✎▂▁▁▄▂▅▇█▆▂▂▂ beats 32/58medium · avg 50%▇▇▇▇▇▇▇ 16%at its level
BigCodeBench (Instruct)33.7% ✎▃▂·▆▆██▆▅▃▃▃ beats 14/33medium · avg 41%▇▇▇▇▇▇ 16%at its level
EuroEval HellaSwag (English), test split, 5-shot generative MC, accuracy33.1% ✎▃·▁▁▃▁▂▅█▇▄▁ beats 16/100medium · avg 68%▇ 2.4%at its level · noisy
EuroEval Life in the UK (English knowledge MC), test split, 5-shot, accuracy45.4% ✎▁▁▁▁▁▁▃▂▄█▄▃ beats 17/146easy · avg 83%▇ 2.0%at its level · noisy

$ where to run it

llama.cpp · recommended

  1. Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.
    macOS / Linux
    curl -LsSf https://llama.app/install.sh | sh
    Windows
    irm https://llama.app/install.ps1 | iex

    other ways to install ↗

  2. Run Granite 20B Code Instruct (8K) · needs ~12.82 GB · from huggingface.co/ibm-granite
    chat in the terminal
    llama cli -hf ibm-granite/granite-20b-code-instruct-8k-GGUF:Q4_K_M
  3. Or start a local server and open the address it prints (http://localhost:9931)
    llama serve -hf ibm-granite/granite-20b-code-instruct-8k-GGUF:Q4_K_M

LM Studio

  1. Install LM Studio · Open the app once before using the lms command.

    download it (macOS / Windows / Linux) ↗

  2. Run Granite 20B Code Instruct (8K) · needs ~12.82 GB · from huggingface.co/ibm-granite

    open in LM Studio ↗

  3. Or download it in the terminal
    lms get https://huggingface.co/ibm-granite/granite-20b-code-instruct-8k-GGUF@Q4_K_M -y
  4. Then run lms ls to see its name, and lms chat followed by that name

Ollama

version

  1. Install Ollama

    download it (macOS / Windows) ↗

    Linux
    curl -fsSL https://ollama.com/install.sh | sh
  2. Run Granite 20B Code Instruct (8K) · needs ~12 GB · from ollama.com
    chat in the terminal
    ollama run granite-code:20b

Weights and documentation: huggingface.co/ibm-granite ↗

$ how the score was worked out · Granite Code Models: A Family… 63%, BigCodeBench paper (Zhuo et a… 32%, EuroEval leaderboards (result… 4%

Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its counts column above; here it's added up by who ran the tests. How it works

sourceresultsshare of the scorelicence
Granite Code Models: A Family of Open Foundation Models for Code Intelligence — authors' own runs · lab-reported3▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 63%CC BY 4.0
BigCodeBench paper (Zhuo et al., ICLR 2025), arXiv 2406.15877v42▇▇▇▇▇▇▇▇▇▇ 32%CC BY 4.0
EuroEval leaderboards (results collection), English generative leaderboard2▇ 4%MIT
prior · pull toward the middle▇ 1%
weighted average= 44.0

$ improve this page

Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.

data updated · sources and licences · json