-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 模型推理压测工具 压测API服务报错(乱码) #301
Comments
参考教程
|
按照教程,修改为 /v1/completions 端点后,运行python脚本: 日志前期显示请求内容为“熵”并且有正常返回值,在请求了两次熵后,请求变为大量熵及�,查看了模型侧的日志,没有接收到body信息,具体日志如下: 尝试了在环境变量中添加export LANG=en_US.UTF-8,以及在python的开始增加# coding=utf-8,无效果 |
这个不是乱码,因为prompt是非常多的“熵”这个字,模型的输出也可能是非常多的“熵”这个字,模型只要产生输出就可以计算推理速度了。 |
明白,这一点充分理解了。目前遇到的问题是接收到的Body为空,从接收端看到的日志如下,从发送端看到的日志是发送了大量的“熵”字。 root@a6ce8af4ebbb:/tmp# tail -f ./completions.log |
请问,你是用什么部署的模型服务呢? 这个使用示例能运行吗? |
我使用的是MindIE-Server,我是用这个使用示例可以正常运行的,其中 /v1/completions 与 /v1/chat/completions 的兼容层是自己实现的,因为MindIE-Server默认没有兼容 /v1/completions 。 |
我这边没有复现这个问题🤦 |
问题描述 / Issue Description
请简要描述您遇到的问题。 / Please briefly describe the issue you encountered.
使用的工具 / Tools Used
执行的代码或指令 / Code or Commands Executed
task_cfg = {"url": "http://127.0.0.1/v1/chat/completions",
"parallel": 1,
"model": "Qwen2.5-72B",
"number": 15,
"api": "openai",
"dataset": "speed_benchmark"}
run_perf_benchmark(task_cfg)
错误日志 / Error Log
Processing: 0it [00:00, ?it/s]2025-02-09 11:32:41,721 - evalscope - ERROR - Request: {'prompt': '熵', 'model': 'Qwen2.5-72B', 'max_tokens': 2048, 'seed': 42, 'stop': [], 'stop_token_ids': []} failed, state_code: 422, data: {"error": "request param contains not messages or messages null", "error_type": "validation"}
2025-02-09 11:32:42,720 - evalscope - ERROR - Request: {'prompt': '熵', 'model': 'Qwen2.5-72B', 'max_tokens': 2048, 'seed': 42, 'stop': [], 'stop_token_ids': []} failed, state_code: 422, data: {"error": "request param contains not messages or messages null", "error_type": "validation"}
Processing: 2it [00:01, 1.96it/s]2025-02-09 11:32:43,723 - evalscope - ERROR - Request: {'prompt': '熵熵熵熵熵熵熵熵熵 熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵熵
运行环境 / Runtime Environment
操作系统 / Operating System:
Python版本 / Python Version:
其他信息 / Additional Information
使用docker构建环境,docker-file:
FROM ubuntu:22.04
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.tuna.tsinghua.edu.cn/ubuntu/|g' /etc/apt/sources.list
RUN apt-get update -y &&
apt-get install -y python3.10 python3-pip &&
apt-get clean all
RUN pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple evalscope
&& pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple "evalscope[perf]"
&& pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple gradio
RUN apt-get update -y &&
apt-get install -y --fix-broken unzip wget &&
apt-get clean all
RUN mkdir -p /root/nltk_data/tokenizers &&
wget -O /root/nltk_data/tokenizers/punkt_tab.zip https://modelscope-open.oss-cn-hangzhou.aliyuncs.com/open_data/nltk_data/punkt_tab.zip &&
unzip /root/nltk_data/tokenizers/punkt_tab.zip -d /root/nltk_data/tokenizers
CMD ["/bin/sh"]
The text was updated successfully, but these errors were encountered: