Skip to content

Convert torch.bfloat16, torch.float16, etc. to vLLM valid dtypes - #2811

Merged
danielhanchen merged 2 commits into
unslothai:mainfrom
rishabh135:main
Jun 30, 2025
Merged

danielhanchen merged 2 commits into
unslothai:mainfrom
rishabh135:main

Conversation

@rishabh135

Copy link
Copy Markdown
Contributor

Convert torch.bfloat16, torch.float16, etc. to valid CLI string

Checks dtype params when building the subprocess_command for vllm.

Passing torch.bfloat16 values seems to stop vllm from deploying properly, and result in

vllm serve: error: argument --dtype: invalid choice: 'torch.bfloat16' (choose from 'auto', 'bfloat16', 'float', 'float16', 'float32', 'half')

The update makes it such that vLLM will deploy even when the correct dtype isn't specified isn't specified in the model name

@danielhanchen

Copy link
Copy Markdown
Member

Oh thank you! Could you remove some extra spaces and newlines - thanks :)

@rishabh135 rishabh135 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed newline characters as requested. Kindly merge this submission!

@danielhanchen

Copy link
Copy Markdown
Member

Thank you!

@danielhanchen
danielhanchen merged commit a15e77f into unslothai:main Jun 30, 2025
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
…lothai#2811)

* Convert torch.bfloat16, torch.float16, etc. to vLLM valid dtypes

* removed newlines and extra whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants