Explore the research collection
2 entries · Follow this search
- Paper
Don't Stop Long-Context Continual Pre-Training Too Early: An Empirical Scaling Law
Asks how the benefits of long-context continual pre-training (LCCP — the stage after short-context pre-training that extends the window) scale with its token budget, and whether they can be predicted. Setup: five dense full-attention scales S1–S5 (non-embedding N = 31M–821M; total 165M–1.22B; S5 = 36 layers, hidden 1,536, GQA 24Q/2KV heads, vocab 130,560, attention sink enabled), all trained with Muon in bf16 on 16×H800. Short stage: 4K sequences, WSD schedule. LCCP stage: 32K sequences, RoPE base 10,000 → 500,000, LR starting at the 4K stage's terminal value, on a fixed 32K mixture of public + internally curated data (not fully released — exact replication impossible). Metric: LongPPL (Fang et al. 2025) — perplexity only on tokens a reference model (Llama-3.1-8B) predicts well with full context but badly with a 4K chunk (only 1.42% of tokens on 10K GovReport 32K documents); ShortPPL is the matched local-token control. (1) THE LAW: an additive Chinchilla-style power law with short-context tokens D_s and LCCP tokens D_l as SEPARATE predictors — log(LongPPL) = A/N^α + B_s/D_s^β_s + B_l/D_l^β_l + C — fit on 109 Linear-Decay configurations. Held-out-scale extrapolation: fit S1–S4 → S5 R² 0.9516 / MAPE 1.71% (Linear-Decay) and 0.9718 / 0.66% (Constant-Last4), despite S5's ~100B LCCP tokens being >8× the largest D_l in the fitting set; collapsing D_s+D_l into one budget wrecks extrapolation (R² 0.849), and no-offset variants collapse entirely (R² −0.10 / −4.09 on S5) — separating the two budgets is doing real work. (2) CONSTANT-LAST4 PROTOCOL: linear decay needs a pre-committed endpoint, blocking open-ended scaling; their alternative trains LCCP at constant LR (extensible trajectory) but OBSERVES it through the uniform average of the 4 most recent checkpoints — merging is an observation mechanism only, training always continues from the latest raw checkpoint. It tracks budget-matched Linear-Decay endpoints closely (32K LongPPL 2.241 vs raw-constant 2.312; RULER-32K 45.48 vs 44.29), but its small edge shrinks and slightly reverses after the larger SFT budget (−0.16) — the authors explicitly decline to claim merging improves downstream training. (3) DOWNSTREAM: RULER-32K rises across the whole 5N→120N LCCP trajectory with no clear saturation, driven by intermediate-difficulty retrieval (niah_multikey_2 51.2 → 71.2, niah_multivalue 10.2 → 28.75, niah_multiquery 18.75 → 45.0); gains transfer to 128K after a fixed 2.10B-token extension and persist through identical long-context and agentic SFT stages (the agentic arm — GAIA / BFCL-WebSearch / τ²-telecom — improves with upstream 32K LCCP budget). Proxy sanity checks: LongPPL improves much faster than ShortPPL (elasticity ratio 3.35 → 2.22, always >2 — gains are not just general LM improvement), while retrieval-head probes plateau after ~30N even as behavior improves to 120N — mechanistic probes saturate before behavior does. Caveats: everything ≤1.22B params, 32K LCCP (128K only as fixed extension), one data mixture — frontier transfer asserted, not shown; the law is explicitly finite-range (fitted offset C is negative, so it eventually predicts LongPPL < 1 — authors compute the zero crossing and disown asymptotic interpretation); downstream evidence is mostly figure trends at modest absolute levels with non-monotonic per-subtask movement; "no saturation" ≠ no diminishing returns (their own elasticity ratio shrinks); the HF weights release was mid-upload at check time (several checkpoint repos incomplete/"coming soon").
- Dataset
UltraData-Code (OpenBMB L0–L3 tiered code pretrain: L2 algorithmic + L3 synthesis)
OpenBMB UltraData-Code implements the UltraData L0–L4 tiered code-data pipeline. L0 archives ~192M public GitHub default-branch revisions; L1 filters/normalizes/near-dedups; Hub currently releases L2 (~400B tokens, algorithmically selected natural code) and L3 (~150B tokens, task-oriented synthesis: task/analysis/solution/test) across 11 languages (cpp,cs,go,java,js,php,py,r,rb,rust,sh). L0/L1 not published as Hub configs. Viewer: 348,083,481 rows (L2 266,878,376 × 7 cols; L3 81,205,105 × 10 cols); usedStorage ~1.216 TB / 1132.5 GiB across 1131 siblings. L2 schema: uuid, repo_name, relative_path, content, category, algo_rel_score, quality_score. L3 schema: uuid, content, content_format, raw_content, task, analysis, solution, test, full_content, full_content_format. 10B-token CPT of a 1B model: L2 vs L1 +7.80 EvalPlus / +5.13 MultiPL-E; L2+L3 mix vs L2-only +8.42 / +8.07. Companion L2 Classifier uses Qwen3-Embedding-0.6B.