Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@younesbelkada
Copy link

@younesbelkada younesbelkada commented Jun 15, 2025

Copy link
Owner

Choose a reason for hiding this comment

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

I thought about making it configurable. But I think we can just keep it fused for bitnet because of the increased performance.

Copy link
Author

Choose a reason for hiding this comment

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

Makes sense, let's put it to True always then



def apply_hf_quantization(model, config):
def apply_hf_quantization(model, config, weights):
Copy link
Owner

@Blaizzy Blaizzy Jun 15, 2025

Choose a reason for hiding this comment

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

Please ensure the tests bitnet_llama tests are passing. Because I use this function there

Copy link
Owner

@Blaizzy Blaizzy left a comment

Choose a reason for hiding this comment

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

This is awesome!

I just have a couple nits.

print(f"{name:<16}: {dt*1e3:.1f} ms | {(bs*sl)/dt:,.0f} tok/s")


class BitFusedAttention(nn.Module):
Copy link
Owner

Choose a reason for hiding this comment

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

Let's also import this module on bitnet.py to avoid having duplicates.

@younesbelkada younesbelkada requested a review from Blaizzy June 15, 2025 11:50
@younesbelkada
Copy link
Author

Addressed all comments ! LMK wdyt

@Blaizzy Blaizzy merged commit 02ee4f4 into Blaizzy:pc/fused-bitnet Jun 21, 2025
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.

2 participants