Model reference · open weights
stablelm-tuned-alpha-3b is an open-weight language model from Stability AI. stablelm-tuned-alpha-3b (BF16) weighs 14.8 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the stabilityai/stablelm-tuned-alpha-3b model card, 2026-11-29
What it is
| Released by | Stability AI |
|---|---|
| Released | 2023-04-19 |
| VRAM | 14.8 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 4K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | |||
| RTX 3090 24 GB | 7 | all 4K | 23.4 GB |
| RTX 4090 24 GB | 7 | all 4K | 23.4 GB |
| RTX 5090 32 GB | 14 | all 4K | 31.0 GB |
| L40S 48 GB | 26 | all 4K | 44.0 GB |
| A100 80 GB | 58 | all 4K | 78.2 GB |
| H100 80 GB | 55 | all 4K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 69 | all 4K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 82 | all 4K | 107 GB |
| H200 141 GB | 110 | all 4K | 138 GB |
| B200 180 GB | 145 | all 4K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 6 | all 4K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 13 | all 4K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 28 | all 4K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 28 | all 4K | 23.4 GB a card |
| Requests at once | 4K tokens each |
|---|---|
| 1 | 16.6 GB |
| 5 | 20.9 GB |
| 8 | 24.1 GB |
| 16 | 32.7 GB |
| 32 | 49.9 GB |
| 64 | 84.2 GB |
One card, with vLLM's small-card settings.
From the model card
StableLM-Tuned-Alpha is a suite of 3B and 7B parameter decoder-only language models built on top of the StableLM-Base-Alpha models and further fine-tuned on various chat and instruction-following datasets.
Get started chatting with StableLM-Tuned-Alpha by using the following code snippet:
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList
tokenizer = AutoTokenizer.from_pretrained("StabilityAI/stablelm-tuned-alpha-7b")
model = AutoModelForCausalLM.from_pretrained("StabilityAI/stablelm-tuned-alpha-7b")
model.half().cuda()
class StopOnTokens(StoppingCriteria):
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
stop_ids = [50278, 50279, 50277, 1, 0]
for stop_id in stop_ids:
if input_ids[0][-1] == stop_id:
return True
return False
system_prompt = """# StableLM Tuned (Alpha version)
- StableLM is a helpful and harmless open-source AI language model developed by StabilityAI.
- StableLM is excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.
- StableLM is more than just an information source, StableLM is also able to write poetry, short stories, and make jokes.
- StableLM will refuse to participate in anything that could harm a human.
"""
prompt = f"{system_prompt}What's your mood today?"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
tokens = model.generate(
**inputs,
max_new_tokens=64,
temperature=0.7,
do_sample=True,
stopping_criteria=StoppingCriteriaList([StopOnTokens()])
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))
StableLM Tuned should be used with prompts formatted to .........
The system prompt is
- StableLM is a helpful and harmless open-source AI language model developed by StabilityAI.
- StableLM is excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.
- StableLM is more than just an information source, StableLM is also able to write poetry, short stories, and make jokes.
- StableLM will refuse to participate in anything that could harm a human.
StableLM-Tuned-Alpha) are licensed under the Non-Commercial Creative Commons license (CC BY-NC-SA-4.0), in-line with the original non-commercial license specified by Stanford Alpaca.lm@stability.ai| Parameters | Hidden Size | Layers | Heads | Sequence Length |
|---|---|---|---|---|
| 3B | 4096 | 16 | 32 | 4096 |
| 7B | 6144 | 16 | 48 | 4096 |
StableLM-Tuned-Alpha models are fine-tuned on a combination of five datasets:
Alpaca, a dataset of 52,000 instructions and demonstrations generated by OpenAI's text-davinci-003 engine.
GPT4All Prompt Generations, which consists of 400k prompts and responses generated by GPT-4;
Anthropic HH, made up of preferences about AI assistant helpfulness and harmlessness;
DataBricks Dolly, comprising 15k instruction/responses generated by Databricks employees in capability domains from the InstructGPT paper, including brainstorming, classification, closed QA, generation, information extraction, open QA and summarization;
and ShareGPT Vicuna (English subset), a dataset of conversations retrieved from ShareGPT.
Models are learned via supervised fine-tuning on the aforementioned datasets, trained in mixed-precision (FP16), and optimized with AdamW. We outline the following hyperparameters:
| Parameters | Batch Size | Learning Rate | Warm-up | Weight Decay | Betas |
|---|---|---|---|---|---|
| 3B | 256 | 2e-5 | 50 | 0.01 | (0.9, 0.99) |
| 7B | 128 | 2e-5 | 100 | 0.01 | (0.9, 0.99) |
These models are intended to be used by the open-source community chat-like applications in adherence with the CC BY-NC-SA-4.0 license.
Although the aforementioned datasets help to steer the base language models into "safer" distributions of text, not all biases and toxicity can be mitigated through fine-tuning. We ask that users be mindful of such potential issues that can arise in generated responses. Do not treat model outputs as substitutes for human judgment or as sources of truth. Please use responsibly.
This work would not have been possible without the helpful hand of Dakota Mahan (@dmayhem93).
@misc{alpaca,
author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
title = {Stanford Alpaca: An Instruction-following LLaMA model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{httQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.