CodeAlchemy: Synthetic Code Rewriting at Scale
Pre-training on raw code teaches syntax but provides sparse signal for diverse real-world task formats. While synthetic data has proven transformative for language models, code remains largely unexplored beyond limited quality improvements. We present CodeAlchemy, a synthetic data generation framework that transforms publicly sourced code into semantically-rich training data through 5 strategies: CodeEnhance (quality-aware rewriting), CodeQA (template-based problems), CodeDev (developer tasks), CodeDialogue (multi-turn conversations), and CodeTrace (execution traces). We process 3 corpora across 15 languages to generate 500B+ tokens of synthetic data plus 350B reasoning tokens, orders of magnitude more than prior efforts. CodeTrace instruments and executes 1.3M+ files across 14 languages and 5K libraries, capturing control flow, state tracking, and library knowledge. We introduce DevEval (developer tasks) and TraceEval (execution prediction) benchmarks; frontier models like Claude Sonnet 4.5 achieve only 5.6% exact match on TraceEval, revealing critical gaps in semantic understanding. Our 3B models achieve 83.5% on HumanEval, 63.2% on MBPP, 8.09% win rate on DevEval, and 15.36 ROUGE-2 on TraceEval, outperforming frontier models 10x the size including 27B Gemma-3 and 32B Granite-4.0.
Code (0)
등록된 구현이 없습니다.
Tasks
Synthetic Data GenerationSimilar Papers 제목 키워드 기반
Synthetic Rewriting as a Quality Multiplier: Evidence from Portuguese Continued Pretraining
Synthetic data generation through document rewriting has emerged as a promising technique for improving language model pretraining, yet most studies focus on English and do not systematically control for the quality of t…
Synthetic Data GenerationQURG: Question Rewriting Guided Context-Dependent Text-to-SQL Semantic Parsing
Context-dependent Text-to-SQL aims to translate multi-turn natural language questions into SQL queries. Despite various methods have exploited context-dependence information implicitly for contextual SQL parsing, there a…
Question RewritingSemantic ParsingSQL ParsingText to SQL+1Rewrite to Translate, Translate to Reward: Reinforcement Learning for Source Rewriting in Machine Translation
Prior work has explored prompting large language models (LLMs) to rewrite source text before translation, with the goal of improving machine translation (MT) quality. However, we find that such prompt-based rewriting can…
Reinforcement LearningMachine TranslationFaithful or Findable? Evaluating LLM-Generated Metadata for RDF Dataset Search
Dataset search depends heavily on metadata, making LLM-generated metadata a consequential form of synthetic content in retrieval systems. We study six metadata-generation settings for RDF datasets, ranging from simple re…
Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewriting
Large Language Models (LLMs) have demonstrated remarkable proficiency in generating code. However, the misuse of LLM-generated (synthetic) code has raised concerns in both educational and industrial contexts, underscorin…
Contrastive Learningmbpp