[whatmodel.sh](../../README.md) / Granite 8B Code Base (4K) # Granite 8B Code Base (4K) IBM · released 2024-04 · 8.05B params · apache-2.0 **score 40.5** ±1.1 · #555 of 732 · from 10 benchmark results across 3 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Granite 8B Code Base (4K) among every model on that task or test, worst to best.
task    vs the others          rank  counts  tests
coding  ▁▁▁▃●▇█▇▅▄▃▁    #392 of 469     75%      6
math    ▁▁▃▅█●▄█▄▂▁▁   #206 of 431*     10%      2
coding · #392 of 469 · 75% of its score Beats [LFM2.5 8B-A1B](lfm2-5-8b-a1b.md), [DeepSeek R1 Distill Qwen 7B](deepseek-r1-distill-qwen-7b.md), [Qwen3.5 2B](qwen3-5-2b.md) here, though they rank higher overall. Trails [Qwen2.5 1.5B Instruct](qwen2-5-1-5b.md), [WizardLM 13B V1.2](wizardlm-13b-v1-2.md), [Falcon3 3B Instruct](falcon3-3b.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
HumanEvalSynthesize (HumanEvalPac…   43.5%  ▁·▂▁▂▆▅●▄▄▁▂ beats 24/35  medium · avg 62%     21%  at its level
HumanEvalExplain (HumanEvalPack, …   26.4%  ▄▇█▃▄●▄▁▇▃·▁ beats 22/35  medium · avg 46%     13%  at its level
MBPP (maker)                         42.2%  █·▅▃▃▃●▃▃▅·▅ beats 8/15   easy · avg 67%       12%  at its level
HumanEvalFix (HumanEvalPack, 6-la…   29.6%  ▁·▁▁▄██▄●▁▅▅ beats 26/35  medium · avg 51%     12%  sharp
CRUXEval-I (maker)                   36.0%  ▃▅█▃▃●·▃▃▅·▅ beats 8/15   medium · avg 56%    9.2%  at its level
CRUXEval-O (maker)                   36.1%  ▃·▃██●▃·▃▃▅▃ beats 9/15   medium · avg 54%    7.6%  blunt · at its level
math · #206 of 431 · 10% of its score Beats [MiniMax-M2.1](minimax-m2-1.md), [DeepSeek V3 (Dec '24)](deepseek-v3.md), [Qwen3 235B-A22B (Apr 2025, hybrid)](qwen3-235b-a22b.md) here, though they rank higher overall.
test           result  vs the others in its run  difficulty        counts  why
GSM8K (maker)   61.9%  ▄··▄···▄··█● beats 5/5    easy · avg 75%      5.2%  sharp · at its level · noisy
MATH (maker)    21.4%  ▃·▃····▃···● beats 3/5    medium · avg 37%    4.5%  noisy
other tests (2)
test                                result  vs the others in its run  difficulty        counts  why
BigCodeBench (Complete)              35.6%  ▂▁▁▄▂●▇█▆▂▂▂ beats 17/58  medium · avg 48%     13%  at its level
EuroEval Life in the UK (English …   34.5%  ▁▁▁▁●▁▁▂▄█▄▃ beats 9/146  easy · avg 82%      2.1%  at its level · noisy
## How the score was worked out Each result implies a score on its own, after adjusting for how hard that test is and who ran it. The model's 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 is added up by who ran the tests. [Method](../method.md)
source                                    results  share of the score
Granite Code Models: A Family of Open F…        8   84% ▇▇▇▇▇▇▇▇▇▇
BigCodeBench paper                              1   13% ▇▇
EuroEval leaderboards                           1    2% ▇
prior: pull toward the middle                        1% ▇
weighted average                                   = 40.5
Licences: Granite Code Models: A Family of Open Foundation Models for Code Intelligence ([CC BY 4.0](../../licenses/paper-2405.04324v1-CC-BY-4.0.txt)) · BigCodeBench paper ([CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)) · EuroEval leaderboards ([MIT](https://github.com/EuroEval/leaderboards/blob/1a77f1d2f8ba1ba05ab73287fb090d76bf41b2e0/LICENSE)) ## How to run it ### llama.cpp (recommended) 1. Install llama.cpp. Homebrew and winget installs name the commands llama-cli and llama-server instead. [Other ways to install](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) ```sh # macOS / Linux curl -LsSf https://llama.app/install.sh | sh # Windows irm https://llama.app/install.ps1 | iex ``` 2. Run Granite 8B Code Base (4K) (Q4_K_M, needs ~4.88 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-8b-code-base-4k-GGUF/tree/ddd3138955f8f4e20970dea07a486d91e039ca72)) ```sh 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) ```sh 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)](https://lmstudio.ai/download) 2. Run Granite 8B Code Base (4K) (Q4_K_M, needs ~4.88 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-8b-code-base-4k-GGUF/tree/ddd3138955f8f4e20970dea07a486d91e039ca72)) ```sh lms get https://huggingface.co/ibm-granite/granite-8b-code-base-4k-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run Granite 8B Code Base (4K) (Q4_K_M, needs ~4.88 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-8b-code-base-4k-GGUF/tree/ddd3138955f8f4e20970dea07a486d91e039ca72)) ```sh ollama run hf.co/ibm-granite/granite-8b-code-base-4k-GGUF:Q4_K_M ``` Model repository and documentation: [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-8b-code-base-4k) [interactive version](https://whatmodel.sh/model/granite-8b-code-base-4k) · [JSON](https://whatmodel.sh/api?format=json&all=1)