modelscope / eval-scope

A streamlined and customizable framework for efficient large model evaluation and performance benchmarking
Apache License 2.0
103 stars 12 forks source link

perf 测试不输出结果 #69

Open hetian127 opened 6 days ago

hetian127 commented 6 days ago

环境: 部署了一个基于 qwen2 72B的vllm openai api server

命令: llmuses perf --url 'http://127.0.0.1:8000/v1/chat/completions' --parallel 4 --model '/share/modelscope/hub/qwen/Qwen2-72B-Instruct-FP8' --log-every-n-query 10 --read-timeout=120 --dataset-path '/path/open_qa.jsonl' -n 1 --max-prompt-length 128000 --api openai --stream --n-choices 3 --stop-token-ids 128001 128009 --dataset openqa --debug

执行过程中能看到 vllm的日志,

image

但llmuses一直没有输出最后的结果,卡在如下图

image

请问会是哪里的问题呢,非常感谢

worldPower555 commented 5 days ago

我也有一样的情况, 服务端使用的vLLM推理框架进行部署, 客户端采用llmuses perf进行压测。

命令如下, 只发送一次请求, llmuses perf客户端请求成功许久后命令都没有终止并生成db文件, 想知道怎样的参数才能正常终止命令:

llmuses perf   --url 'http://127.0.0.1:8000/v1/chat/completions'   --parallel 1   --model '/data/models/llama2-7b-hf/'       --dataset-path '/data/gitclone/eval-scope/open_qa.jsonl'      --max-prompt-length 512   --api openai   --max-tokens 512      -n 1 --stop 500

vllm服务端截图: image

llmuses perf命令日志如下, 之后就一直卡住, 没有生成测试的sqlite db文件:

