A single DPO batch. Each branch is padded to the longest sequence of its
kind within the batch (port of dpo.py _make_batch). The response masks are
0 at both prompt AND pad positions, so per-sequence log-probs naturally
ignore padding without a separate length array. For B=1 there is no padding
and the masks/forward are bit-identical to the single-example trainer.
A single DPO batch. Each branch is padded to the longest sequence of its kind within the batch (port of dpo.py _make_batch). The response masks are 0 at both prompt AND pad positions, so per-sequence log-probs naturally ignore padding without a separate length array. For B=1 there is no padding and the masks/forward are bit-identical to the single-example trainer.