EMNLP papers
Search EMNLP papers by title, author, or track. Open a paper’s abstract to read more.
Explore the EMNLP analysisSearch results
221–240 of 322
- EMNLP · Findings
Syntax-Aware Detection of Training Data Contamination in Code LLMs
Jiazheng Zhang, Cheng Liu, Long Cheng, Xiaowei Li, Huawei Li
Abstract
Despite rapid advances in Code LLMs, their training datasets are often opaque due to proprietary and competitive concerns. Since many evaluation benchmarks are open-source and widely available online, models may unintentionally train on them, leading to data contamination that compromises evaluation validity. Reliable techniques for detecting whether a code snippet appears in a model’s training data are therefore essential. Compared with natural language, code contamination detection presents two unique challenges. First, code tokens from different syntactic categories contribute unequally to contamination signals, making uniform token treatment ineffective. Second, models trained on semantically equivalent code variants can evade detectors based solely on text matching. To address these challenges, we propose a syntax-aware framework that explicitly models token-type contributions. With a lightweight supervised detector trained on few labels, it captures contamination signals efficiently. Experiments across 8 Code LLMs, 2 languages, and 4 code transformations show absolute AUC gains of 8–10% for pretraining data detection and 15–20% for fine-tuning data detection, with AUC exceeding 90% on most fine-tuned tasks. Our work demonstrates that syntax-aware modeling is essential for trustworthy Code LLM evaluation.
Abstract source - EMNLP · Findings
Better World Models Can Lead to Better Post-Training Performance
Prakhar Gupta, Henry Conklin, Sarah-Jane Leslie, Andrew Lee
Abstract
We study how explicit world-modeling objectives affect the internal representations and downstream capability of Transformers, using Rubik’s Cubes as our training domain. We ask: (1) how does explicitly pretraining a world model affect a model’s latent representations, (2) how does world-model quality affect post-training performance, and (3) how should a finite data budget be split between pretraining and task-specific fine-tuning? We compare standard action-prediction fine-tuning with two strategies that add explicit state-prediction supervision: state pretraining followed by fine-tuning, and joint action and state training. We measure task accuracy after Group Relative Policy Optimization (GRPO). We further find that explicit world-modeling yields better representations in terms of higher probing accuracy and steerability of the model, and that better representations yield larger gains from GRPO, especially on harder cube states. Finally, when the fine-tuning budget is held fixed, probe accuracy strongly predicts the GRPO improvement. Under a fixed total data budget, accuracy is maximized by allocating only a small fraction to pretraining.
Abstract source - EMNLP · Findings
Modal Sense Disambiguation in Language Models: The Role of Context, Training Domain, and Input Frequency
Ezgi Başar, Yevgen Matusevych, Annemarie van Dooren, Arianna Bisazza
Abstract
Modals such as may and must can take on different senses depending on discourse context, alternating between root interpretations (e.g., permission, obligation) and epistemic interpretations (e.g., knowledge, belief). While modals are known to be notoriously difficult for children to acquire, limited research exists on whether language models (LMs) can reliably distinguish between different modal senses. We evaluate seven LMs that vary in architecture, size, and training data type using vector-based similarity and surprisal measures across four datasets. Specifically, we investigate whether LMs can leverage contextual information to disambiguate modal senses and whether their performance reflects the distribution of modal senses in their training data. We show that larger LMs trained on diverse text successfully leverage additional contextual information when available. In the absence of context, they tend to favor the dominant sense based on corpus statistics. Smaller developmentally plausible LMs, including those trained on child-directed language (CDL), fail to show consistent sensitivity to modal sense distinctions and do not benefit from context to the same degree.
Abstract source - EMNLP · Findings
VisMind: Stateful Synthetic Dialogue for Visual Mid-Training
Xinlong Fu, Zihao Zhou, Qiufeng Wang
Abstract
The mid-training phase has emerged as a critical bridge for enhancing the reasoning capabilities of Vision-Language Models, yet its effectiveness is constrained by the scarcity of high-quality visual reasoning data. While data synthesis offers a promising alternative, conventional stateless synthesis paradigms produce shallow trajectories that quickly succumb to utility plateaus. To overcome this, we propose VisMind, a novel multi-agent collaborative framework that generates deep-reasoning Stateful Synthetic Dialogue (SSD) from visual inputs. By orchestrating iterative problem-solving, where peer student agents engage in bidirectional critique under the ground-truth-anchored guidance of a teacher, VisMind transforms static, fragmented responses into rich, multi-turn logical derivations. Utilizing this interactive paradigm, we construct a dense mid-training corpus of approximately 1.14B tokens. Extensive experiments across the Qwen2-VL and InternVL3 model families demonstrate that applying this corpus via Continued Pretraining consistently outperforms a representative stateless synthesis approach and elevates standard baselines by up to a 2.24% absolute average gain across comprehensive mathematical and logical benchmarks. Furthermore, in-depth analysis reveals that the SSD paradigm exhibits continuous linear scaling without early saturation, fosters intrinsic reasoning generalization, and establishes a robust cognitive foundation that enhances the efficacy of subsequent Reinforcement Learning with Verifiable Rewards.
Abstract source - EMNLP · Findings
BenchCompass: From Scores to Signals for Training and Harness Decisions in Payment-Domain LLMs
Sijie Dong, Wei Ren, Xuanwei Hu, Jiawei Luo, Zifan Wang, Xiaoyun Feng, Hui Cai, Lyuxin Xue, Peng Lu, Wei Wu, Xin Zhang
Abstract
Payment operations are a critical financial infrastructure, but the value of large language models in this domain remains unclear because payment rules change quickly, evidence is fragmented, and decisions depend on transaction state, participant role, region, and payment rail. Existing benchmarks do not isolate whether failures come from missing payment-rule knowledge, poor use of supplied evidence, or brittleness under imperfect harness inputs. We introduce BenchCompass, a payment-domain benchmark whose construction pipeline builds scenario-grounded tasks from typed evidence packs, applies LLM-based quality checks, creates task-input attack variants, and reserves final item admission for domain experts. The release contains an expert-reviewed Pro benchmark covering payment knowledge, context-grounded scenario reasoning, and Attacked Open robustness, plus a lower-assurance Normal pool for inspection and future curation. Across 16 model variants, BenchCompass shows qualitatively different failure modes: missing parametric payment knowledge, incomplete reasoning over supplied rules, and failure to reject plausible but invalid workflows. The benchmark remains unsaturated: the best frontier model reaches 89.6% on Open Context-Grounded Reasoning and 81.7% under attacked inputs, while a representative 32B open-weight model reaches 69.8% and 42.6%. The benchmark, data, and code are publicly available at https://github.com/ant-intl/BenchCompass.
Abstract source - EMNLP · Findings
EDIT: Evidence-Diagnosed Intervention Training for Rule-Faithful LLM Grading
Zhihao Wu, Linhai Zhang, Taiyi Wang, Runcong Zhao, Peter Andrews, Cesare Aloisi, Yulan He
Abstract
Reliable rubric grading requires more than accurate score prediction. Each judgement must be grounded in the mark scheme and evidence from the student answer. Existing credit-assignment and intervention methods, primarily designed for self-contained reasoning tasks such as mathematics reasoning, struggle in this setting because they do not identify where grading reasoning goes wrong or how the model’s belief about the final mark changes during reasoning. We propose Evidence-Diagnosed Intervention Training (EDIT), a two-phase framework for training more rubric-faithful LLM graders. First, EDIT-SFT locates problematic reasoning steps using internal model signals: posterior belief over the final mark and input-grounding scores. It then revises only these local steps with help from a rubric checklist. Second, EDIT-RL calibrates the grader with belief-guided reward shaping, penalising large harmful belief drifts while still allowing helpful exploration. Experiments on two real-world, multi-subject grading benchmarks demonstrate that EDIT consistently outperforms strong supervised fine-tuning and reinforcement learning baselines on both in-domain and out-of-domain splits, with ablation studies confirming that internal-state diagnostics drive these gains. Under deterministic rubric-edit interventions, EDIT-SFT is the most rule-responsive of all evaluated systems, and EDIT-RL largely retains this responsiveness while improving accuracy.
Abstract source - EMNLP · Findings
CompCQR: Compositional Query Generation for Training-Free Conversational Search
Yunah Jang, Kang-il Lee, Joongbo Shin, Kyomin Jung
Abstract
Multi-turn interactions with LLMs are becoming increasingly common in information-seeking scenarios. However, user queries are often ambiguous and context-dependent, making them ill-suited for direct use as retriever queries. Conversational query reformulation (CQR) addresses this issue by rewriting the current utterance into a stand-alone query grounded in the dialogue history. Recent LLM-based CQR approaches achieve strong performance; however, their repeated LLM invocations and misalignment with downstream retrievers remain challenges. In this work, we begin from the observation that retrievers are highly sensitive to content ordering: simply reordering the same content can lead to changes in retrieval coverage and performance. Based on this, we propose a novel training-free method that generates a very large number of queries with minimal LLM usage by compositionally combining a small set of atomic components. We further apply LLM reasoning to construct a high-quality document set that balances precision and recall while capturing the user’s core intent. Our framework generalizes across both open- and closed-source LLMs as well as dense and sparse retrievers. It achieves strong performance on four widely used conversational benchmarks, with up to 22.5% relative MRR improvement over the previous state-of-the-art baseline with far fewer LLM calls.
Abstract source - EMNLP · Findings
CoDR: Training-Free Confidence-Drift Remasking for Diffusion Language Models
Yue Wu, Qinghe Zheng, Yu Zhang, Jian Huang
Abstract
Masked diffusion language models (MDLMs) decode by repeatedly committing tokens to masked positions, but these commitments are usually irreversible. A token chosen under sparse, partial context is kept fixed, even when later context no longer supports it. Existing samplers mainly decide when to commit a token, but rarely check whether an already committed token should still be kept, allowing early mistakes to propagate. We trace this issue to confidence drift, where the model’s confidence in a committed token drops from its sparse commit-time context to the denser context available later. Based on this signal, we propose CoDR (Confidence-Drift Remasking), a training-free and sampler-agnostic refinement pass. CoDR estimates drift for all committed positions in only k forward passes via k-partition probing, then remasks and regenerates only the tokens the model no longer endorses. Across two backbones, four reasoning and coding tasks, and three base samplers, CoDR improves accuracy on nearly every combination with modest overhead. Controlled experiments show that the gains come from targeted confidence-drift remasking rather than extra compute alone, and that CoDR uses far fewer forward passes than prior remasking methods.
Abstract source - EMNLP · Findings
M-GOAL: Toward Accurate and Language-Consistent Reasoning in LLMs via English-Only Post-Training
Dingyuan Dai, Yuxi Chen, Jiayuan Wang
Abstract
Reasoning-oriented language models inherit strong English-centric biases from pre-training, which are further reinforced by English-only post-training. This creates a dual failure mode where models fail both to reason correctly and to maintain reasoning traces in the query language. We study reasoning accuracy and language consistency under English-only post-training. SFT primarily improves language consistency with limited or inconsistent accuracy gains, while group relative policy optimization (GRPO) substantially improves accuracy at the cost of language consistency. Although translated multilingual GRPO improves both objectives, it requires translating reasoning post-training data into multiple languages and may introduce translation noise and information loss. We find that the language-consistency capability acquired by SFT and the accuracy capability acquired by GRPO are approximately orthogonal in the model’s update space. By merging an English LoRA-SFT adapter with an English GRPO checkpoint trained from the same base model, M-GOAL improves MGSM accuracy from 39.1 to 57.8 and language consistency from 17.1 to 75.2 without translated reasoning supervision. This composition outperforms sequential training, its merge coefficient exposes a tunable operating point along the accuracy–consistency frontier, and the pattern holds beyond mathematical reasoning and on benchmarks whose non-English problems are natively authored rather than translated. Our results suggest that multilingual reasoning post-training does not necessarily require multilingual post-training data.
Abstract source - EMNLP · Findings
Surgical Alignment in Knowledge Graph Training for Clinical Diagnosis with Large Language Models
Saksham Khatwani, He Cheng, Majid Afshar, Dmitriy Dligach, Yanjun Gao
Abstract
Biomedical knowledge graphs (KGs) offer structured medical knowledge that can ground large language model (LLM) reasoning in clinical diagnosis application, yet how KG signal should be integrated into LLMs remains an open question. We present a systematic study spanning five KG task formulations, three training paradigms, two KGs, and three base LLMs. At the task level, all paradigms improve over the non-finetuned baseline, but methods with comparable in-domain accuracy show substantially different knowledge transfer behavior. We introduce \textbf{Gradient Intervention Density (GID)} to measure how broadly an optimizer modifies the pretrained model. GID reveals a clear divide: KG-judgment training under KL regularization produces sparse, localized updates (a regime we term as \textit{surgical alignment}), while task-specific SFT produces dense ones. A controlled ablation shows that the objective and KL contribute to sparsity independently, and the paradigms that produce sparse updates also improve reasoning quality, even when their in-domain accuracy is lower than task-specific SFT. Assessing KG-LLM integration thus requires complementing accuracy with optimization-geometry diagnostics. Our implementation can be found at https://github.com/LARK-NLP-Lab/Surgical-Alignment.
Abstract source - EMNLP · Findings
GIFT: Reconciling Post-Training Objectives via Variational Finite-Temperature Gibbs Initialization
Zhengyang Zhao, Lu Ma, Yizhen Jiang, Xiaochen Ma, Zimo Meng, Chengyu Shen, Lexiang Tang, Haoze Sun, Peng Pei, Wentao Zhang
Abstract
The prevailing post-training paradigm for Large Reasoning Models (LRMs)—Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL)—suffers from an intrinsic optimization mismatch: the rigid likelihood maximization in SFT induces distributional collapse, thereby exhausting the exploration space necessary for subsequent RL. Motivated by the Gibbs optimum of KL-regularized RL, we derive a token-level variational surrogate that makes the SFT target structurally compatible with the subsequent RL stage, and propose Gibbs Initialization with Finite Temperature (GIFT). Standard SFT emerges as a degenerate zero-temperature limit of this surrogate, while a finite temperature preserves structural diversity. Our experiments demonstrate that GIFT outperforms standard SFT and surpasses competitive baselines when utilized for RL initialization. Our code is available at https://github.com/zzy1127/GIFT.
Abstract source - EMNLP · Findings
Beyond One-Hot Replay: Self-Distillation Reduces Target Variance in Continual Pre-Training
Peng Lu, Sijie Dong, Xiaoyun Feng, Xuanwei Hu, Xin Zhang
Abstract
Continual pre-training (CPT) adapts a pretrained language model to a target domain, but it often degrades general capabilities even when general-data replay is used to mitigate forgetting. We revisit this failure through replay supervision: prior CPT replay mainly tunes data mixtures and token budgets while applying one-hot next-token prediction (NTP) uniformly to domain and replay tokens. This target is natural for learning domain text, but on replay tokens it introduces target variance: it is a noisy, corpus-dependent proxy for preserving the frozen base model’s conditional behavior. We study self-distilled replay: domain tokens keep NTP, while replay tokens are trained to match the frozen base model distribution. Diagnostics show that this target substitution lowers target error, produces more directionally consistent replay gradients, and reduces base-behavior drift. Empirically, self-distilled replay improves the SmolLM3 domain–general trade-off over matched NTP replay across diverse token budgets and replay ratios. It also remains effective for Qwen3 models whose pretraining mixtures are unavailable: under the same mismatched, non-source replay setting, it improves both general score and PubMedQA in all eight matched comparisons. Overall, these results suggest supervising CPT replay to preserve base behavior, rather than fit empirical next tokens, as a way to reduce target variance.
Abstract source - EMNLP · Findings
LEAF: Growing Trees Without Branching for Speech-Aware Large Language Model Post-Training
Argyrios Gerogiannis, Yekaterina Yegorova, Mark A. Hasegawa-Johnson, Venugopal Veeravalli
Abstract
State-of-the-art GRPO-style methods for speech-aware large language model post-training suffer from coarse credit assignment, broadcasting the same terminal-reward advantage to every token in a response. This ignores useful structure within rollout batches, where speech-conditioned completions often share prefixes before diverging at important decisions. We propose Low-rank Exploration with Adaptive Forking (LEAF), a retrospective tree-based RL method that recovers this structure without online branching or additional decoding. LEAF samples complete responses, selects high-surprisal boundaries, groups responses by shared prefixes, and assigns span-level advantages using descendant rewards. We theoretically justify LEAF’s span-level credit assignment and boundary-selection design. Empirically, LEAF improves over GRPO across speech question answering and speech translation benchmarks under the same rollout and low-rank adaptation budget. Notably, smaller LEAF-trained models consistently outperform current state-of-art, full-parameter baselines.
Abstract source - EMNLP · Findings
GROVE: Graph-based Routing Over Variant Experts for Adaptive Two-Stage Training of Reasoning Models
Yiming Luo, Chunlin Tian, Li Li
Abstract
Post-training reasoning models is computationally expensive, and the allocation between supervised fine-tuning (SFT) and reinforcement learning (RL) substantially affects reasoning quality. Existing methods operate at the training-procedure level and treat the reasoning corpus as homogeneous, ignoring the structural heterogeneity of individual traces. We propose GROVE (Graph-based Routing Over Variant Experts), an adaptive framework that routes each example to SFT or RL based on the structural topology of its reasoning trace. GROVE parses each trace into a Reasoning Tree, scores its complexity via graph entropy, and partitions the corpus through a data-driven Gaussian Mixture Model with no hand-tuned threshold. Low-complexity traces are trained with SFT and high-complexity traces with GRPO as parallel LoRA adapters from a shared frozen base, merged into a single deployable model with no inference-time overhead. Across two training corpora and five reasoning benchmarks, GROVE consistently outperforms single-stage and naive-hybrid baselines, and a reversed-routing ablation confirms that this mapping is intrinsic rather than arbitrary.
Abstract source - EMNLP · Findings
DART: Draft-Agreement Routing for Training-Free Adaptive Thinking Budgets in Hybrid Reasoning Models
Jungseob Lee, Seongtae Hong, Seungjun Lee, Jaehyung Seo, Junyoung Son, Sugyeong Eo, Chanjun Park, Hyeongju Park, Hyeonseok Moon, Heuiseok Lim
Abstract
Hybrid reasoning models can answer directly or spend extra tokens on extended thinking. A practical router should choose between these modes for each query, so easy problems avoid unnecessary reasoning and hard problems receive enough budget to finish the answer. Existing routers move in this direction, but they typically require labeled training data or fix thinking budgets up front, ignoring answer-level evidence from the model itself. We introduce DART, a training-free routing framework that samples two cheap no-think drafts, accepts direct answering when the drafts agree, and predicts a thinking budget from draft entropy when they disagree. Across the main comparisons, DART preserves or improves always-thinking accuracy in most settings while reducing thinking-token use. On math reasoning, accuracy improves by up to +9.0 points on Olympiad-level problems while thinking tokens drop 15-69%. On code reasoning under execution-based equivalence, accuracy improves by up to +22.5 points while thinking tokens drop 51-63%. The Stage 1 signal extends across model scales (0.6B-32B), model families, and API-only hosted settings, with no labeled data and no gradient updates required.
Abstract source - EMNLP · Findings
Empirically Grounded Behavioral Adaptivity for LLM-Based Virtual Patients in Psychotherapy Training
Angela Chen, Siwei Jin, Catherine Bao, Canwen Wang, Yi-Chia Wang, Robert E. Kraut, Tongshuang Wu, Haiyi Zhu
Abstract
Simulated patients offer a scalable way to train psychotherapy micro-skills such as empathic responding and exploratory probing, but current systems either follow fixed scripts or rely on LLMs that drift unpredictably over long sessions. We present the Adaptive Virtual Patient (AVP), which adapts its disclosure behavior in response to trainee skill, from guarded, through moderate openness, to full disclosure. The AVP is informed by a structural equation model fit to nearly 2000 hours of real-world psychotherapy transcripts, which quantifies how therapist empathy and exploration shift a patient’s openness over time. An LLM generates the AVP’s utterances conditioned on a disclosure level that the dynamics module updates each turn. In an evaluation with 20 clinicians and trainees over 80 sessions (1,033 turns), the AVP’s disclosure rises in response to therapist empathy and exploration, while a prompt-only baseline stays flat; ablations confirm that the empirically motivated parameterization outperforms alternatives, with exploration carrying most of the adaptive signal.
Abstract source - EMNLP · Findings
COGTRL: Training LLMs for Scientific Discovery Assistance using Cognitive Traces via Reinforcement Learning
Shrinidhi Kumbhar, Santosh Mashetty, Divij Handa, Kevin Coutinho, Siddharth Sambhaji Ghule, Chitta Baral
Abstract
Large Language Models (LLMs) trained on extensive scientific research are increasingly integrated as assistants for scientific discovery. However, most research papers omit the fine-grained cognitive process of examining constraints, failed alternatives, and iterative decisions required to achieve the desired goal. Such cognitive processes are vital for real-world scientists working toward specific goals under constraints. In this paper, we show that LLMs, when trained to produce such cognitive traces, perform better as scientific discovery assistants than when trained solely on scientific literature. We propose COGTRL, a trajectory-level reinforcement learning framework that trains LLMs to emulate cognitively grounded reasoning by jointly optimizing cognitive traces and the scientific steps produced in an interleaved manner. Across two 3B-parameter models and two scientific domains (AI and Materials Science), COGTRL improves method quality by an average of 7.85 points over comparable 3B model baselines and achieves competitive performance relative to 70B parameter models. Moreover, analysis by domain experts shows a preference for methods generated by COGTRL over the baselines.
Abstract source - EMNLP · Findings
IDEEA: training-free Input-Dependent stEEring via Activation cluster matching
Zheng Wang, Muchen Li, Renjie Liao, Yan Leng
Abstract
Steering aligns large language models (LLMs) by injecting a bias into selected activations at inference time, offering a far cheaper alternative to weight-update methods such as supervised fine-tuning or reinforcement learning. However, most existing training-free steering methods are input-independent: a single direction is fitted once and shared across all inputs. This is fundamentally limiting as different inputs occupy different regions of the activation space and admit different optimal steering directions toward the same target concept, much as the gradient with respect to a fixed loss varies from input to input. We close this gap with IDEEA (Input-Dependent stEEring via Activation cluster matching), a training-free framework for input-dependent steering. IDEEA clusters the positive and negative activation supports per attention head, and solves an optimal-matching problem to construct a set of cluster-conditional directions, all about the target concept. At inference time, it picks from this pool of directions and uses the one that best matches the input’s own activation for steering. IDEEA aligns the model toward the target concept while preserving the input’s original representation, evidence that activations encoding a concept occupy several distinct sub-regions of the representation space rather than a single one. IDEEA improves the truth × info rate in TruthfulQA by an average of 9.9% (up to 23.5%) over the best input-independent baseline.
Abstract source - EMNLP · Findings
AMDKernelVault: Large-Scale Datasets and Agentic Training for AMD GPU Kernel Optimization
Ji Liu, Saptarshi Majumder, Yiqing Huang, Wenwen Ouyang, Umang Pandey, Zeping Li, Chushi Chen, Zihao An, Puyuan Yang, Zekai Li, Sina Rafati, Ziqiong Liu, Pratik Prabhanjan Brahma, Dong Li, Zicheng Liu, Sharon Zhou, Emad Barsoum
Abstract
We introduce AMDKernelVault, an open corpus and training framework for optimizing HIP and Triton kernels on recent AMD CDNA GPUs. Existing LLM-based kernel agents are predominantly designed for CUDA and NVIDIA hardware and often rely on repeated calls to frontier models for generation, reflection, and optimization. To address this gap, we develop HIPKernelGen and TritonKernelGen, agent-driven pipelines that translate PyTorch references into GPU kernels, compile and validate candidates under ROCm, and profile their latency on AMD hardware. AMDKernelVault contains 62,153 execution-verified HIP kernel samples, 2,377 production-grounded ROCm Libraries QA entries, and 39,893 Triton kernels. To demonstrate the corpus’s utility, we specialize Qwen3-8B through supervised fine-tuning and execution-aware reinforcement learning. Under fixed evaluation budgets and identical agent settings, the resulting model achieves the highest correctness among the evaluated models on PyTorch-to-HIP (34.0% Pass@1), TritonBench-G (33.2% Corr@3), and ROCmBench (41.94% Corr@3), while running locally on AMD hardware. These advantages are specific to the reported correctness metrics and do not extend uniformly to compilation accuracy or execution speed. The corpus and documentation are publicly available at https://huggingface.co/datasets/amd/AIG-Datasets.
Abstract source - EMNLP · Findings
HuggingBrew: Brewing High-Quality Mid-Training Data from the HuggingFace Community Datasets
Han Zhang, Ningqi Chen, Xiao Liu, Zhenghao Lin, Yeyun Gong, Yan Lu, Hanfang Yang
Abstract
Data curation for large language models (LLMs) has been extensively studied for both the pre-training and post-training stages, yet the intermediate \textit{mid-training} phase—bridging general pretraining and task-specific fine-tuning—remains critically underexplored. Most existing mid-training data for state-of-the-art models remains proprietary. Meanwhile, the Hugging Face platform hosts a huge amount of community-contributed datasets, yet no systematic effort has been made to refine this rich ecosystem into a unified high-quality corpus. We present \textbf{HuggingBrew}, a large-scale mid-training corpus constructed through a principled, multi-step curation pipeline applied to the massive publicly accessible Hugging Face datasets. The pipeline operates at two complementary granularities: \textit{dataset-level} operations act on each dataset independently, while \textit{corpus-level} operations are applied jointly across all retained corpus. We construct three progressively curated variants—\textsf{Draught}, \textsf{Craft}, and \textsf{Reserve}—containing 1.6T, 450B, and 40B tokens, respectively. Continual pretraining experiments under a 100B-token budget show that series yields substantial improvements over baselines across mathematical reasoning, general knowledge, and code generation, validating the untapped value of community-contributed data for mid-training.
Abstract source