linkedin / linkedin/Liger-Kernel
Possible support for weighted average loss calculation in FusedLinearCrossEntropy kernel
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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