【FLCE】the bias in the previous layer

Open
#891 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start at LigerFusedLinearCrossEntropyLoss.forward and compare the proposed parameter order with the arguments passed to LigerFusedLinearCrossEntropyFunction.apply. Confirm whether lin_weight and bias represent the previous layer, then ensure the public signature and its call site use an unambiguous order.

Written by the indexing model from the issue text.

Description

I see the function LigerFusedLinearCrossEntropyLoss, I think bias and lin_weight are from the previous layer. If so, maybe def forward(self, _input, target, lin_weight, bias=None): is easy to understand.


    def forward(self, lin_weight, _input, target, bias=None):
        loss, z_loss = LigerFusedLinearCrossEntropyFunction.apply(
            _input,
            lin_weight,
            target,
            bias,
            self.ce_weight,
            self.ignore_index,
            self.lse_square_scale,
            self.label_smoothing,
            self.reduction,
            self.softcap,
            self.return_z_loss,
            self.accum_dtype,
        )
        if not self.return_z_loss:
            return loss
        return loss, z_loss
Dominant language
Python
Stars
6.7k
Forks
673
Avg merge
4d 20h
Merged PRs (30d)
19

Getting set up

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.

More from linkedin/Liger-Kernel

All issues in linkedin/Liger-Kernel

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.