Manuscript Offprint

arXiv:2611.02688

Accelerating LLM Pretraining with Zeroth-Order Curvature on Idle Serving Compute

Mingchuan Ma, Dongqi Cai, Daqian Yang, Zhenyan Lu, Chen Chen, Teresa Lv, Yan Gao, Shangguang Wang, Mengwei Xu, Nicholas D. Lane, Yu Huang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

LLM pretraining is increasingly compute-intensive, while substantial inference serving compute remains idle during off-peak periods. However, such serving hardware is difficult to use for conventional first-order training due to its memory, networking and other system requirements. Zeroth-order (ZO) optimization offers a natural interface to this forward-only compute resource, but its gradient estimates break down in pretraining. Unlike fine-tuning, which can confine updates to a small parameter subspace, pretraining must update every parameter, and the alignment of a ZO gradient estimate with the true gradient shrinks as the number of updated parameters grows. We make a different observation: noisy ZO estimates can still provide useful curvature information, even when they are too inaccurate to serve as gradients. Based on this insight, we propose ZO-Curv, which leverages idle forward-only devices to estimate curvature and uses it to adapt and refine the update used during first-order training, thereby accelerating the process. We provide convergence guarantees that characterize the effect of finite-query curvature estimation. Experiments on LLMs from 125M to 1.5B parameters show that ZO-Curv consistently accelerates pretraining. At 770M parameters, ZO-Curv reaches AdamW's 20K-step validation loss in 3.9 hours instead of 7.5 hours, while achieving a lower final loss of 2.70 versus 2.84 under the same step budget. These results show that idle model serving compute can accelerate LLM pretraining when zeroth-order queries are used to estimate curvature rather than gradients directly.

1 INTRODUCTION

LLM pretraining demands substantial compute, with model development requiring repeated runs over architectures, training schedules, data mixtures, and optimizer configurations (Khandelwal et al., 2024; Kaplan et al., 2020; Hoffmann et al., 2022; Zhang et al., 2022; Yang et al., 2021). Meanwhile, rapidly growing model serving compute, from inference clusters to local devices (Cai, 2025), represents a potentially valuable neglected resource for accelerating pretraining.

Serving compute is abundant but difficult to train on. Much of this serving capacity is underutilized. As shown in Figure 1(a), serving clusters are provisioned for peak demand, leaving substantial capacity idle during off-peak periods (Patel et al., 2024; Griggs et al., 2024; Li et al., 2023; Liu et al., 2026a). Across tens of thousands of production Kubernetes clusters, Cast AI reports only 5% average GPU utilization from January 2025 to April 2026 (Cast AI, 2026). However, this idle compute cannot readily join conventional first-order (FO) training. Training must additionally store activations for backpropagation, gradients, and optimizer states, resulting in a 3.5–9× memory overhead

∗^{*} These authors contributed equally to this work.

†^{\dagger} Corresponding author: cdq@nju.edu.cn, hy@pku.edu.cn

Figure

Figure 1: Landscape of idle serving devices and the pathway of harvesting them. (a) Diurnal inference demand leaves peak-provisioned capacity idle. (b) Production clusters exhibit low average GPU utilization. (c) Harvesting idle devices doubles the pretraining runs a cluster completes per day. (d) Comparison of ZO curvature and ZO gradients on pretraining.

over inference (Figure 3(a)). It also requires optimized backward kernels, ultra high-speed networks and runtime support that serving platforms often lack (Kwon et al., 2023; Zhong et al., 2024).

Zeroth-order optimization: promise and challenge. Zeroth-order (ZO) optimization needs only forward passes, estimating gradients from loss differences under random perturbations (Spall, 1992; Nesterov & Spokoiny, 2017). This makes it a natural fit for forward-only hardware, and it has recently proven practical for fine-tuning LLMs at inference-level memory cost (Malladi et al., 2023; Zhang et al., 2024). Pretraining is harder: the variance of random-direction ZO estimators grows with the parameter dimension d (Nesterov & Spokoiny, 2017; Duchi et al., 2015; Shamir, 2017). At the hundreds of millions to billions of parameters of modern LLMs, this leaves low-query estimates extremely noisy. MeZO-style pretraining of GPT-2 355M confirms the effect, stalling near a validation loss of 8.5 while AdamW drops below 3.0 after the same number of training steps. Mixing ZO estimates into the FO gradient inherits the same noise and underperforms AdamW (Figure 1(d)).

Our approach: ZO-Curv. ZO-Curv uses ZO to estimate curvature rather than gradients. Unlike a gradient, curvature need not identify a precise descent direction, which noisy ZO queries cannot provide at pretraining scale; it only sets a coordinate-wise scale for the update, and even a coarse diagonal estimate can tell how aggressively each coordinate should move. ZO-Curv therefore keeps exact FO gradient computation on the training node and outsources only curvature estimation to idle serving devices, which evaluate perturbed losses with forward passes. The training node aggregates these estimates into a diagonal preconditioner for its FO update.

Our contributions are as follows.

  • We show that ZO estimates, while too noisy to provide reliable descent directions for LLM pretraining, remain effective for estimating curvature to precondition FO gradients.

  • We propose ZO-Curv, a hybrid optimization framework that keeps exact FO gradient computation on the training node while offloading forward-only curvature estimation to idle serving devices. We further establish convergence guarantees for ZO-Curv.

  • We demonstrate consistent gains across models from 125M to 1.5B parameters. ZO-Curv reaches AdamW's target loss up to 2.2×2.2\times faster, with larger models benefiting more from additional serving compute. On the downstream task LAMBADA, ZO-Curv improves accuracy by 26.9% over AdamW.

References (72)