Skip to content

Fix lfm2 kernel path#44634

Merged
Cyrilvallez merged 2 commits intomainfrom
fix-lfm2
Mar 12, 2026
Merged

Fix lfm2 kernel path#44634
Cyrilvallez merged 2 commits intomainfrom
fix-lfm2

Conversation

@Cyrilvallez
Copy link
Member

What does this PR do?

As per the title

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: lfm2, lfm2_moe

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


conv_weights = self.conv.weight.view(self.conv.weight.size(0), self.conv.weight.size(2))
if past_key_values is not None and past_key_values.get_seq_length() > 0:
if past_key_values is not None and past_seen_tokens > 0:
Copy link
Member

Choose a reason for hiding this comment

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

past_key_values is not None will always be true if past_seen_tokens > 0

Suggested change
if past_key_values is not None and past_seen_tokens > 0:
if past_seen_tokens > 0:

@Cyrilvallez Cyrilvallez merged commit e5a861d into main Mar 12, 2026
23 checks passed
@Cyrilvallez Cyrilvallez deleted the fix-lfm2 branch March 12, 2026 14:48
Copy link
Member

@hmellor hmellor left a comment

Choose a reason for hiding this comment

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

I can't seem to approve anymore by LGTM

michaelbenayoun pushed a commit to michaelbenayoun/transformers that referenced this pull request Mar 12, 2026
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