Skip to content

[Bug] Mistral Tool-Call via Jinja Template: Missing parallel_tool_prompt Injection and Incorrect tool_response Handling #19545

@cyc00518

Description

@cyc00518

Your current environment

The output of python collect_env.py
INFO 06-12 09:30:39 [__init__.py:244] Automatically detected platform cuda.
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version                : Could not collect
CMake version                : version 3.30.4
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.7.0+cu126
Is debug build               : False
CUDA used to build PyTorch   : 12.6
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-4.18.0-513.24.1.el8_9.x86_64-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.6.77
CUDA_MODULE_LOADING set to   : LAZY
GPU models and configuration : 
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

Nvidia driver version        : 570.133.20
cuDNN version                : Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.5.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.5.0
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             128
On-line CPU(s) list:                0-127
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8462Y+
CPU family:                         6
Model:                              143
Thread(s) per core:                 2
Core(s) per socket:                 32
Socket(s):                          2
Stepping:                           8
CPU max MHz:                        4100.0000
CPU min MHz:                        800.0000
BogoMIPS:                           5600.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          3 MiB (64 instances)
L1i cache:                          2 MiB (64 instances)
L2 cache:                           128 MiB (64 instances)
L3 cache:                           120 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-31,64-95
NUMA node1 CPU(s):                  32-63,96-127
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

==============================
Versions of relevant libraries
==============================
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.6.4.1
[pip3] nvidia-cuda-cupti-cu12==12.6.80
[pip3] nvidia-cuda-nvrtc-cu12==12.6.77
[pip3] nvidia-cuda-runtime-cu12==12.6.77
[pip3] nvidia-cudnn-cu12==9.5.1.17
[pip3] nvidia-cufft-cu12==11.3.0.4
[pip3] nvidia-cufile-cu12==1.11.1.6
[pip3] nvidia-curand-cu12==10.3.7.77
[pip3] nvidia-cusolver-cu12==11.7.1.2
[pip3] nvidia-cusparse-cu12==12.5.4.2
[pip3] nvidia-cusparselt-cu12==0.6.3
[pip3] nvidia-nccl-cu12==2.26.2
[pip3] nvidia-nvjitlink-cu12==12.6.85
[pip3] nvidia-nvtx-cu12==12.6.77
[pip3] pyzmq==26.4.0
[pip3] torch==2.7.0
[pip3] torchaudio==2.7.0
[pip3] torchvision==0.22.0
[pip3] transformers==4.52.3
[pip3] triton==3.3.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.9.1
vLLM Build Flags:
  CUDA Archs: 5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX; ROCm: Disabled; Neuron: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7NIC8     NIC9    NIC10   NIC11   CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    PXB     PXB     NODE    NODE    NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS     0-31,64-95      0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    PXB     PXB     NODE    NODE    NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS     0-31,64-95      0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    PXB     PXB     SYS     SYS SYS      SYS     SYS     SYS     0-31,64-95      0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    PXB     PXB     SYS     SYS SYS      SYS     SYS     SYS     0-31,64-95      0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     PXB     PXB NODE     NODE    NODE    NODE    32-63,96-127    1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     PXB     PXB NODE     NODE    NODE    NODE    32-63,96-127    1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODENODE     NODE    PXB     PXB     32-63,96-127    1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODENODE     NODE    PXB     PXB     32-63,96-127    1               N/A
NIC0    PXB     PXB     NODE    NODE    SYS     SYS     SYS     SYS      X      PXB     NODE    NODE    NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS
NIC1    PXB     PXB     NODE    NODE    SYS     SYS     SYS     SYS     PXB      X      NODE    NODE    NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS
NIC2    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      PIX     NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS
NIC3    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    PIX      X      NODE    NODE    SYS     SYS SYS      SYS     SYS     SYS
NIC4    NODE    NODE    PXB     PXB     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X      PXB     SYS     SYS SYS      SYS     SYS     SYS
NIC5    NODE    NODE    PXB     PXB     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PXB      X      SYS     SYS SYS      SYS     SYS     SYS
NIC6    SYS     SYS     SYS     SYS     PXB     PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS      X      PXB NODE     NODE    NODE    NODE
NIC7    SYS     SYS     SYS     SYS     PXB     PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     PXB      X  NODE     NODE    NODE    NODE
NIC8    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE X       PIX     NODE    NODE
NIC9    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODEPIX       X      NODE    NODE
NIC10   SYS     SYS     SYS     SYS     NODE    NODE    PXB     PXB     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODENODE     NODE     X      PXB
NIC11   SYS     SYS     SYS     SYS     NODE    NODE    PXB     PXB     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODENODE     NODE    PXB      X 

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7
  NIC8: mlx5_8
  NIC9: mlx5_9
  NIC10: mlx5_10
  NIC11: mlx5_11

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=GPU-d3a648f1-acd2-49e0-2e21-e61e875bfaea,GPU-1f3aa0d6-2a2e-5b11-ac18-9175655f35c0,GPU-96ddba1c-c7be-4bf3-5e0b-629ea4d14045,GPU-812caee5-ca53-e7eb-185f-4426a3e4f6f4,GPU-cd5718a7-d022-4daa-ceb6-790884357a75,GPU-ffb8dbac-fbd9-8692-80e3-51712e3c6d44,GPU-d36e2b11-8702-44bd-20f3-c9b78bfdcc97,GPU-72d61571-7a83-c878-3815-68ff4810a412
CUBLAS_VERSION=12.6.3.3
NVIDIA_REQUIRE_CUDA=cuda>=9.0
CUDA_CACHE_DISABLE=1
TORCH_CUDA_ARCH_LIST=5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX
NCCL_VERSION=2.22.3
NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
NVIDIA_PRODUCT_NAME=PyTorch
CUDA_VERSION=12.6.2.004
PYTORCH_VERSION=2.5.0a0+e000cf0
PYTORCH_BUILD_NUMBER=0
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
CUDNN_FRONTEND_VERSION=1.7.0
CUDNN_VERSION=9.5.0.50
PYTORCH_HOME=/opt/pytorch/pytorch
LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/torch/lib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
NVIDIA_BUILD_ID=114410972
CUDA_DRIVER_VERSION=560.35.03
PYTORCH_BUILD_VERSION=2.5.0a0+e000cf0
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
CUDA_MODULE_LOADING=LAZY
NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=
NVIDIA_PYTORCH_VERSION=24.10
TORCH_ALLOW_TF32_CUBLAS_OVERRIDE=1
NCCL_CUMEM_ENABLE=0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1

