                                                   Scaling Inference-Efficient Language Models







                                                                                                         Downstream Tasks

                                        Predicted             Profiled

                        1         3       Loss                Latency                       1







                        2         4                                                         3                                                          3



                                                                                    Select Models

              A Candidate Models       B Rank Loss and Latency                  C                        D       Evaluate Models            E   Release Model

                                                                                     for Training





Figure 6. An Overview of Methodology: (A) The model training team first selects several candidate models with various model sizes

and configurations; (B) Measure the inference latency using open-source inference systems and predict model loss with fitted scaling

laws; (C) Select top-k candidate models for training based on inference latency and loss; (D) Evaluate the models over downstream tasks

after training; (E) Release the best model based on inference efficiency and performance over downstream tasks.





              0.8                                                 0.7                                                        0.5

                                            80M                                                       80M                                                      80M

                                            116M                                                      116M                                                     116M

                                            164M                                                      164M                                                     164M

              0.7                                                 0.6                                                        0.4

   Accuracy









                                                       Accuracy









                                                                                                                  Accuracy

                                            237M                                                      237M                                                     237M

                                            313M                                                      313M                                                     313M

              0.6                                                 0.5                                                        0.3



              0.5                                                 0.4                                                        0.2

                    2       3     4     5          6                    2   3       4       5   6    7       8                     2    3        4         5          6

                                Loss                                                    Loss                                                    Loss

                            (a) PIQA                                            (b) BoolQ                                              (c) HellaSwag



Figure 7. Accuracy vs. Loss: (Left) We illustrate the correlation between accuracy and model loss on PIQA (Bisk et al., 2020). (Center)

We present the connection between accuracy and model loss on BoolQ (Clark et al., 2019). (Right) We show the connection between

accuracy and model loss on HellaSwag (Zellers et al., 2019). These three patterns shown in the plots demonstrate the difficulty in robustly

predicting individual downstream task accuracies from scaling laws.





We plot the loss values against the aspect ratio in Figure 5.                               loss to errors in downstream tasks. Inherently, predicting

From the figure, we can see that the most suitable model                                    the error in downstream tasks becomes challenging when

shape adjustment is the inclusion of the term (1 + εRγ ) to                                 model losses are similar, due to noise and inaccuracies in

the Chinchilla scaling law (Hoffmann et al., 2022). There-                                  scaling laws. We observe this in Figure 7. To tackle this

fore, we derive the following inference-efficient scaling law                               challenge, we develop a new method for training inference-

formulation:                                                                                efficient models, as shown in Figure 6. Our key idea is

                                                                                            that inference latency measurement has negligible overhead,

  L(N, D, R) = (E + AN −α + BD−β ) · (1 + εRγ ) (4)                                         and scaling laws can help us estimate the loss of scaled-up

where N is the number of parameters, D is the number of                                     models. Thus, we propose identifying top-k candidate mod-

training tokens, and R = dmodel /nlayers is the aspect ratio.                               els using inference latency and loss data, where the user

Moreover, A, B, E, α, β, γ, ε are learned parameters. In                                    can choose k. After training, we evaluate these models on

Figure 5, we plot the predicted values from the scaling law                                 downstream tasks and release the best-performing model to

against the observed values from training. More details of                                  the public, taking into account both inference latency and

the experimental setup and fitting procedure can be found                                   performance on downstream tasks. Our method (Figure 6)

in §3.                                                                                      can also be applied to different architectural optimizations,

                                                                                            such as MLA (Liu et al., 2024a), to quantify the accuracy-

2.3. Methodology                                                                            efficiency tradeoff.



Scaling laws were first developed to predict the loss of

language models. However, LLMs are evaluated on the per-

formance of downstream tasks. A recent study (Gadre et al.,

2024) attempts to establish scaling laws that link evaluation



                                                                                        5

