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]: Error using OpenAI interface with TGI: logit_bias: invalid type: map, expected a sequence #1549

Closed
jvstme opened this issue Aug 13, 2024 · 0 comments · Fixed by #1557
Assignees
Labels
bug Something isn't working

Comments

@jvstme
Copy link
Collaborator

jvstme commented Aug 13, 2024

Steps to reproduce

> cat .dstack.yml
type: service

image: ghcr.io/huggingface/text-generation-inference:2.2.0
env:
  - HUGGING_FACE_HUB_TOKEN
  - MODEL_ID=mistralai/Mistral-7B-Instruct-v0.2
commands:
  - text-generation-launcher --port 8000 --trust-remote-code
port: 8000

resources:
  gpu: 24GB

model:
  format: openai
  type: chat
  name: mistralai/Mistral-7B-Instruct-v0.2

> dstack apply -y

...

> curl https://gateway.mydomain.example/chat/completions -H 'Authorization: Bearer *****' -H 'Content-Type: application/json' -d '{"model":"mistralai/Mistral-7B-Instruct-v0.2", "messages": [{"role":"user", "content":"Hi"}]}'

Actual behaviour

> curl https://gateway.mydomain.example/chat/completions -H 'Authorization: Bearer *****' -H 'Content-Type: application/json' -d '{"model":"mistralai/Mistral-7B-Instruct-v0.2", "messages": [{"role":"user", "content":"Hi"}]}'
{"error":"GatewayError","message":"Failed to deserialize the JSON body into the target type: logit_bias: invalid type: map, expected a sequence at line 1 column 137"}

Expected behaviour

A successful response from the model.

dstack version

master

Server logs

No response

Additional information

Workaround: Use format: tgi in the service configuration when launching models with TGI.

@jvstme jvstme added the bug Something isn't working label Aug 13, 2024
@jvstme jvstme self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant