Skip to content
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

[Bugfix] Use LoadFormat values as choices for vllm serve --load-format #7784

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Aug 22, 2024

The choices for the --load-format argument haven't been kept in sync with new load formats being added. This PR changes the choices of the arg to directly reference the LoadFormat enum.

For instance, before this PR you could not load sharded_state models with vllm serve

> huggingface-cli download neuralmagic/Meta-Llama-3-8B-Instruct-FP8 --local-dir Meta-Llama-3-8B-Instruct-FP8
> python examples/save_sharded_state.py --model Meta-Llama-3-8B-Instruct-FP8 --tensor-parallel-size 2 --output Meta-Llama-3-8B-Instruct-FP8-SHARDED
> vllm serve Meta-Llama-3-8B-Instruct-FP8-SHARDED --tensor-parallel-size 2 --load-format sharded_state
usage: vllm serve <model_tag> [options]
vllm serve: error: argument --load-format: invalid choice: 'sharded_state' (choose from 'auto', 'pt', 'safetensors', 'npcache', 'dummy', 'tensorizer', 'bitsandbytes')

This did not accurately list the enum values we have available

class LoadFormat(str, enum.Enum):
    AUTO = "auto"
    PT = "pt"
    SAFETENSORS = "safetensors"
    NPCACHE = "npcache"
    DUMMY = "dummy"
    TENSORIZER = "tensorizer"
    SHARDED_STATE = "sharded_state"
    GGUF = "gguf"
    BITSANDBYTES = "bitsandbytes"

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 22, 2024
Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@mgoin mgoin enabled auto-merge (squash) August 22, 2024 13:18
@youkaichao youkaichao disabled auto-merge August 22, 2024 18:36
@youkaichao youkaichao merged commit 15310b5 into main Aug 22, 2024
55 of 57 checks passed
@youkaichao youkaichao deleted the fix-load-format-cli-arg branch August 22, 2024 18:37
omrishiv pushed a commit to omrishiv/vllm that referenced this pull request Aug 26, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants