We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86c86c6 commit 2830778Copy full SHA for 2830778
1 file changed
vllm/config.py
@@ -2954,10 +2954,12 @@ def _get_and_verify_dtype(
2954
) -> torch.dtype:
2955
# NOTE: getattr(config, "torch_dtype", torch.float32) is not correct
2956
# because config.torch_dtype can be None.
2957
- config_dtype = getattr(config.get_text_config(), "torch_dtype", None)
+ config_dtype = getattr(config, "torch_dtype", None)
2958
2959
- # Fallback for multi-modal models if the root config
+ # Fallbacks for multi-modal models if the root config
2960
# does not define torch_dtype
2961
+ if config_dtype is None:
2962
+ config_dtype = getattr(config.get_text_config(), "torch_dtype", None)
2963
if config_dtype is None and hasattr(config, "vision_config"):
2964
config_dtype = getattr(config.vision_config, "torch_dtype", None)
2965
0 commit comments