Skip to content

liger-kernels: sync with liger-kernels upstream#857

Merged
sayakpaul merged 6 commits into
mainfrom
liger-kernels-update
May 18, 2026
Merged

liger-kernels: sync with liger-kernels upstream#857
sayakpaul merged 6 commits into
mainfrom
liger-kernels-update

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul commented May 15, 2026

Also update AGENTS.md to include Liger-Kernels specific instructions for syncing with the upstream.

Cc: @vasqu

@sayakpaul sayakpaul requested review from danieldk and drbh as code owners May 15, 2026 03:26
Comment thread AGENTS.md
If the user did not specify the version tag, stop and ask which tag to sync
from.

## liger-kernels
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

return loss


class LigerFusedLinearCrossEntropyLoss(nn.Module):
Copy link
Copy Markdown
Collaborator

@vasqu vasqu May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also expose something like https://github.com/linkedin/Liger-Kernel/blob/38c0d4f8af6cc0386a4c798558e992570843f1ac/src/liger_kernel/transformers/model/loss_utils.py#L67 in the init? That's at least exactly what we are looking for in transformers then

I.e. we are looking into the base function we will exchange instead of the module

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check now?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looking good now, thanks!

@sayakpaul sayakpaul requested a review from vasqu May 18, 2026 13:40
@sayakpaul
Copy link
Copy Markdown
Member Author

@vasqu the build CI is here https://github.com/huggingface/kernels-community/actions/runs/26037106273/job/76538369834

Comment on lines +28 to +33
offset: float = 0.0,
casting_mode: str = "llama",
init_fn: str = "ones",
in_place: bool = True,
row_mode: Optional[bool] = None,
elementwise_affine: bool = True,
Copy link
Copy Markdown
Collaborator

@vasqu vasqu May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we can ignore the extra init args and always default as done before?

Edit: Don't think it matters too much tho, should be fine as is as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

@sayakpaul sayakpaul merged commit 08b4d53 into main May 18, 2026
4 checks passed
@sayakpaul sayakpaul deleted the liger-kernels-update branch May 18, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants