Granite SWASH

Granite-SWASH-2B

by IBM watsonx · Experimental preview; currently accessible as an open-weight model

IBM Granite-SWASH-2B is a 2.14-billion-parameter Apache 2.0 language model for local text generation and inference research. Its SWASH design combines 128-token sliding-window layers, periodic full-attention layers, and learnable attention sinks to reduce memory demands. The experimental, text-only model supports an 8,192-position configuration but has no identified hosted API price or verified tool-use and structured-output features.

Text Reasoning Coding
Granite-SWASH-2B is an experimental IBM Granite model designed to explore more memory-efficient language-model inference. It generates text from text prompts, uses Apache 2.0-licensed open weights, and combines a 128-token sliding attention window with periodic full-attention layers. That design makes it relevant for local deployment and research, although its 8,192-position limit, lack of safety alignment, and preview status make it less suitable for demanding production applications.
Outputs

What Granite-SWASH-2B can produce

Text
Inputs

What it can understand

Text
Model profile

Performance characteristics

4/10 Reasoning
3/10 Coding
8/10 Speed
9/10 Cost efficiency
Specifications

Technical details

Family Granite SWASH
Type General Purpose
Context window 8K tokens
Max output tokens tokens
Release date 2026-07-07
Status Experimental preview; currently accessible as an open-weight model
Knowledge cutoff notes

No authoritative model-specific knowledge cutoff was published in the reviewed model documentation.

Model notes

Granite-SWASH-2B is a 2,144,463,840-parameter decoder-only dense English-language base model from IBM's Granite team. It uses seven full-attention layers and 17 sliding-window layers with a 128-token window, plus learnable per-head attention sinks. The model card reports WikiText-2 word perplexity of 15.29, MMLU five-shot accuracy of 0.5519, and GSM8K chain-of-thought exact-match accuracy of 0.4223. It is distributed in BF16 under the Apache 2.0 license. Standard SDPA is not supported because it cannot express the attention-sink mechanism; Flash Attention 3 or 4 and eager attention are supported. Transformers support requires a version newer than 5.8.0. The model is not safety-aligned and is presented as an experimental preview.

COST

Pricing

Input No IBM-hosted API price identified; self-hosted weights are available under Apache 2.0
Output No IBM-hosted API price identified; self-hosted weights are available under Apache 2.0
Model guide

Granite-SWASH-2B: IBM’s Experimental Small Model for Memory-Efficient Inference

Granite-SWASH-2B is IBM’s 2.14-billion-parameter, English-language open-weight decoder-only model. Its SWASH architecture combines sliding-window attention, periodic full-attention layers, and learnable attention sinks to reduce memory requirements during inference while retaining access to broader context.

What is Granite-SWASH-2B?

Granite-SWASH-2B is a small, open-weight language model from IBM’s Granite team. It is a decoder-only dense model, which means it processes text and generates text one token at a time rather than accepting or producing images, audio, or video. The model is intended for general text generation, experimentation, and research rather than for serving as IBM’s flagship production model.

IBM describes it as an experimental, small-scale preview for future Granite work. The model has 2,144,463,840 parameters and is distributed in BF16 format under the Apache 2.0 license through IBM Granite’s official Hugging Face organization. Because the weights are available for self-hosted use, developers can run it locally or deploy it in their own compatible inference environment. The supplied research does not identify a separate IBM-hosted API price for Granite-SWASH-2B.

Where it fits in IBM’s Granite lineup

Granite-SWASH-2B belongs to IBM Granite’s experimental collection rather than being presented as a mature, general-purpose flagship. Its main distinction is architectural: it investigates whether a model can reduce attention-related memory costs by using local attention in most layers while retaining occasional full-attention processing.

This positioning matters when evaluating the model. It is not primarily differentiated by a large context window, multimodal input, tool use, or a hosted service ecosystem. Instead, it is aimed at users who want an Apache-licensed text model and are interested in how attention design affects local inference speed and memory consumption.

How the SWASH architecture works

