mlx-bun library API
    Preparing search index...
    • ORPO loss via the shared prompt-prefix single forward (B=1). promptIds is the shared prefix; chosenResp/rejectedResp are the response continuations. Returns the scalar loss (caller owns). Differentiable through the LoRA primals like the two-forward orpoLoss. chunk (when fused/flash) routes each branch through the [M,V]-free flash-CCE head. The graph must declare prefixShared.

      Parameters

      • model: RuntimeModel
      • promptIds: number[]
      • chosenResp: number[]
      • rejectedResp: number[]
      • lambda: number
      • Optionalchunk: ChunkCtx
      • sftScope: SftScope = "response"

      Returns MlxArray