🐛 Describe the bug

pip list | grep vllm
# vllm                                     0.9.1

Start vllm server

vllm serve models/Mistral-Small-24B-Instruct-2501 \
--tensor-parallel-size 8 \
--served_model_name Mistral-Small-24B-Instruct-2501 \
--port 8002 \
--tool-call-parser mistral \
--chat-template vllm/examples/tool_chat_template_mistral3.jinja \ 
--enable-auto-tool-choice \
--tokenizer-mode mistral \
--config_format mistral \
--load_format mistral
The output of Start vllm server
INFO 06-12 09:44:46 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:44:51 [api_server.py:1287] vLLM API server version 0.9.1
INFO 06-12 09:44:52 [cli_args.py:309] non-default args: {'port': 8002, 'chat_template': 'vllm/examples/tool_chat_template_mistral3.jinja', 'enable_auto_tool_choice': True, 'tool_call_parser': 'mistral', 'model': 'models/Mistral-Small-24B-Instruct-2501', 'tokenizer_mode': 'mistral', 'served_model_name': ['Mistral-Small-24B-Instruct-2501'], 'config_format': 'mistral', 'load_format': 'mistral', 'tensor_parallel_size': 8}
INFO 06-12 09:45:01 [config.py:823] This model supports multiple tasks: {'score', 'embed', 'reward', 'generate', 'classify'}. Defaulting to 'generate'.
ERROR 06-12 09:45:02 [config.py:114] Error retrieving safetensors: 'models/Mistral-Small-24B-Instruct-2501' is not a safetensors repo. Couldn't find 'model.safetensors.index.json' or 'model.safetensors' files., retrying 1 of 2
ERROR 06-12 09:45:05 [config.py:112] Error retrieving safetensors: 'models/Mistral-Small-24B-Instruct-2501' is not a safetensors repo. Couldn't find 'model.safetensors.index.json' or 'model.safetensors' files.
INFO 06-12 09:45:05 [config.py:3268] Downcasting torch.float32 to torch.bfloat16.
INFO 06-12 09:45:05 [config.py:1946] Defaulting to use mp for distributed inference
INFO 06-12 09:45:05 [config.py:2195] Chunked prefill is enabled with max_num_batched_tokens=8192.
/workspace/data/open-r1-0603/openr1/lib/python3.10/site-packages/mistral_common/tokens/tokenizers/tekken.py:184: FutureWarning: Special tokens not found in models/Mistral-Small-24B-Instruct-2501/tekken.json and default to ({'rank': 0, 'token_str': <SpecialTokens.unk: '<unk>'>, 'is_control': True}, {'rank': 1, 'token_str': <SpecialTokens.bos: '<s>'>, 'is_control': True}, {'rank': 2, 'token_str': <SpecialTokens.eos: '</s>'>, 'is_control': True}, {'rank': 3, 'token_str': <SpecialTokens.begin_inst: '[INST]'>, 'is_control': True}, {'rank': 4, 'token_str': <SpecialTokens.end_inst: '[/INST]'>, 'is_control': True}, {'rank': 5, 'token_str': <SpecialTokens.begin_tools: '[AVAILABLE_TOOLS]'>, 'is_control': True}, {'rank': 6, 'token_str': <SpecialTokens.end_tools: '[/AVAILABLE_TOOLS]'>, 'is_control': True}, {'rank': 7, 'token_str': <SpecialTokens.begin_tool_results: '[TOOL_RESULTS]'>, 'is_control': True}, {'rank': 8, 'token_str': <SpecialTokens.end_tool_results: '[/TOOL_RESULTS]'>, 'is_control': True}, {'rank': 9, 'token_str': <SpecialTokens.tool_calls: '[TOOL_CALLS]'>, 'is_control': True}, {'rank': 10, 'token_str': <SpecialTokens.img: '[IMG]'>, 'is_control': True}, {'rank': 11, 'token_str': <SpecialTokens.pad: '<pad>'>, 'is_control': True}, {'rank': 12, 'token_str': <SpecialTokens.img_break: '[IMG_BREAK]'>, 'is_control': True}, {'rank': 13, 'token_str': <SpecialTokens.img_end: '[IMG_END]'>, 'is_control': True}, {'rank': 14, 'token_str': <SpecialTokens.prefix: '[PREFIX]'>, 'is_control': True}, {'rank': 15, 'token_str': <SpecialTokens.middle: '[MIDDLE]'>, 'is_control': True}, {'rank': 16, 'token_str': <SpecialTokens.suffix: '[SUFFIX]'>, 'is_control': True}, {'rank': 17, 'token_str': <SpecialTokens.begin_system: '[SYSTEM_PROMPT]'>, 'is_control': True}, {'rank': 18, 'token_str': <SpecialTokens.end_system: '[/SYSTEM_PROMPT]'>, 'is_control': True}, {'rank': 19, 'token_str': <SpecialTokens.begin_tool_content: '[TOOL_CONTENT]'>, 'is_control': True}). This behavior will be deprecated going forward. Please update your tokenizer file and include all special tokens you need.
  warnings.warn(
WARNING 06-12 09:45:07 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
INFO 06-12 09:45:11 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:15 [core.py:455] Waiting for init message from front-end.
INFO 06-12 09:45:15 [core.py:70] Initializing a V1 LLM engine (v0.9.1) with config: model='models/Mistral-Small-24B-Instruct-2501', speculative_config=None, tokenizer='models/Mistral-Small-24B-Instruct-2501', skip_tokenizer_init=False, tokenizer_mode=mistral, revision=None, override_neuron_config={}, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=32768, download_dir=None, load_format=mistral, tensor_parallel_size=8, pipeline_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto,  device_config=cuda, decoding_config=DecodingConfig(backend='auto', disable_fallback=False, disable_any_whitespace=False, disable_additional_properties=False, reasoning_backend=''), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None), seed=0, served_model_name=Mistral-Small-24B-Instruct-2501, num_scheduler_steps=1, multi_step_stream_outputs=True, enable_prefix_caching=True, chunked_prefill_enabled=True, use_async_output_proc=True, pooler_config=None, compilation_config={"level":3,"debug_dump_path":"","cache_dir":"","backend":"","custom_ops":["none"],"splitting_ops":["vllm.unified_attention","vllm.unified_attention_with_output"],"use_inductor":true,"compile_sizes":[],"inductor_compile_config":{"enable_auto_functionalized_v2":false},"inductor_passes":{},"use_cudagraph":true,"cudagraph_num_of_warmups":1,"cudagraph_capture_sizes":[512,504,496,488,480,472,464,456,448,440,432,424,416,408,400,392,384,376,368,360,352,344,336,328,320,312,304,296,288,280,272,264,256,248,240,232,224,216,208,200,192,184,176,168,160,152,144,136,128,120,112,104,96,88,80,72,64,56,48,40,32,24,16,8,4,2,1],"cudagraph_copy_inputs":false,"full_cuda_graph":false,"max_capture_size":512,"local_cache_dir":null}
WARNING 06-12 09:45:15 [multiproc_worker_utils.py:307] Reducing Torch parallelism from 64 threads to 1 to avoid unnecessary CPU contention. Set OMP_NUM_THREADS in the external environment to tune this value as needed.
INFO 06-12 09:45:15 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0, 1, 2, 3, 4, 5, 6, 7], buffer_handle=(8, 16777216, 10, 'psm_0342c4f0'), local_subscribe_addr='ipc:///tmp/9e3dc032-41ce-4a02-9c00-3a3fa3bcdf79', remote_subscribe_addr=None, remote_addr_ipv6=False)
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
WARNING 06-12 09:45:17 [env_override.py:17] NCCL_CUMEM_ENABLE is set to 0, skipping override. This may increase memory overhead with cudagraph+allreduce: https://github.com/NVIDIA/nccl/issues/1234
INFO 06-12 09:45:27 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:27 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:27 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:27 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:28 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:28 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:28 [__init__.py:244] Automatically detected platform cuda.
INFO 06-12 09:45:28 [__init__.py:244] Automatically detected platform cuda.
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f6fec943f10>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f82752bfee0>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f311ab1feb0>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f2d78697eb0>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f2484e47d90>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f4c5fbf3f40>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7ff8e9fbfe20>
WARNING 06-12 09:45:38 [utils.py:2737] Methods determine_num_available_blocks,device_config,get_cache_block_size_bytes,initialize_cache not implemented in <vllm.v1.worker.gpu_worker.Worker object at 0x7f9f011e7eb0>
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_f4196905'), local_subscribe_addr='ipc:///tmp/667f7cab-ac62-479d-86b1-9a974d0cdf7d', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_17345d60'), local_subscribe_addr='ipc:///tmp/01e95c25-ff25-4b0f-912b-125ae39c1442', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_0b306af8'), local_subscribe_addr='ipc:///tmp/9c6dc067-a1dc-4f7d-ae44-c69f71750664', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_d9b5fc34'), local_subscribe_addr='ipc:///tmp/a5e3852f-6667-41a5-85f9-a8adb99b7555', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_45aa83e7'), local_subscribe_addr='ipc:///tmp/ff96ac32-e432-49c5-8b32-c28d985adadb', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_cfeea0e7'), local_subscribe_addr='ipc:///tmp/c127c492-a656-4807-a22d-91db0627b5fa', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_b18eb2d1'), local_subscribe_addr='ipc:///tmp/772d30b1-2990-41ed-8c60-25ed38f55e40', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:38 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[0], buffer_handle=(1, 10485760, 10, 'psm_7f713be7'), local_subscribe_addr='ipc:///tmp/04f42a48-59c6-44d6-9088-75034a202687', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:43 [utils.py:1126] Found nccl from library libnccl.so.2
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:43 [pynccl.py:70] vLLM is using nccl==2.26.2
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:45 [custom_all_reduce_utils.py:246] reading GPU P2P access cache from /root/.cache/vllm/gpu_p2p_access_cache_for_0,1,2,3,4,5,6,7.json
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:45 [shm_broadcast.py:289] vLLM message queue communication handle: Handle(local_reader_ranks=[1, 2, 3, 4, 5, 6, 7], buffer_handle=(7, 4194304, 6, 'psm_e865585a'), local_subscribe_addr='ipc:///tmp/4e2f70d0-bfd1-45a7-93aa-0c58b3025e53', remote_subscribe_addr=None, remote_addr_ipv6=False)
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 3 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 3, EP rank 3
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 2 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 2, EP rank 2
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 1 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 1, EP rank 1
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 0 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 0, EP rank 0
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 5 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 5, EP rank 5
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 4 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 4, EP rank 4
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 7 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 7, EP rank 7
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:45 [parallel_state.py:1065] rank 6 in world size 8 is assigned as DP rank 0, PP rank 0, TP rank 6, EP rank 6
(VllmWorker rank=3 pid=74092) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=2 pid=74091) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=0 pid=74089) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=5 pid=74094) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=6 pid=74095) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=7 pid=74096) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=4 pid=74093) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=1 pid=74090) WARNING 06-12 09:45:45 [topk_topp_sampler.py:59] FlashInfer is not available. Falling back to the PyTorch-native implementation of top-p & top-k sampling. For the best performance, please install FlashInfer.
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:45 [gpu_model_runner.py:1595] Starting to load model models/Mistral-Small-24B-Instruct-2501...
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=2 pid=74091) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=6 pid=74095) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=7 pid=74096) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:46 [gpu_model_runner.py:1600] Loading model from scratch...
(VllmWorker rank=1 pid=74090) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=5 pid=74094) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=3 pid=74092) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=0 pid=74089) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
(VllmWorker rank=4 pid=74093) INFO 06-12 09:45:46 [cuda.py:252] Using Flash Attention backend on V1 engine.
Loading safetensors checkpoint shards:   0% Completed | 0/1 [00:00<?, ?it/s]
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.38 seconds
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.42 seconds
Loading safetensors checkpoint shards: 100% Completed | 1/1 [01:16<00:00, 76.44s/it]
Loading safetensors checkpoint shards: 100% Completed | 1/1 [01:16<00:00, 76.44s/it]
(VllmWorker rank=0 pid=74089) 
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.45 seconds
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.56 seconds
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.62 seconds
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.59 seconds
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.62 seconds
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:02 [default_loader.py:272] Loading weights took 76.70 seconds
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.774442 seconds
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.605351 seconds
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.737031 seconds
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.568607 seconds
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.600160 seconds
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.849632 seconds
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.813007 seconds
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:03 [gpu_model_runner.py:1624] Model loading took 5.4980 GiB and 76.772485 seconds
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_0_0 for vLLM's torch.compile
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_7_0 for vLLM's torch.compile
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_6_0 for vLLM's torch.compile
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_1_0 for vLLM's torch.compile
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_4_0 for vLLM's torch.compile
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_5_0 for vLLM's torch.compile
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_2_0 for vLLM's torch.compile
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:17 [backends.py:462] Using cache directory: /root/.cache/vllm/torch_compile_cache/3e47913f0c/rank_3_0 for vLLM's torch.compile
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.30 s
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.22 s
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.31 s
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.29 s
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.20 s
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.23 s
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.22 s
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:17 [backends.py:472] Dynamo bytecode transform time: 13.21 s
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.145 s
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.212 s
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.278 s
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.292 s
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.198 s
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.248 s
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.292 s
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:22 [backends.py:135] Directly load the compiled graph(s) for shape None from the cache, took 5.240 s
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.21 s in total
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.20 s in total
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.31 s in total
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.29 s in total
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.23 s in total
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.22 s in total
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.22 s in total
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:25 [monitor.py:34] torch.compile takes 13.30 s in total
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.80 GiB
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.33 GiB
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:26 [gpu_worker.py:227] Available KV cache memory: 58.42 GiB
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,063,136 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.48x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,058,208 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 93.33x
INFO 06-12 09:47:27 [kv_cache_utils.py:715] GPU KV cache size: 3,082,784 tokens
INFO 06-12 09:47:27 [kv_cache_utils.py:719] Maximum concurrency for 32,768 tokens per request: 94.08x
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:50 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:51 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:51 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:52 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:55 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:58 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:58 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:59 [custom_all_reduce.py:196] Registering 5427 cuda graph addresses
(VllmWorker rank=7 pid=74096) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=0 pid=74089) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=3 pid=74092) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=1 pid=74090) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=2 pid=74091) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=5 pid=74094) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=4 pid=74093) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
(VllmWorker rank=6 pid=74095) INFO 06-12 09:47:59 [gpu_model_runner.py:2048] Graph capturing finished in 32 secs, took 0.70 GiB
INFO 06-12 09:47:59 [core.py:171] init engine (profile, create kv cache, warmup model) took 55.90 seconds
/workspace/data/open-r1-0603/openr1/lib/python3.10/site-packages/mistral_common/tokens/tokenizers/tekken.py:184: FutureWarning: Special tokens not found in models/Mistral-Small-24B-Instruct-2501/tekken.json and default to ({'rank': 0, 'token_str': <SpecialTokens.unk: '<unk>'>, 'is_control': True}, {'rank': 1, 'token_str': <SpecialTokens.bos: '<s>'>, 'is_control': True}, {'rank': 2, 'token_str': <SpecialTokens.eos: '</s>'>, 'is_control': True}, {'rank': 3, 'token_str': <SpecialTokens.begin_inst: '[INST]'>, 'is_control': True}, {'rank': 4, 'token_str': <SpecialTokens.end_inst: '[/INST]'>, 'is_control': True}, {'rank': 5, 'token_str': <SpecialTokens.begin_tools: '[AVAILABLE_TOOLS]'>, 'is_control': True}, {'rank': 6, 'token_str': <SpecialTokens.end_tools: '[/AVAILABLE_TOOLS]'>, 'is_control': True}, {'rank': 7, 'token_str': <SpecialTokens.begin_tool_results: '[TOOL_RESULTS]'>, 'is_control': True}, {'rank': 8, 'token_str': <SpecialTokens.end_tool_results: '[/TOOL_RESULTS]'>, 'is_control': True}, {'rank': 9, 'token_str': <SpecialTokens.tool_calls: '[TOOL_CALLS]'>, 'is_control': True}, {'rank': 10, 'token_str': <SpecialTokens.img: '[IMG]'>, 'is_control': True}, {'rank': 11, 'token_str': <SpecialTokens.pad: '<pad>'>, 'is_control': True}, {'rank': 12, 'token_str': <SpecialTokens.img_break: '[IMG_BREAK]'>, 'is_control': True}, {'rank': 13, 'token_str': <SpecialTokens.img_end: '[IMG_END]'>, 'is_control': True}, {'rank': 14, 'token_str': <SpecialTokens.prefix: '[PREFIX]'>, 'is_control': True}, {'rank': 15, 'token_str': <SpecialTokens.middle: '[MIDDLE]'>, 'is_control': True}, {'rank': 16, 'token_str': <SpecialTokens.suffix: '[SUFFIX]'>, 'is_control': True}, {'rank': 17, 'token_str': <SpecialTokens.begin_system: '[SYSTEM_PROMPT]'>, 'is_control': True}, {'rank': 18, 'token_str': <SpecialTokens.end_system: '[/SYSTEM_PROMPT]'>, 'is_control': True}, {'rank': 19, 'token_str': <SpecialTokens.begin_tool_content: '[TOOL_CONTENT]'>, 'is_control': True}). This behavior will be deprecated going forward. Please update your tokenizer file and include all special tokens you need.
  warnings.warn(
INFO 06-12 09:48:00 [loggers.py:137] Engine 000: vllm cache_config_info with initialization after num_gpu_blocks is: 191138
WARNING 06-12 09:48:00 [chat_utils.py:321] 'chat_template' cannot be overridden for mistral tokenizer.
INFO 06-12 09:48:00 [serving_chat.py:81] "auto" tool choice has been enabled please note that while the parallel_tool_calls client option is preset for compatibility reasons, it will be ignored.
WARNING 06-12 09:48:00 [config.py:1363] Default sampling parameters have been overridden by the model's Hugging Face generation config recommended from the model creator. If this is not intended, please relaunch vLLM instance with `--generation-config vllm`.
INFO 06-12 09:48:00 [serving_chat.py:118] Using default chat sampling params from model: {'temperature': 0.15}
INFO 06-12 09:48:00 [serving_completion.py:66] Using default completion sampling params from model: {'temperature': 0.15}
INFO 06-12 09:48:00 [api_server.py:1349] Starting vLLM API server 0 on http://0.0.0.0:8002
INFO 06-12 09:48:00 [launcher.py:29] Available routes are:
INFO 06-12 09:48:00 [launcher.py:37] Route: /openapi.json, Methods: GET, HEAD
INFO 06-12 09:48:00 [launcher.py:37] Route: /docs, Methods: GET, HEAD
INFO 06-12 09:48:00 [launcher.py:37] Route: /docs/oauth2-redirect, Methods: GET, HEAD
INFO 06-12 09:48:00 [launcher.py:37] Route: /redoc, Methods: GET, HEAD
INFO 06-12 09:48:00 [launcher.py:37] Route: /health, Methods: GET
INFO 06-12 09:48:00 [launcher.py:37] Route: /load, Methods: GET
INFO 06-12 09:48:00 [launcher.py:37] Route: /ping, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /ping, Methods: GET
INFO 06-12 09:48:00 [launcher.py:37] Route: /tokenize, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /detokenize, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/models, Methods: GET
INFO 06-12 09:48:00 [launcher.py:37] Route: /version, Methods: GET
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/chat/completions, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/completions, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/embeddings, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /pooling, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /classify, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /score, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/score, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/audio/transcriptions, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /rerank, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v1/rerank, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /v2/rerank, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /invocations, Methods: POST
INFO 06-12 09:48:00 [launcher.py:37] Route: /metrics, Methods: GET
INFO:     Started server process [73677]
INFO:     Waiting for application startup.
INFO:     Application startup complete.

Basic setup

from openai import OpenAI
from transformers import AutoTokenizer
import json

tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather in a given location",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {
                        "type": "string",
                        "description": "Country or city name, e.g., 'Taipei', 'Japan'"
                    },
                    "unit": {
                        "type": "string",
                        "description": "Temperature unit. Use Celsius for Asian cities; use Fahrenheit for European and American cities",
                        "enum": ["celsius", "fahrenheit"]
                    }
                },
                "required": ["location", "unit"]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "search",
            "description": "A search engine similar to Google. Use it to look up information about knowledge, weather, stocks, movies, novels, encyclopedias, etc. If you're not sure about the answer, search for it.",
            "parameters": {
                "type": "object",
                "properties": {
                    "query": {
                        "type": "string",
                        "description": "Should be a search query, e.g., '2024 South Korea martial law'"
                    }
                },
                "required": ["query"]
            }
        }
    }
]

client = OpenAI(
    base_url="http://127.0.0.1:8002/v1",
    api_key="EMPTY",
)

model_path = "Mistral-Small-24B-Instruct-2501"
tokenizer = AutoTokenizer.from_pretrained(model_path, local_files_only=True)


def decode_ids(token_ids):
    decoded_text = tokenizer.decode(token_ids, skip_special_tokens=False)
    return decoded_text

#1 Client Query (Tool call)

response = client.chat.completions.create(
    model=client.models.list().data[0].id,
    messages=[
        {"role": "system", "content": "Remember your knowledge cutoff is December 2024, and today is June 12, 2025."},
        {"role": "user", "content": "What are the birthdays of Trump、Putin and Musk?"},
    ],
    max_tokens=1500,
    temperature=0,
    top_p=0.95,
    tools=tools,
    tool_choice="auto"
)

print(response)
# ChatCompletion(id='chatcmpl-47ae6f5ca38049d1b97f0b0a7562428c', choices=[Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content=None, refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='ERmQKeeei', function=Function(arguments='{"query": "Trump birthday"}', name='search'), type='function'), ChatCompletionMessageToolCall(id='eQXPwIxH2', function=Function(arguments='{"query": "Putin birthday"}', name='search'), type='function'), ChatCompletionMessageToolCall(id='wCDBcn1LS', function=Function(arguments='{"query": "Musk birthday"}', name='search'), type='function')], reasoning_content=None), stop_reason=None)], created=1749722138, model='Mistral-Small-24B-Instruct-2501', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=57, prompt_tokens=290, total_tokens=347, completion_tokens_details=None, prompt_tokens_details=None), prompt_logprobs=None, kv_transfer_params=None)

