Stability AI
StableLM 2 12B (12B parameters) requires approximately 22.3 GB of VRAM with Q5_K_M quantization. For the best balance of quality and speed, we recommend hardware with at least 26 GB of VRAM.
Get started
— copy & paste to run locallyCopy-paste commands to run StableLM 2 12B on your machine.
Run
docker run --rm -it ghcr.io/ggerganov/llama.cpp:full \
--hf-repo "stabilityai/stablelm-2-12b-chat" \
--hf-file "stablelm-2-12b-chat-Q5_K_M.gguf" \
-c 4096 -ngl 99Quick specs
About this model
Inference speed
Estimated decode speed (tokens/sec) for StableLM 2 12B at Q5_K_M across popular GPUs and Apple Silicon, using the fastest local runtime per device. Fastest is RTX 5090 32GB at ~103 tok/s. Speed is memory-bandwidth bound, so cards that fit the whole model in VRAM run far faster than ones that offload to system RAM.
| GPU / Mac | Memory | Quant | Speed (tok/s) | Fits? |
|---|---|---|---|---|
| 32 GB | Q5_K_M | 103.1 | Fits | |
Mac Studio M3 Ultra 256GB | 256 GB | Q5_K_M | 60.1 | Fits |
| 24 GB | Q5_K_M | 53.5 | Offloads | |
Mac Studio M2 Ultra 128GB | 128 GB | Q5_K_M | 50.1 | Fits |
RX 7900 XTX 24GB | 24 GB | Q5_K_M | 47.8 | Offloads |
Mac Studio M1 Ultra 128GB | 128 GB | Q5_K_M | 47.5 | Fits |
| 24 GB | Q5_K_M | 45.3 | Offloads | |
MacBook Pro M4 Max 128GB | 128 GB | Q5_K_M | 32.7 | Fits |
MacBook Pro M4 Max 64GB | 64 GB | Q5_K_M | 32.7 | Fits |
MacBook Pro M3 Max 64GB | 64 GB | Q5_K_M | 25.9 | Fits |
MacBook Pro M1 Max 64GB | 64 GB | Q5_K_M | 23.8 | Fits |
| 16 GB | Q5_K_M | 23.4 | Too big | |
MacBook Pro M4 Pro 48GB | 48 GB | Q5_K_M | 20.0 | Fits |
| 12 GB | Q5_K_M | 8.2 | Too big | |
| 12 GB | Q5_K_M | 4.8 | Too big | |
| 8 GB | Q5_K_M | 3.4 | Too big |
Estimates for single-stream decoding at Q5_K_M; real tokens/sec varies with prompt length, context, batch size, and runtime build. Prompt processing (prefill) is faster than the decode figures shown here.
Quick picks
Best hardware
Run this model
Quantization
How much VRAM StableLM 2 12B (12B) needs at each GGUF quant, and whether it fits a 24 GB card (RTX 4090 / 3090). The recommended Q5_K_M uses ~8.6 GB — about 33% less VRAM than Q8_0, at a small quality cost.
| Quant | Bits | VRAM (weights) | Quality | Fits 24 GB? |
|---|---|---|---|---|
| Q2_K | 2 | 4.7 GB | Low | Tight |
| Q3_K_S | 3 | 5.9 GB | Low | Tight |
| NVFP4 | 4 | 6.7 GB | Medium | Tight |
| Q4_K_M | 4 | 7.3 GB | Medium | Offloads |
| Q5_K_Mrecommended | 5 | 8.6 GB | High | Offloads |
| Q6_K | 6 | 9.8 GB | High | Offloads |
| Q8_0 | 8 | 12.8 GB | Very High | Heavy offload |
| F16 | 16 | 24.6 GB | Maximum | Too big |
VRAM shown is quantized weights only; add ~1–3 GB runtime overhead plus KV cache for your context length. Lower quants trade quality for memory — Q4_K_M is the usual sweet spot; Q2/Q3 only when you must fit a bigger model.
Quality benchmarks
Reasoning
General
Source: official · 2024-02-01
Hardware compatibility
Computing compatibility...
Memory breakdown
Frequently asked questions
StableLM 2 12B (12B parameters) requires approximately 22.3 GB of VRAM with Q5_K_M quantization. Lower quantizations like Q4_K_M use less memory but may reduce quality.
Yes, Mac mini M4 64GB can run StableLM 2 12B with a compatibility score of 47/100. It provides 64 GB of memory and achieves approximately 8.2 tokens per second.
The recommended quantization for StableLM 2 12B is Q5_K_M, which offers the best balance between model quality and memory efficiency. Higher quantizations preserve more quality but require more VRAM.
The top recommended hardware for StableLM 2 12B: RTX 5090 32GB (score: 57/100), RTX PRO 4500 Blackwell 32GB (score: 56/100), AMD Instinct MI100 32GB (score: 56/100). These provide the best combination of memory, bandwidth, and compute for running this model locally.
Yes, StableLM 2 12B is well-suited for chat as well as general. It was designed with these use cases in mind.
See also