[whatmodel.sh](../../README.md) / Granite 20B Code Base (8K) # Granite 20B Code Base (8K) IBM · released 2024-04 · 20.07B params · apache-2.0 **score 38.7** ±1.2 · #583 of 732 · from 7 benchmark results across 2 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Granite 20B Code Base (8K) among every model on that task or test, worst to best.
task    vs the others         rank  counts  tests
coding  ▁▁▁▃●▇█▇▅▄▃▁   #404 of 469     84%      6
coding · #404 of 469 · 84% of its score Beats [DeepSeek R1 Distill Qwen 7B](deepseek-r1-distill-qwen-7b.md), [Qwen3.5 2B](qwen3-5-2b.md), [DeepSeek R1 Distill Llama 8B](deepseek-r1-distill-llama-8b.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…   44.3%  ▁·▂▁▂▆▅█●▄▁▂ beats 25/35  medium · avg 62%     24%  at its level
MBPP (maker)                         43.8%  █·▅▃▃▃▅●▃▅·▅ beats 10/15  easy · avg 67%       14%  at its level
HumanEvalExplain (HumanEvalPack, …   18.8%  ▄▇█●▄▇▄▁▇▃·▁ beats 15/35  medium · avg 46%     14%  typical
HumanEvalFix (HumanEvalPack, 6-la…   17.7%  ▁·▁▁▄█●▄█▁▅▅ beats 17/35  medium · avg 51%     12%  sharp
CRUXEval-I (maker)                   39.1%  ▃▅█▃▃▅·●▃▅·▅ beats 10/15  medium · avg 56%     11%  at its level
CRUXEval-O (maker)                   37.5%  ▃·▃██▅●·▃▃▅▃ beats 10/15  medium · avg 54%    8.8%  blunt · at its level
other tests (1)
test                     result  vs the others in its run  difficulty        counts  why
BigCodeBench (Complete)   25.8%  ▂▁●▄▂▅▇█▆▂▂▂ beats 5/58   medium · avg 48%     15%  at its level
## 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…        6   84% ▇▇▇▇▇▇▇▇▇▇
BigCodeBench paper                              1   15% ▇▇
prior: pull toward the middle                        1% ▇
weighted average                                   = 38.7
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/)) ## 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 20B Code Base (8K) (Q4_K_M, needs ~12.82 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-20b-code-base-8k-GGUF/tree/0629b8c5cb57028b6954ef7f94e285fee68550a2)) ```sh llama cli -hf ibm-granite/granite-20b-code-base-8k-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-20b-code-base-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)](https://lmstudio.ai/download) 2. Run Granite 20B Code Base (8K) (Q4_K_M, needs ~12.82 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-20b-code-base-8k-GGUF/tree/0629b8c5cb57028b6954ef7f94e285fee68550a2)) ```sh lms get https://huggingface.co/ibm-granite/granite-20b-code-base-8k-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 20B Code Base (8K) (Q4_K_M, needs ~12.82 GB, from [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-20b-code-base-8k-GGUF/tree/0629b8c5cb57028b6954ef7f94e285fee68550a2)) ```sh ollama run hf.co/ibm-granite/granite-20b-code-base-8k-GGUF:Q4_K_M ``` Model repository and documentation: [huggingface.co/ibm-granite](https://huggingface.co/ibm-granite/granite-20b-code-base-8k) [interactive version](https://whatmodel.sh/model/granite-20b-code-base-8k) · [JSON](https://whatmodel.sh/api?format=json&all=1)