$ llmuses perf   --url 'http://127.0.0.1:8000/v1/chat/completions'   --parallel 1   --model '/data/models/llama2-7b-hf/'       --dataset-path '/data/gitclone/eval-scope/open_qa.jsonl'      --max-prompt-length 512   --api openai   --max-tokens 512      -n 1 --stop 500 --debug
Save the result to : .//data/models/llama2-7b-hf/_benchmark_2024_07_05_16_17_52_523849.db
2024-07-05 16:17:52,524 - perf - http_client.py - on_request_start - 52 - DEBUG - Starting request: <TraceRequestStartParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), headers=<CIMultiDict('Content-Type': 'application/json', 'user-agent': 'modelscope_bench')>)>
2024-07-05 16:17:52,524 - perf - http_client.py - on_request_chunk_sent - 56 - DEBUG - Request body: TraceRequestChunkSentParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), chunk=b'{"messages": [{"role": "user", "content": "{\\"question\\":\\"\\u76d7\\u8d3c\\u5929\\u8d4b\\u76d7\\u8d3c\\u600e\\u4e48\\u52a0\\u5929\\u8d4b?\\u77e5\\u9053\\u544a\\u8bc9\\u4e00\\u4e0b\\u4e0b\\u5566~~ \\",\\"human_answers\\":[\\"\\u641e\\u5315\\u9996\\u8fd8\\u52a0\\u51fa\\u8840\\uff08\\u697c\\u4e0a\\uff09\\uff1f\\\\r\\\\n\\u5929\\u8d4b\\u770b\\u4f60\\u559c\\u7231\\u4e86\\uff0c31 8 12 \\u548c  21 8 22 PK\\u90fd\\u597d\\uff0c\\\\r\\\\n17 34 \\u662f\\u56e2\\u961f\\u526f\\u672c\\u8d3c\\uff0c\\u73a9\\u8f93\\u51fa\\u7684\\uff0c\\u6b66\\u5668\\u5efa\\u8bae1\\u5315\\u99961\\u5251\\u3002\\"],\\"chatgpt_answers\\":[\\"\\u5982\\u679c\\u4f60\\u5728\\u73a9\\u89d2\\u8272\\u626e\\u6f14\\u6e38\\u620f\\uff08RPG\\uff09\\uff0c\\u90a3\\u4e48\\u4f60\\u53ef\\u80fd\\u662f\\u5728\\u95ee\\u5982\\u4f55\\u5728\\u6e38\\u620f\\u4e2d\\u7ed9\\u4f60\\u7684\\u76d7\\u8d3c\\u89d2\\u8272\\u52a0\\u5929\\u8d4b\\u3002\\u5177\\u4f53\\u65b9\\u6cd5\\u53ef\\u80fd\\u56e0\\u6e38\\u620f\\u800c\\u5f02\\uff0c\\u4f46\\u901a\\u5e38\\u6709\\u4ee5\\u4e0b\\u51e0\\u79cd\\u65b9\\u6cd5\\uff1a \\\\n1. \\u5728\\u6e38\\u620f\\u5f00\\u59cb\\u65f6\\u9009\\u62e9\\u76d7\\u8d3c\\u5929\\u8d4b\\uff1a\\u5728\\u6e38\\u620f\\u5f00\\u59cb\\u65f6\\uff0c\\u4f60\\u53ef\\u4ee5\\u9009\\u62e9\\u4f60\\u60f3\\u8981\\u7684\\u5929\\u8d4b\\u3002\\u8fd9\\u901a\\u5e38\\u662f\\u901a\\u8fc7\\u9009\\u62e9\\u4e0d\\u540c\\u7684\\u89d2\\u8272\\u79cd\\u65cf\\u6216\\u804c\\u4e1a\\u6765\\u5b9e\\u73b0\\u7684\\u3002 \\\\n2. \\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\u83b7\\u5f97\\u5929\\u8d4b\\uff1a\\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\uff0c\\u4f60\\u53ef\\u80fd\\u4f1a\\u83b7\\u5f97\\u4e00\\u4e9b\\u4e0e\\u76d7\\u8d3c\\u76f8\\u5173\\u7684\\u5929\\u8d4b\\u3002\\u8fd9\\u53ef\\u80fd\\u662f\\u901a\\u8fc7\\u5b8c\\u6210\\u4efb\\u52a1\\u3001\\u5347\\u7ea7\\u6216\\u89e3\\u9501\\u65b0\\u7684\\u6280\\u80fd\\u6765\\u5b9e\\u73b0\\u7684\\u3002 \\\\n3. \\u4f7f\\u7528\\u9053\\u5177\\u6216\\u88c5\\u5907\\u83b7\\u5f97\\u5929\\u8d4b\\uff1a\\u4f60\\u53ef\\u80fd\\u4f1a\\u53d1\\u73b0\\u4e00\\u4e9b\\u9053\\u5177\\u6216\\u88c5\\u5907\\uff0c\\u5b83\\u4eec\\u53ef\\u4ee5\\u8d4b\\u4e88\\u4f60\\u4e00\\u4e9b\\u76d7\\u8d3c\\u5929\\u8d4b\\u3002\\u8fd9\\u4e9b\\u9053\\u5177\\u6216\\u88c5\\u5907\\u901a\\u5e38\\u662f\\u968f\\u673a\\u751f\\u6210\\u7684\\uff0c\\u6216\\u8005\\u662f\\u4f60\\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\u83b7\\u5f97\\u7684\\u5956\\u52b1\\u3002 \\\\n\\u5e0c\\u671b\\u8fd9\\u4e9b\\u4fe1\\u606f\\u5bf9\\u4f60\\u6709\\u6240\\u5e2e\\u52a9\\uff01\\"]}"}], "model": "/data/models/llama2-7b-hf/", "max_tokens": 512, "stop": ["500"]}')
2024-07-05 16:18:01,416 - perf - http_client.py - on_response_chunk_received - 60 - DEBUG - Response info: <TraceResponseChunkReceivedParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), chunk=b'{"id":"cmpl-e22c24ae2142425ca5c2dd68fdb343e7","object":"chat.completion","created":1720167472,"model":"/data/models/llama2-7b-hf/","choices":[{"index":0,"message":{"role":"assistant","content":"\\n\xe7\x9b\x97\xe8\xb4\xbc\xe5\xa4\xa9\xe8\xb5\x8b\xe7\x9b\x97\xe8\xb4\xbc\xe6\x80\x8e\xe4\xb9\x88\xe5\x8a\xa0\xe5\xa4\xa9\xe8\xb5\x8b?\xe7\x9f\xa5\xe9\x81\x93\xe5\x91\x8a\xe8\xaf\x89\xe4\xb8\x80\xe4\xb8\x8b\xe4\xb8\x8b\xe5\x95\xa6~~\\n\xe6\x90\x9e\xe5\x8c\x95\xe9\xa6\x96\xe8\xbf\x98\xe5\x8a\xa0\xe5\x87\xba\xe8\xa1\x80\xef\xbc\x88\xe6\xa5\xbc\xe4\xb8\x8a\xef\xbc\x89\xef\xbc\x9f\\n\xe5\xa4\xa9\xe8\xb5\x8b\xe7\x9c\x8b\xe4\xbd\xa0\xe5\x96\x9c\xe7\x88\xb1\xe4\xba\x86\xef\xbc\x8c31 8 12 \xe5\x92\x8c  21 8 22 PK\xe9\x83\xbd\xe5\xa5\xbd\xef\xbc\x8c\\n17 34 \xe6\x98\xaf\xe5\x9b\xa2\xe9\x98\x9f\xe5\x89\xaf\xe6\x9c\xac\xe8\xb4\xbc\xef\xbc\x8c\xe7\x8e\xa9\xe8\xbe\x93\xe5\x87\xba\xe7\x9a\x84\xef\xbc\x8c\xe6\xad\xa6\xe5\x99\xa8\xe5\xbb\xba\xe8\xae\xae1\xe5\x8c\x95\xe9\xa6\x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e7\x94\xa8\xe9\x81\x93\xe5\x85\xb7\xe6\x88\x96\xe8\xa3\x85\xe5\xa4\x87\xe8\x8e\xb7\xe5\xbe\x97\xe5\xa4\xa9\xe8\xb5\x8b\xef\xbc\x9a\xe4\xbd\xa0\xe5\x8f\xaf\xe8\x83\xbd\xe4\xbc\x9a\xe5\x8f\x91\xe7\x8e\xb0\xe4\xb8\x80\xe4\xba\x9b\xe9\x81\x93\xe5\x85\xb7\xe6\x88\x96\xe8\xa3\x85\xe5\xa4\x87\xef\xbc\x8c\xe5\xae\x83\xe4\xbb\xac\xe5\x8f\xaf\xe4\xbb\xa5\xe8\xb5\x8b\xe4\xba\x88\xe4\xbd\xa0\xe4\xb8\x80\xe4\xba\x9b\xe7\x9b\x97\xe8\xb4\xbc\xe5\xa4\xa9\xe8\xb5\x8b\xe3\x80\x82\xe8\xbf\x99\xe4\xba\x9b\xe9\x81\x93\xe5\x85\xb7\xe6\x88\x96\xe8\xa3\x85\xe5\xa4\x87\xe9\x80\x9a\xe5\xb8\xb8\xe6\x98\xaf\xe9\x9a\x8f\xe6\x9c\xba\xe7\x94\x9f\xe6\x88\x90\xe7\x9a\x84\xef\xbc\x8c\xe6\x88\x96\xe8\x80\x85\xe6\x98\xaf\xe4\xbd\xa0\xe5\x9c\xa8\xe6\xb8\xb8\xe6\x88\x8f\xe8\xbf\x9b\xe7\xa8\x8b\xe4\xb8\xad\xe8\x8e\xb7\xe5\xbe\x97\xe7\x9a\x84"},"logprobs":null,"finish_reason":"length","stop_reason":null}],"usage":{"prompt_tokens":572,"total_tokens":1084,"completion_tokens":512}}')>
2024-07-05 16:18:01,416 - perf - http_client.py - send_requests_worker - 557 - DEBUG - {"id": "cmpl-e22c24ae2142425ca5c2dd68fdb343e7", "object": "chat.completion", "created": 1720167472, "model": "/data/models/llama2-7b-hf/", "choices": [{"index": 0, "message": {"role": "assistant", "content": "\n\u76d7\u8d3c\u5929\u8d4b\u76d7\u8d3c\u600e\u4e48\u52a0\u5929\u8d4b?\u77e5\u9053\u544a\u8bc9\u4e00\u4e0b\u4e0b\u5566~~\n\u641e\u5315\u9996\u8fd8\u52a0\u51fa\u8840\uff08\u697c\u4e0a\uff09\uff1f\n\u5929\u8d4b\u770b\u4f60\u559c\u7231\u4e86\uff0c31 8 12 \u548c  21 8 22 PK\u90fd\u597d\uff0c\n17 34 \u662f\u56e2\u961f\u526f\u672c\u8d3c\uff0c\u73a9\u8f93\u51fa\u7684\uff0c\u6b66\u5668\u5efa\u8bae1\u5315\u99961\u5251\n\u5982\u679c\u4f60\u5728\u73a9\u89d2\u8272\u626e\u6f14\u6e38\u620f\uff08RPG\uff09\uff0c\u90a3\u4e48\u4f60\u53ef\u80fd\u662f\u5728\u95ee\u5982\u4f55\u5728\u6e38\u620f\u4e2d\u7ed9\u4f60\u7684\u76d7\u8d3c\u89d2\u8272\u52a0\u5929\u8d4b\u3002\u5177\u4f53\u65b9\u6cd5\u53ef\u80fd\u56e0\u6e38\u620f\u800c\u5f02\uff0c\u4f46\u901a\u5e38\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\n1. \u5728\u6e38\u620f\u5f00\u59cb\u65f6\u9009\u62e9\u76d7\u8d3c\u5929\u8d4b\uff1a\u5728\u6e38\u620f\u5f00\u59cb\u65f6\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u4f60\u60f3\u8981\u7684\u5929\u8d4b\u3002\u8fd9\u901a\u5e38\u662f\u901a\u8fc7\u9009\u62e9\u4e0d\u540c\u7684\u89d2\u8272\u79cd\u65cf\u6216\u804c\u4e1a\u6765\u5b9e\u73b0\u7684\u3002\n2. \u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\u83b7\u5f97\u5929\u8d4b\uff1a\u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\uff0c\u4f60\u53ef\u80fd\u4f1a\u83b7\u5f97\u4e00\u4e9b\u4e0e\u76d7\u8d3c\u76f8\u5173\u7684\u5929\u8d4b\u3002\u8fd9\u53ef\u80fd\u662f\u901a\u8fc7\u5b8c\u6210\u4efb\u52a1\u3001\u5347\u7ea7\u6216\u89e3\u9501\u65b0\u7684\u6280\u80fd\u6765\u5b9e\u73b0\u7684\u3002\n3. \u4f7f\u7528\u9053\u5177\u6216\u88c5\u5907\u83b7\u5f97\u5929\u8d4b\uff1a\u4f60\u53ef\u80fd\u4f1a\u53d1\u73b0\u4e00\u4e9b\u9053\u5177\u6216\u88c5\u5907\uff0c\u5b83\u4eec\u53ef\u4ee5\u8d4b\u4e88\u4f60\u4e00\u4e9b\u76d7\u8d3c\u5929\u8d4b\u3002\u8fd9\u4e9b\u9053\u5177\u6216\u88c5\u5907\u901a\u5e38\u662f\u968f\u673a\u751f\u6210\u7684\uff0c\u6216\u8005\u662f\u4f60\u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\u83b7\u5f97\u7684"}, "logprobs": null, "finish_reason": "length", "stop_reason": null}], "usage": {"prompt_tokens": 572, "total_tokens": 1084, "completion_tokens": 512}}
liuyhwangyh commented 5 days ago

