ModelIBM (Granite)IBM (Granite)published Apr 6, 2026seen 5d

ibm-granite/granite-4.1-8b-base

Open original ↗

Captured source

source ↗
published Apr 6, 2026seen 5dcaptured 11hhttp 200method plaintask text-generationlicense apache-2.0library transformersparams 8.4Bdownloads 7.5klikes 23

![mof-class3-qualified](https://mot.isitopen.ai/model/1163)

Granite-4.1-8B-Base

Model Summary: Granite‑4.1‑8B‑Base is a decoder‑only language model with long‑context capabilities, designed to support a broad range of text‑to‑text generation tasks. In addition to standard generation, it supports Fill‑in‑the‑Middle (FIM) code completion through specialized prefix and suffix tokens. The model is trained from scratch on approximately 15 trillion tokens using a five‑phase training strategy: 10 trillion tokens in phase one, 2 trillion tokens each in phases two and three, and 0.5 trillion tokens in phase four. In the final phase, long‑context extension is applied to expand the model’s context window to 512K tokens.

Supported Languages: English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 4.1 models for languages beyond these languages.

Intended Use: Prominent use cases of LLMs in text-to-text generation include summarization, text classification, extraction, question-answering, code-completion (including FIM), and long-context generation tasks. All Granite Base models are able to handle these tasks as they were trained on a large amount of data from various domains. Moreover, they can serve as baseline to create specialized models for specific application scenarios.

Generation: This is a simple example of how to use Granite-4.1-8B-Base model.

Install the following libraries:

pip install torch torchvision torchaudio
pip install accelerate
pip install transformers

Then, copy the code snippet below to run the example.

from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"

model_path = "ibm-granite/granite-4.1-8b-base"

tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
input_text = "The capital of France is"
# tokenize the text
input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
# generate output tokens
output = model.generate(**input_tokens, max_length=10)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# print output
print(output[0])

Expected output:

The capital of France is Paris.

Evaluation Results:

Benchmarks Metric 3B Dense 8B Dense 30B Dense

General Tasks

MMLU 5-shot 66.47 73.60 78.44

MMLU-Pro 5-shot,CoT 37.16 44.58 49.51

BBH 3-shot, CoT 63.84 73.83 80.66

AGI EVAL 3-shot 54.32 61.68 69.20

DROP 5-shot 66.04 72.36 78.57

SimpleQA no-judge-short-form 6.85 7.92 10.54

Math Tasks

GSM8K 8-shot 72.93 73.54 83.78

Minerva Math 4-shot 38.00 43.42 45.66

Code Tasks

HumanEval pass@1 [StarCoder Prompt] 76.19 79.24 81.52

HumanEval pass@1 59.76 68.29

67.68

HumanEval+ pass@1 54.27 62.80 62.20

MBPP pass@1 81.48 63.76 83.60

MBPP+ pass@1 68.25 53.97 69.58

Eval+ Avg

65.94 62.21 70.76

Multilingual Tasks

MMMLU 5-shot 56.59 64.73 73.36

INCLUDE 5-shot 51.77 57.60 67.07

MGSM 8-shot 58.48 63.68 74.40

Multilingual Benchmarks and the included languages:

Benchmarks

Langs

Languages

MMMLU 11 ar, de, en, es, fr, ja, ko, pt, zh, bn, hi

INCLUDE 14

hi, bn, ta, te, ar, de, es, fr, it, ja, ko, nl, pt, zh

MGSM 5 en, es, fr, ja, zh

Model Architecture:

Granite-4.1-8B-Base is based on a decoder-only dense transformer architecture. Core components of this architecture are: GQA, RoPE, MLP with SwiGLU, RMSNorm, and shared input/output embeddings.

Model 3B Dense 8B Dense 30B Dense

Embedding size 2560 4096 4096

Number of layers 40 40 64

Attention head size 64 128 128

Number of attention heads 40 32 32

Number of KV heads 8 8 8

MLP / Shared expert hidden size 8192 12800 32768

Num. Experts

Num. active Experts

Expert hidden size

<td style="text-align:center; background-color: #FFFFFF; color: b

Notability

notability 7.0/10

Notable 8B base model from IBM with solid traction.