Scaling our RL infrastructure to long-horizon software tasks

Finetuning Qwen3.8-Flash-Next (176B) at 256k context

Arnav Shah

The only way to truly understand what an RL environment teaches a model is to train on it. Because GRPO-style (Shao et al., 2024) training algorithms center their advantage estimates on the group mean, groups with all-zero rewards contribute no policy-gradient signal (Yu et al., 2025). As a result, learning from RL environments depends on the model succeeding nontrivially within each group, which becomes increasingly challenging as tasks grow more complex. To address this, we need sufficiently long context lengths and large models, making each experiment considerably more expensive and exacerbating elusive numerical errors.

Studying our increasingly difficult software-engineering RL environments requires overcoming these practical limitations of long-horizon RL. As a first step, we finetuned Qwen3.8-Flash-Next, a 176B-parameter hybrid mixture-of-experts model, at a 256,000 context length on a deliberately easy subset of our software-engineering RL environments. Even at this scale, several ordinary post-training stack implementation choices that are tolerated at shorter horizons became catastrophic for reasoning about our experiments. This post covers seven of these choices across three core problems: (1) making long rollouts practical, (2) mitigating policy drift between the trainer and sampler, and (3) eliminating long-horizon entropy collapse that emerged at scale. Together, these fixes allow us to study our environments at a faster experimental cadence and with much greater confidence in our results.

The training loop

Figure 1. Inference workers run agents in fresh sandboxes and record, for every token, the log-probability and the experts the router chose. The trainer replays those choices, updates the adapter, and publishes it back to the engines.

We built on Z.ai’s slime framework and first validated our RL training recipe on SWE-Gym (Pan et al., 2024) using Qwen3-Coder-30B-A3B with a 32k context window. We then scaled up to Qwen3.8-Flash-Next on 128 H200 GPUs. In our stack, a large trainer coordinates with several elastic single-node inference workers. We disaggregate rollouts from the trainer using Stitch, which lets Modal seamlessly schedule the trainer cluster and the inference workers independently on serverless capacity. The inference workers run each agent in a fresh sandbox, and the verifiers then grade each agent in another sandbox by applying the agent’s patch to a clean copy of the repository with the hidden unit tests. The reward is 1 if all tests pass, and 0 otherwise. Finally, the trainer replays the recorded expert choices (Ma et al., 2025), updates the adapter, publishes the new weights to the serving engines, and begins the next batch.

At long horizons, rollout batches can take several hours to complete, and running generation and training successively would leave the trainer GPUs idle most of that time. Asynchronous RL remedies this by training on samples from older policies (Noukhovitch et al., 2024; Fu et al., 2025). Instead of waiting for all rollouts to finish, Async RL lets the trainer update as soon as KK rollouts are complete, with generation fully decoupled and running in parallel. As a result, long-running rollouts are likely to be several policy versions stale by the time they are trained on.

Because our goal is to study our training environments, we limit this additional confound by adopting one-step asynchrony, which overlaps generation and training while bounding policy staleness to a single update. This offers both high GPU utilization and more accurate attribution of environment effects.

Figure 2. Back to back, every update waits for a full rollout and a full training step. Overlapped, the trainer works on batch k while batch k+1 generates. Block lengths follow our production medians: about 56 minutes of training and 43 minutes of waiting for the next batch.

Making long rollouts practical

Long rollouts make experiments expensive. With generation and training overlapped, our steady-state step time is roughly max(rollout, train) plus some minor synchronization overhead. Since rollouts dominate, reducing their duration is the main way to improve our experimental cadence.

We therefore focused on three problems: waiting for the last episodes in a batch, recovering faulted episodes, and serving LoRA adapters.

Long tail of episodes

The longest group in each rollout step generated 99% of its tokens within two hours but still required another 51 minutes to finish. During that final window, throughput fell to 25 tokens/s and GPU utilization to 1.8%.

Figure 3. One 400-episode batch at 256k context on 64 serving GPUs. Top: share of tokens generated and of episodes finished. Bottom: fleet decode throughput. Hover to read values.

The barrier between inference and training forces inference workers to idle during the last few episodes. On a typical batch, the slowest episode spent about equal time executing tool calls and generating tokens. Even on oversized sandboxes, individual tool calls required several minutes to finish.

Earlier works shorten this tail by resuming unfinished episodes in later steps as partial rollouts (Kimi Team, 2025; Zhou et al., 2025), or by removing the barrier altogether and bounding how stale each sample may be (Fu et al., 2025). Both approaches train some samples at a larger lag than others, which our one-update constraint prohibits. We instead let idle inference workers start episodes from the next batch while the current batch’s trajectories finish. At 256k context, freed workers started parts of the next batch 81 minutes before the current batch finished. This brought completion of the entire next batch forward by an estimated 50 minutes, cutting the wait between batch completions nearly in half while preserving complete trajectories, fixed batch membership, and our one-update policy-lag constraint.

Figure 4. Each row is one of 16 serving engines; its height is how many episodes it is still running. Waiting for the slowest engine, every engine sits idle until all of batch k drains before starting batch k+1. Starting each engine on batch k+1 as soon as it frees up finishes that batch about 50 minutes sooner.

Faulted episode recovery

Figure 5. Twelve episodes from the batch in Figure 3, shortest to longest, with one infrastructure fault at turn 75 of one episode (the median in production). Restarting from a checkpoint keeps the finished episodes but reruns every unfinished one from its first turn after a 15-minute boot. Repairing in place regenerates only the faulted episode, under its original policy, and the batch still finishes on time. Hover over a row for its numbers.

Long episodes create more opportunities for failure across each component of the training infrastructure. Over hundreds of thousands of tool calls and tens of thousands of hours of sandbox time per training run, our agents broke their environments in numerous ways. One agent wrote a test that deleted /tmp, along with the state of the process supervisor running its commands. Another issued a single 72 KiB shell command, exceeding sandbox argument limits. In one task, a mocked process ID evaluated to 1, so a test’s cleanup sent SIGTERM to the sandbox’s init process, which then killed itself.

Faults must be finely attributable so that recovery mitigates training bias. When the policy causes a failure, for example by exhausting its sandbox’s memory or time limit, we never replace the episode. These failures reflect the policy’s own behavior, and replacing them would bias training toward shorter episodes. Conversely, when the infrastructure causes a failure, scoring the episode would penalize the policy for an unrelated mistake. Dropping or resampling such an episode would inadvertently violate batch membership or our one-update policy-lag constraints, adding new training biases. The naive solution is to restart from the last checkpoint, which avoids both problems but is painfully slow, as every in-flight episode restarts from scratch and takes a median 2.1 hours to finish.

We therefore regenerate only the faulted episode, under its original sampling policy. The replacement runs in parallel to the rollout batch’s slowest episodes, so its cost is almost always hidden. Over a 50-update run, we expect restarting after each fault to add 10-20 hours of dead time – 8-16% of the total duration of the run – where in-place repair adds only 2.5. When the task itself is broken, retrying only reproduces the fault, so a second fault on the same episode stops the run until we can debug the environment/infra.

LoRA tax

Figure 6. An unmerged adapter adds two low-rank matmuls to every adapted layer on every request; a merged one is a single weight of the original shape. Rollout time per step on the 30B model, for a 32k SWE-Gym training step.

LoRA (Hu et al., 2021) reduces training memory cost, but serving unmerged adapters adds inference-time work. Following Schulman et al. (2025), who show that well-configured LoRA can match full finetuning, we finetune separate adapters on each MoE expert, totalling about 5.5 billion trainable parameters. Because it stores fewer gradients, master weights, and Adam moments, LoRA finetuning requires around 8x less HBM for frozen weights and training state than full finetuning.

An unmerged adapter computes y=W0x+(α/r)BAxy = W_0x + (\alpha/r)BAx at each adapted layer. In our earlier 30B training runs, rollouts with stock SGLang adapter serving took nearly twice as long as with the base model. This overhead is significant when rollouts already dominate update time.

Merging the adapter into the base weights removes that cost (Hu et al., 2021), so we built merging into weight synchronization, and serve W′=W0+(α/r)BAW' = W_0 + (\alpha/r)BA. This brought serving speeds back near the base-model baseline, but also introduced a new problem: small updates disappeared when we merged into bf16 weights. This speed optimization had meaningfully changed the policy we served. We will return to that in the next section.

Trainer-sampler drift

