whatmodel.sh / Granite 8B Code Base (4K)

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

Catalogue identity notes

Comparison-only. Maker repo ibm-granite/granite-8b-code-base-4k @d21e874: licence tag apache-2.0. 8,054,910,976 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-21). May 2024 Granite Code release (repo later suffixed -4k); not the 128K variant.

40.4±1.1#566 of 743 LLMsfrom 10 benchmark results across 3 sources

Score within the LMArena (text) comparison set only.

$ how it compares

The LLMs ranked either side of Granite 8B Code Base (4K), out of 897 with a score, then more from IBM.

#modelscorewhereRAMreleased
674Llama 2 70B Chat Meta41±1local~32GB2023-07
675Granite 3.0 2B Instruct IBM41±1local~3.2GB2024-10
676Granite 8B Code Base (4K) IBM40±1local~6.6GB2024-04
677StarCoder2 15B BigCode40±1local~11GB2024-02
678Llama 3.2 3B Instruct Meta40±1api $0.12/M +local~3.3GB2024-09
more from IBM
213Granite 4.2 30B IBM62±1api $0.28/M +local~19GB2026-08
264Granite 4.2 8B IBM59±1api $0.11/M +local~6.8GB2026-08
302Granite 4.2 3B IBM57±1api $0.052/M +local~3.3GB2026-08

see all LLMs · find the ones that fit your machine

$ what it's good at

coding▁▁▁▃▆▇█▆▆▃▃▁ #396 of 474 · 74% of its score · 6 tests

Beats LFM2.5 8B-A1B, DeepSeek R1 Distill Qwen 7B, Qwen3.5 2B here, though they rank higher overall. Trails Qwen2.5 1.5B Instruct, WizardLM 13B V1.2, Falcon3 3B Instruct here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
HumanEvalSynthesize (HumanEvalPack, 6-language average) lab43.5% ✎▁·▂▁▂▆▅█▄▄▁▂ beats 24/35medium · avg 62%▇▇▇▇▇▇▇▇▇ 21%at its level
HumanEvalExplain (HumanEvalPack, 6-language average) lab26.4% ✎▄▇█▃▄▇▄▁▇▃·▁ beats 22/35medium · avg 46%▇▇▇▇▇ 13%at its level
MBPP lab42.2% ✎█·▅▃▃▃▅▃▃▅·▅ beats 8/15easy · avg 68%▇▇▇▇▇ 12%at its level
HumanEvalFix (HumanEvalPack, 6-language average) lab29.6% ✎▁·▁▁▄██▄█▁▅▅ beats 26/35medium · avg 52%▇▇▇▇▇ 12%sharp
CRUXEval-I lab36.0% ✎▃▅█▃▃▅·▃▃▅·▅ beats 8/15medium · avg 57%▇▇▇▇ 9.2%at its level
CRUXEval-O lab36.1% ✎▃·▃██▅▃·▃▃▅▃ beats 9/15medium · avg 54%▇▇▇ 7.6%blunt · at its level
math▁▁▃▅█▆▅█▄▁▁▁ #207 of 440 * · 10% of its score · 2 tests

Beats MiniMax-M2.1, DeepSeek V3 (Dec '24), Qwen3 235B-A22B (Apr 2025, hybrid) here, though they rank higher overall.

testresultvs the others in its rundifficultycountswhy
GSM8K lab61.9% ✎▄··▄···▄··█▄ beats 5/5easy · avg 76%▇▇ 5.2%sharp · at its level · noisy
MATH lab21.4% ✎▃·▃····▃···█ beats 3/5medium · avg 38%▇▇ 4.5%noisy
other tests2 not in a task · 15% of its score
testresultvs the others in its rundifficultycountswhy
BigCodeBench (Complete)35.6% ✎▂▁▁▄▂▅▇█▆▂▂▂ beats 17/58medium · avg 49%▇▇▇▇▇ 13%at its level
EuroEval Life in the UK (English knowledge MC), test split, 5-shot, accuracy34.5% ✎▁▁▁▁▃▁▁▂▄█▄▃ beats 9/146easy · avg 82%▇ 2.2%at its level · noisy

$ where to run it

Memory is what a version takes in GPU memory (or a Mac's unified memory) with an 8k-token conversation. With less, it runs partly from system RAM, more slowly. Enter your machine to see what runs at full speed.

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 8B Code Base (4K) · needs 6.6 GB memory, 4.88 GB download · from huggingface.co/ibm-granite
    chat in the terminal
    llama cli -hf ibm-granite/granite-8b-code-base-4k-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-8b-code-base-4k-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 8B Code Base (4K) · needs 6.6 GB memory, 4.88 GB download · from huggingface.co/ibm-granite

    open in LM Studio ↗

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

Ollama

  1. Install Ollama

    download it (macOS / Windows) ↗

    Linux
    curl -fsSL https://ollama.com/install.sh | sh
  2. Run Granite 8B Code Base (4K) · needs 6.6 GB memory, 4.88 GB download · from huggingface.co/ibm-granite
    chat in the terminal
    ollama run hf.co/ibm-granite/granite-8b-code-base-4k-GGUF:Q4_K_M

Model repository and documentation: huggingface.co/ibm-granite ↗

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

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 · maker-reported8CC BY 4.0
BigCodeBench paper (Zhuo et al., ICLR 2025), arXiv 2406.15877v41CC BY 4.0
EuroEval leaderboards (results collection), English generative leaderboard1MIT
prior · pull toward the middle
weighted average= 40.4

$ 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