Manuscript Offprint

arXiv:2609.37899

Scaling Zero-Order Pretraining through Model Sharding

Francois Chaubard, Mykel J. Kochenderfer, Chris Ré

ABSTRACT

Zero-order optimization (ZO) enables training without backpropagation, making it relevant to forward-only hardware and non-differentiable loss, but its gradient variance grows with perturbed dimension. This inhibits large model training. Sharded Optimization Mixture of Assemblies (SOMA) is an architecture designed with ZO in mind. SOMA is an ensemble of LSTM experts that train independently on N clusters of data using simultaneous perturbation stochastic approximation (SPSA). Its separable loss function removes cross-expert perturbation noise at the cost of jointly learned representations across domains. Experts train independently, without exchanging gradients, activations or optimizer state. We use 80,000 estimated RTX 5090 GPU-hours to study SOMA compared to baseline methods. Modest sharding improves training compute efficiency over all tested monolithic ZO controls. We study a 8.44M model at 150 aggregate GPU-hour budget and show SOMA N = 2 with 64 perturbations reaches 1.76 test nats/byte, versus 2.00–2.11 for monolithic SPSA at 64, 256 or 1,024 perturbations and 2.21 for EGGROLL. On WikiText-103, these frozen checkpoints reach 2.07, 2.25–2.36 and 2.49, respectively. On a fixed separable objective with equal-size blocks, we prove that independent losses reduce relative gradient variance to approximately 1/N of a shared-loss estimator's. Holding starting weights, data, perturbations and compute fixed, independent rather than summed losses lower SOMA N = 4 test loss by 0.035 nats/byte after 1,000 updates across three seeds. Finally, we show larger ensembles offer a separate inference benefit. At similar model size with top-k routing (k = 4), SOMA N = 256 achieves 2.36M tokens/s versus 257k for SOMA N = 8 (9.19×, including routing), at lower test loss (1.68 versus 1.71), albeit with SOMA N = 256 using 59.9× as much aggregate training compute. We release all training and evaluation code and checkpoints for reproduction.

Model size ≃\simeq 8.44M, SOMA npert=B=64n_{pert} = B = 64, SPSA B = 64

SOMA N = 2 (2 GPUs)

Monolithic SPSA npert=64n_{pert} = 64 (4 GPUs)

SOMA N = 8 (8 GPUs)

Monolithic SPSA npert=256n_{pert} = 256 (16 GPUs)

SOMA N = 256 (256 GPUs)

Monolithic SPSA npert=1024n_{pert} = 1024 (32 GPUs)

Monolithic EGGROLL (8 GPUs)

Figure

Aggregate GPU-hours

Figure 1: Modest sharding improves training compute efficiency. Near 150 aggregate GPU-hours, SOMA N = 2 reaches 1.76 test nats/byte, versus 2.00–2.11 for monolithic SPSA and 2.21 for EGGROLL. Appendix I gives checkpoint and timing details.

1 INTRODUCTION

Zero-order optimization (ZO) is useful when exact gradients are unavailable or costly, including forward-only hardware and non-differentiable loss. However, ZO methods struggle to improve loss as model size grows because, at a fixed number of perturbations per global step, relative gradient variance increases linearly with the number of perturbed parameters.

Simultaneous perturbation stochastic approximation (SPSA) (Spall, 1992) estimates updates by averaging scalar loss differences along npertn_{pert} independent perturbation directions. With M jointly perturbed parameters, leading relative gradient variance scales as M/npertM/n_{pert} (Nesterov & Spokoiny, 2017). Controlling that error requires a compute budget of npert∝Mn_{pert} \propto M. If forward compute grows linearly with parameters at fixed batch size and context length, compute per global step grows as O(M2)O(M^{2}) (Section 5). Increasing the perturbation count improves each estimate but leaves fewer updates within a fixed compute budget. Reducing model size makes estimation easier but limits the parameters available for prediction.

Modern techniques, such as EGGROLL (Sarkar et al., 2025), improve the efficiency of perturbation evaluations through low-rank structure. We investigate an orthogonal technique, changing the architecture so that total model size can grow without enlarging each independently estimated parameter block and gradient variance.

Following Cluster–Branch–Train–Merge (CBTM) (Gururangan et al., 2023), Sharded Optimization Mixture of Assemblies (SOMA) trains domain-specialized recurrent experts on separate corpus clusters (Figures 2 and 3). Each expert receives its own loss, making the training objective separable and removing noise from perturbations to other experts. Gradient estimation depends on expert size rather than full ensemble size, but experts give up joint learning of recurrent representations across domains. This changes both the architecture and the optimization problem. Domain specialization gives each expert a distinct learning task, independent losses isolate its update signal, and routing combines selected expert predictions at inference. The challenge is whether these independently learned predictors compensate for the shared representations and joint adaptation that decomposition removes.

We compare learned models at approximately fixed total size and aggregate compute, then isolate why, with independent versus summed-loss continuations at fixed architecture and gradient-variance measurements. Six ablations examine data partitioning, initialization, head updates, independent losses, perturbation and batch allocation, and active expert count. Finally, we study SOMA's inference benefits in exchange for larger training budgets. Our contributions are:

• We introduce SOMA for independent ZO expert training and demonstrate improved compute efficiency over the tested monolithic controls. Near 8.44M parameters and 150 aggregate GPU-hours, SOMA N = 2 reaches 1.76 test nats/byte, versus 2.00–2.11 for monolithic SPSA at 64, 256 or 1,024 perturbations and 2.21 for EGGROLL (Figure 1). The same frozen checkpoints score 2.07, 2.25–2.36 and 2.49 on WikiText-103 (Table 9). An early comparison with equal compute and tuning budgets favors SOMA N = 2 over monolithic SPSA in all three optimization seeds (Table 7).

• We explain and test the independent loss mechanism. Controlling for the same expert sizes, and number of experts, we prove that independent losses reduce relative gradient variance to approximately 1/N of a shared-loss estimator's. Independent losses give 4.02×4.02 \times lower error compared to summed loss on SOMA N = 4 (Figure 11). This translates to lower test loss by 0.035 nats/byte after 1,000 updates across three seeds (Figure 4). We compare the marginal benefits of sharding versus investing in more npertn_{pert} or batch size (B) and show sharding reduces relative gradient error more than increasing npertn_{pert} or B at comparable aggregate GPU-seconds per global step (Figure 5), with 118×118 \times lower measured relative centered variance for SOMA N = 256 than the N = 1 control (Figure 10).

• Finally, we characterize the separate inference benefit of heavier sharding (Figure 6), measuring how loss changes with the number of active experts at fixed expert width (Figure 16). At approximately equal total model size with top-k routing (k = 4), SOMA N = 256 achieves 2.36M tokens/s versus 257k for SOMA N = 8 (9.19×, including routing), with test losses of 1.68 and 1.71, albeit with SOMA N = 256 using 59.9× as much aggregate training compute (Tables 12 and 13).

References (100)

Couldn't load all references. Reload the page to try again.