环境: 部署了一个基于 qwen2 72B的vllm openai api server

命令: llmuses perf --url 'http://127.0.0.1:8000/v1/chat/completions' --parallel 4 --model '/share/modelscope/hub/qwen/Qwen2-72B-Instruct-FP8' --log-every-n-query 10 --read-timeout=120 --dataset-path '/path/open_qa.jsonl' -n 1 --max-prompt-length 128000 --api openai --stream --n-choices 3 --stop-token-ids 128001 128009 --dataset openqa --debug

执行过程中能看到 vllm的日志,

image

但llmuses一直没有输出最后的结果,卡在如下图

image

请问会是哪里的问题呢,非常感谢

您先测试下--n-choices=1

liuyhwangyh commented 5 days ago

我也有一样的情况, 服务端使用的vLLM推理框架进行部署, 客户端采用llmuses perf进行压测。

命令如下, 只发送一次请求, llmuses perf客户端请求成功许久后命令都没有终止并生成db文件, 想知道怎样的参数才能正常终止命令:

llmuses perf   --url 'http://127.0.0.1:8000/v1/chat/completions'   --parallel 1   --model '/data/models/llama2-7b-hf/'       --dataset-path '/data/gitclone/eval-scope/open_qa.jsonl'      --max-prompt-length 512   --api openai   --max-tokens 512      -n 1 --stop 500

