-
Notifications
You must be signed in to change notification settings - Fork 461
[Bugfix] Add Fake VllmConfig on NPU and add slicing/tiling args in Qwen-Image #145
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
Changes from 6 commits
e893624
d73ad6f
6553505
0299e4c
a24604d
fd78db0
0b9eff4
3963cd4
59f1d4b
4d85a67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,8 @@ | |
|
|
||
| import torch | ||
| import zmq | ||
| from vllm.config import VllmConfig, set_current_vllm_config | ||
| from transformers import PretrainedConfig | ||
| from vllm.config import ModelConfig, VllmConfig, set_current_vllm_config | ||
| from vllm.distributed.device_communicators.shm_broadcast import MessageQueue | ||
| from vllm.distributed.parallel_state import ( | ||
| init_distributed_environment, | ||
|
|
@@ -53,7 +54,12 @@ def init_device_and_model(self) -> None: | |
| torch.npu.set_device(device) | ||
|
|
||
| # hack | ||
| vllm_config = VllmConfig() | ||
| # set hf_config to a fake one to avolid get attr error | ||
| class FakePretrainedConfig(PretrainedConfig): | ||
| def __getattr__(self, name): | ||
| return "fake" | ||
|
|
||
| vllm_config = VllmConfig(model_config=ModelConfig(hf_config=FakePretrainedConfig())) | ||
|
||
| vllm_config.parallel_config.tensor_parallel_size = self.od_config.num_gpus | ||
| set_current_vllm_config(vllm_config) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.