Skip to content

Would cuTile ports of Liger's chunked preference losses (DPO, ORPO, SimPO, KTO) be accepted into the liger suite? #190

Description

@Aryan95614

I would like to contribute cuTile ports of Liger-Kernel's chunked preference losses to src/tilegym/suites/liger/, following the grpo_loss fwd+bwd pattern and the chunked backward-in-forward structure of fused_linear_cross_entropy. Plan: one PR per loss, starting with DPO (LigerFusedLinearDPOLoss semantics: fused linear over chosen/rejected halves, per-sequence logps, reference-model support, the upstream loss_type variants).

Intended split, mirroring the FLCE port: torch/cuBLAS keeps the GEMMs, cuTile owns the two row-wise kernels (fused per-row logsumexp plus target log-prob, and the in-place d_logits write), and the O(n_pairs) preference formulas stay in device-side torch so every variant matches upstream exactly. Upstream implements these in chunked torch.compile rather than a handwritten kernel, so the benchmark baseline would be Liger's compiled path plus a naive full-logits torch reference, validated on Ampere or Blackwell.

Before I start: is the liger suite open to external ports? It is NVIDIA-authored so far, and I do not want to collide with internal plans. Two scope questions if yes:

  1. Full loss_type coverage in the first DPO PR, or sigmoid first with variants as follow-ups?
  2. Perf table in the PR description only, like the existing liger suite ops, or an in-repo benchmark file like tests/benchmark/suites/unsloth/?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions