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.
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.
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).
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.