#1 Server Output (Tool call)

INFO:     127.0.0.1:57304 - "GET /v1/models HTTP/1.1" 200 OK
INFO 06-12 09:55:38 [chat_utils.py:420] Detected the chat template content format to be 'string'. You can set `--chat-template-content-format` to override this.
WARNING 06-12 09:55:38 [chat_utils.py:324] 'add_generation_prompt' is not supported for mistral tokenizer, so it will be ignored.
WARNING 06-12 09:55:38 [chat_utils.py:328] 'continue_final_message' is not supported for mistral tokenizer, so it will be ignored.
INFO 06-12 09:55:38 [logger.py:43] Received request chatcmpl-47ae6f5ca38049d1b97f0b0a7562428c: prompt: None, params: SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.0, top_p=1.0, top_k=0, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], include_stop_str_in_output=False, ignore_eos=False, max_tokens=1500, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None, guided_decoding=None, extra_args=None), prompt_token_ids: [1, 17, 68552, 2143, 7807, 59379, 1395, 7199, 1032, 1050, 1048, 1050, 1052, 1044, 1321, 9406, 1395, 6633, 1032, 1049, 1050, 1044, 1032, 1050, 1048, 1050, 1053, 1046, 18, 5, 1091, 19227, 4994, 2811, 1429, 5165, 1897, 1429, 5165, 2811, 16753, 2391, 2811, 1429, 1689, 1095, 45629, 1897, 1429, 14653, 2811, 1429, 4147, 1278, 3519, 17253, 1294, 1261, 4265, 7285, 1897, 1429, 26204, 2811, 16753, 4994, 2811, 1429, 6371, 1897, 1429, 48649, 2811, 16753, 17611, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 34492, 1505, 5970, 2564, 1044, 1324, 3596, 3109, 1576, 105472, 51720, 2096, 1576, 1074, 2464, 51720, 38416, 4179, 1429, 8979, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 78343, 5476, 1046, 13516, 112399, 1394, 19943, 16500, 1059, 2210, 1439, 16605, 10432, 1394, 9298, 1321, 5150, 16500, 1897, 1429, 31222, 2811, 12161, 1099, 79092, 1897, 1429, 38600, 10432, 4964, 47579, 1429, 15760, 2811, 12161, 17611, 1897, 1429, 8979, 4964, 2821, 4179, 16753, 4994, 2811, 1429, 5165, 1897, 1429, 5165, 2811, 16753, 2391, 2811, 1429, 8928, 1897, 1429, 14653, 2811, 1429, 1065, 6123, 7555, 4510, 1317, 13346, 1046, 13516, 1494, 1317, 2985, 2015, 3686, 2314, 7807, 1044, 17253, 1044, 49884, 1044, 31218, 1044, 47395, 1044, 108155, 23193, 4409, 1044, 6704, 1046, 3367, 1636, 6185, 1605, 5257, 2314, 1278, 4832, 1044, 6123, 1394, 1494, 39249, 1429, 26204, 2811, 16753, 4994, 2811, 1429, 6371, 1897, 1429, 48649, 2811, 16753, 5272, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 38868, 1402, 1261, 6123, 7330, 1044, 1324, 3596, 3109, 1576, 1050, 1048, 1050, 1052, 6443, 17896, 61774, 5622, 38416, 47579, 1429, 15760, 2811, 12161, 5272, 4964, 2821, 27028, 6, 3, 7493, 1584, 1278, 11573, 27942, 1307, 22279, 1749, 38742, 1259, 1321, 96389, 1063, 4], prompt_embeds shape: None, lora_request: None, prompt_adapter_request: None.
INFO 06-12 09:55:38 [async_llm.py:271] Added request chatcmpl-47ae6f5ca38049d1b97f0b0a7562428c.
INFO:     127.0.0.1:57304 - "POST /v1/chat/completions HTTP/1.1" 200 OK

