You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT][kernels]: implement fused Gumbel-Softmax sampler for differentiable rollouts #45
Standard autoregressive sampling like greedy or temperature sampling in vLLM breaks the computational graph, requiring REINFORCE-style gradient estimators like PPO. For future alignment algorithms that may rely on reparameterization gradients through discrete tokens, we need a high-performance, differentiable Gumbel-Softmax sampling operator.
Tasks:
Implement a Triton kernel for the Gumbel-Softmax trick in rl_engine/kernels/ops/triton/sampling.py.
The kernel should support hard=True returns one-hot vectors on forward, continuous gradients on backward and temperature annealing.
Ensure it efficiently handles the [Batch, Sequence, Vocab_size] tensor shape without materializing excessive intermediate random noise arrays in global memory.
Hi @Flink-ddd , I have created a draft PR #215 addressing this issue. The correctness has successfully passed and our triton implementation has outperformed the native pytorch implementation in terms of both speed and saving memory. Willing to further revise as needed.
Activity
JLiu4Coding commentedon Jul 6, 2026
Hi Vensen, I am eagerly working on this. Can this be assigned to me?
Flink-ddd commentedon Jul 6, 2026
for sure, assigned, Thank you.
JLiu4Coding commentedon Jul 10, 2026
Hi @Flink-ddd , I have created a draft PR #215 addressing this issue. The correctness has successfully passed and our triton implementation has outperformed the native pytorch implementation in terms of both speed and saving memory. Willing to further revise as needed.