# IBM CodeAlchemy: ~1 Trillion Tokens of Open Code Data

> Source: <https://byteiota.com/ibm-codealchemy-trillion-token-synthetic-code-dataset/>
> Published: 2026-07-30 23:08:48+00:00

IBM Research just open-sourced nearly a trillion tokens of synthetic code training data under Apache 2.0. The dataset, called **CodeAlchemy**, covers 15 programming languages, weighs in at 873 GB on disk, and ships with something no other public code dataset has at this scale: 1.3 million files paired with actual execution traces. It is live on [Hugging Face](https://huggingface.co/datasets/open-alchemy/code-alchemy) right now.

## Why This Is Different From Every Other Synthetic Code Dataset

Most synthetic datasets in 2026 are generated the same way: call a frontier model, ask it to write code examples, filter the output, and call it a training set. That approach is expensive, proprietary, and — critically — based on what the teacher model already knows. You are distilling one model’s knowledge into another, which works fine for some tasks but builds in a ceiling.

CodeAlchemy starts from real public source code across three corpora, then applies five distinct synthesis strategies on top:

**CodeEnhance**— rewrites code for quality: adds documentation, improves structure, handles edge cases** CodeQA**— generates Q&A pairs from code context** CodeDev**— realistic developer tasks: debugging, feature extension, and cross-language porting** CodeDialogue**— multi-turn conversations where a developer and assistant work through a problem** CodeTrace**— instruments code files to capture what actually happens at runtime

The result is ~976.6 billion tokens and 162 million rows, under a permissive Apache 2.0 license with no restrictions on commercial use.

## The Execution Trace Gap Nobody Wanted to Measure

CodeTrace is the technically significant piece. IBM’s team instrumented over 4 million code files across 14 languages and 5,000 libraries, ran them in isolated containers, and recorded the execution: control flow, variable states at each step, library calls, data transformations. After filtering out non-deterministic code — about 75% of files — they were left with 1.3 million (code, trace) pairs capturing what programs actually do when they run.

Then they built a benchmark to test it — **TraceEval** — and the results are uncomfortable reading for anyone who has been impressed by frontier model coding scores. Claude Sonnet 4.5 achieves 5.6% exact match on TraceEval. A 3B model trained on CodeAlchemy data scores 15.36 ROUGE-2, outperforming 27B Gemma-3 and 32B Granite-4.0.

What that reveals: models that ace HumanEval are pattern-matching on syntax, not reasoning about execution. They have learned to write code that looks right, not to understand what code does when it runs. CodeTrace data directly addresses that gap — and until now, there was nothing at this scale to train on.

## Two New Benchmarks Worth Bookmarking

The [paper](https://arxiv.org/abs/2606.10087) introduces DevEval and TraceEval as harder, more realistic evaluation tools:

**DevEval**— 1,488 tasks across 12 languages: debugging, feature extension, code porting. Tests whether a model can assist with developer work, not just complete isolated functions.**TraceEval**— 1,050 execution prediction tasks across 14 languages. Requires mental simulation of control flow and state changes step by step. Frontier models score poorly.

If you build or evaluate code models, these benchmarks offer a more honest picture than what has dominated leaderboards so far.

## How to Use CodeAlchemy Today

The dataset is at [open-alchemy/code-alchemy](https://huggingface.co/datasets/open-alchemy/code-alchemy) on Hugging Face. Practical starting points:

**Fine-tune a small model**— Pick a 3B–7B base, apply LoRA on a language-specific subset, and train a specialized code assistant that beats much larger general models on your actual tasks.**Benchmark what you have**— Run DevEval and TraceEval to see where your current code model stands on developer tasks versus synthetic function-completion benchmarks.**Mix strategically**— CodeAlchemy pairs well with domain-specific corpora. Add samples from your internal codebase to CodeDev or CodeDialogue subsets for a fine-tuned assistant that knows your patterns.

## The Bigger Pattern

There is a reliable sequence that follows open dataset releases at this scale. FineWeb changed what was possible for web models in 2024. DCLM followed. Now CodeAlchemy does the same for code. Teams that cannot train at frontier scale use these datasets to build 3B–7B models that beat the large ones on the tasks that matter for their specific use case.

IBM Research has published the [technical blog post](https://research.ibm.com/blog/code-alchemy-for-synthetic-code) walking through the full pipeline. If you build anything that touches code generation, debugging assistance, or execution reasoning, this dataset is worth a serious look this week.
