-
Notifications
You must be signed in to change notification settings - Fork 192
Fix/Improve vllm PTQ and Support multi-node with ray #484
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
base: main
Are you sure you want to change the base?
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: mxin <[email protected]>
Signed-off-by: mxin <[email protected]>
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.
@mxinO does this maintain the support for non-ray + vLLM ?
| model.load_state_dict(current_state_dict) | ||
| torch.distributed.barrier() | ||
|
|
||
| if amax_file_path is None: | ||
| # Sync amax across TP can be done here if needed | ||
| pass | ||
| # for name, buffer in model.named_buffers(): | ||
| # if name.endswith("_amax"): | ||
| # print("syncing amax across TP for", name) | ||
| # torch.distributed.all_reduce( | ||
| # buffer, op=torch.distributed.ReduceOp.MAX, group=get_tp_group().device_group | ||
| # ) | ||
| # torch.distributed.barrier() | ||
|
|
||
| if not torch.distributed.is_initialized() or torch.distributed.get_rank() == 0: | ||
| mtq.print_quant_summary(model) | ||
|
|
||
| mtq.fold_weight(model) | ||
| for name, module in model.named_modules(): | ||
| if name.endswith("weight_quantizer"): | ||
| assert not module.is_enabled, f"quantizer {name} is still enabled" |
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.
Do we need to do this under disable_compilation context?
What does this PR do?
Type of change: Bug fix
Overview:
Fix or improve the vllm PTQ.
SharedFusedMoEUsage
Testing
Tested with latest vllm.
Additional Information
The vllm >0.11.0 changed the low-level API significantly. Some changes needs to be removed when vllm<=0.11.0 is outdated.