linkedin / linkedin/Liger-Kernel

Possible support for weighted average loss calculation in FusedLinearCrossEntropy kernel

Open
#338 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.6k
Forks
603
Avg merge
1d 20h
Merged PRs (30d)
47

Description

🚀 The feature, motivation and pitch

Hi, great job on the FusedLinearCrossEntropy kernel! I’ve found it very efficient for model training. However, it seems to lack support for custom token-wise weighted loss calculation. For instance, users might input a 2D tensor containing individual loss weights for each token and calculate a weighted average loss based on those values. Does this version support that functionality, or is it something that might be added in the future?

Alternatives

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the FusedLinearCrossEntropy kernel and reviewing its current loss-reduction entry point. Clarify the expected behavior for a 2D token-wise weight tensor, including how the weighted average should be defined, then add coverage for weighted and unweighted cases before considering the feature complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.