Faster rollouts only help if the policy being trained matches the policy generating the rollouts. On-policy RL relies on that relationship, but the trainer and inference engine use different kernels, so they still disagree despite bit-identical weights and MoE router replay (Yao et al., 2025). At long context, significant discrepancies arise from MoE reductions, low-precision LoRA merging, and sparse-attention selection.

To interpret the true train/serve gap reliably, we first needed to resolve more fundamental discrepancies between repeated trainer forwards on identical inputs.

Trainer output repeatability

Figure 7. Mean absolute log-probability difference of the sampled token, one 200k-token trajectory scored repeatedly with the same weights, tokens, and expert choices.

Repeated forward passes on identical data should produce identical outputs. At 200k tokens, ours disagreed by more than the trainer and sampler did. Each token’s probability shifted by an average of 12% between identical forward passes, with the weights and trajectory fixed. Fixing expert-routing and sparse-attention choices barely affected the discrepancy.

The difference came from one summation. Each MoE layer routes tokens to a small subset of its experts and combines their weighted outputs back together. Megatron (Shoeybi et al., 2019) performs that combine operation using bf16 atomic adds, which apply nondeterministic ordering based on GPU scheduling. Because floating-point addition is not associative, repeated calls produced slightly different outputs (He, 2025); in our numerical tests, about 6% of the combine’s output values changed between calls.

Figure 8. Four expert outputs for one value of one token, added in whatever order the GPU happens to schedule. Every partial sum is rounded to bf16, so the order changes the answer. Sorting the outputs and accumulating in fp32 gives the same bits every time. The arithmetic is exact.

We made the reduction order deterministic by stably sorting expert outputs, accumulating them in fp32, and rounding the result to bf16. We also replaced atomic adds in the backward pass with gathers. Repeated trainer forwards subsequently matched bit-for-bit, at the cost of a 0.6% slower forward pass.

Disappearing merged LoRA updates

Figure 9. The train/serve gap on the 30B model, with each sync merged into the bf16 weights incrementally versus rebuilt from a pristine copy. The band is the range the unmerged adapter stays in.
Figure 10. One weight whose adapter contribution grows by 1/80 of a bf16 step per sync. The ticks are the fp16 values between two neighbouring bf16 values. An increment under half a step rounds away every time; a rebuild rounds the accumulated change once.

Our earlier LoRA-merging technique, which recovered our serving throughput, noticeably increased our train/serve drift. A merged LoRA weight is algebraically equivalent in exact arithmetic to a separately served adapter, but the two implementations use subtly different operations and rounding.

Our merge applied each weight sync as an increment to the current weight iteration W←bf16(W+Δ)W \leftarrow \mathrm{bf16}(W + \Delta). On average, the increments were 40x smaller than the spacing between neighboring bf16 values at the corresponding weight size. Thus, about 78% of the adapter parameter updates failed to change the served weight. Rebuilding the merged weights from a saved copy of the base weight at every sync helped (Figures 9 and 10), but bf16 still could not express the smallest changes.

A simple PyTorch example illustrates the problem well:

>>> torch.tensor(1.0, dtype=torch.bfloat16) + 1e-3
tensor(1., dtype=torch.bfloat16)
>>> torch.tensor(1.0, dtype=torch.float16) + 1e-3
tensor(1.0010, dtype=torch.float16)

We enabled fp16 kernels for both training and inference (see also Qi et al., 2025). fp16’s three additional mantissa bits provide eight times finer spacing, at the cost of a narrower exponent range. The intervention successfully preserved the small merged updates, at a hidden cost in the backward pass.

Sparse-attention selection

Figure 11. The selector finishes its top 512 from a fixed 4,096-entry buffer. The cutoff bucket that fills it grows with the history, and whatever no longer fits is dropped without an error.