#1 Decode Server Output (Tool call)

print(decode_ids(prompt_token_ids))

Real Outcome:

Image

Expectation:

Image

#2 Client Query (Tool Call + Tool Response)

response = client.chat.completions.create(
    model=client.models.list().data[0].id,
    messages=[
        {"role": "system", "content": "Remember your knowledge cutoff is December 2024, and today is June 12, 2025."},
        {"role": "user", "content": "What are the birthdays of Trump、Putin and Musk?"},
        {
            "role": "assistant",
            "content": "",
            "tool_calls": response.choices[0].message.tool_calls
        },
        {
            "role": "tool",
            "content": '1911/02/17',
            "tool_call_id": response.choices[0].message.tool_calls[0].id
        },
        {
            "role": "tool",
            "content": '1922/08/23',
            "tool_call_id": response.choices[0].message.tool_calls[1].id
        },
        {
            "role": "tool",
            "content": '1955/09/25',
            "tool_call_id": response.choices[0].message.tool_calls[2].id
        }
        
    ],
    max_tokens=1500,
    temperature=0,
    top_p=0.95,
    tools=tools,
    tool_choice="auto"
)
print(response)
# ChatCompletion(id='chatcmpl-864443284ed949be9dd2a0b1098a8c52', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='Trump was born on 1911/02/17, Putin was born on 1922/08/23, and Musk was born on 1955/09/25.', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=[], reasoning_content=None), stop_reason=None)], created=1749723320, model='Mistral-Small-24B-Instruct-2501', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=51, prompt_tokens=441, total_tokens=492, completion_tokens_details=None, prompt_tokens_details=None), prompt_logprobs=None, kv_transfer_params=None)

