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

Was the chat template applied in ochat/config/conversation_template.py? #200

Open
houghtonweihu opened this issue Mar 12, 2024 · 0 comments

Comments

@houghtonweihu
Copy link

In ReadMe, it shows that when sending a request to API server, use this format:
curl http://localhost:18888/v1/chat/completions
-H "Content-Type: application/json"
-d '{
"model": "openchat_3.5",
"messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}]
}'

It also says: when using transformers for inference, use this format:
GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant:

It seems that the method tokenize_conversations in conversation_template.py only adds eot to messages, but did not add GPT4 Correct User and GPT4 Correct Assistant (only used user and assistant in messages)?

As a result, the same input is processed differently for API server and Inference with transformers?
Because of this, the model that I tested for inference with transformers will behave differently when it is deployed
using API Server?

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

1 participant