A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 18:30 UTC
[Bugfix] Fix incorrect resolving order for transformers fallback (#15279)
Signed-off-by: Isotr0py <2037008807@qq.com>
Isotr0py committed
Mar 21, 2025 at 18:54 UTC
84e00adc8a0807487beebae44b900c2e9cb987ac
1 file changed
+7
-5
vllm/model_executor/models/registry.py
+7
-5
@@ -418,11 +418,13 @@ class _ModelRegistry:
418
if not architectures:
419
logger.warning("No model architectures are specified")
420
421
- normalized_arch = []
422
- for model in architectures:
423
- if model not in self.models:
424
- model = "TransformersModel"
425
- normalized_arch.append(model)
421
+ # filter out support architectures
422
+ normalized_arch = list(
423
+ filter(lambda model: model in self.models, architectures))
424
+
425
+ # make sure Transformers fallback are put at the last
426
+ if len(normalized_arch) != len(architectures):
427
+ normalized_arch.append("TransformersModel")
428
return normalized_arch
429
430
def inspect_model_cls(