Model reference · open weights

granite-swash

LLMs ibm-granite Text gen 2 builds Open weights 6k dl/mo

granite-swash is an open-weight language model from IBM. granite-swash-3b-a600m (BF16) weighs 6.0 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • Granite-SWASH-2B is a 2.1B parameter decoder-only dense language model developed by IBM for general-purpose English text generation.
  • It features per-layer Sliding Window Attention and learnable attention sinks, with a context length of 8192 tokens.
  • The model is released under the Apache 2.0 license.

Summary of the ibm-granite/granite-swash-2b model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released byIBM
Released2026-07-01
Parameters2.1B
VRAM6.0 GB for the weights

What it runs on

Memory and cards for granite-swash-3b-a600m (BF16)

6.0 GBweights, file size
8 MBcache per 1K tokens
104 MBwindow cache per request
557 MBruntime overhead, at least
8,192 tokenscontext max
CardRequests at onceContext maxMemory
8K each
RTX 3060 12 GB29all 8K11.6 GB
RTX 4060 Ti 16 GB51all 8K15.4 GB
RTX 3090 24 GB98all 8K23.4 GB
RTX 4090 24 GB98all 8K23.4 GB
RTX 5090 32 GB142all 8K31.0 GB
L40S 48 GB218all 8K44.0 GB
A100 80 GB418all 8K78.2 GB
H100 80 GB254all 8K78.1 GB
RTX PRO 6000 Blackwell 96 GB312all 8K93.8 GB
DGX Spark (GB10) 128 GB unified362all 8K107 GB
H200 141 GB477all 8K138 GB
B200 180 GB619all 8K176 GB
Memory needed at each load
Requests at once8K tokens each
16.8 GB
57.5 GB
88.0 GB
169.3 GB
3212.1 GB
6417.5 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
granite-swash-2b ↗ 2.1BBF16 4.3 GBRTX 3060 12 GB
granite-swash-3b-a600m (above) ↗ 3.0BBF16 6.0 GBRTX 3060 12 GB

From the model card

What IBM says about granite-swash

Read the model card

Model Summary Granite-SWASH-2B is a 2B parameter decoder-only dense language model with per-layer Sliding Window Attention (SWA) and learnable attention sinks (LSE-based). Trained on a mix of open source and proprietary data, it is a broad, general-purpose, English-language base model that serves as an early exploration and small-scale preview for upcoming Granite series model releases.

Architecture

Granite-SWASH-2B is based on a decoder-only dense transformer architecture. Core components of this architecture are: GQA, RoPE, MLP with SwiGLU, RMSNorm, shared input/output embeddings, Sliding Window Attention, and Attention Sinks.

ParameterValue
Hidden size2560
Layers24
Attention heads20 (4 KV heads, GQA)
Intermediate size8192 (SwiGLU)
Max position embeddings8192
Sliding window size128
Vocabulary100,352
Parameters2,144,463,840

Attention Pattern: 7 full-attention layers (indices 0, 3, 7, 11, 15, 19, 23) and 17 sliding-window layers (window=128). All layers have learnable per-head attention sinks.

MuP Scaling: embedding_multiplier=12, residual_multiplier=0.28, logits_scaling=10, attention_multiplier=0.0078125

Sink Mechanism: this model uses post-attention LSE scaling in the eager implementation:

sink_scale = sigmoid(lse - sinks)
attn_output = attn_output * sink_scale

Where lse is the log-sum-exp of attention scores, and sinks is a learnable per-head parameter. Flash Attention 3 and 4 implementations natively incorporate and compute the sink token under the hood. Note that SDPA does not express sink tokens or sink_scale, and so is not a supported backend.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "ibm-granite/granite-swash-2b",
    dtype=torch.bfloat16,
    device_map="auto",
    attn_implementation="flash_attention_3",  # or "flash_attention_4" or "eager", NOT "sdpa"
)
tokenizer = AutoTokenizer.from_pretrained("ibm-granite/granite-swash-2b")

inputs = tokenizer("The capital of France is", return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=50, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Requires transformers version > 5.8.0

Evaluation Results

BenchmarkMetricScore
WikiText-2word_perplexity15.29
MMLU (5-shot)accuracy0.5519
GSM8K CoT (5-shot)exact_match0.4223

Supported Features

  • Flash Attention 3 and 4 with native LSE (recommended for speed)
  • Eager attention fallback (for debugging/CPU)
  • Sliding window KV cache (memory-efficient generation)
  • Per-layer causal mask dispatch (full vs sliding window)
  • Generation via model.generate()

Ethical Considerations and Limitations

The use of Large Language Models involves risks and ethical considerations people must be aware of, including but not limited to: bias and fairness, misinformation, and autonomous decision-making. Granite-SWASH-2B is not an exception in this regard. Even though this model is suited for multiple generative AI tasks, it has not undergone any safety alignment and it may produce problematic outputs. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in generation scenarios by copying text verbatim from the training dataset due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain. Regarding ethics, a latent risk associated with all Large Language Models is their malicious utilization. We urge the community to use Granite-SWASH-2B model with ethical intentions and in a responsible way. To enhance safety in enterprise deployments, we recommend using Granite Language models alongside Granite Guardian, a model designed to detect and flag risks in inputs and outputs across key dimensions outlined in the IBM AI Risk Atlas.

Resources

  • ⭐️ Learn about the latest updates with Granite: https://www.ibm.com/granite
  • 📄 Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
  • 💡 Learn about the latest Granite learning resources: https://github.com/ibm-granite-community/

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms