-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Bug]: v0.4.1 VLLM_USE_MODELSCOPE not working #4362
[Bug]: v0.4.1 VLLM_USE_MODELSCOPE not working #4362
Comments
sorry why would it never work? if the env var is set |
ah, I reread the code and found that I made a wrong debugging result. |
My temp workaround is adding the origin snippet to vllm/config.py line 106: ...
if VLLM_USE_MODELSCOPE:
# download model from ModelScope hub,
# lazy import so that modelscope is not required for normal use.
# pylint: disable=C.
from modelscope.hub.snapshot_download import snapshot_download
if not os.path.exists(model):
model_path = snapshot_download(model_id=model, revision=revision)
else:
model_path = model
... |
can you send a PR for what worked for you? |
Sending a PR is easy. But my workaround is reverting some changes of a refactor which I think is the cause, I have to read the whole refactored code to confirm what to do is best. |
self.hf_config = get_config(self.model, trust_remote_code, revision,
code_revision) calls config = AutoConfig.from_pretrained(
model,
trust_remote_code=trust_remote_code,
revision=revision,
code_revision=code_revision) The code above does not check the environment variable Have no clue how to fix it elegantly now. |
My friends,how to fix it ? |
insert the code, at the line 106 of the file if VLLM_USE_MODELSCOPE:
from modelscope.hub.snapshot_download import snapshot_download
if not os.path.exists(model):
model_path = snapshot_download(model_id=model,
revision=revision)
else:
model_path = model
self.model = model_path
self.download_dir = model_path
self.tokenizer = model_path Remember it is not the best way, just a temp workaround. |
Your current environment
🐛 Describe the bug
the related code in the previous version :
if os.environ.get("VLLM_USE_MODELSCOPE", "False").lower() == "true":
now the code:
if VLLM_USE_MODELSCOPE:
but the
VLLM_USE_MODELSCOPE
is set to string "true" byso, VLLM_USE_MODELSCOPE will never work
The text was updated successfully, but these errors were encountered: