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, 11:00 UTC
[Fix] check to make sure processor has chat templates (#18047)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
Aaron Pham committed
May 13, 2025 at 06:04 UTC
cb528d0585c0a2a876dfc3813c7fe6092a2549ae
3 files changed
+4
-4
tests/compile/test_pass_manager.py
+1
-1
@@ -22,7 +22,7 @@ def test_bad_callable():
22
pass_manager.configure(config)
23
24
with pytest.raises(AssertionError):
25
- pass_manager.add(simple_callable) # noqa, type wrong on purpose
25
+ pass_manager.add(simple_callable)
26
27
28
# Pass that inherits from InductorPass
vllm/compilation/inductor_pass.py
+1
-1
@@ -16,7 +16,7 @@ if is_torch_equal_or_newer("2.6"):
16
from torch._inductor.custom_graph_pass import CustomGraphPass
17
else:
18
# CustomGraphPass is not present in 2.5 or lower, import our version
19
- from .torch25_custom_graph_pass import ( # noqa: yapf
19
+ from .torch25_custom_graph_pass import ( # noqa: E501
20
Torch25CustomGraphPass as CustomGraphPass)
21
22
_pass_context = None
vllm/entrypoints/chat_utils.py
+2
-2
@@ -349,11 +349,11 @@ def resolve_hf_chat_template(
349
trust_remote_code=model_config.trust_remote_code,
350
)
351
if isinstance(processor, ProcessorMixin) and \
352
+ hasattr(processor, 'chat_template') and \
353
processor.chat_template is not None:
354
return processor.chat_template
355
except Exception:
355
- logger.debug("Failed to load AutoProcessor chat template for %s",
356
- tokenizer.name_or_path, exc_info=True)
356
+ logger.debug("Failed to load AutoProcessor chat template for %s", tokenizer.name_or_path, exc_info=True) # noqa: E501
357
358
# 3rd priority: AutoTokenizer chat template
359
try: