Manuscript Offprint
arXiv:2610.22263Baselines and Score Centering in Policy Gradient Estimation
Abstract
Reinforcement learning has become a widely used approach to post-training large language models. In a typical implementation, learning is off-policy: The policy generating the responses differs from the policy being trained because of training-inference mismatch or policy staleness in asynchronous training. This discrepancy is commonly addressed by importance sampling, whose ratio is usually regularized in practice through truncation, masking, or clipping. Under regularized importance sampling, the importance-weighted policy gradient is no longer invariant to constant shifts in the reward. This invariance is recovered by using the covariance between the reward and the importance-weighted score as the estimand, which coincides with the policy gradient when the ratio is not regularized. This note develops this covariance perspective for both sequence-level and token-level importance sampling. The covariance perspective reveals the roles of the group-mean baseline and score centering in policy gradient estimation. Both perform centering in covariance estimation, but they differ in the mean being subtracted: The group-mean baseline uses a sample mean, whereas score centering uses a population mean. The two lead to distinct unbiased covariance estimators with different variances. Whether both forms of centering should be used simultaneously depends on whether importance sampling is applied at the sequence level or at the token level. With sequence-level importance sampling, score centering adds no benefit once the group-mean baseline is used; with token-level importance sampling, using the group-mean baseline without score centering generally introduces bias when the importance ratio is regularized.
1 Background
Email: hanshuo@uic.edu
Email: ziqing@perplexity.ai conditional distribution of a single token given the prompt and the history when it is clear from the context. Thus, for any response , it holds that
The quality of for a given is measured by a reward function as . Let be the distribution of prompts. The goal is to find that maximizes
Throughout, we assume that generation terminates with probability one under every policy under consideration, so that almost surely and the expectation in (1) is well defined. In practice, this assumption is enforced by imposing a maximum response length.
1.2 Token generation as a Markov decision process
The token generation process can be modeled as an undiscounted indefinite-horizon Markov decision process (MDP). Let the state space S consist of sequences of tokens whose prefix is a valid prompt, and the action space A be the space of tokens. The idea is to use the state to store the prompt and all the tokens generated thus far, and to use the action to represent the next generated token:
The initial state is chosen as . At time , the action is determined by the policy as . The transition dynamics are deterministic: is the concatenation of and unless , the end-of-sequence token. If , the next state becomes an absorbing state associated with no reward. The original reward function induces a token-level reward . During token generation, if , then , where denotes the completed response including the terminal EOS token, so that ; otherwise . In other words, the reward is sparse and assigned only at the last decoding step. Under the MDP framework, the training objective in (1) can be equivalently rewritten as
Define the state value, state-action value, and advantage functions of a policy by
In what follows, we assume that the policy is parametrized by for some set , and we denote the policy by to highlight the parameter dependence. The training objective in (1) thus becomes a function of , defined by
2 Importance Sampling in Policy Optimization
The training objective in (2) involves an expectation over the prompt distribution D and the distribution over possible responses. Because D is unknown and the space of responses is prohibitively large to enumerate, it is intractable to compute the expectation exactly. Instead, the expectation is typically replaced by a sample-average approximation using sampled token sequences. A naive application of sample-average approximation to (2) requires these samples to be drawn from .
However, modern post-training systems for reinforcement learning typically use separate engines with different design objectives. A training engine, built on PyTorch FSDP (Zhao et al., 2023) or Megatron-LM (Shoeybi et al., 2019), supports efficient gradient computation and stable updates to , whereas an inference engine, e.g., vLLM (Kwon et al., 2023) and SGLang (Zheng et al., 2024), prioritizes generation throughput. Their distinct numerical implementations can yield different token probabilities even with identical policy parameters. This discrepancy is referred to as training-inference mismatch (Liu et al., 2025a). For a given parameter , let and denote the policies implemented by the training and inference engines, respectively.
When samples are drawn from a different policy, importance sampling is a common technique for obtaining an unbiased estimate. It works by weighting the samples using an importance sampling ratio. Common formulations use two types of importance sampling ratios. One is sequence-level importance sampling, which uses
The other is token-level importance sampling, which uses the individual ratios
rather than their product as a whole. As shown below, the two types of importance sampling ratios lead to different estimators, which are unbiased for different quantities.
While sampling a response from must be done sequentially, scoring when is given can be parallelized. Only one forward pass is required to compute all the quantities , , ..., and this is typically much faster than sampling. Both formulations require the inference engine to return the token probabilities it used at decoding time.
2.1 Methods using sequence-level importance sampling
2.1.1 REINFORCE
The REINFORCE algorithm (Williams, 1992) updates by performing gradient ascent on the training objective in (2). It is well known (see, e.g., Sutton and Barto, 2018) that the gradient is given by
To use samples drawn from the inference policy , we rewrite (3) as
(4) assuming that whenever . For a given prompt , draw samples . From the samples, can be approximated by a sample-average approximation as
It can be shown that the right side of (5) is an unbiased estimator of .
Remark 1. Strictly speaking, for a fixed prompt , the estimator in (5) is only unbiased for the inner expectation over in (4). It is unbiased for when the prompt is drawn from . This is what happens in practice, where a batch of prompts is sampled and the per-prompt estimators are averaged. For brevity, we will assume that is drawn from in all subsequent discussions unless mentioned otherwise.
2.1.2 Policy gradient with a baseline
To reduce the variance of sample-average approximation, one important technique is introducing a baseline (Greensmith et al., 2004) to the reward in . Let be a baseline, which may be random and may depend on the prompt . It turns out that remains unchanged after is introduced to , i.e.,
provided that b is conditionally independent of y given x. This can be shown by recalling the fact
If b and y are conditionally independent given x, the extra term contributed by the baseline becomes
The use of a baseline can be extended to multiple samples. Let be drawn independently and let be baselines. If is conditionally independent of given for , it can be shown that the sample average
is an unbiased estimator of . Note that is allowed to depend on the other samples because those are independent of given .
One popular choice of the baseline, as in the REINFORCE leave-one-out (RLOO) algorithm (Kool et al., 2019), is setting
which is the empirical mean reward of the group with the ith sample removed. Define
Using the fact
one can rewrite (6) as
Remark 2. Equation (9) shows that the leave-one-out baseline in (7) is closely related to the group-mean baseline, defined by for . The group-mean baseline is used by the Dr. GRPO algorithm (Liu et al., 2025b), a variant of the group relative policy optimization algorithm (Shao et al., 2024), and leads to the following gradient estimator:
Because contains , it is not conditionally independent of . However, the resulting gradient estimator only differs from the RLOO gradient estimator by a deterministic multiplicative factor , which is absorbed into the learning rate in practice. In other words, Dr. GRPO is practically equivalent to the RLOO algorithm.
2.2 Methods using token-level importance sampling
2.2.1 Trust-region policy optimization and proximal policy optimization
Methods that use token-level importance sampling consider a surrogate objective function (Kakade and Langford, 2002)
where
is the (unnormalized) state occupancy measure induced by and the prompt distribution . Because is unnormalized, the slightly abused notation denotes integration against this measure. We briefly recall why is a useful surrogate function to optimize by examining the behavior of the training objective in the policy space; namely, we will examine how changes with the policy rather than itself. Define
which is the value of a given policy. The value of a parametrized policy recovers the training objective: . Denote by the linear approximation of at :
where denotes the derivative of at . It can be shown that
One can see from (11) that is affine in . Informally, can be viewed as a linear approximation of in the policy space, up to an additive constant.
The relationship between and reveals why is a useful surrogate objective to optimize. Because and differ only by a constant independent of , maximizing is equivalent to maximizing . If improves over in , i.e., , this implies , indicating that is an ascent direction in the policy space. When is sufficiently close to , it follows that , i.e., improves over in the true objective. In the constrained version of trust-region policy optimization (TRPO) (Schulman et al., 2015), this condition is enforced by a trust-region constraint that restricts the divergence .
To optimize using a first-order method, one can obtain as
In comparison, it can be shown that can be rewritten as
under mild conditions. This shows that generally , i.e., is not a linear approximation of in the parameter space. To use samples from , we rewrite (12) as
The importance sampling ratio corrects the action distribution at each visited state, but the states are still distributed according to . Using the fact and , we can further write
where the sum terminates at because the absorbing state reached after EOS has no contribution. For a given prompt , sample , with which can be approximated as
The surrogate objective is also used in the proximal policy optimization (PPO) algorithm (Schulman et al., 2017). Compared with TRPO, PPO replaces the trust-region constraint by a heuristic that involves clipping the (token-level) importance sampling ratio in to a bounded interval:
for some . The heuristic aims to discourage the updated policy from leaving the trust region by limiting the amount of improvement made by the updated policy.
2.2.2 Token-level GRPO
In language model post-training, the value of is often difficult to evaluate or estimate, as it would require learning a value function over prefixes. To avoid evaluating , one can use the fact
to use in place of (see, e.g., Schulman et al. (2016)). A baseline can be incorporated similarly to what has been done in Section 2.1.2. For any baseline that is conditionally independent of given , it can be shown that
Suppose samples are available. Define as in (7) for , and as in (8). It can be shown that
is an unbiased estimator of .
Remark 3. The estimator in (15) is the token-level counterpart of (10). In practice, a clipping heuristic is sometimes applied to the token-level importance ratio in (15) to further reduce variance at the price of introducing bias, so that the gradient estimator becomes
The bias of the estimator will be discussed in Section 3.5.
2.3 Comparison between sequence-level and token-level importance sampling
The results in Sections 2.1 and 2.2 show that the two importance sampling formulations yield unbiased gradient estimators for different objective functions: the sequence-level estimators target , whereas the token-level estimators target . This difference, together with the different numerical behavior of importance sampling ratios, accounts for the trade-offs discussed below.
The importance sampling ratio accounts for the main drawback of sequence-level importance sampling. Because is a product of token-level ratios, even when the per-token discrepancy in the ratios is small, these discrepancies accumulate along the sequence. For long agentic traces, this accumulation can cause sequence-level ratios to span several orders of magnitude. As a result, computing the sequence-level ratio may lead to numerical instability. More importantly, the variance of the corresponding gradient estimator can become enormous. This is because the sample average may be dominated by a small number of samples with large importance sampling ratios, thus reducing the effective sample size of a batch (Kong, 1992; Liu, 2001).
In comparison, the token-level ratios are better behaved numerically. This is, however, at the cost that the gradient estimator only corresponds to a surrogate at the current inference policy. At step of policy optimization, the policy improvement guarantee only ensures that the updated training policy is better than the current inference policy , i.e., . Due to the training–inference mismatch, generally differs from the current training policy and can be worse, i.e., . Consequently, it may occur that , thus defeating the purpose of the policy update. One apparent remedy is to reduce the mismatch between and and consequently by choosing how the two engines are implemented and how the parameters are synchronized.
3 Policy Gradient as a Covariance
This section shows that both the policy gradient and the approximate policy gradient can be viewed as a covariance. This interpretation of the policy gradient yields two main results. First, when the importance sampling ratio is regularized, e.g., by truncation, masking, or clipping (as in Remark 3), the covariance form recovers invariance to constant shifts in the reward, a key property enjoyed by standard importance sampling. Second, the covariance form admits two distinct unbiased estimators, which correspond to the group-relative methods, including RLOO and Dr. GRPO, in Section 2 and score centering (Marek and Ryabinin, 2026), respectively. Comparing the variances of these two estimators provides a guideline for choosing between the two algorithms for estimating the policy gradient. Throughout this section, the prompt x is fixed. As discussed in Remark 1, the per-prompt results extend to the full objective by drawing x from D.
3.1 Unbiased covariance estimation
To prepare for subsequent discussions on sample-average approximation of the policy gradient, this subsection briefly reviews the estimation of a covariance from samples. The results are applied in Sections 3.3 and 3.5.
Let be independent copies of a pair with and , matching the setting in which is a scalar reward and a score. Write , and
The estimand is the covariance vector . Define the moments
In particular, we have , and . For an estimator of , we write , the sum of the variances of individual coordinates, which for an unbiased estimator is its mean squared error.
Definition 4 (Sample-mean estimators). For , define
The following shows that these three are the same unbiased estimator of .
Proposition 5 (Equivalence among sample-mean estimators). for every realization of the sample. More generally, for any constants and ,
and .
Proof. For the first equality in (17),
and . The second equality is symmetric, using . Setting and recovers and , respectively. For unbiasedness, expand and use together with . The expectation of the sum is thus .
Proposition 5 reveals the following two facts. First, it suffices to center either X or Y, and performing both has no further effect. Second, knowledge of the population mean is of no use when is used for centering because setting in (17) leads to the same estimator.
In comparison, when is not used, replacing in by yields a different estimator as defined below.
Definition 6 (Known-mean estimator). Suppose is known. For , define
The sample-mean estimator and the known-mean estimator differ in how many samples they require. The known-mean estimator is defined at , whereas the sample-mean estimator requires . Similarly to what is done in (17), we consider a generalization of by incorporating a centering constant for . The constant is referred to as a baseline since it plays the role of a baseline reward in policy gradient.
Definition 7 (Known-mean estimator with a baseline). For and any constant , define
It follows immediately that . The following shows that this estimator is unbiased for any b.
Proposition 8. for every and every constant .
Proof. Writing and using ,
Although both and are unbiased, their variances are different.
Proposition 9 (Variances of the estimators). Define the residual mean and
(i) For every ,
(ii) For every ,
Proof. For (19), the summands of (18) are independent and identically distributed. This implies
Expanding and using (16), we obtain . For (20), notice that is a sum over coordinates, and the th entry of is the ordinary scalar sample covariance of , whose exact variance is with ; summing over gives (20).
The baseline that minimizes can be obtained by minimizing in (19). The minimum of is attained at
with . Thus, the minimum-variance baseline is given by
Proposition 9 shows that the choice of determines which of the two unbiased estimators has the smaller variance. When the baseline is set to the population mean of , i.e., or equivalently , the variance of the known-mean estimator is smaller by , which is of order . When the minimum-variance baseline is used, the variance is further reduced by , which is of order . More generally, has strictly smaller variance than if and only if
Conversely, when is far from , the variance of can be much larger than that of , and the gap grows without bound as grows.
3.2 The sequence-level estimand
Denote by
the score. Recall that . This implies that the policy gradient in (3) can be viewed as a covariance:
Denote the (sequence-level) importance sampling ratio by
As discussed in Section 2.3, is a product of token-level ratios, and the resulting sample average can be dominated by a few rollouts. The standard method is to regularize the importance sampling ratio by replacing with for some satisfying . Common choices are
(standard importance sampling),
(truncated importance sampling),
(masked importance sampling),
(ratio clipping).
The property that ensures that no regularization is imposed when the two policies agree. It is convenient to absorb the weight into the score by defining the weighted score
When importance sampling is used with regularization, the quantity in (4) can be written as . We take the covariance
as the sequence-level estimand instead of for the following reasons. First, (22) reduces to if either is the identity mapping id (i.e., when standard importance sampling is used) or : In the former case,
In the latter case, , and thus . Second, is unchanged if the reward is shifted by a constant, , whereas is not.
3.3 Sequence-level covariance estimation
Since the sequence-level estimand in (22) is a covariance, the results of Section 3.1 apply directly. Fix a prompt , draw independently, and set and with . The following proposition shows that the sample-mean estimator of yields the RLOO algorithm and, up to a multiplicative factor, the Dr. GRPO algorithm.
Proposition 10 (RLOO and Dr. GRPO are the sample-mean estimator). Let be the leave-one-out baseline of (7). Then
where is the group mean (8).
Proof. By (9), for each . Thus the first sum in (23) becomes , which is by Proposition 5. The second identity is immediate from the same expression.
With standard importance sampling, i.e., , we have ; hence score centering is implicit. When , we have in general, and one may ask whether score centering provides any benefit. Exact computation of is intractable since it involves a sum over all possible responses. More importantly, the following proposition shows that score centering with is unnecessary when the sample-mean reward is used as the baseline, even when .
Proposition 11 (Sequence-level centering with the group-mean baseline). With the group-mean baseline,
Proof. The result immediately follows from Proposition 5 by setting .
Since both RLOO and Dr. GRPO can be viewed as the sample-mean estimator up to a multiplicative factor, Proposition 11 implies that score centering is unnecessary for both algorithms.
Comparison with the variance-optimal baseline Suppose that standard importance sampling is used. Then . From (21), the optimal baseline is given by . This is the variance-optimal reward baseline of Greensmith et al. (2004, Theorem 11). The mean reward, which is the baseline used by the group-relative methods, is optimal only when , as also shown by Greensmith et al. (2004, Corollary 12). In language model post-training, is not negligible, since grows with response length, and length is empirically correlated with reward. This indicates that using the mean reward as the baseline may be far from optimal.
3.4 The token-level estimand
At the token level, the approximate policy gradient is computed, and the importance sampling ratio is applied per token position as in (13) and (14). Write for the prefix,
and let
be the mean weighted score at a given prefix , where denotes the token vocabulary, i.e., the action space in Section 1.2. Because the expectation in (25) is a finite sum over , computing is much more tractable than computing the mean score at the sequence level in Section 3.3.
As in the sequence-level case, for any when . We assume that the sampling policy terminates in finite expected time and that the weighted score has a bounded conditional mean:
To incorporate regularized importance sampling, we generalize in (13) and define the token-level estimand
Write for the state-action value and for the state value under . The following lemma shows that can be expressed as a sum of conditional covariances.
Lemma 12. The token-level estimand
Proof. For brevity, we assume that all the expectations and covariances are taken under and drop from all the subscripts. Using the facts and , it can be seen that
(28)
Thus,
The interchange of the summation and the expectation is permitted under the conditions in (26). The third equality holds because the event is a function of , as it is determined by whether EOS occurs among .
The form in (27) does not depend on the score being centered since a covariance only requires one of its arguments to be centered, as achieved by in (28). Alternatively, one may center the score by expressing
As will be shown in Proposition 14, score centering leads to an equivalent and more useful form. Define
Lemma 13.
Proof. Let . Both the prefix and the event are functions of . By (25),
This shows that is a martingale difference sequence. Therefore, the partial sums of form a martingale, and is a stopping time. The conditions in (26) bound uniformly, so optional stopping applies and .
The following proposition shows that can be expressed as a single covariance.
Proposition 14. The token-level estimand .
Proof. Expanding the conditional covariance in (27) with score centering in (29) yields
The interchange of the summation and the expectation is permitted under the conditions in (26). The fourth equality uses the fact that both and the event are functions of .
3.5 Token-level covariance estimation
Since the token-level estimand in Proposition 14 is a single covariance, the results of Section 3.1 immediately apply with , , and . In addition, Lemma 13 implies . Suppose that are drawn independently. The corresponding pairs , , are independent and identically distributed. The estimator we mainly consider is the known-mean estimator in (18) with , namely
which is unbiased for every constant b and every by Proposition 8.
In comparison, the sample-mean estimator analogous to in Definition 4 is given by
It also requires score centering because it involves . Recall that, by Proposition 11, score centering for the sample-mean estimator in (23) is optional at the sequence level regardless of f, as long as the group-mean baseline is used. In contrast, the following proposition shows that score centering is no longer optional at the token level even when ; removing score centering would generally yield a different estimator.
Proposition 15 (Token-level centering with the group-mean baseline). With the group-mean baseline, the uncentered estimator
obtained by applying f to (15), is unbiased for
Proof. Split the inner sum as and rewrite (30) as
Each of the two terms is an ordinary sample covariance with one-sided centering on . These are unbiased for and for , respectively.
Remark 16. The discrepancy vanishes when since for any , and is otherwise nonzero in general. The sequence-level cancellation fails here because the token-level mean score varies across rollouts, whereas the sequence-level mean score in (24) is a single constant and can be annihilated by .
The optimal baseline can be obtained as
following (21). Recall . Since , the sign of determines how compares with the mean reward . In the token-level setting, we have . Since grows with response length, and a longer response empirically leads to higher reward, we expect to often hold in practice. This implies that it is preferable to set the baseline above the mean reward.
One should keep in mind that the expectations in (31) are taken over rollouts from a single prompt. Thus, is prompt-dependent, and no constant baseline remains optimal across multiple prompts in general. Estimating per prompt instead would still require multiple rollouts for the current prompt.
4 Summary
We have examined the roles of baselines and score centering in policy gradient estimation when responses are generated off-policy and the importance sampling ratio is regularized. Without regularization, sequence-level and token-level importance sampling yield unbiased gradient estimators for different objectives: the former for the true objective J and the latter for the surrogate . At either level, regularizing the ratio breaks the invariance of the importance-weighted gradient to constant shifts in the reward. Choosing the covariance between the reward and the weighted score as the estimand recovers this invariance, and the covariance reduces to the policy gradient when the ratio is not regularized. At the sequence level, the estimand is a single covariance by definition; at the token level, it is an expected sum of conditional covariances but can also be written as a single covariance (Proposition 14). Hence, the two classes of covariance estimators in Section 3.1 apply at both levels.
The covariance perspective clarifies the roles of baselines and score centering. Both perform centering in covariance estimation, but they differ in the choice of the mean used for centering. The group-mean baseline uses the sample mean and yields the sample-mean estimator, which coincides with RLOO and, up to a multiplicative factor, with Dr. GRPO (Proposition 10). With a sample mean, centering the reward, centering the score, and centering both are all equivalent (Proposition 5). Score centering uses the population mean instead and yields the known-mean estimator, which is unbiased for any constant baseline (Proposition 8) and is defined even for a single sample. The two estimators have different variances (Proposition 9). The known-mean estimator has strictly smaller variance if and only if its baseline is sufficiently close to the variance-optimal baseline , and it can become arbitrarily worse as the baseline moves away from .
Whether both forms of centering should be used simultaneously depends on whether importance sampling is applied at the sequence level or at the token level. At the sequence level, score centering is redundant once the group-mean baseline is used, regardless of whether the ratio is regularized (Proposition 11). Consequently, the population mean of the sequence-level weighted score, which is intractable to compute, is not needed. At the token level, while score centering is far more computationally tractable, it is no longer optional. Without score centering, the group-mean estimator is biased for the token-level estimand; its expectation contains an extra term (Proposition 15) that vanishes under standard importance sampling but is nonzero in general when the ratio is regularized.
These results suggest the following practice. With sequence-level importance sampling, the group-mean baseline alone suffices, and score centering should be omitted. With token-level importance sampling and a regularized ratio, score centering should be applied, either together with the group-mean baseline or with a constant baseline; the latter has smaller variance only if the baseline is sufficiently close to , which is prompt-dependent and must be estimated from multiple rollouts. Finally, because both families of estimators degrade as the training-inference mismatch grows, it remains useful to reduce the mismatch at its source, e.g., through matched kernels, batch-invariant computation, and consistent arithmetic precision across the training and inference engines.
References
Greensmith, E., Bartlett, P. L., and Baxter, J. (2004). Variance reduction techniques for gradient estimates in reinforcement learning. Journal of Machine Learning Research, 5:1471–1530.
Kakade, S. and Langford, J. (2002). Approximately optimal approximate reinforcement learning. In International Conference on Machine Learning, pages 267–274.
Kong, A. (1992). A note on importance sampling using standardized weights. Technical Report 348, Department of Statistics, University of Chicago.
Kool, W., van Hoof, H., and Welling, M. (2019). Buy 4 REINFORCE samples, get a baseline for free! In Deep Reinforcement Learning Meets Structured Prediction, ICLR 2019 Workshop.
Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., and Stoica, I. (2023). Efficient memory management for large language model serving with PagedAttention. In Symposium on Operating Systems Principles, pages 611–626.
Liu, J., Li, Y., Fu, Y., Wang, J., Liu, Q., and Shen, Y. (2025a). When speed kills stability: Demystifying RL collapse from the training-inference mismatch.
Liu, J. S. (2001). Monte Carlo Strategies in Scientific Computing. Springer Series in Statistics. Springer, New York.
Liu, Z., Chen, C., Li, W., Qi, P., Pang, T., Du, C., Lee, W. S., and Lin, M. (2025b). Understanding R1-Zero-like training: A critical perspective. In Conference on Language Modeling.
Marek, M. and Ryabinin, M. (2026). Score centering stabilizes off-policy reinforcement learning. arXiv preprint arXiv:2609.20807.
Schulman, J., Levine, S., Abbeel, P., Jordan, M., and Moritz, P. (2015). Trust region policy optimization. In International Conference on Machine Learning, pages 1889–1897.
Schulman, J., Moritz, P., Levine, S., Jordan, M. I., and Abbeel, P. (2016). High-dimensional continuous control using generalized advantage estimation. In International Conference on Learning Representations.
Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. (2017). Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.
Shao, Z., Wang, P., Zhu, Q., Xu, R., Song, J., Bi, X., Zhang, H., Zhang, M., Li, Y. K., Wu, Y., and Guo, D. (2024). DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300.
Shoeybi, M., Patwary, M., Puri, R., LeGresley, P., Casper, J., and Catanzaro, B. (2019). Megatron-LM: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053.
Sutton, R. S. and Barto, A. G. (2018). Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 2nd edition.
Williams, R. J. (1992). Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3–4):229–256.
Zhao, Y., Gu, A., Varma, R., Luo, L., Huang, C.-C., Xu, M., Wright, L., Shojanazeri, H., Ott, M., Shleifer, S., Desmaison, A., Balioglu, C., Damania, P., Nguyen, B., Chauhan, G., Hao, Y., Mathews, A., and Li, S. (2023). PyTorch FSDP: Experiences on scaling fully sharded data parallel. Proceedings of the VLDB Endowment, 16(12):3848–3860.
Zheng, L., Yin, L., Xie, Z., Sun, C., Huang, J., Yu, C. H., Cao, S., Kozyrakis, C., Stoica, I., Gonzalez, J. E., Barrett, C., and Sheng, Y. (2024). SGLang: Efficient execution of structured language model programs. In Advances in Neural Information Processing Systems (NeurIPS), volume 37.