Skip to content
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

[Bug]: vllm部署后,用官方的例子调用报错openai.BadRequestError: Error code: 400 - {'object': 'error', 'message': "name 'Extension' is not defined", 'type': 'BadRequestError', 'param': None, 'code': 400} #998

Open
4 tasks done
1gst opened this issue Sep 29, 2024 · 2 comments

Comments

@1gst
Copy link

1gst commented Sep 29, 2024

Model Series

Qwen2.5

What are the models used?

Qwen2.5-14b-Instruct

What is the scenario where the problem happened?

vllm版本是0.6.2

Is this badcase known and can it be solved using avaiable techniques?

  • I have followed the GitHub README.
  • I have checked the Qwen documentation and cannot find a solution there.
  • I have checked the documentation of the related framework and cannot find useful information.
  • I have searched the issues and there is not a similar one.

Information about environment

Ubuntu20.04.6TLS
CPU:2AMD Milan 7543 32核 2.8GHz
内存:1TB
硬盘:2
SATA SSD 3.84TB
网卡:双口千兆1+双口万兆1
显卡:4*A100_SXM4_40GB NV-Link
cuda 12.2

Description

按照官方的例子进行的操作
pip install vllm
vllm serve Qwen/Qwen2.5-7B-Instruct
然后运行代码:

from openai import OpenAI
# Set OpenAI's API key and API base to use vLLM's API server.
openai_api_key = "EMPTY"
openai_api_base = "http://localhost:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)

chat_response = client.chat.completions.create(
    model="Qwen/Qwen2.5-7B-Instruct",
    messages=[
        {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
        {"role": "user", "content": "Tell me something about large language models."},
    ],
    temperature=0.7,
    top_p=0.8,
    max_tokens=512,
    extra_body={
        "repetition_penalty": 1.05,
    },
)
print("Chat response:", chat_response)

能够确保的是成功部署了模型,并且能够调到模型接口,部署日志也会报这个错误。

@1gst
Copy link
Author

1gst commented Sep 29, 2024

微信截图_20240929172059

@jklj077
Copy link
Collaborator

jklj077 commented Oct 9, 2024

the error appeared to be raised by transformers but that's unusual. what's your transformers version?

@jklj077 jklj077 changed the title [Badcase]: vllm部署后,用官方的例子调用报错openai.BadRequestError: Error code: 400 - {'object': 'error', 'message': "name 'Extension' is not defined", 'type': 'BadRequestError', 'param': None, 'code': 400} [Bug]: vllm部署后,用官方的例子调用报错openai.BadRequestError: Error code: 400 - {'object': 'error', 'message': "name 'Extension' is not defined", 'type': 'BadRequestError', 'param': None, 'code': 400} Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants