                                        Scaling Inference-Efficient Language Models



3. Experiments                                                      ting problems, where the goal is to find the parameter

                                                                    vector β of a model f (x, β) that minimizes the sum of

We next discuss the experiment setup we use for model               squared deviations.

training and evaluation (§3.1). Following that, in §3.2, we                       Pm Formally, the problem

                                                                                                        2

                                                                                                                 can be expressed

                                                                    as arg minβ i=1 [yi − f (xi , β)] , where (xi , yi ) are data

demonstrate how to fit scaling laws using our experimental          pairs. Following observations from Chinchilla scaling

results.                                                            law (Hoffmann et al., 2022) and another recent work (Gadre

                                                                    et al., 2024), we set α, β, and γ equal to simplify the fitting

3.1. Experimental Setup                                             procedure. To fit and evaluate the scaling law, we train 63

Training Setup. For all experiments, we train transformer-          models using a range of model sizes, shapes, and amounts

based decoder-only language models (Vaswani, 2017). Fol-            of training tokens. The size of our model ranges from 80M

lowing (Gururangan et al., 2023; Gadre et al., 2024), the           to 339M and the number of tokens used for training ranges

model’s architecture is similar to GPT-2 (Radford et al.,           from 1.6B to 12.8B. Detailed model configurations can be

2019) and LLaMA (Touvron et al., 2023a), with GPT-                  found in Table 4 in Appendix A.

NeoX (Black et al., 2022) employed as the tokenizer. We

train models with a maximum of 1.5 billion parameters for           4. Results

up to 30 billion tokens, following the compute-optimal setup

in (Hoffmann et al., 2022). The models are trained on uni-          In this section, we first study the predictive power of our

formly sampled subsets of DCLM-Baseline (Li et al., 2024)           inference-efficient scaling laws in §4.1. Then, in §4.2, we

with one epoch, ensuring no repetition in data (other than          release an inference-efficient model that maintains accuracy

possible data repetition in the dataset itself). More details       on downstream tasks compared with open-sourced models

are included in Appendix A.                                         by using the methodology outlined in Figure 6. We also

                                                                    show that our method significantly outperforms Chinchilla

Evaluation Setup. We use HuggingFace (Wolf, 2019)                   in predicting the best model configurations. Finally, we

to measure the inference efficiency of models over a sin-           perform ablation studies on obtaining robust scaling laws

gle NVIDIA Ampere 40GB A100 GPU. By default, we                     and show that our inference-efficient scaling law is more

set the number of input and output tokens to be 128 and             robust than Chinchilla in various scenarios in §4.3.

256, respectively, aligning with the distribution outlined in

ShareGPT (Kwon et al., 2023).                                       Table 1. Data Used to Fit Scaling Laws: In this table, we show

We use LLM-foundry (llm, 2024) along with a zero-shot               the number of parameters and tokens used in model training to

evaluation approach to evaluate model performance on                fit the scaling laws in Figure 8-10. ✓ indicates we use all model

                                                                    variants with the given size and ✗ means we do not use any model

downstream tasks. We evaluate the downstream task ac-

                                                                    variants with the given size. ❖ indicates that we randomly sample

curacy of models derived from the methodology outlined in

                                                                    one model variant from the candidate set. The details of model

§2.3 using the following datasets: ARC-Easy (Clark et al.,          variants are included in Appendix A.

2018), ARC-Challenge (Clark et al., 2018), BoolQ (Clark

et al., 2019), COPA (Roemmele et al., 2011), Hel-                         N         D       Figure 8     Figure 9    Figure 10

laSwag (Zellers et al., 2019), LAMBADA (Paperno et al.,                  80M       1.6B         ✓           ✓            ❖

2016), PIQA (Bisk et al., 2020), WinoGrande (Sakaguchi                  116M      2.3B          ✓           ✓            ❖

et al., 2021), MMLU (Hendrycks et al., 2020), Jeop-                     164M      3.2B          ✓           ✓            ❖

ardy (Jeo, 2022), and Winograd (Levesque et al., 2012).                 237M      4.7B          ✓           ✓            ❖

Furthermore, to compare the predicted loss against the ac-              313M      6.2B          ✓           ✓            ❖

tual loss, we measure relative prediction error: |ψ − ψ̂|/ψ,             80M      12.8B         ✓           ✗            ❖

                                Pn

mean squared error (MSE): n1 i=1 (ψi − ψ̂i )2 , and R2 =

    Pn                    n

1 − i=1 (ψi − ψ̂i )2 / i=1 (ψi − ψ̄)2 , where ψ represents

                        P



        Pnloss, ψ̂ the predicted loss from scaling laws, and

the actual                                                          4.1. Prediction acccuracy

ψ̄ = n1 i=1 ψi . We also apply Spearman’s rank correla-

tion coefficient (Spearman, 1961) to evaluate how well the          As shown in §3.2, we obtain the actual losses of various

predicted rankings correspond to the actual rankings.               models by training multiple small models with different

                                                                    model configurations to establish the scaling law. We set

                                                                    N ∈ {80, 116, 164, 237, 313}M and D = 20N to train

3.2. Fitting Scaling Laws

                                                                    small models and collect the data to fit the learnable param-

Following (Gadre et al., 2024), we use the Levenberg-               eters in Eq. (2) and Eq. (4). Furthermore, to enhance the

Marquardt algorithm to fit Eq. (4).       The Leven-                generality of the scaling law, we train 80M models with

berg–Marquardt algorithm solves least-squares curve fit-            D = 160N tokens, thereby collecting data from an over-



                                                                6

