Per-row summed response log likelihood, extracted unchanged from DPO.
logits [B,L-1,V] predict ids[:,1:]; mask is indexed in the original [B,L]
token coordinates. Prompt and padding masks are zero, answer masks one.
Borrows every input and returns an owned differentiable f32 tensor [B].
Subtraction precedes the f32 cast, retaining the existing DPO operation order.
Per-row summed response log likelihood, extracted unchanged from DPO. logits [B,L-1,V] predict ids[:,1:]; mask is indexed in the original [B,L] token coordinates. Prompt and padding masks are zero, answer masks one. Borrows every input and returns an owned differentiable f32 tensor [B]. Subtraction precedes the f32 cast, retaining the existing DPO operation order.