Skip to content

Conversation

@junhuihe-hjh
Copy link
Collaborator

No description provided.

gpu/README.md Outdated

Within each block, values are stored contiguously in memory and permuted to facilitate efficient access and processing.

See `convert_convert_checkpoint.py` for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

convert_checkpoint.py ?

@@ -0,0 +1,106 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

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

may remove this as the conversion script is written by us.

from einops import rearrange
from safetensors.torch import save_file
import model
from pack_weight import convert_weight_int8_to_int2_adsbrain, weight_repack, convert_weight_int8_to_int2
Copy link
Contributor

Choose a reason for hiding this comment

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

may remove 'convert_weight_int8_to_int2_adsbrain' if it's not used.


return ret

def convert_weight_int8_to_int2_adsbrain(weight):
Copy link
Contributor

Choose a reason for hiding this comment

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

can be removed?

gpu/test.py Outdated
from torch.utils import benchmark
from torch import nn

from pack_weight import convert_weight_int8_to_int2, weight_repack, convert_weight_int8_to_int2_adsbrain
Copy link
Contributor

Choose a reason for hiding this comment

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

weight_repack and convert_weight_int8_to_int2_adsbrain can be removed?

@junhuihe-hjh junhuihe-hjh merged commit 6c2c08f into main May 19, 2025
1 check was pending
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