A separate train/serve mismatch arose from a size assumption in the sparse-attention selector that stops holding at long context. Each sparse-attention layer selects compressed blocks of its history to attend to. To accomplish this, SGLang’s fast top-k selector uses a radix bucket with a 4096-entry buffer. At 200k tokens, the token history compresses to up to 65k blocks, and the kernel silently discarded values, returning the wrong blocks (SGLang#36807). In smaller-context-length experiments, this behavior is imperceptible.

To fix this, we cropped each query to its visible prefix and used torch.topk. While numerically correct, this required CPU selection and row-by-row selection, sacrificing the performance of the original selection kernel. We thus rebuilt the selector as a bufferless, GPU-only masked top-k, producing identical scores and re-enabling CUDA graphs. At batch sizes of 8, decode throughput rose from 50 to 275 tokens/s, roughly 5.5x over the exact eager version.

We could now get repeatable forwards and a low, flat train/serve gap. That was necessary. However, it did not establish that the backward pass computed the correct gradient.

Long horizon entropy collapse

In our full-scale long-horizon runs, policy entropy collapsed over roughly a dozen updates despite repeatable forwards and a low train/serve gap. Such a collapse limits exploration and thereby inhibits learning, since the policy can only reinforce behaviors it still samples. A near-identical recipe had trained cleanly on a SWE-Gym rerun experiment.

Successful trajectories were rare in our environments, which suggested a credit assignment issue. However, entropy still collapsed rapidly on an even easier subset of our chosen tasks, roughly 70% the length of our standard software-engineering environments, with balanced positive and negative advantage trajectories. The long context batches – up to 100 million tokens each – could also have driven the collapse by producing unusually low-noise, aligned updates, but their overall cosine alignment was comparable to a pure noise update baseline.

Figure 12. Left: policy entropy per update in the original long-horizon run and in the same run after the fix described below. Right: change in pass@8 from the base model on 128 held-out tasks (whiskers: 95% intervals). As entropy collapsed, the original run’s gain faded; after the fix, it kept growing.

What stood out instead was that gradients from different tasks aligned as closely as those from repeat samples of the same task. Same-task batches share the phenomena specific to their tasks, so they should have more in common. Yet the only recurring gradient component was a single direction present in every batch, regardless of task family. This anomalous shared direction appeared across batches and updates, including on different batches under the base model.

We then reran the SWE-Gym experiment, retaining only 25% of successful trajectories to manufacture our dataset’s low-success regime. Entropy sharpened in that run, while the full-success control’s did not. For a fixed model and batch, our gradient estimator should be linear in its advantages. Reducing the contribution from successful trajectories should merely change the weighting of directions, rather than create a whole new shared gradient direction.

To see why, for each trajectory τi\tau_i let rir_i be its reward, rˉ\bar{r} the average reward in its group, and Ai=ri−rˉA_i = r_i - \bar{r} its advantage. Let πθ\pi_\theta be the policy parameterized by θ\theta, and TT the total number of trained tokens in the batch. Then the policy-gradient estimator has the form:

g=1T∑iAi∇θlog⁡πθ(τi)g = \frac{1}{T}\sum_i A_i \nabla_\theta \log \pi_\theta(\tau_i)

Retaining each success with probability p=0.25p = 0.25 gives ri′=bi⋅rir'_i = b_i \cdot r_i, with bi∼Bernoulli⁡(p)b_i\sim\operatorname{Bernoulli}(p). Because the group mean is also linear in the rewards, E[Ai′]=pAi\mathbb E[A'_i]=pA_i.

Taking the expectation through the gradient sum:

E[g′]=1T∑iE[Ai′]∇θlog⁡πθ(τi)=pT∑iAi∇θlog⁡πθ(τi)=pg=0.25 g\mathbb E[g'] = \frac{1}{T}\sum_i\mathbb E[A'_i]\nabla_\theta \log \pi_\theta(\tau_i) = \frac{p}{T}\sum_i A_i \nabla_\theta \log \pi_\theta(\tau_i) = pg = 0.25\,g

Thus, on average the low-success batches should scale the original gradient, not create a task-independent shared direction.

Linearity can be tested directly. Freeze the model and batch, split the trajectories into four disjoint sets, and compute the gradient four times over the full batch, each time zeroing the advantages outside one set. By linearity, the four partial gradients should sum to the full one. However, in our trainer, their sum instead differed from the full gradient by about 50% on our long-horizon batches, indicating severe numerical instability.

The error arose from the backward pass. The loss was normalized by the token count before backprop, so activation gradients underflowed on long-horizon batches at fp16 precision. This resulted in gradients that were 36% off higher-precision references on the long-horizon batch, versus about 10% on the SWE-Gym control. Moreover, sparse credit experiments quartered the expected gradient but not the underflow error, making the error relative to the signal significantly larger. The underflow-driven error accumulated into the shared direction rather than averaging out.

The standard fix is a larger loss scale (Micikevicius et al., 2018), but every fp16 loss scale large enough to remedy the gradient nonlinearity caused overflow elsewhere. Residual-stream gradients grew roughly two orders of magnitude from the final to first layer. We therefore combined a larger loss scale and selective fp32 recomputation of sensitive layers. Together, they cut the error on the long-horizon batch from 50% to 12% and halted the entropy collapse. Giving each layer’s gradient its own scale then brought it to 0.4%, bordering the noise floor.

Figure 13. The four-mask test. Each partial gradient uses the advantages of one quarter of the trajectories, so by linearity, the four must add up to the full gradient. Right: the measured gap on a long-horizon batch, before and after protecting the backward pass, with each measurement’s noise floor.

This finally closed the loop on the earlier precision decision. We merged LoRA to speed up inference; bf16 merging then discarded many small updates, so we switched to fp16 to preserve them; and at large token counts, our loss normalization made fp16 gradients underflow. Each solution introduced a new numerical discrepancy, and the last of these, without deeper investigation, initially resembled a property of our training recipe or environments.

What we can now measure

With the infrastructure working as intended, we can return to the question that motivated the work: what behaviors do our RL environments help the model acquire? We evaluated our checkpoints on 128 held-out tasks from our software-engineering set, all 113 public DeepSWE tasks, and 164 tasks from 150 repositories that never appear in training, with 8 attempts per task.

To begin, we distinguish improvements in satisfying formatting constraints from improvements in problem-solving. Both increase pass rates, so this distinction helps assess the shape of useful generalization.

Across runs, models quickly learned to force episodes within the context limit and reduce malformed tool calls. These improvements matter, but they should not be interpreted as a meaningful improvement in the model’s software-engineering problem-solving capabilities.

The gains also depend strongly on the base model’s capabilities. On tasks from unseen repositories, pass@1 improved from 34% to 42% (+8.1 percentage points) over 27 steps. The gains concentrated on tasks where the base model was already somewhat competent; pass@1 improved by +11.8 percentage points on tasks it solved 47% of the time, compared with only +3.4 percentage points on tasks it solved 18% of the time. These results line up with earlier findings that RL mostly makes a model more reliable on problems it can already solve (Shao et al., 2024; Yue et al., 2025).

Figure 14. Change in pass@1 from the base model through training, on three held-out sets and on unseen repositories split by base difficulty (whiskers: paired task-bootstrap 95% intervals). Bottom: the final gain on each set, split into finishing more episodes within the context limit and passing more of the finished ones.

As training progressed, we also saw fewer trajectories get derailed by unlikely tokens and closer adherence to the task-requested specification. The former arises from the model further suppressing the probability of its rarest tokens. Sampling these tokens introduces corrupted context the model rarely saw during training, resulting in cascading errors – a phenomenon called exposure bias (Bengio et al., 2015). The latter stops the model from blindly accepting verifier-failing code already present in the repository.

These behaviors warrant a closer analysis for a future blog post. For now, they illustrate how different kinds of learning can contribute to a single uplift number. Our training infrastructure gives us a strong base for investigating further.

Closing

As we scale the horizon length and model size of our RL runs, we revisited seven implementation choices that shorter-horizon runs could decide arbitrarily: how we schedule episodes, recover faulted episodes, serve adapters, combine expert outputs, merge low-precision weights, select sparse-attention blocks, and compute gradients. Making the training stack fast and trustworthy now gives us a much stronger basis for studying what our environments actually teach.

The harder question is how to improve performance on tasks beyond what the model already handled with baseline competence. Our early results show that gains concentrate where the base model is already capable, while harder tasks generalize much less. Can we design software-engineering environments and training recipes that teach models to solve problems they previously barely could, and make those improvements transfer to entirely unseen repositories?

Answering that question requires work spanning the full stack, including task construction and verification, rollout generation, optimization, and evaluation. These are the problems we are working on at Datacurve.

If these types of problems sound interesting to you, we are hiring.

Acknowledgements

Special thanks to Harsh Satija, Jason Mancuso, Anupam Chettimada, Zachary Rosca Halmagean, and Vickie Wan for thoroughly reviewing this post.

Citation

Please cite this work as:

