Yacine shares RL training trick: top-p sampling with Keep Sampling Mask replay

yacinelearning · x · 2026-11-24

Yacine (yacinelearning) highlighted an LLM RL training trick: top-p/top-k sampling avoids optimizing toward extremely low-probability tokens, but the truncation creates an action-space mismatch between πold and πθ, violating importance sampling and destabilizing training.

The shared paper excerpt describes the Keep Sampling Mask strategy: preserve truncation masks when sampling from πold and apply them to πθ during training, so both policies share identical action subspaces. Empirically, top-p sampling with this mask preserves language consistency during RL training. He also mentions score centering.

Original post →

More from coding & agent

coding & agent channel →