LLMs
Foundation Models
Data Labeling

Data Story: IBM Granite 4.2 Training Data, Stage by Stage

A stage-by-stage record of Granite 4.2 training data, from pretraining phases to reinforcement learning. Every figure carries the IBM document it came from.

Table of contents

AI Summary

  • Granite 4.2 pretraining runs ~15T tokens across five phases, quantified for phases 1–4.
  • CodeAlchemy contributed roughly 1T tokens of synthetic source code.
  • Fine-tuning is ~7.2M samples, split 31.6% agentic.
  • Eight reinforcement learning entries; the 3B skips the agentic block.
  • All three model sizes ship under Apache 2.0.

Introduction

IBM released Granite 4.2 on August 25, 2026 in three model sizes: 3B, 8B and 30B parameters, all under an Apache 2.0 license, all dense transformer decoders supporting twelve languages. The weights are available to download from Hugging Face.

These are the latest models in the Granite series, and the release documents their training data in more detail than most open source models receive. Per-phase token allocations. A percentage breakdown of the supervised fine-tuning mix. A named synthetic-code pipeline with its own paper and released dataset. A four-step filtering procedure. A reinforcement learning sequence with its stage order set out.

That documentation is spread across several files. The Granite 4.2 release post covers fine-tuning and reinforcement learning but defers the pretraining blend to the Granite 4.1 write-up. The synthetic-code figures live in an IBM Research post, a pipeline blog, an arXiv paper and a dataset card. The model cards route dataset listings to a GitHub folder.

This article collects what each document specifies about Granite 4.2 training data. It follows the order the model encountered that data, and attributes every figure to the file it came from.

What Is the IBM Granite Family?

Granite 4.2 is one member of a larger family of IBM foundation models. The pipeline described in this article is a language-model pipeline; other Granite models in the family cover other modalities and are trained differently.

IBM's Granite page lists the current model types:

Granite model type Purpose
Granite Language Dense reasoning and instruction models, including Granite 4.2
Granite Code Code generation and developer tooling
Granite Vision Document, chart and image understanding
Granite Speech Transcription across accents, domains and noisy audio
Granite Embedding Semantic representations for retrieval, search and classification
Granite Time Series Compact time series forecasting models
Granite Guardian Guardrails that detect malicious content and harmful outputs

All IBM Granite models are released under the Apache 2.0 license, which is why the open source community can inspect their weights and documentation directly. IBM distributes them through Hugging Face, Ollama, LM Studio, watsonx.ai, OpenRouter and Replicate. The language models are optimized for three open source inference runtimes: vLLM, SGLang and llama.cpp.

The Granite Code models are a separate, earlier line from the Granite 4.x language models. Their technical paper describes models "ranging in size from 3 to 34 billion parameters." They were trained on source code in 116 programming languages, and released under Apache 2.0 for research and commercial use. When a comparison mentions Granite code models at 20B or 34B, it is referring to that line rather than to Granite 4.2.

Granite Guardian is the governance component. IBM's Granite 4.1 announcement describes Guardian 4.1 as flagging four things: socially biased content, hateful or abusive language, hallucinations, and agentic risks. Each dimension maps to IBM's AI Risk Atlas. Organizations pair it with a Granite language model rather than getting those safeguards from the language model alone.

Because the weights are downloadable under a permissive license, the models can be fine-tuned on an organization's own datasets for specific tasks. IBM names several enterprise uses the family targets: document summarization, retrieval-augmented generation (RAG, where a model answers from documents retrieved at query time), multimodal RAG over text, tables and images, time series forecasting, and code generation. It describes tool calling and instruction following as the two metrics that matter most for enterprise deployment.

What Are the Granite 4.2 Models?

Three dense decoder-only language models. The Granite 4.2 release post gives the architecture and parameters for each model size:

3B 8B 30B
Layers 40 40 64
Embedding dimension 2560 4096 4096
MLP hidden size 8192 12800 32768
Attention heads 40 32 32
KV heads 8 8 8
Sequence length 131072 131072 131072

Shared across all three model sizes: grouped-query attention with 8 KV heads, RoPE θ = 10M, SwiGLU activations, RMSNorm with ε = 1e-5, untied embeddings, bf16, and 128K native context with extension to 512K. Twelve languages. Apache 2.0.

The source documents describe two of these figures in more than one way. The release prose mentions 40 attention heads and 8 KV heads, which matches the 3B, while the architecture table gives 32 heads for the 8B and 30B. On context, the 512K figure refers to a training stage; the shipped sequence length is 131072.

How Was the Pretraining Corpus Staged?

Approximately 15 trillion training tokens, trained from scratch across five phases.

The 4.2 post states the total and the phase structure. It then notes that the recipe closely follows the previous generation, and refers to the Granite 4.1 write-up for the blend itself. The composition figures below are therefore Granite 4.1 figures, cited by the 4.2 release.

Phase Tokens Composition
1 — General pretraining 10T CommonCrawl ~59%, code ~20%, technical ~10.5%, math ~7%, multilingual ~2%, domain-specific ~1.5%
2 — Math and code 2T Math ~35%, code ~30%, CommonCrawl-HQ ~12%, technical ~10%, synthetic ~9%, multilingual ~3%, domain ~1%
3 — High-quality annealing 2T CommonCrawl-HQ ~16.67%, math ~16.67%, code ~16.67%, technical ~12.5%, long CoT ~12.5%, synthetic ~8.5%, language instructions ~7.5%, multilingual ~4.5%, code instructions ~4.5%
4 — High-quality refinement 0.5T CommonCrawl-HQ ~40%, code ~20%, math ~20%, language instructions ~9%, long CoT ~6%, code instructions ~5%
5 — Long context Not published Staged 4K→32K→128K→512K

Phase 3 runs under an exponential-decay learning rate. Phase 5 is described as using the remaining tokens, so it is the one phase without a published allocation.

The 32K and 128K stages reuse the Phase 4 data mix. The 512K stage uses a distinct mix of 80% books and 20% code repository data, and is applied to the 8B and 30B only. Model merging follows each stage to preserve short-context performance.

What Is in the CodeAlchemy Synthetic Code?

The IBM Research announcement states that the models were trained on 1 trillion tokens of synthetic code produced by an in-house pipeline called CodeAlchemy.

The CodeAlchemy paper documents five generation strategies:

Strategy Tokens
CodeDev 207B
CodeDialogue 150B
CodeEnhance 112B
CodeQA 13B
CodeTrace 7.4B

Seed corpora of real source code are named as Stack-edu, The Stack v2-train-smol-ids and RefineCode. Generation runs through GPT-OSS models. The pipeline write-up adds coverage of 15 programming languages and 1.3 million code files paired with execution traces across more than 5,000 libraries.

Validation is execution-based. CodeQA samples run in a sandbox, and approximately 28% are discarded. CodeTrace executes each file three times in a bubblewrap sandbox and discards approximately 75% of samples for non-determinism or empty traces, retaining 1.3 million pairs.

The paper also reports mixture experiments. In its ablation tables, CodeEnhance data alone yields 40.9 on HumanEval and 5.6 on MBPP. Adding 20% raw code raises MBPP to 52.9. Five epochs of pure synthetic data reduces it to 4.0. A CodeAlchemy-mixed backbone reaches 83.5 HumanEval and 63.2 MBPP against 76.8 and 57.4 for a raw-code backbone. These experiments were run on 3B research models and Granite 4.0 3B.

The synthetic-code token count appears with four values across four documents. IBM Research states 1 trillion. The pipeline write-up says "nearly 1 trillion". The paper reports 500B+ synthetic tokens plus 350B reasoning tokens. The released dataset card estimates approximately 976.6 billion tokens across 162.4 million rows. The dataset is released under Apache 2.0 in five subsets, about 873 GB of Parquet. Raw source files are excluded.

What Does the Supervised Fine-Tuning Mix Contain?

Supervised fine-tuning (SFT, the stage that teaches a pretrained model to follow instructions) uses approximately 7.2 million samples and roughly 100 billion tokens, of which about 65 billion are trainable. The split is 31.6% agentic and 68.4% non-agentic.

The two halves of the breakdown use different denominators. Agentic shares are expressed against the agentic portion; non-agentic shares are expressed against the whole mix, which is why they sum to 68.4%.

Agentic (31.6% of mix) Share of agentic Non-agentic Share of mix
Software engineering 69% Instruction following 18.8%
Tool calling 12.1% Coding 18.8%
Terminal use 8.0% Math 14.6%
Math 3.5% Multilingual 7.0%
Search 0.8% Science 5.4%
Action 0.2% Reasoning 3.0%
Safety 0.8%

Agentic trajectories are the recorded runs of an AI agent working through a task, and they are the data behind the models' tool calling and code generation. IBM generates them using twelve named scaffolds and harnesses: OpenHands, OpenCode, Terminus-2, SWE-agent, OpenResearcher, MiniSWE, OpenSeeker, EnvScaler, Gemini CLI, Hermes, Codex and Goose. Its own synthetically generated reinforcement learning environments supply the rest.

The model cards name four source categories but no datasets: publicly available data under permissive licenses, internally generated synthetic data, agentic traces, and curated human-authored data. The scaffold literature documents how this kind of data is produced. SWE-smith builds an execution environment for each codebase, then synthesises 50,000 task instances across 128 repositories that break existing tests. It validates each one by running it.

