-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gpu branch #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpu branch #266
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert_checkpoint.py ?
gpu/convert_checkpoint.py
Outdated
| @@ -0,0 +1,106 @@ | |||
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |||
There was a problem hiding this comment.
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.
gpu/convert_checkpoint.py
Outdated
| 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 |
There was a problem hiding this comment.
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.
gpu/pack_weight.py
Outdated
|
|
||
| return ret | ||
|
|
||
| def convert_weight_int8_to_int2_adsbrain(weight): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
No description provided.