We study the role of batch size in stochastic conditional gradient methods under a μ-Kurdyka-Łojasiewicz (μ-KL) condition. Focusing on momentum-based stochastic conditional gradient algorithms (e.g., Scion), we derive a new analysis that explicitly captures the interaction between stepsize, batch size, and stochastic noise. Our study reveals a regime-dependent behavior: increasing the batch size initially improves optimization accuracy but, beyond a critical threshold, the benefits saturate and can eventually degrade performance under a fixed token budget. Notably, the theory predicts the magnitude of the optimal stepsize and aligns well with empirical practices observed in large-scale training. Leveraging these insights, we derive principled guidelines for selecting the batch size and stepsize, and propose an adaptive strategy that increases batch size and sequence length during training while preserving convergence guarantees. Experiments on NanoGPT are consistent with the theoretical predictions and illustrate the emergence of the predicted scaling regimes. Overall, our results provide a theoretical framework for understanding batch size scaling in stochastic conditional gradient methods and offer guidance for designing efficient training schedules in large-scale optimization.
Figures & tables
Figure 1: Empirical verification of the validity of Assumption 3.3 during the training of a 124M NanoGPT model. The points with a loss below 5 fit a linear function well, with a slope equal to μ .
Figure 2: Empirical gradient variance and fitted power-law models as functions of batch size B with fixed sequence length S=1024 ( left ) and sequence length S with fixed batch size B=512 ( right ) when training a 124M NanoGPT model on the FineWeb dataset under a fixed token budget T=2.7 B. For the left plot, the estimated scaling exponent is λ≈0.9 and Bshift≈90 , while for the right plot they are λ≈1.1 and Sshift≈35 . The fitted models support the validity of Assumption 3.4 .
Table 1: Summary of BST scaling rules for different optimizers when transferring hyperparameters to larger token budget/model size.
T=1.3 B
Batch Size
β,×10−4
64
128
256
512
1024
2048
4096
1.2
3.4258 ±0.0004
3.3889 ±0.0012
3.3857 ±0.0013
3.4074 ±0.0010
3.4587 ±0.0010
3.5598 ±0.0012
3.7715 ±0.0013
2.4
3.4394 ±0.0007
3.3880 ±0.0043
3.3706 ±0.0019
3.3801 ±0.0016
3.4144 ±0.0004
3.4940 ±0.0009
3.6694 ±0.0021
3.6
3.4554 ±0.0008
3.3945 ±0.0015
3.3717 ±0.0020
3.3765 ±0.0017
3.4065 ±0.0007
3.4799 ±0.0017
3.6472 ±0.0023
4.8
3.4766 ±0.0016
3.4072 ±0.0048
3.3790 ±0.0013
3.3807 ±0.0006
3.4115 ±0.0025
3.4945 ±0.0038
3.6611 ±0.0020
6.0
3.4967 ±0.049
3.4198 ±0.0002
3.3875 ±0.0019
3.3887 ±0.0024
3.4202 ±0.0022
3.5005 ±0.0038
3.7013 ±0.0160
Table 2: Final validation loss when training a 124M NanoGPT model varying the batch size while keeping the validation and train sequence lengths 1024 under the token budget 1.3 B (TPP 10.8). We report the average across 5 runs along with a standard deviation. Bold numbers indicate the best performance in the column. The runs in red indicate the best configuration of batch size, sequence length, and Frank–Wolfe stepsize across all runs for a given token budget.
T=1.3 B
Sequence Length
β,×10−4
256
512
1024
2048
4096
1.2
3.7076 ±0.0084
3.4647 ±0.0240
3.4587 ±0.0010
3.4126 ±0.0014
3.4811 ±0.0025
2.4
3.9622 ±0.0585 ∗
3.4633 ±0.0091
3.3706 ±0.0019
3.3834 ±0.0026
3.4299 ±0.0021
3.6
4.0441 ±0.2055 ∗
3.4796 ±0.0131
3.3717 ±0.0020
3.3792 ±0.0022
3.4216 ±0.0013
4.8
3.9292 ±0.0852 ∗
3.5004 ±0.0063
3.3790 ±0.0013
3.3829 ±0.0020
3.4243 ±0.0029
6.0
3.9901 ±0.0170 ∗
3.5134 ±0.0059
3.3875 ±0.0019
3.3910 ±0.0024
3.4374 ±0.0037
Table 3: Final validation loss when training a 124M NanoGPT model varying the train sequence length while keeping the batch size 256 under the token budget 1.3 B. The validation sequence length is always 1024 . We report the average across 5 runs along with a standard deviation. ∗ indicates that not all runs had a stable decrease in validation loss. Bold numbers indicate the best performance in the column. The runs in red indicate the best configuration of batch size, sequence length, and Frank–Wolfe stepsize across all runs for a given token budget.
Model
L
μ
ρ
How to change β w.r.t. 124M model?
How to change BS w.r.t. 124M model?
124M
7.2
3.1
62.7
1×
1×
1B
10.6
2.9
111.9
↘0.5×\penalty(a)↘0.54×\penalty(b)
↗4×\penalty(a)↗4.37×\penalty(b)
Table 4: Estimated problem-dependent constants, assuming that they change with the number of layers n_layer , embedding dimension n_embd , and batch size batch_size according to ( 15 ). The estimations of the change for β and BS are based on ( 7 ) and ( 8 ).
Figure 3: Comparison of batch size and sequence length scheduling strategies when training a 1B model. The restarting schemes (in yellow and gray ) are compared against fixed schedules. The validation loss is evaluated with a smaller sequence length of 1024 . The values of batch sizes B0,1,2 , sequence lengths S0,1 , and Frank–Wolfe stepsizes β0,1 are given in the legends. The notation (B0,1,2,S0,1,2,β0,1) characterizes which batch size, sequence length, and Frank–Wolfe stepsize are used for the particular setup. The notation (B0,S0,β0)→(B1,2,S1,2,β1) characterizes how parameters of Scion change after restart (e.g., batch size increases from B0 to B1,2 ), respectively. The notation μ P or BST indicates the rule used to select B,S , and β .
Figure 4: Comparison of fixed large batch size strategies when training a 1B model. The validation loss is evaluated with a smaller sequence length 1024 . Scion with a batch size of 1024 suggested by our BST scaling rule achieves the best performance compared to other baselines with batch sizes 2048 and 4096 . The values of batch sizes B1,2,3 , sequence lengths S , and Frank–Wolfe stepsizes β0,1 are given in the legends. The notation (B1,2,3,S,β0,1) characterizes which batch size, sequence length, and Frank–Wolfe stepsize are used for the particular setup, respectively. The notation BST indicates the rule used to select the B,S , and β .
Figure 5: The final performance of the 124M model when varying the Frank–Wolfe stepsize β under different token budgets ( left: 2.7B, center: 5.3B, right: 8.0B). We average the train loss over 3 random seeds and report the moving average in a window of size 500. We observe that the BST scaling rule predicts a good estimate for the optimal β when increasing the token budget. Moreover, the difference in performance between BST and μ P baselines grows with a token budget.
Figure 6: The final performance of the 124M model when varying the momentum α under different token budgets ( left: 1.3B, center left: 2.7B, center right: 5.3B, right: 8.0B). We average the train loss over 3 random seeds and report the moving average in the window of size 500. We observe that rule momentum parameter α transfers under BST scaling.
Figure 7: The final performance of the 1B model when varying the momentum parameter α ( left ) and Frank–Wolfe stepsize β ( right ) under different token budget 10.6 TPP. We report the final train loss, smoothed in the window of size 500 . We observe that the BST scaling rule predicts a good estimate for both optimal α and β when transferring from a smaller 124M model to a larger 1B model.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
124M Model
775M Model
1B Model
Layers
12
36
18
Heads
6
20
16
Embedding Size
768
1280
2048
Weight Tying
Yes
Activation Function
ReLU 2
Vocabulary Size
50304
Appendix
Table B.1 : The model configurations and training details used in Section 6 .
Figure B.1 : Evolution of the empirical gradient variance varying batch size B with fixed sequence length S=1024 ( left ) and sequence length S with fixed batch size B=512 ( right ) when training a 124M NanoGPT model on the FineWeb dataset. We observe that the variance quickly stabilizes after a short initial phase.
n_embd \ n_layer
3
6
9
12
15
18
21
24
27
30
384
–
5.3
6.2
6.5
6.2
18
7.6
–
27
7.84
576
–
6.4
7.7
7.0
7.4
–
7.5
8.5
7.9
8.2
768
6.1
6.5
6.9
7.6
8.3
18
9.9
8.5
8.7
10.0
1152
–
–
–
8.8
9.4
10.8
9.5
–
–
–
1536
3
7.9
9.2
12
9.9
–
–
–
–
–
2304
–
9.9
–
–
–
–
–
–
–
–
Appendix
Table B.2 : Estimated L constant for various model configurations.
n_embd \ n_layer
3
6
9
12
15
18
21
24
27
30
384
–
35.5
41.3
48.2
48.7
–
50.7
–
–
58.0
576
–
42.1
53.8
61.1
62.9
–
64.2
64.6
66.2
68.6
768
31.2
52.6
64.1
67.1
72.4
–
80.2
87.0
86.3
89.2
1152
–
–
–
76.6
81.1
87.3
—
–
–
–
1536
–
67.5
77.4
–
–
–
–
–
–
–
2304
–
–
–
–
–
–
–
–
–
–
Appendix
Table B.3 : Estimated ρ constant for various model configurations.
batch_size
256
512
1024
2048
4096
ρ
48.9
52.6
55.0
56.4
57.9
Appendix
Table B.4 : Estimated ρ constant for a configuration with 6 layers and 768 embedding dimension when varying the batch size.
n_embd \ n_layer
3
6
9
12
15
18
21
24
27
30
384
–
3.4
3.1
3.1
3.0
–
2.9
–
–
2.7
576
–
3.3
3.2
3.0
2.9
–
2.7
2.6
2.5
2.4
768
3.7
3.2
3.0
2.9
2.8
–
2.6
2.5
2.3
2.4
1152
–
–
–
2.7
2.7
2.8
2.6
–
2.5
–
1536
–
3.2
2.9
–
2.9
3.0
–
–
–
–
2304
–
3.6
–
–
–
–
–
–
–
–
Appendix
Table B.5 : Estimated Kurdyka–Łojasiewicz constant μ for various model configurations.
Figure C.1 : Comparison of two strategies: BST scaling rule, where BS∼T2/3 (fixed 1024 batch size with β1=1.8⋅10−4 in light green and restarted version in gray ) and square-root rule ( 16 ), where BS∼T1/2 (fixed 736 batch size with β2=1.27⋅10−4 in orange and restarted version in pink ). The validation and train sequence lengths are fixed to 1024 . ( large batch size strategies when training a 1B model. Scion with a batch size of 1024 (fixed from the beginning or after a restart) achieves slightly better performance compared to the baselines, where the batch size is set according to the square-root rule ( 16 ). The notation (B1,2,S,β0,1) characterizes which batch size, sequence length, and Frank–Wolfe stepsize are used for the particular setup, respectively. The notation (B0,S,β0)→(B1,2,S,β1,2) characterizes how parameters of Scion change after restart (e.g., batch size increases from B0 to B1,2 ), respectively.
Figure C.2 : Final performance of 124M model with B=256,S=1024,β=3.6⋅10−4 and varying the momentum parameter α and device batch size.
King Abdullah University of Science and Technology (KAUST), Thuwal, Saudi Arabia · ETH Zürich, Zürich, Switzerland · Mila, Quebec AI Institute & Université de Montréal, Quebec, Canada +1