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: with Wasi-nn-ggml plugin: b2715, when I using curl to send a API request, it responses the stop sign of the model #3360

Open
alabulei1 opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alabulei1
Copy link
Contributor

Summary

After upgrading the wasi-nn-ggml plugin to b 2715, the API response is not correct.

Example 1: <|eot_id|> from Llama-3-8b

curl -X POST http://localhost:8080/v1/chat/completions \
  -H 'accept:application/json' \
  -H 'Content-Type: application/json' \
  -d '{"messages":[{"role":"system", "content": "You are a helpful, respectful and honest assistant"}, {"role":"user", "content": "Hello"}], "model":"Meta-Llama-3-8B-Instruct-Q5_K_M"}'
{"id":"chatcmpl-910f1f25-66c8-4e7b-89e3-f00c545a6b73","object":"chat.completion","created":1713947997,"model":"Meta-Llama-3-8B-Instruct-Q5_K_M","choices":[{"index":0,"message":{"role":"assistant","content":"I'm here to help with any questions you have. What would you like to know?<|eot_id|>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":622,"completion_tokens":20,"total_tokens":642}}%   

Example 2: </s> from Llama-2-7b and Llama-2-13b

curl -X POST http://localhost:8080/v1/chat/completions \
  -H 'accept:application/json' \
  -H 'Content-Type: application/json' \
  -d '{"messages":[{"role":"system", "content": "You are a helpful, respectful and honest assistant"}, {"role":"user", "content": "Hello"}], "model":"llama-2"}'
{"id":"chatcmpl-129c334b-20b5-4555-91b9-74af02bd447c","object":"chat.completion","created":1713949744,"model":"llama-2","choices":[{"index":0,"message":{"role":"assistant","content":"Hello there! *adjusts glasses* It's a pleasure to make your acquaintance. Is there anything I can help you with or would you like to chat? I'm here to assist you in any way I can, so feel free to ask me anything.</s>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":32,"completion_tokens":59,"total_tokens":91}}

Current State

No response

Expected State

No response

Reproduction steps

See above

Screenshots

DESCRIPTION

Any logs you want to share for showing the specific issue

No response

Components

Others

WasmEdge Version or Commit you used

0.13.5

Operating system information

Ubuntu 22.04

Hardware Architecture

Arm

Compiler flags and options

No response

@alabulei1 alabulei1 added the bug Something isn't working label Apr 24, 2024
@alabulei1 alabulei1 changed the title bug: with Wasi-nn-ggml plugin: b2715, when I using curl to send a API request, it responses the top sign of the model bug: with Wasi-nn-ggml plugin: b2715, when I using curl to send a API request, it responses the stop sign of the model Apr 24, 2024
@hydai
Copy link
Member

hydai commented Jun 4, 2024

Is this fixed with latest plugin?

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

No branches or pull requests

2 participants