OSAIM
Open Source AI Models

Stable LM 2 12B

Stability AI's general-purpose 12B model. Apache 2.0. Useful default when you need a permissively-licensed 12B-scale model.

Parameters
12B
Context length
4K
Modality
text
Released
2024-04-09

Memory & hardware

VRAM (fp16)
24 GB
VRAM (Q4)
7.2 GB
Recommended
RTX 4090 24GB
Quantizations
fp16, q8_0, q5_k_m, q4_k_m

License: Apache 2.0

SPDX
Apache-2.0
Commercial use
Yes
Modification
Yes
Redistribution
Yes

Benchmarks

MMLU
61.0
HumanEval
27.4
Benchmarks last verified 2026-05-18.

Hosted inference pricing

No hosted pricing listed — this model is currently self-host-only on this site.

Run it yourself

Drop-in commands for the three most common open-source inference paths. The Ollama tag is a best-effort match against the registry; verify the size variant before pulling.

Run Stable LM 2 12B locally
No official Ollama registry tag for this model — use transformers or vLLM below.
vLLM (production)
vllm serve stabilityai/stablelm-2-12b
High-throughput hosted inference; one command to expose an OpenAI-compatible HTTP server.
Transformers (Python)
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-12b")
model = AutoModelForCausalLM.from_pretrained(
    "stabilityai/stablelm-2-12b", device_map="auto", torch_dtype="auto"
)
Direct PyTorch usage. Pin a torch / cuda version that matches your GPU.
Hugging Face ID: stabilityai/stablelm-2-12b

Related models

Same family or similar size — useful when shopping around.

Mistral Nemo 12B
12B

Joint Mistral × NVIDIA model with 128K context, designed as a drop-in upgrade to Mistral 7B. Trained with NVIDIA's Megatron stack and released under Apache 2.0. Strong multilingual coverage thanks to the Tekken tokenizer.

Context
128K
License
apache-2-0
VRAM Q4
7.2 GB
Llama 3.2 11B Vision
11B

Llama 3's first vision-language model. Image understanding via a separately-trained ViT adapter bolted onto Llama 3 weights. Useful for OCR-adjacent workloads, document understanding, and image captioning at a permissive licence. The 11B size makes it cheap to host. Combined with the 128K text context, it handles long PDF-with-images workflows comfortably on a single 4090.

Context
128K
License
llama-3
VRAM Q4
6.6 GB
Gemma 2 9B
9B

Mid-tier Gemma. Strong general-purpose chat model at small scale. The Gemma Terms of Use permit commercial use subject to Google's prohibited-use policy.

Context
8K
License
gemma
VRAM Q4
5.4 GB
Llama 3.1 8B Instruct
8B

The workhorse 8B instruction-tuned model. Excellent quality-to-cost ratio and the broadest ecosystem support of any open-weights model — every major inference engine, fine-tuning library, and quantization toolchain has a 3.1 8B preset. Fits in 24 GB of VRAM at fp16, ~6 GB at Q4. Strong default for production chat where 70B is overkill, for fine-tuning on a specialist task, and for any workload where you want a known-good baseline.

Context
128K
License
llama-3
VRAM Q4
4.8 GB
Qwen 3 8B
8B

The April 2025 refresh of Qwen at 8B. Native mixed-mode reasoning: the model can 'think' before answering when triggered, or answer directly for simple queries — configurable per request. Apache 2.0. A strong upgrade over Qwen 2.5 7B on math and code, with much better instruction following.

Context
33K
License
apache-2-0
VRAM Q4
4.8 GB
Hermes 3 Llama 3.1 8B
8B

NousResearch's community-driven fine-tune on the Llama 3.1 8B base. Tuned for strong tool use, function calling and steerable persona behaviour. Inherits Llama 3's community licence and its 128K context.

Context
128K
License
llama-3
VRAM Q4
4.8 GB