SWASH stands for Sliding Window Attention + Sinks Hybrid. In a conventional full-attention layer, each new token can attend broadly across the available sequence. That flexibility can increase computation and the size of the key-value cache used during generation. Granite-SWASH-2B changes this pattern by combining two layer types.

  • Seven full-attention layers: These periodically give the model access to the complete available context.
  • Seventeen sliding-window layers: These use a 128-token attention window, limiting most attention operations to nearby tokens.
  • Learnable attention sinks: Per-head sink values help preserve the behavior needed by the hybrid attention mechanism and rescale attention outputs through a log-sum-exp-based calculation.

In practical terms, most layers do not need to process the entire history in the same way. The full-attention layers provide broader context access, while the local layers can reduce the amount of active attention and key-value-cache state. The design is therefore a memory-efficiency experiment, not a claim that every task can be handled with only 128 tokens of total context.

The model also uses grouped-query attention, rotary position embeddings, SwiGLU activations, RMSNorm, shared input and output embeddings, and a vocabulary of 100,352 tokens. These details are relevant to users working with model configuration or inference engines, but they do not change the basic user-facing role: Granite-SWASH-2B is a text-in, text-out language model.

Technical specifications and limits

SpecificationVerified detail
ProviderIBM
Parameters2,144,463,840
Model typeDecoder-only dense language model
LanguageEnglish
Layers24
Attention heads20, including 4 key-value heads
Maximum position configuration8,192 positions
Sliding-window size128 tokens in 17 layers
Tensor typeBF16
LicenseApache 2.0
Maximum output tokensNot specified in the supplied research

The documented 8,192-position configuration is the relevant overall sequence limit. The research does not provide a separate maximum-output-token value, so users should not assume that the model supports a particular completion length beyond what their chosen runtime and the remaining context capacity allow.

Capabilities and evaluation results

Granite-SWASH-2B accepts text input and produces text output. Suitable tasks include text completion, drafting, lightweight generation, controlled experiments, and testing inference systems that support the Granite SWASH architecture. It is not natively multimodal and does not generate images, audio, video, music, embeddings, or speech.

The model card reports a WikiText-2 word perplexity of 15.29, MMLU five-shot accuracy of 0.5519, and GSM8K chain-of-thought exact-match accuracy of 0.4223. These are provider-reported results from the model documentation, not guarantees for every prompt or deployment. They suggest a usable general language capability and some basic mathematical-reasoning performance, but the model is not presented as a specialized reasoning system.

For practical evaluation, this model is better understood as a compact base model than as a polished assistant. The supplied research does not identify instruction tuning, safety alignment, a dedicated coding specialization, or a verified structured-output mode. Coding is possible as a general text-generation task, but it should not be treated as a primary strength without task-specific validation.

Deployment and inference considerations

Granite-SWASH-2B can be loaded with Hugging Face Transformers and served through compatible inference systems such as vLLM or SGLang. The model documentation states that Transformers support requires a version newer than 5.8.0. Users should check the current model card and runtime documentation before deployment because support for the attention implementation is important.

Standard scaled dot-product attention, commonly called SDPA, is not supported for this model because it cannot express the attention-sink mechanism used by SWASH. The documented recommendations are Flash Attention 3 or 4, with eager attention available as a fallback for debugging or CPU-oriented use. A backend that does not correctly implement the model’s attention behavior may fail to load the model or produce incorrect results.

The architecture can reduce memory use during generation compared with applying full attention uniformly across all layers, especially when the key-value cache would otherwise become a major constraint. However, the exact speed and memory benefit depends on hardware, quantization, batch size, sequence length, and runtime implementation. The research does not provide a universal tokens-per-second figure or a hardware-specific memory requirement.

Pricing and availability

No IBM-hosted inference price is identified for Granite-SWASH-2B. The model is available as open weights under the Apache 2.0 license, so there is no reported per-token input or output tariff for downloading and running the weights yourself. Self-hosting still involves hardware, storage, electricity, and infrastructure costs, and those costs vary substantially by deployment.

The open license may be useful for teams that need to inspect, adapt, or operate a model without depending on a hosted API. It does not eliminate the engineering work associated with selecting a compatible runtime, managing model files, configuring hardware, and evaluating generated content.

Main strengths and limitations

Strengths include:

  • A relatively small 2.14-billion-parameter footprint compared with larger language models.
  • An Apache 2.0 license that supports self-hosted experimentation and deployment subject to the license terms.
  • A hybrid attention design specifically intended to reduce memory demands during inference.
  • Periodic full-attention layers that preserve broader context access instead of restricting every layer to a local window.
  • Compatibility with documented open inference tooling, including Transformers, vLLM, and SGLang, when the required architecture support is available.

Limitations include:

  • The model is an experimental preview, not a mature production flagship.
  • The maximum documented position configuration is 8,192, and no separate maximum output-token limit is supplied.
  • It is text-only and has no native image, audio, video, speech, or embedding output.
  • Standard SDPA is unsupported because of the attention-sink implementation.
  • The model has not undergone safety alignment according to the supplied documentation.
  • It may produce biased, false, unsafe, or otherwise problematic content, and IBM notes potential memorization and verbatim-copying risks.
  • No verified native tool use, function calling, streaming, fine-tuning, caching, batch API, or JSON-mode capability is identified in the supplied research.

When to choose Granite-SWASH-2B

Choose Granite-SWASH-2B when the main requirement is a compact, open-weight English text model that can be run under your own control and when experimenting with memory-efficient attention is valuable. It is a reasonable candidate for local text completion, research into sliding-window attention, lightweight language applications, and inference experiments where an Apache-licensed model is preferable to a closed hosted service.

The model may also suit developers who want to study how periodic full attention and local attention interact in a small language model. Its relatively modest size can make experimentation more accessible than working with a much larger model, although actual hardware requirements depend on the runtime and precision configuration.

Another option is more appropriate when you need a production-hardened assistant, strong safety controls, verified function calling, a large or extended context window, multimodal generation, a hosted API with predictable per-token pricing, or specialized high-end reasoning and coding performance. It is also worth choosing a different model if your infrastructure cannot support Flash Attention 3 or 4, or if the runtime does not yet implement Granite SWASH correctly.

Bottom line

Granite-SWASH-2B is best viewed as an IBM research-oriented preview with a practical deployment angle. Its defining feature is not a broad set of assistant capabilities but the SWASH attention design: 17 local sliding-window layers, seven full-attention layers, and learnable attention sinks intended to lower inference-memory pressure. For local text generation and architecture research, that makes it distinctive. For safety-sensitive, multimodal, tool-using, or highly demanding production workloads, its experimental status and limited documented capabilities call for a more mature alternative.


Answers to Frequently Asked Questions

Is Granite-SWASH-2B free to use, and does IBM offer hosted API pricing?
The model weights are available under the Apache 2.0 license through IBM Granite’s official Hugging Face organization, allowing self-hosted use subject to the license terms. No IBM-hosted inference price or per-token API tariff is identified; self-hosting still incurs hardware, storage, electricity, and infrastructure costs.
How can Granite-SWASH-2B be deployed?
Granite-SWASH-2B can be loaded with Hugging Face Transformers and served through compatible systems such as vLLM or SGLang. Its implementation requires attention support for the SWASH mechanism: standard SDPA is unsupported, while Flash Attention 3 or 4 is recommended and eager attention can be used as a fallback.
What are the main technical specifications and limitations of Granite-SWASH-2B?
The model has 24 layers, 20 attention heads including four key-value heads, an 8,192-position configuration, BF16 weights, and an Apache 2.0 license. It is text-only, has no documented separate maximum-output-token limit, and is an experimental preview without verified native tool use, function calling, or multimodal capabilities.
What is Granite-SWASH-2B?
Granite-SWASH-2B is an experimental, open-weight, decoder-only language model from IBM’s Granite team. It has 2,144,463,840 parameters, generates English text, and is intended for local inference, experimentation, and research rather than as a flagship production assistant.
How does the SWASH architecture reduce inference memory use?
SWASH combines 17 sliding-window attention layers using a 128-token window with seven full-attention layers and learnable attention sinks. Most layers therefore process local context, while periodic full-attention layers preserve broader context access, which can reduce attention and key-value-cache memory demands during generation.


Sources 3
AI Provider

About IBM watsonx