LLMs · BigCode
StarCoder2 7B
- Parameters
- 7.2B
- Architecture
- Dense
- Max context
- 16K tokens
- License
- bigcode-openrail-m
- Released
- 2024-02
How to run it
- Install PocketPal AI (free) and open it.
- Download starcoder2-7b.Q4_K_M.gguf (opens in a new tab) on the device. It goes to Files › Downloads on an iPhone or iPad, or the Downloads folder on Android.
- In PocketPal AI, tap the menu (☰), then Models, then + and Add Local Model, and pick the file.
- Tap Load next to the model and start a chat. It runs on the device, offline.
- Install PocketPal AI (free) and open it.
- Download starcoder2-7b.Q4_K_M.gguf (opens in a new tab) on the device. It goes to Files › Downloads on an iPhone or iPad, or the Downloads folder on Android.
- In PocketPal AI, tap the menu (☰), then Models, then + and Add Local Model, and pick the file.
- Tap Load next to the model and start a chat. It runs on the device, offline.
On a mobile device
StarCoder2 7B is too big for a device like yours: it needs more memory than the device has. Models that run on mobile devices.
Quickest · Ollama
One command downloads a ready-to-run version and starts a chat.
ollama run starcoder2:7bQuantized files · GGUF
Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.
huggingface.co/QuantFactory/starcoder2-7b-GGUF (opens in a new tab)
ollama run hf.co/QuantFactory/starcoder2-7b-GGUFOriginal weights · Hugging Face
Full-precision files from BigCode, for fine-tuning, vLLM, Transformers.
Apps that run StarCoder2 7B
Our pick for each kind of computer, assuming the model fits in its memory. Pick your own GPU or device in the Model Finder for an exact answer.
| App | Type | Opens it as | Systems | Engine | Start |
|---|---|---|---|---|---|
| LM Studio | Desktop app | GGUF or MLX | macOSWindowsLinux | Open in LM Studio | |
| Ollama | CLI + API | Ollama library | macOSWindowsLinux |
|
|
| llama.cpp | CLI + API | GGUF | macOSWindowsLinux |
|
|
| Jan | Desktop app | GGUF or MLX | macOSWindowsLinux | Open in Jan | |
| MLX LM | CLI + API | MLX | macOS |
|
|
| vLLM | Server | Original weights | WSLWindowsLinux |
|
|
| SGLang | Server | Original weights | WSLWindowsLinux |
|
|
| Docker Model Runner | CLI + API | GGUF | macOSWindowsLinux |
|
|
| Lemonade | Desktop app | GGUF | macOSWindowsLinux |
|
|
| Unsloth Desktop | Desktop app | GGUF or MLX | macOSWindowsLinux | Open in Unsloth Desktop | |
| Atomic Chat | Desktop app | GGUF or MLX | macOSWindowsLinux | Open in Atomic Chat | |
| Pi | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Hermes Agent | Assistant | GGUF or MLX | macOSWSLWindowsLinux | ||
| OpenClaw | Assistant | GGUF or MLX | macOSWSLWindowsLinux | ||
| OpenCode | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Codex CLI | Coding agent | GGUF or MLX | macOSWSLWindowsLinux | ||
| OpenHands | Coding agent | GGUF or MLX | macOSWSLWindowsLinux | ||
| Zed | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Cline | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Open Interpreter | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Goose | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Aider | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Crush | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Qwen Code | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Kilo Code | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| Open WebUI | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| Khoj | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| Letta | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| GPT4All | Desktop app | GGUF | macOSWindowsLinux | Get GPT4All | |
| KoboldCpp | Desktop app | GGUF | macOSWindowsLinux | Get KoboldCpp | |
| Text Generation WebUI | Desktop app | GGUF | macOSWindowsLinux | Get Text Generation WebUI | |
| llamafile | CLI + API | GGUF | macOSWindowsLinux | Get llamafile | |
| Msty Studio | Desktop app | GGUF or MLX | macOSWindowsLinux | Open in Msty Studio | |
| Llama (macOS) | Desktop app | GGUF | macOS | Open in Llama (macOS) | |
| RecurseChat | Desktop app | GGUF | macOS | Open in RecurseChat | |
| Inferencer | Desktop app | MLX | macOS | Get Inferencer | |
| node-llama-cpp | Library | GGUF | macOSWindowsLinux | Get node-llama-cpp | |
| exo | Server | MLX | macOSLinux | Get exo | |
| Continue | Coding agent | GGUF or MLX | macOSWindowsLinux | ||
| SillyTavern | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| LibreChat | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| Cherry Studio | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| Chatbox | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| PrivateGPT | Assistant | GGUF or MLX | macOSWindowsLinux | ||
| PocketPal AI | Mobile app | GGUF | iOSAndroid | App Store Google Play | |
| ChatterUI | Mobile app | GGUF | Android | Download the APK | |
| LLM Farm | Mobile app | GGUF | iOS |
Memory needed
Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps. Try another context length.
| Quantization | Quality | Weights | Total at 8K context | Total at 16K context | Download |
|---|---|---|---|---|---|
Q2_K |
Low | 2.9 GB | 4.0 GB | 4.5 GB | GGUF (opens in a new tab) |
Q3_K_M |
Low | 3.5 GB | 4.7 GB | 5.2 GB | GGUF (opens in a new tab) |
Q4_K_M |
Good | 4.4 GB | 5.5 GB | 6.0 GB | GGUF (opens in a new tab) |
Q5_K_M |
High | 5.1 GB | 6.2 GB | 6.8 GB | GGUF (opens in a new tab) |
Q6_K |
High | 5.9 GB | 7.0 GB | 7.6 GB | GGUF (opens in a new tab) |
Q8_0 |
Very high | 7.6 GB | 8.7 GB | 9.3 GB | GGUF (opens in a new tab) |
F16 |
Full | 14.3 GB | 15.5 GB | 16.0 GB | Original weights (opens in a new tab) |
Best hardware for StarCoder2 7B
The least expensive GPU in our catalog that runs it without offloading is the Intel Arc A380 (launch price $139) at Q2_K.
| Quality | Hardware | Quant | Memory | Speed | Runs |
|---|---|---|---|---|---|
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 4070 SUPER |
Q8_0 | 9.3 GB / 12.0 GB | 43.9 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at F16, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 4090 |
F16 | 16.7 GB / 24.0 GB | 40.5 tok/s | Runs great |
| 23Basic quality (D) · 23 of 100: how capable the model is at Q6_K, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. | Intel Arc B580 |
Q6_K | 7.6 GB / 12.0 GB | 41.4 tok/s | Runs great |
| 23Basic quality (D) · 23 of 100: how capable the model is at Q6_K, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 3060 12GB |
Q6_K | 7.6 GB / 12.0 GB | 42.8 tok/s | Runs great |
| 22Basic quality (D) · 22 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 4060 |
Q4_K_M | 5.9 GB / 8.0 GB | 46.6 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 64/100 (quality, fit, speed and memory use) sets the ranking. | AMD Radeon RX 9070 XT |
Q8_0 | 9.5 GB / 16.0 GB | 48.0 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 64/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 4070 Ti SUPER |
Q8_0 | 9.5 GB / 16.0 GB | 58.6 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 64/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 4080 SUPER |
Q8_0 | 9.5 GB / 16.0 GB | 64.1 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 64/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 5070 Ti |
Q8_0 | 9.5 GB / 16.0 GB | 78.1 tok/s | Runs great |
| 24Basic quality (D) · 24 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 64/100 (quality, fit, speed and memory use) sets the ranking. | NVIDIA GeForce RTX 5080 |
Q8_0 | 9.5 GB / 16.0 GB | 83.7 tok/s | Runs great |
Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.









