Open thangld201 opened 2 months ago
Did you make a typo? I could not find max_prompt_tokens
on that page.
@DarkLight1337, my bad. It's truncate_prompt_tokens
(still same problem).
Does the server receive the request at all? Or is it a validation error from the OpenAI client?
@DarkLight1337 I saw the request on server side, with 400 status code.
Which vLLM version are you using? I'm not getting this problem on my end. Please run python collect_env.py
as shown in the OP.
I am using vllm version 0.5.1, I checked the source codes for this version (in my env cache) and saw that truncate_prompt_tokens
is in SamplingParams
already. Currently I work around this by manually truncate the prompts beforehand, but I will try other versions and see if it persists.
Just in case, can you also check your Pydantic version?
My Pydantic version is 2.7.0
. I also checked other lib versions but it was according to vllm's requirements so I dont think thats the problem though ....
Similar issue when using "prompt_logprob" parameters, when serving "MiniCPM-Llama3-V-2_5" @DarkLight1337
Serve command:
CUDA_VISIBLE_DEVICES=0 vllm serve openbmb/MiniCPM-Llama3-V-2_5 --trust-remote-code --dtype auto --api-key token-abc123
Python code
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="token-abc123",
)
completion = client.chat.completions.create(
model="openbmb/MiniCPM-Llama3-V-2_5",
messages=[
{"role": "user", "content": "Do you think 2 is larger than 1? answer yes or no."}
],
extra_body={
"stop": ['<|eot_id|>'],
"prompt_logprobs": True,
}
)
Return
Error code: 400 - {'object': 'error', 'message': "[{'type': 'extra_forbidden', 'loc': ('body', 'prompt_logprobs'), 'msg': 'Extra inputs are not permitted', 'input': True}]", 'type': 'BadRequestError', 'param': None, 'code': 400}
The environment
PyTorch version: 2.3.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0
Clang version: Could not collect
CMake version: version 3.30.1
Libc version: glibc-2.35
Python version: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-113-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
Nvidia driver version: 535.183.01
cuDNN version: Probably one of the following:
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.9.7
/usr/local/cuda-12.2/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.9.7
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
Stepping: 7
CPU max MHz: 4000.0000
CPU min MHz: 1200.0000
BogoMIPS: 6000.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 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 cdp_l3 invpcid_single intel_ppin 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 mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 1.5 MiB (48 instances)
L1i cache: 1.5 MiB (48 instances)
L2 cache: 48 MiB (48 instances)
L3 cache: 71.5 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI Syscall hardening, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; TSX disabled
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] open-clip-torch==2.24.0
[pip3] optree==0.12.1
[pip3] torch==2.3.1+cu121
[pip3] torch-struct==0.5
[pip3] torchaudio==2.3.1+cu121
[pip3] torchvision==0.18.1+cu121
[pip3] transformers==4.43.3
[pip3] transformers-stream-generator==0.0.5
[pip3] triton==2.3.1
[pip3] vllm-nccl-cu12==2.18.1.0.4.0
[conda] blas 1.0 mkl
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libjpeg-turbo 2.0.0 h9bf148f_0 pytorch
[conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-service 2.4.0 py310h5eee18b_1
[conda] mkl_fft 1.3.8 py310h5eee18b_0
[conda] mkl_random 1.2.4 py310hdb19cb5_0
[conda] nomkl 0.0.3 pypi_0 pypi
[conda] numpy 1.26.4 py310h5f9d8c6_0
[conda] numpy-base 1.26.4 py310hb5e798b_0
[conda] nvidia-nccl-cu12 2.20.5 pypi_0 pypi
[conda] open-clip-torch 2.24.0 pypi_0 pypi
[conda] optree 0.12.1 pypi_0 pypi
[conda] pytorch-cuda 12.1 ha16c6d3_5 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torch 2.3.1 pypi_0 pypi
[conda] torch-struct 0.5 pypi_0 pypi
[conda] torchaudio 2.3.1+cu121 pypi_0 pypi
[conda] torchvision 0.18.1 pypi_0 pypi
[conda] transformers 4.43.2 pypi_0 pypi
[conda] transformers-stream-generator 0.0.5 pypi_0 pypi
[conda] triton 2.2.0 pypi_0 pypi
[conda] vllm-nccl-cu12 2.18.1.0.4.0 pypi_0 pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.5.3.post1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
Pydantic version
Version: 2.8.2
Does this happen for any other model?
Does this happen for any other model?
Same issue when using OpenGVLab/InternVL2-4B
, which is also an available model according to latest vllm doc @DarkLight1337
Similar issue when using "prompt_logprob" parameters, when serving "MiniCPM-Llama3-V-2_5" @DarkLight1337
prompt_logprobs
isn't a valid parameter to the OpenAI-compatible server. Please refer to the OpenAI API documentation for how to require logprobs (note that OpenAI API spec only allows getting logprobs from the output tokens).
Similar issue when using "prompt_logprob" parameters, when serving "MiniCPM-Llama3-V-2_5" @DarkLight1337
prompt_logprobs
isn't a valid parameter to the OpenAI-compatible server. Please refer to the OpenAI API documentation for how to require logprobs (note that OpenAI API spec only allows getting logprobs from the output tokens).
Actually, there is an existing workaround for this: https://github.com/vllm-project/vllm/issues/6508
Similar issue when using "prompt_logprob" parameters, when serving "MiniCPM-Llama3-V-2_5" @DarkLight1337
prompt_logprobs
isn't a valid parameter to the OpenAI-compatible server. Please refer to the OpenAI API documentation for how to require logprobs (note that OpenAI API spec only allows getting logprobs from the output tokens).Actually, there is an existing workaround for this: #6508
Thanks!! I will try to follow this on minicpm_v2_5 and internvl2-4B.
Your current environment
🐛 Describe the bug
I used the openai compatible server deployed with vllm:
When I send a request with the following snippet (openai client):
I got the error:
The following code, however, works:
I wonder why in https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html#extra-parameters,
truncate_prompt_tokens
is supported but I am getting the error here ?