#2 Server Output (Tool call + Tool Response)

INFO:     127.0.0.1:37306 - "GET /v1/models HTTP/1.1" 200 OK
INFO 06-12 10:15:20 [logger.py:43] Received request chatcmpl-864443284ed949be9dd2a0b1098a8c52: prompt: None, params: SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.0, top_p=1.0, top_k=0, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], include_stop_str_in_output=False, ignore_eos=False, max_tokens=1500, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None, guided_decoding=None, extra_args=None), prompt_token_ids: [1, 17, 68552, 2143, 7807, 59379, 1395, 7199, 1032, 1050, 1048, 1050, 1052, 1044, 1321, 9406, 1395, 6633, 1032, 1049, 1050, 1044, 1032, 1050, 1048, 1050, 1053, 1046, 18, 5, 1091, 19227, 4994, 2811, 1429, 5165, 1897, 1429, 5165, 2811, 16753, 2391, 2811, 1429, 1689, 1095, 45629, 1897, 1429, 14653, 2811, 1429, 4147, 1278, 3519, 17253, 1294, 1261, 4265, 7285, 1897, 1429, 26204, 2811, 16753, 4994, 2811, 1429, 6371, 1897, 1429, 48649, 2811, 16753, 17611, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 34492, 1505, 5970, 2564, 1044, 1324, 3596, 3109, 1576, 105472, 51720, 2096, 1576, 1074, 2464, 51720, 38416, 4179, 1429, 8979, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 78343, 5476, 1046, 13516, 112399, 1394, 19943, 16500, 1059, 2210, 1439, 16605, 10432, 1394, 9298, 1321, 5150, 16500, 1897, 1429, 31222, 2811, 12161, 1099, 79092, 1897, 1429, 38600, 10432, 4964, 47579, 1429, 15760, 2811, 12161, 17611, 1897, 1429, 8979, 4964, 2821, 4179, 16753, 4994, 2811, 1429, 5165, 1897, 1429, 5165, 2811, 16753, 2391, 2811, 1429, 8928, 1897, 1429, 14653, 2811, 1429, 1065, 6123, 7555, 4510, 1317, 13346, 1046, 13516, 1494, 1317, 2985, 2015, 3686, 2314, 7807, 1044, 17253, 1044, 49884, 1044, 31218, 1044, 47395, 1044, 108155, 23193, 4409, 1044, 6704, 1046, 3367, 1636, 6185, 1605, 5257, 2314, 1278, 4832, 1044, 6123, 1394, 1494, 39249, 1429, 26204, 2811, 16753, 4994, 2811, 1429, 6371, 1897, 1429, 48649, 2811, 16753, 5272, 2811, 16753, 4994, 2811, 1429, 3607, 1897, 1429, 14653, 2811, 1429, 38868, 1402, 1261, 6123, 7330, 1044, 1324, 3596, 3109, 1576, 1050, 1048, 1050, 1052, 6443, 17896, 61774, 5622, 38416, 47579, 1429, 15760, 2811, 12161, 5272, 4964, 2821, 27028, 6, 3, 7493, 1584, 1278, 11573, 27942, 1307, 22279, 1749, 38742, 1259, 1321, 96389, 1063, 4, 9, 1091, 19227, 2391, 2811, 1429, 8928, 1897, 1429, 61906, 2811, 16753, 5272, 2811, 1429, 3821, 4939, 36335, 50666, 1429, 1327, 2811, 1429, 2794, 1109, 1081, 1075, 6035, 25063, 50666, 16753, 2391, 2811, 1429, 8928, 1897, 1429, 61906, 2811, 16753, 5272, 2811, 1429, 38742, 1259, 36335, 50666, 1429, 1327, 2811, 1429, 1101, 1081, 1088, 1080, 1119, 1073, 1120, 1072, 1050, 50666, 16753, 2391, 2811, 1429, 8928, 1897, 1429, 61906, 2811, 16753, 5272, 2811, 1429, 1077, 15465, 36335, 50666, 1429, 1327, 2811, 1429, 1119, 8584, 1066, 18170, 1049, 18369, 1034, 27028, 2, 7, 2794, 1109, 1081, 1075, 6035, 25063, 19, 1049, 1057, 1049, 1049, 1047, 1048, 1050, 1047, 1049, 1055, 8, 7, 1101, 1081, 1088, 1080, 1119, 1073, 1120, 1072, 1050, 19, 1049, 1057, 1050, 1050, 1047, 1048, 1056, 1047, 1050, 1051, 8, 7, 1119, 8584, 1066, 18170, 1049, 18369, 19, 1049, 1057, 1053, 1053, 1047, 1048, 1057, 1047, 1050, 1053, 8], prompt_embeds shape: None, lora_request: None, prompt_adapter_request: None.
INFO 06-12 10:15:20 [async_llm.py:271] Added request chatcmpl-864443284ed949be9dd2a0b1098a8c52.
INFO:     127.0.0.1:37306 - "POST /v1/chat/completions HTTP/1.1" 200 OK

#2 Decode Server Output (Tool Call+Tool Response)

print(decode_ids(prompt_token_ids))

Real Outcome:

Image

Expectation:

Image

🐛Bug Description

  1. You can find that parallel_tool_prompt (You are a helpful assistant that can call tools. If you ....) is missing in Real Outcome.
  2. Please focus on how the [TOOL_RESULTS] terms is handled. It is noticeably inconsistent with the configured template tool_chat_template_mistral3.jinja.
    [TOOL_RESULTS]ERmQKeeei[TOOL_CONTENT]1911/02/17[/TOOL_RESULTS] shuould be [TOOL_RESULTS] {"content": "1911/02/17", "call_id": "ERmQKeeei"}[/TOOL_RESULTS]

Also noticed that one log messages might be relevant during the vllm serve startup process:

WARNING 06-12 09:48:00 [chat_utils.py:321] 'chat_template' cannot be overridden for mistral tokenizer.

💬Other question

When using a chat template, is it possible for the server to still display the prompt instead of the converted prompt_token_ids? Otherwise, it's a bit inconvenient to manually decode them using the tokenizer each time.

Thanks !

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions