DatologyAI: Engineering Lessons from 12 Trillion Synthetic Tokens

By LatestLLM Editorial ·

DatologyAI: Engineering Lessons from 12 Trillion Synthetic Tokens

Learn how DatologyAI scaled synthetic data from 30B to 12 trillion tokens using BeyondWeb, vLLM, and HyperPod to overcome the AI 'data wall'.

Key takeaways

  • DatologyAI scaled synthetic data production from 30 billion to 12 trillion tokens.
  • The BeyondWeb recipe uses seeded rephrasing to avoid model collapse and reduce required tokens by 2.7x to 5.3x.
  • S3 metadata fetch times were reduced from 11 days to 2 hours via API batching.
  • vLLM throughput was increased by 40% through systematic hyperparameter sweeping for batch inference.
  • Infrastructure was unified using Ray and KubeRay on AWS HyperPod to eliminate manual data movement between Slurm and Kubernetes.

The AI industry is hitting a 'data wall.' With only about 30 trillion tokens of usable text available on the web, frontier models are running out of high-quality human data to fuel their scaling laws.

⚡ TL;DR: DatologyAI scaled its synthetic data production from 30 billion to 12 trillion tokens (7T web, 5T math/code) using a rephrasing recipe called BeyondWeb. They achieved this by optimizing S3 metadata fetches (reducing 11 days of wait to 2 hours), implementing GPU checkpointing, and tuning vLLM flags to increase throughput by 40%.

The Simple Version

Most people think of synthetic data as asking an AI to 'write a textbook' from scratch. DatologyAI takes a different approach called rephrasing. Instead of starting from a blank page, they find high-quality existing data and use models to restructure or reframe it.

🎯 Think of it this way: DatologyAI acts like an oil refinery. They don't just find raw crude oil (web data); they refine it into high-octane fuel. Rephrasing is like taking a great piece of information and rewriting it in ten different ways to ensure the model understands the concept, not just the specific words used.

This method is significantly more efficient. According to Bogdan Gaza, CTO of DatologyAI, their BeyondWeb recipe allows models to reach the same performance as others using 2.7x to 5.3x fewer tokens.

How It Actually Works

The BeyondWeb Recipe

Generating data from scratch often leads to 'model collapse,' where the AI simply repeats the most common patterns it was originally trained on. As Bogdan puts it, "If you just prompt a model and say hey give me a synthetic data data point you're going to just learn the modes of the distribution the data was origin trained on."

BeyondWeb solves this by using seeded rephrasing. They identify the highest-quality documents in a dataset and use them as anchors. The pipeline then prefixes these documents with specific prompts to generate variations, ensuring the synthetic output remains grounded in real-world facts rather than AI hallucinations.

The Infrastructure Stack

To move from 30 billion to 12 trillion tokens, DatologyAI moved away from a fragmented Slurm/Kubernetes setup to a unified pipeline. Their current stack relies on Ray, KubeRay, and vLLM running on EKS on HyperPod (AWS's specialized cluster for large-scale ML).

🎯 Think of it this way: Moving from Slurm to Kubernetes is like moving from a set of manual workshops to a fully automated factory assembly line. Instead of manually moving data between research and production, everything now flows through one coordinated pipeline.

Their workflow follows a strict four-step cycle: Curate (using Spark to find quality data) $\rightarrow$ Synthesize (using Ray and vLLM) $\rightarrow$ Train $\rightarrow$ Eval.

Technical Deep Dive

Solving the S3 Metadata Bottleneck

At a trillion-token scale, data is stored in millions of Parquet partitions. Initially, DatologyAI attempted to fetch metadata for these files one by one. With each request taking roughly 10 milliseconds, the process of simply identifying the files to process would take 9 to 11 days.

To fix this, they implemented batched S3 metadata fetches. By using S3 APIs to request up to 1,000 objects in a single list request, they reduced the metadata population time from 11 days to just 2 hours. This prevents 'idle GPUs,' where expensive H100s sit waiting for the CPU to tell them which file to read next.

GPU Instability and Idempotency

When running thousands of GPUs, hardware failure is a statistical certainty. A single node crash in an 8-hour job could result in the loss of all progress for that partition. DatologyAI solved this by right-sizing partitions and implementing checkpointing.

For context, this requires idempotency—the ability to restart a job and overwrite the specific failed chunk without duplicating data or corrupting the set. By ensuring partitions are small enough to be recoverable, they turned multi-day failures into minimal, automatic retries.

Atomic Scheduling and Inference Tuning

A major challenge in cross-cluster orchestration is the mismatch between CPU and GPU availability. You might have available H100s (GPU pool) but no available Ray heads (CPU pool) to manage them. DatologyAI implemented atomic scheduling by decoupling these pools, ensuring that a job only launches when both the head and worker resources are guaranteed.

Finally, they focused on inference throughput. By performing grid searches (sweeps) over vLLM hyperparameters—specifically focusing on batch sizes and speculative decoding—they achieved a 40% increase in throughput. While many users use vLLM for online chat, DatologyAI uses it for batch inference, which requires entirely different optimization parameters to maximize tokens-per-second.

Why This Matters

The transition from 30 billion to 12 trillion tokens represents a massive shift in how frontier models are built. We are moving from an era of 'data collection' (scraping the web) to an era of 'data engineering' (synthesizing precision datasets).

This approach allows for the creation of specialized datasets for math, code, and multilingual tasks where human-written data is scarce. By proving that smaller models (e.g., 3B parameters) can match the performance of larger models (e.g., 8B) through superior synthetic data, DatologyAI is showing that data quality is a more powerful lever than model size.

Frequently asked questions

What is the 'data wall' in AI?

The data wall refers to the point where AI developers run out of high-quality, human-generated text on the internet (estimated at ~30 trillion tokens) to train larger models.

How does rephrasing differ from standard synthetic data generation?

Standard generation asks a model to create data from scratch, which often leads to repetition of common patterns. Rephrasing uses high-quality existing documents as 'seeds' to generate diverse but grounded variations.

What is AWS HyperPod in the context of this project?

HyperPod is an AWS service that provides a cluster of H100 GPUs on a single spine, orchestrated by Kubernetes (EKS), designed specifically for the massive scale required for LLM pre-training.

Sources

Source: “DatologyAI: Engineering Lessons from 12 Trillion Synthetic Tokens” on YouTube by AI Engineer

Tags: Synthetic Data, LLM Pre-training, MLOps, vLLM, AWS HyperPod