How Was the Fine-Tuning Data Filtered?

Four steps, in order.

  1. All samples are converted to OpenAI Chat format.
  2. GPT-OSS-120B and Gemma 4 score the samples as judges.
  3. Low scores, hallucinated or fabricated content, invalid tool interactions, and calls to undefined tools are dropped.
  4. SHA-256 hashes are computed over the combination of the tools and messages fields, and duplicates removed.

The deduplication works on exact hashes of two concatenated fields, so it catches only byte-identical pairs. That is narrower than the fuzzy and semantic methods some pretraining pipelines use; our FineWeb2 dataset guide covers MinHash deduplication for comparison.

No score threshold is published for step 2, and no figure is published for how many samples were removed at any step.

A separate machine-unlearning step, provided by Hirundo, is named in the IBM Research post as applied post-training.

What Does Each Reinforcement Learning Stage Train On?

Training uses asynchronous GRPO (group relative policy optimization, a reinforcement learning method that scores a batch of sampled answers against each other instead of against a separate value model) with a leave-one-out advantage baseline. The GLM Data Story covers asynchronous reinforcement learning infrastructure in more detail.

The ladder for the 8B and 30B has eight named entries, with RLVR (reinforcement learning from verifiable rewards, where a checker rather than a human decides whether an answer is correct) repeated three times:

Stage Data and environment
RLVR (×3) Math chain-of-thought reasoning with boxed-answer checking plus Lean formal proving; competitive coding against hidden tests in a sandbox; STEM and graduate-level MCQA; instruction following including inverse-instruction; single-step tool calling; reasoning puzzles and abstention
IF booster Multi-turn chat, inverse-IFEval, structured outputs
Code booster Competitive coding only
SWE 1 OpenHands harness on real repositories in sandboxes
SWE 2 OpenHands harness on real repositories in sandboxes
Terminal Harbor and Terminus-2 in a live shell
Search Live web-search calls in a browsing loop
RLHF Generative reward model for preference, plus a safety reward for jailbreak resistance and appropriate refusals

The 3B follows a shortened path: foundational reinforcement learning and alignment, without the agentic block. RLHF, the final entry, is reinforcement learning from human feedback, where a reward model trained on human preferences scores the output.

Three reward types are used. Verifiable rewards cover exact match, unit tests, format checkers and rule checkers. Reward-model or judge rewards cover open-ended quality, preference and safety. Agentic outcome rewards record whether a task was solved in a real environment.

Per-stage hyperparameters including prompts per step, rollout turns and context length are given in a table in the release post. Per-stage data volumes are not published: the prompts, environments and trajectories consumed at each stage. Neither is the training data for the generative reward model used in the RLHF stage.

What Does Granite 4.2 Score on Its Reported Benchmarks?

Benchmark 3B 8B 30B
MMLU-Pro 67.84 74.04 77.60
AIME25 78.33 86.67 89.17
HMMT Feb25 66.67 78.33 89.17
GPQA 54.80 64.14 66.41
LiveCodeBench v6 69.71 73.24 75.77
SciCode 24.11 36.09 38.76
SWE-Bench Verified not reported 47.67 57.00
SWE-Bench Multilingual not reported 30.78 41.89
SWE-Bench Pro not reported 19.11 33.29
Terminal-Bench 2.1 not reported 20.56 29.24
τ³-bench 45.78 58.06 62.00
BFCL v4 52.41 50.29 61.39
ProfBench 32.10 41.20 42.90
Arena-Hard-V2 34.96 65.19 67.93
RULER 64K 67.52 80.99 89.96
RULER 128K 55.30 71.41 81.38

All benchmark figures are IBM's own, reported in the release post. Independent evaluation stood as follows on September 9, 2026. Artificial Analysis lists the 30B at an Intelligence Index of 15, but marks that score estimated and says independent evaluation is forthcoming. It publishes independently measured speed and price on the same page. The official SWE-bench leaderboard lists no Granite model at all. Its 323 submissions span the Verified, Lite, Multilingual, Multimodal and Full splits, and its two IBM entries are from 2024. An aggregated view of the Verified leaderboard dated September 4, 2026 shows the same.

What Does the Published Record Not Specify?

Stated as facts about the documentation, as of September 9, 2026.

  • No dataset is named for 4.1 or 4.2 beyond category labels such as CommonCrawl, CommonCrawl-HQ, Code, Technical and Synthetic. The model cards route the full listing to the GitHub repository. That repository's disclosures folder states the files "are currently being prepared and will be published in this repository soon." It describes them as a step toward an AI Bill of Materials, a machine-readable inventory of what went into a model, supporting EU AI Act reporting.
  • Phase 1 is approximately 59% CommonCrawl. For that portion, no licensing statement, rights basis, opt-out handling or robots.txt policy appears in the release posts, model cards or documentation. The repository README describes curation and training incorporating governance, risk and compliance evaluations, plus IBM's standard data clearance and document quality review procedures.
  • No classifier, scoring model or threshold is described for the CommonCrawl-HQ category, so what counts as high quality is not defined operationally.
  • Five quantities are absent: the Phase 5 token count, per-language token allocations, the generative reward model's training data, fine-tuning judge thresholds and filtering yields, and per-stage reinforcement learning volumes.
  • No benchmark decontamination procedure is described for pretraining or fine-tuning.
  • The Hirundo machine-unlearning step is named without a statement of what was unlearned or how it was verified.
  • CodeAlchemy is released; the fine-tuning mixture, agentic trajectories, reinforcement learning environments and preference data are not.
  • No public EU AI Act Article 53(1)(d) training-content summary for the Granite 4 family was located. The template requires four things: named large datasets, the top 10% of crawled domain names, identification of synthetic data from other AI models, and data-processing methods. Commission supervision began on August 2, 2026. Our Gemma 4 Data Story sets out what the template asks for.

What the Granite 4.2 Record Documents

Granite 4.2's training pipeline, as published, runs to five parts. Pretraining takes 15 trillion tokens across five phases, 2.5 trillion of them in annealing and refinement. Roughly 1 trillion tokens of that are execution-validated synthetic code. Fine-tuning adds 7.2 million samples weighted toward software engineering, passed through a four-step filtering stack. Reinforcement learning then runs an eight-entry ladder, applied in full to two of the three model sizes.

The composition figures come from the Granite 4.1 post. The synthetic-code figures come from four documents that give four token counts. The dataset listing points to a repository folder that states its files are pending. Anyone quoting a number from this release should carry its source document with it.

The disclosure files, once published, will be the first document to name datasets directly. Until then, the account above is what the record supports.

Frequently Asked Questions About Granite 4.2

How much training data was Granite 4.2 trained on?Approximately 15 trillion tokens of pretraining data across five phases. Supervised fine-tuning added roughly 100 billion tokens across 7.2 million samples, of which about 65 billion are trainable.

What model sizes does Granite 4.2 come in?Three: 3B, 8B and 30B parameters. All three are dense decoder-only models with a 131072 sequence length. Larger models in the family, such as the 20B and 34B Granite Code models, belong to the earlier code line rather than to Granite 4.2.

Is Granite 4.2 open source?The weights are released under an Apache 2.0 license and can be downloaded from Hugging Face. The training datasets are a separate question. CodeAlchemy is released; the fine-tuning mixture, agentic trajectories, reinforcement learning environments and preference data are not.

How many programming languages does Granite 4.2 cover?The CodeAlchemy synthetic component spans 15 programming languages. The earlier Granite Code models were trained on 116.

Was Granite 4.2 trained on synthetic data?Yes, in three places. CodeAlchemy supplied roughly 1 trillion tokens of synthetic source code. Pretraining phases 2 through 4 each carry a synthetic category running between approximately 8.5% and 9%. And IBM generated its own reinforcement learning environments synthetically.

What is Granite 4.2 trained to do?The fine-tuning mix weights software engineering most heavily at 69% of the agentic split, followed by tool calling at 12.1% and terminal use at 8.0%. On the non-agentic side, instruction following and coding lead at 18.8% each, then mathematics at 14.6%.

Can Granite 4.2 be fine-tuned on my own data?The Apache 2.0 license permits it, and the weights are publicly downloadable. IBM's own fine-tuning recipe for these models is documented in the release post, though the datasets behind it are not released.

Who measured the Granite 4.2 benchmarks?IBM. As of September 9, 2026, no independent reproduction of the headline figures was located. Artificial Analysis marks its intelligence score for the 30B as estimated, and the official SWE-bench leaderboard carries no Granite entry.

Does Granite 4.2 include safety guardrails?Safety appears twice in the training record. It is 0.8% of the fine-tuning mix, and it is a reward signal in the RLHF stage, covering jailbreak resistance and appropriate refusals. IBM also ships Granite Guardian as a separate model for detecting harmful outputs.

Resources

IBM Primary Documentation

CodeAlchemy

Agentic Data and Evaluation

Granite Family

Policy

Kili Data Stories and Guides

Working With Training Data at This Scale

Kili's platform organises annotation and review as workflow steps over assets and jobs, with consensus and honeypot scoring configured per step. Talk to our team about your data pipeline.