[whatmodel.sh](../../README.md) / Stable Code 3B # Stable Code 3B Stability AI · released 2024-01 · 2.8B params · stability-ai-community **score 34.6** ±0.6 · #632 of 732 · from 15 benchmark results across 4 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Stable Code 3B among every model on that task or test, worst to best.
task vs the others rank counts tests coding ▁▁▁●▅▇█▇▅▄▃▁ #432 of 469 90% 10 math ▁▁▃▅●▆▄█▄▂▁▁ #323 of 431* 2.8% 1
test result vs the others in its run difficulty counts why HumanEval 29.3% ▁·▁▁●▄▆▅█▃▁▁ beats 14/99 easy · avg 76% 46% sharp · at its level · several runs HumanEval+ 25.6% ▁·▁▁▁●▄▄▄█▃▁ beats 14/99 easy · avg 70% 17% sharp · at its level MBPP 34.8% █·●▃▃▃▅▃▃▅·▅ beats 4/15 easy · avg 81% 7.3% at its level · several runs HumanEvalSynthesize (HumanEvalPac… 27.8% ▁·▂▁●▆▅█▄▄▁▂ beats 5/35 medium · avg 62% 5.0% at its level MBPP+ 45.8% ▁···▁▁▂●▇█▆▂ beats 12/75 easy · avg 66% 4.0% at its level DS-1000 22.7% ▄▄·▄●█▄█·█·▄ beats 4/12 medium · avg 49% 2.9% typical HumanEvalExplain (HumanEvalPack, … 12.3% ▄●█▃▄▇▄▁▇▃·▁ beats 3/35 medium · avg 46% 2.5% typical CRUXEval-I 33.5% ▃▅█●▃▅·▃▃▅·▅ beats 6/15 medium · avg 56% 2.3% at its level HumanEvalFix (HumanEvalPack, 6-la… 10.5% ▁·▁▁▄●█▄█▁▅▅ beats 7/35 medium · avg 51% 2.0% sharp CRUXEval-O 32.1% ▃·▃●█▅▃·▃▃▅▃ beats 4/15 medium · avg 54% 1.9% blunt · at its level
test result vs the others in its run difficulty counts why GSM8K 39.7% ▄▄▄·▄█·●█·█▄ beats 7/12 easy · avg 75% 2.8% sharp · at its level
test result vs the others in its run difficulty counts why EvoEval (overall) 20.7% ▂▂●▄▄█▁▄▅▃▁▃ beats 6/42 medium · avg 52% 6.6% typical
source results share of the score EvalPlus / EvalPerf published evaluatio… 3 45% ▇▇▇▇▇ Top Leaderboard Ranking = Top Coding Pr… 2 20% ▇▇ StarCoder 2 and The Stack v2: The Next … 4 19% ▇▇ Granite Code Models: A Family of Open F… 6 17% ▇▇ prior: pull toward the middle 0% ▇ weighted average = 34.6Licences: EvalPlus / EvalPerf published evaluation runs ([Apache-2.0](../../licenses/evalplus-published-runs-Apache-2.0.txt)) · Top Leaderboard Ranking = Top Coding Proficiency ([CC BY 4.0](../../licenses/paper-2403.19114v1-CC-BY-4.0.txt)) · StarCoder 2 and The Stack v2: The Next Generation ([CC BY-SA 4.0](../../licenses/paper-2402.19173v1-CC-BY-SA-4.0.txt)) · 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)) ## 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 Stable Code 3B (Q4_K_M, needs ~1.7 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/stable-code-3b-GGUF/tree/53430e2b42177f12f2fe8c844cd47211756ca072)) ```sh llama cli -hf TheBloke/stable-code-3b-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf TheBloke/stable-code-3b-GGUF:Q4_K_M ``` Other versions: Q8_0 (~3 GB) `llama cli -hf TheBloke/stable-code-3b-GGUF:Q8_0` ### 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 Stable Code 3B (Q4_K_M, needs ~1.7 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/stable-code-3b-GGUF/tree/53430e2b42177f12f2fe8c844cd47211756ca072)) ```sh lms get https://huggingface.co/TheBloke/stable-code-3b-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q8_0 (~3 GB) `lms get https://huggingface.co/TheBloke/stable-code-3b-GGUF@Q8_0 -y` · 4bit (~1.8 GB, Mac only) `lms get https://huggingface.co/mlx-community/stable-code-3b-4bit -y` ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run Stable Code 3B (Q4_K_M, needs ~1.7 GB, from [ollama.com](https://ollama.com/library/stable-code/tags)) ```sh ollama run stable-code:3b-code-q4_K_M ``` Other versions: Q8_0 (~3 GB) `ollama run stable-code:3b-code-q8_0` ### MLX (Mac) 1. Install MLX (Mac). Apple silicon Macs only, text only. ```sh # with uv uv tool install mlx-lm # or pip install mlx-lm ``` 2. Run Stable Code 3B (4bit, needs ~1.8 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/stable-code-3b-4bit/tree/66066766c04ab275eb9b55f4b11f99a1506e6a12)) ```sh mlx_lm.chat --model mlx-community/stable-code-3b-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/stable-code-3b-4bit ``` Model repository and documentation: [huggingface.co/stabilityai](https://huggingface.co/stabilityai/stable-code-3b) [interactive version](https://whatmodel.sh/model/stable-code-3b) · [JSON](https://whatmodel.sh/api?format=json&all=1)