alt.freeweights.granite / granite-swash-2b
From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject:

granite-swash-2b

Date: 2026-11-15Commit: af1e322Signed: 2DC28CC7B26A283B ✓

Text generation model with 2.1B parameters. Safetensors weights, 4.30 GB in all. Published by ibm-granite under Apache-2.0.

2.1B params4.30GBgranite-swash-2bsafetensorspermissive
FactsParams2.1BSize4.30 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get ibm-granite/granite-swash-2b
# manifest sha256 4899e7a3c4cb… · 4.30 GB · 8 files
$ fw verify ./granite-swash-2b ibm-granite/granite-swash-2b
From sourceHosted (signed)ibm-granite/granite-swash-2bLast check: 2026-11-15 03:24 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
4.30 GB
Weights
4.29 GB (safetensors)
Parameters
2.1B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
8, each with a sha256
Publisher
ibm-granite
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:24 UTCpassed

Model card

From the publisher at commit af1e322. Shown as plain text with links; images open at the publisher.

Granite-SWASH-2B (Sliding Window Attention + Sinks Hybrid)#

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#

Files

8 files · 4.30 GBWeights 4.29 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 8 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md5.31 KB18691591180732df1f260c85a106e7bb11a38a20eb900a8a09a46c32575be0f2
config.json1.29 KB654162ab4a5373344d6e93ea744b577814224c442a02a08bde4a04c516d28795
model.safetensors4.29 GB586b8e92031953b2c4aa830a418e1443d3c49442c5202f505f4561b3629384ad
model.sig9.54 KB769231856b6b1531201f5e12e0944c3202efb3800825247ca6871b33116bf78f
special_tokens_map.json579 Bc08676c49fd7969a3130f72be6d4bf34da66aa484a6e21dffe359893a1bd5f2e
tokenizer.json7.15 MBd44f7e5085ab278d3fc497b2d4fda2da84074c62d2980817229919b007e45b1a
tokenizer_config.json17.7 KBf7d756d106b80285c3f77c433e53a44bca3666111f14074a78ff0d80631b192e
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
af1e322710 pinned now2026-11-15 03:24 UTC8 files · 4.30 GB

Use it

$ fw get ibm-granite/granite-swash-2b
# manifest sha256 4899e7a3c4cb… · 4.30 GB · 8 files
$ fw verify ./granite-swash-2b ibm-granite/granite-swash-2b
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/ibm-granite/granite-swash-2b.json --dir ./granite-swash-2b $ python3 fw.py verify ./granite-swash-2b ./ibm-granite__granite-swash-2b.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-swash-2b --revision af1e3227100b61088eead48389ab5409b5d0e39c --local-dir ./granite-swash-2b
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("ibm-granite/granite-swash-2b", revision="af1e3227100b61088eead48389ab5409b5d0e39c") model = AutoModelForCausalLM.from_pretrained("ibm-granite/granite-swash-2b", revision="af1e3227100b61088eead48389ab5409b5d0e39c", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve ibm-granite/granite-swash-2b --revision af1e3227100b61088eead48389ab5409b5d0e39c

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
18691591180732df1f260c85a106e7bb11a38a20eb900a8a09a46c32575be0f2
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject: granite-swash-2bDate: 2026-11-15Commit: af1e322Signed: 2DC28CC7B26A283B ✓
Upstream
ibm-granite/granite-swash-2b
Pinned commit
af1e3227100b61088eead48389ab5409b5d0e39c
Manifest
granite-swash-2b.json · .minisig
Manifest sha256
4899e7a3c4cb4d4052934789e3f45462728c43392edf045393ab111e51f06b84
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:24 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-swash-2b.json $ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-swash-2b.json.minisig $ minisign -Vm granite-swash-2b.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-swash-2b
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. granite-swash-2b.json. Provenance. Takedown history: none.
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed3
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed3