Skip to content

Conversation

Lakr233
Copy link
Contributor

@Lakr233 Lakr233 commented Sep 29, 2025

This pull request makes a targeted fix to the conditional compilation logic for attention mask handling in the LanguageModelWithStatefulKVCache class. The change ensures that the correct environment check is used for macOS and Mac Catalyst on x86_64 architecture.

  • Compilation condition update: Replaced the incorrect use of macCatalyst with the proper targetEnvironment(macCatalyst) in the #if directive, ensuring accurate platform detection for attention mask logic in LanguageModelWithStatefulKVCache.

@Lakr233
Copy link
Contributor Author

Lakr233 commented Sep 29, 2025

Fix #275

@mattt
Copy link
Collaborator

mattt commented Sep 29, 2025

@Lakr233 This is great! Thanks so much for reporting #275 and providing a fix.

Apologies for our busted CI. This change looks good to me :shipit:

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Thank you @Lakr233!

@pcuenca pcuenca changed the title Update LanguageModel.swift Fix build on x86_64 Sep 29, 2025
@pcuenca pcuenca merged commit cda4025 into huggingface:main Sep 29, 2025
2 of 4 checks passed
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