Shah, Arnav, "Scaling our RL infrastructure to long-horizon software tasks",
Datacurve Research, Dec 2026.
https://datacurve.ai/research/scaling-rl-long-horizons

Or use the BibTeX citation:

@article{shah2026scaling,
  author = {Arnav Shah},
  title = {Scaling our {RL} infrastructure to long-horizon software tasks},
  journal = {Datacurve Research},
  year = {2026},
  url = {https://datacurve.ai/research/scaling-rl-long-horizons},
}

References

  1. Bengio, S., Vinyals, O., Jaitly, N., and Shazeer, N. (2015). Scheduled sampling for sequence prediction with recurrent neural networks. NeurIPS. arxiv.org/abs/1506.03099
  2. Fu, W., et al. (2025). AReaL: A large-scale asynchronous reinforcement learning system for language reasoning. arXiv:2505.24298. arxiv.org/abs/2505.24298
  3. He, H., and Thinking Machines Lab (2025). Defeating nondeterminism in LLM inference. Connectionism. thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference
  4. Hu, E. J., et al. (2021). LoRA: Low-rank adaptation of large language models. arXiv:2106.09685. arxiv.org/abs/2106.09685
  5. Huang, W., et al. (2026). DeepSWE: Measuring frontier coding agents on original, long-horizon engineering tasks. Datacurve. deepswe.datacurve.ai/blog/deepswe
  6. Kimi Team (2025). Kimi k1.5: Scaling reinforcement learning with LLMs. arXiv:2501.12599. arxiv.org/abs/2501.12599
  7. Ma, W., et al. (2025). Stabilizing MoE reinforcement learning by aligning training and inference routers. arXiv:2510.11370. arxiv.org/abs/2510.11370
  8. Micikevicius, P., et al. (2018). Mixed precision training. ICLR. arxiv.org/abs/1710.03740
  9. Modal (2026). Stitch. GitHub. github.com/modal-projects/stitch
  10. Noukhovitch, M., et al. (2024). Asynchronous RLHF: Faster and more efficient off-policy RL for language models. arXiv:2410.18252. arxiv.org/abs/2410.18252
  11. Pan, J., et al. (2024). Training software engineering agents and verifiers with SWE-Gym. arXiv:2412.21139. arxiv.org/abs/2412.21139
  12. Qi, P., et al. (2025). Defeating the training-inference mismatch via FP16. arXiv:2510.26788. arxiv.org/abs/2510.26788
  13. Qwen Team (2025). Qwen3-Coder-30B-A3B-Instruct. Hugging Face model card. huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct
  14. Qwen Team (2026). On the design of Qwen3.8-Next architecture: Evaluation, efficiency, and training stability. Alibaba Group technical report. github.com/QwenLM/Qwen3.8-Flash-Next/blob/main/tech_report.pdf
  15. Schulman, J., and Thinking Machines Lab (2025). LoRA without regret. Connectionism. thinkingmachines.ai/blog/lora
  16. Shao, Z., et al. (2024). DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv:2402.03300. arxiv.org/abs/2402.03300
  17. Shoeybi, M., et al. (2019). Megatron-LM: Training multi-billion parameter language models using model parallelism. arXiv:1909.08053. arxiv.org/abs/1909.08053
  18. Yao, F., Liu, L., et al. (2025). Your efficient RL framework secretly brings you off-policy RL training. fengyao.notion.site/off-policy-rl
  19. Yu, Q., et al. (2025). DAPO: An open-source LLM reinforcement learning system at scale. arXiv:2503.14476. arxiv.org/abs/2503.14476
  20. Yue, Y., et al. (2025). Does reinforcement learning really incentivize reasoning capacity in LLMs beyond the base model? arXiv:2504.13837. arxiv.org/abs/2504.13837
  21. Zheng, L., et al. (2024). SGLang: Efficient execution of structured language model programs. NeurIPS. arxiv.org/abs/2312.07104
  22. Zhou, Y., et al. (2025). APRIL: Active partial rollouts in reinforcement learning to tame long-tail generation. arXiv:2509.18521. arxiv.org/abs/2509.18521
  23. Zhu, Z., Xie, C., Lv, X., and slime Contributors (2025). slime: An LLM post-training framework for RL scaling. GitHub. github.com/THUDM/slime