#6945·trl

AsyncGRPO has no importance-sampling correction, but TRL still imposes --logprobs-mode processed_logprobs on its server

Author: behroozazarkhaliliCreated Aug 27, 2026Updated Sep 28, 2026

The setting

TRL imposes --logprobs-mode processed_logprobs on every vLLM server it talks to. trl.scripts.vllm_serve.build_command appends it unconditionally, and vllm_serve.py:201 lists it as one of "three settings imposed by TRL", with the reason given as:

so that temperature scaling and logit tweaking are reflected in the returned logprobs, which trainers use for importance sampling correction

docs/source/vllm_integration.md:183 repeats it: "which is what the importance sampling correction expects."

The problem

That rationale is specific to the importance-sampling correction, and AsyncGRPOTrainer does not have one. grep importance_sampling returns nothing in either async_grpo_config.py or async_grpo_trainer.py.

What AsyncGRPO does instead is use vLLM's logprob directly as the PPO denominator:

python
# trl/experimental/async_grpo/async_grpo_trainer.py:1113
log_ratio = log_probs - old_log_probs
coef_1 = torch.exp(log_ratio)
coef_2 = torch.clamp(coef_1, 1 - self.epsilon_low, 1 + self.epsilon_high)

old_log_probs is collated straight from the rollout logprobs, and log_probs is a full-vocab log-softmax. With processed logprobs the two normalize over different supports, so for an unchanged policy the ratio reads the surviving mass S rather than 1.0:

top_p coef_1 error vs 1.0 outside (0.8, 1.2)?
1.00 1.0000 0.0000 no
0.90 0.9000 0.1000 no
0.80 0.8000 0.2000 no
0.70 0.7000 0.3000 yes

Below 1 - epsilon_low the clip engages on every negative-advantage token whether or not the policy moved.

The contrast with GRPOTrainer is what makes this a design question rather than a bug report. GRPO computes its own old_per_token_logps (grpo_trainer.py:2664) and differences it against vLLM's (:2680), so processed logprobs are exactly what it wants and vllm_importance_sampling_correction=False disables the whole path. AsyncGRPO gets the setting imposed on it and has no switch.

Proposal

Make the imposed flag conditional on the trainer having an importance-sampling correction, rather than applying it to every server TRL prescribes. Trainers that difference two logprob sources want processed_logprobs; trainers that consume the logprob as a behavior-policy density want the raw one.

I have not been able to schedule a two-GPU async run to measure this end to end, so the table above is derived from the two normalizations and computed exactly rather than observed. Happy to run it if someone can point me at a lane.

#6944 adds a warning on the AsyncGRPO side in the meantime. It does not change the flag, since that is this decision to make.