vllm服务端截图: image

llmuses perf命令日志如下, 之后就一直卡住, 没有生成测试的sqlite db文件:

$ llmuses perf   --url 'http://127.0.0.1:8000/v1/chat/completions'   --parallel 1   --model '/data/models/llama2-7b-hf/'       --dataset-path '/data/gitclone/eval-scope/open_qa.jsonl'      --max-prompt-length 512   --api openai   --max-tokens 512      -n 1 --stop 500 --debug
Save the result to : .//data/models/llama2-7b-hf/_benchmark_2024_07_05_16_17_52_523849.db
2024-07-05 16:17:52,524 - perf - http_client.py - on_request_start - 52 - DEBUG - Starting request: <TraceRequestStartParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), headers=<CIMultiDict('Content-Type': 'application/json', 'user-agent': 'modelscope_bench')>)>
2024-07-05 16:17:52,524 - perf - http_client.py - on_request_chunk_sent - 56 - DEBUG - Request body: TraceRequestChunkSentParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), chunk=b'{"messages": [{"role": "user", "content": "{\\"question\\":\\"\\u76d7\\u8d3c\\u5929\\u8d4b\\u76d7\\u8d3c\\u600e\\u4e48\\u52a0\\u5929\\u8d4b?\\u77e5\\u9053\\u544a\\u8bc9\\u4e00\\u4e0b\\u4e0b\\u5566~~ \\",\\"human_answers\\":[\\"\\u641e\\u5315\\u9996\\u8fd8\\u52a0\\u51fa\\u8840\\uff08\\u697c\\u4e0a\\uff09\\uff1f\\\\r\\\\n\\u5929\\u8d4b\\u770b\\u4f60\\u559c\\u7231\\u4e86\\uff0c31 8 12 \\u548c  21 8 22 PK\\u90fd\\u597d\\uff0c\\\\r\\\\n17 34 \\u662f\\u56e2\\u961f\\u526f\\u672c\\u8d3c\\uff0c\\u73a9\\u8f93\\u51fa\\u7684\\uff0c\\u6b66\\u5668\\u5efa\\u8bae1\\u5315\\u99961\\u5251\\u3002\\"],\\"chatgpt_answers\\":[\\"\\u5982\\u679c\\u4f60\\u5728\\u73a9\\u89d2\\u8272\\u626e\\u6f14\\u6e38\\u620f\\uff08RPG\\uff09\\uff0c\\u90a3\\u4e48\\u4f60\\u53ef\\u80fd\\u662f\\u5728\\u95ee\\u5982\\u4f55\\u5728\\u6e38\\u620f\\u4e2d\\u7ed9\\u4f60\\u7684\\u76d7\\u8d3c\\u89d2\\u8272\\u52a0\\u5929\\u8d4b\\u3002\\u5177\\u4f53\\u65b9\\u6cd5\\u53ef\\u80fd\\u56e0\\u6e38\\u620f\\u800c\\u5f02\\uff0c\\u4f46\\u901a\\u5e38\\u6709\\u4ee5\\u4e0b\\u51e0\\u79cd\\u65b9\\u6cd5\\uff1a \\\\n1. \\u5728\\u6e38\\u620f\\u5f00\\u59cb\\u65f6\\u9009\\u62e9\\u76d7\\u8d3c\\u5929\\u8d4b\\uff1a\\u5728\\u6e38\\u620f\\u5f00\\u59cb\\u65f6\\uff0c\\u4f60\\u53ef\\u4ee5\\u9009\\u62e9\\u4f60\\u60f3\\u8981\\u7684\\u5929\\u8d4b\\u3002\\u8fd9\\u901a\\u5e38\\u662f\\u901a\\u8fc7\\u9009\\u62e9\\u4e0d\\u540c\\u7684\\u89d2\\u8272\\u79cd\\u65cf\\u6216\\u804c\\u4e1a\\u6765\\u5b9e\\u73b0\\u7684\\u3002 \\\\n2. \\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\u83b7\\u5f97\\u5929\\u8d4b\\uff1a\\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\uff0c\\u4f60\\u53ef\\u80fd\\u4f1a\\u83b7\\u5f97\\u4e00\\u4e9b\\u4e0e\\u76d7\\u8d3c\\u76f8\\u5173\\u7684\\u5929\\u8d4b\\u3002\\u8fd9\\u53ef\\u80fd\\u662f\\u901a\\u8fc7\\u5b8c\\u6210\\u4efb\\u52a1\\u3001\\u5347\\u7ea7\\u6216\\u89e3\\u9501\\u65b0\\u7684\\u6280\\u80fd\\u6765\\u5b9e\\u73b0\\u7684\\u3002 \\\\n3. \\u4f7f\\u7528\\u9053\\u5177\\u6216\\u88c5\\u5907\\u83b7\\u5f97\\u5929\\u8d4b\\uff1a\\u4f60\\u53ef\\u80fd\\u4f1a\\u53d1\\u73b0\\u4e00\\u4e9b\\u9053\\u5177\\u6216\\u88c5\\u5907\\uff0c\\u5b83\\u4eec\\u53ef\\u4ee5\\u8d4b\\u4e88\\u4f60\\u4e00\\u4e9b\\u76d7\\u8d3c\\u5929\\u8d4b\\u3002\\u8fd9\\u4e9b\\u9053\\u5177\\u6216\\u88c5\\u5907\\u901a\\u5e38\\u662f\\u968f\\u673a\\u751f\\u6210\\u7684\\uff0c\\u6216\\u8005\\u662f\\u4f60\\u5728\\u6e38\\u620f\\u8fdb\\u7a0b\\u4e2d\\u83b7\\u5f97\\u7684\\u5956\\u52b1\\u3002 \\\\n\\u5e0c\\u671b\\u8fd9\\u4e9b\\u4fe1\\u606f\\u5bf9\\u4f60\\u6709\\u6240\\u5e2e\\u52a9\\uff01\\"]}"}], "model": "/data/models/llama2-7b-hf/", "max_tokens": 512, "stop": ["500"]}')
2024-07-05 16:18:01,416 - perf - http_client.py - on_response_chunk_received - 60 - DEBUG - Response info: <TraceResponseChunkReceivedParams(method='POST', url=URL('http://127.0.0.1:8000/v1/chat/completions'), chunk=b'{"id":"cmpl-e22c24ae2142425ca5c2dd68fdb343e7","object":"chat.completion","created":1720167472,"model":"/data/models/llama2-7b-hf/","choices":[{"index":0,"message":{"role":"assistant","content":"\\n\xe7\x9b\x97\xe8\xb4\xbc\xe5\xa4\xa9\xe8\xb5\x8b\xe7\x9b\x97\xe8\xb4\xbc\xe6\x80\x8e\xe4\xb9\x88\xe5\x8a\xa0\xe5\xa4\xa9\xe8\xb5\x8b?\xe7\x9f\xa5\xe9\x81\x93\xe5\x91\x8a\xe8\xaf\x89\xe4\xb8\x80\xe4\xb8\x8b\xe4\xb8\x8b\xe5\x95\xa6~~\\n\xe6\x90\x9e\xe5\x8c\x95\xe9\xa6\x96\xe8\xbf\x98\xe5\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\x88\x90\xe7\x9a\x84\xef\xbc\x8c\xe6\x88\x96\xe8\x80\x85\xe6\x98\xaf\xe4\xbd\xa0\xe5\x9c\xa8\xe6\xb8\xb8\xe6\x88\x8f\xe8\xbf\x9b\xe7\xa8\x8b\xe4\xb8\xad\xe8\x8e\xb7\xe5\xbe\x97\xe7\x9a\x84"},"logprobs":null,"finish_reason":"length","stop_reason":null}],"usage":{"prompt_tokens":572,"total_tokens":1084,"completion_tokens":512}}')>
2024-07-05 16:18:01,416 - perf - http_client.py - send_requests_worker - 557 - DEBUG - {"id": "cmpl-e22c24ae2142425ca5c2dd68fdb343e7", "object": "chat.completion", "created": 1720167472, "model": "/data/models/llama2-7b-hf/", "choices": [{"index": 0, "message": {"role": "assistant", "content": "\n\u76d7\u8d3c\u5929\u8d4b\u76d7\u8d3c\u600e\u4e48\u52a0\u5929\u8d4b?\u77e5\u9053\u544a\u8bc9\u4e00\u4e0b\u4e0b\u5566~~\n\u641e\u5315\u9996\u8fd8\u52a0\u51fa\u8840\uff08\u697c\u4e0a\uff09\uff1f\n\u5929\u8d4b\u770b\u4f60\u559c\u7231\u4e86\uff0c31 8 12 \u548c  21 8 22 PK\u90fd\u597d\uff0c\n17 34 \u662f\u56e2\u961f\u526f\u672c\u8d3c\uff0c\u73a9\u8f93\u51fa\u7684\uff0c\u6b66\u5668\u5efa\u8bae1\u5315\u99961\u5251\n\u5982\u679c\u4f60\u5728\u73a9\u89d2\u8272\u626e\u6f14\u6e38\u620f\uff08RPG\uff09\uff0c\u90a3\u4e48\u4f60\u53ef\u80fd\u662f\u5728\u95ee\u5982\u4f55\u5728\u6e38\u620f\u4e2d\u7ed9\u4f60\u7684\u76d7\u8d3c\u89d2\u8272\u52a0\u5929\u8d4b\u3002\u5177\u4f53\u65b9\u6cd5\u53ef\u80fd\u56e0\u6e38\u620f\u800c\u5f02\uff0c\u4f46\u901a\u5e38\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\n1. \u5728\u6e38\u620f\u5f00\u59cb\u65f6\u9009\u62e9\u76d7\u8d3c\u5929\u8d4b\uff1a\u5728\u6e38\u620f\u5f00\u59cb\u65f6\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u4f60\u60f3\u8981\u7684\u5929\u8d4b\u3002\u8fd9\u901a\u5e38\u662f\u901a\u8fc7\u9009\u62e9\u4e0d\u540c\u7684\u89d2\u8272\u79cd\u65cf\u6216\u804c\u4e1a\u6765\u5b9e\u73b0\u7684\u3002\n2. \u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\u83b7\u5f97\u5929\u8d4b\uff1a\u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\uff0c\u4f60\u53ef\u80fd\u4f1a\u83b7\u5f97\u4e00\u4e9b\u4e0e\u76d7\u8d3c\u76f8\u5173\u7684\u5929\u8d4b\u3002\u8fd9\u53ef\u80fd\u662f\u901a\u8fc7\u5b8c\u6210\u4efb\u52a1\u3001\u5347\u7ea7\u6216\u89e3\u9501\u65b0\u7684\u6280\u80fd\u6765\u5b9e\u73b0\u7684\u3002\n3. \u4f7f\u7528\u9053\u5177\u6216\u88c5\u5907\u83b7\u5f97\u5929\u8d4b\uff1a\u4f60\u53ef\u80fd\u4f1a\u53d1\u73b0\u4e00\u4e9b\u9053\u5177\u6216\u88c5\u5907\uff0c\u5b83\u4eec\u53ef\u4ee5\u8d4b\u4e88\u4f60\u4e00\u4e9b\u76d7\u8d3c\u5929\u8d4b\u3002\u8fd9\u4e9b\u9053\u5177\u6216\u88c5\u5907\u901a\u5e38\u662f\u968f\u673a\u751f\u6210\u7684\uff0c\u6216\u8005\u662f\u4f60\u5728\u6e38\u620f\u8fdb\u7a0b\u4e2d\u83b7\u5f97\u7684"}, "logprobs": null, "finish_reason": "length", "stop_reason": null}], "usage": {"prompt_tokens": 572, "total_tokens": 1084, "completion_tokens": 512}}

