-
Notifications
You must be signed in to change notification settings - Fork 129
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
cleaned up and tested tp support #976
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/976
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 273fd8c with merge base c0a81f9 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
torchao/_models/llama/generate.py
Outdated
@@ -30,7 +31,7 @@ def device_sync(device): | |||
wd = Path(__file__).parent.parent.resolve() | |||
sys.path.append(str(wd)) | |||
|
|||
from torchao._models.llama.model import Transformer, prepare_inputs_for_model | |||
from model import Transformer, prepare_inputs_for_model |
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.
i think we want this to be the same as before, otherwise it can accidentally pull in gpt-fast model and it becomes annoying to test/debug
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.
otherwise looks good
funcol = None | ||
|
||
from torchao._models.llama.model import Attention, FeedForward, Transformer | ||
from torchao.quantization.GPTQ import WeightOnlyInt4Linear |
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.
we are not usingWeightOnlyInt4Linear
any more in torchao I think, is this just for GPTQ?
@debajyotidatta the way we are supporting tp by composing quantized tensor subclass and DTensor: #939, I believe the way its done in gpt-fast is outdated, would you be interested in integrating the new tp flow in generate.py instead? |
Sounds good! I will do that. |
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 you add try to do tensor parallel support along the lines of https://github.com/pytorch/ao/blob/main/tutorials/developer_api_guide/tensor_parallel.py
No description provided.