Repository navigation
[Show & Tell] Prefix-Aware RL Sequence Packing (PrefixPack-RSI) vs verl karmarkar_karp & AReaL Triton Kernel on NVIDIA L4 + Upstream Guard PRs (#8885, #8886) #8898
peterzhang987723
started this conversation in
Ideas / Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi
verlmaintainers and community! Sharing a cross-framework prefix-reuse & RL sequence-packing study building alongside our two openverlcontrol-plane hardening PRs:verlGuard PRs (all CI checks green / CLA signed / CodeRabbit clean):verl-project/verl#8885(seqlen_balancing.py: non-contiguous same-UID grouping, all-zeroattention_maskIndexError,divmodlogging + 3 regression tests)verl-project/verl#8886(math_reward.py:box/ mixed�oxed, multipleext{AssertionErrorcrash, emptyfrac/sqrtguards)algorithmicsuperintelligence/openevolve#625(merged intomain),#626(CI-green), andareal-project/AReaL#2014.1. Why
karmarkar_karpLeaves Tree Reuse on the Table (3.185M-Token Replay)Across
24multi-turn, GRPO, and SWE workloads (3,185,513prompt tokens,60.96%trie reuse ceiling):PrefixPack-RSI Stage-2achieves2.0850xeffective step speedup oververl's prefix-blindkarmarkar_karppacking and1.8462xover AReaL's_greedy_build_tries(0.9892rank balance,50.62%prefix token savings,6.47 msCPU runtime vs49.65 ms).2. Real NVIDIA L4 GPU Validation (
PrefixPack-RSI× Official AReaLtriton_kernel.py @ d0e216f7)We benchmarked end-to-end Qwen3/Llama3-8B
bf16Decoder Layer Fwd+Bwd on live NVIDIA L4 (22.0 GBVRAM,PyTorch 2.14.1+cu130,Triton 3.8.0) across all24/24held-out workloads (seed=999001):128seqs,bf16):max_abs_diff = 0.000977,mean_abs_diff = 0.000236(PASS).np.uint64 -> int64): bit-exact (torch.equalon all 5 mask/offset tensors) and7.1xfaster than upstream's scalar loop incompute_packed_mask.pad_to_maximum=Truevs Official AReaL:1.3771xfaster CUDA Fwd+Bwd wall-clock (up to2.078xonheldout_async_0_r4).pad_to_maximum=False):1.4993xfaster vs Official AReaL (24/24workloads won, recovering heavy-tail padding overhead to1.26x–1.31x) and2.4518xfaster than no-prefix dense SDPA.R in {4, 8, 16}):1.262xfaster (1.9653xpeak onheldout_async_0_r4,1.6352xonheldout_async_4_r16).Links
v0.3.0): https://github.com/peterzhang987723/PrefixPack-RSIHappy to collaborate if the
verlteam wants to explore tree-packed balanced batching alongsideseqlen_balancing.py!All reactions