您用的vllm哪个版本的?

liuyhwangyh commented 5 days ago

使用最新的master版本吗?

liuyhwangyh commented 5 days ago

环境: 部署了一个基于 qwen2 72B的vllm openai api server

命令: llmuses perf --url 'http://127.0.0.1:8000/v1/chat/completions' --parallel 4 --model '/share/modelscope/hub/qwen/Qwen2-72B-Instruct-FP8' --log-every-n-query 10 --read-timeout=120 --dataset-path '/path/open_qa.jsonl' -n 1 --max-prompt-length 128000 --api openai --stream --n-choices 3 --stop-token-ids 128001 128009 --dataset openqa --debug

执行过程中能看到 vllm的日志,

image

但llmuses一直没有输出最后的结果,卡在如下图

image

请问会是哪里的问题呢,非常感谢

--parallel 1 -n 1, 先跑出结果

hetian127 commented 3 days ago

环境: 部署了一个基于 qwen2 72B的vllm openai api server 命令: llmuses perf --url 'http://127.0.0.1:8000/v1/chat/completions' --parallel 4 --model '/share/modelscope/hub/qwen/Qwen2-72B-Instruct-FP8' --log-every-n-query 10 --read-timeout=120 --dataset-path '/path/open_qa.jsonl' -n 1 --max-prompt-length 128000 --api openai --stream --n-choices 3 --stop-token-ids 128001 128009 --dataset openqa --debug 执行过程中能看到 vllm的日志, image 但llmuses一直没有输出最后的结果,卡在如下图 image 请问会是哪里的问题呢,非常感谢

--parallel 1 -n 1, 先跑出结果

非常感谢您的回复。我改了 您提到的参数,命令如下: image

结果一样,卡在下面位置

image

worldPower555 commented 3 days ago

非常感谢您的回复, 我使用的vLLM 版本是 v4.0 51c31bc10ca7c48b580cd58fcd741ba4d6db4447 @liuyhwangyh image

vLLM v4.0版本运行LLama2-7B-hf命令如下:

python -m vllm.entrypoints.openai.api_server --model /data/models/llama2-7b-hf/ --swap-space 16 --host 0.0.0.0 --port 8000 
wangxingjun778 commented 5 hours ago

已复现,目测是OpenAI format api response解析问题,解决中,很快会再更新下代码。