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] 输出的内容中,content,其他的选项都是错误的或者null #818

Open
5 tasks done
huqianghui opened this issue Mar 6, 2025 · 1 comment
Open
5 tasks done

Comments

@huqianghui
Copy link

检查清单

  • 1. 我已经搜索过相关问题,但未能获得预期的帮助
  • 2. 该问题在最新版本中尚未修复
  • 3. 请注意,如果您提交的BUG相关 issue 缺少对应环境信息和最小可复现示例,我们将难以复现和定位问题,降低获得反馈的可能性
  • 4. 如果您提出的不是bug而是问题,请在讨论区发起讨论 https://github.com/kvcache-ai/ktransformers/discussions。否则该 issue 将被关闭
  • 5. 为方便社区交流,我将使用中文/英文或附上中文/英文翻译(如使用其他语言)。未附带翻译的非中文/英语内容可能会被关闭

问题描述

通过Rest API 请求:curl -X 'POST' 'http://0.0.0.0:10002/v1/chat/completions' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{
"messages": [
{
"content": "tell a joke",
"role": "user"
}
],
"model": "DeepSeek-R1",
"stream": false
}'

输出的结果是:

{"id":"6e143f47-53d8-413f-a721-26bd447d3b14","object":"chat.completion","created":1741240491,"model":"not implmented","system_fingerprint":"not implmented","usage":{"completion_tokens":1,"prompt_tokens":1,"total_tokens":2},"choices":[{"index":0,"message":{"content":"\nOkay, the user asked for a joke. Let me think of a good one. I want it to be light-hearted and not offensive. Maybe something with a pun or a play on words since those are usually well-received.\n\nHmm, how about something tech-related? The user might appreciate a joke about common tech issues. Let's see... "Why did the smartphone go to therapy?" Wait, that's a start. Now, the punchline needs to tie into the reason for therapy. Maybe it's because it had too many "apps"-periences? That's a play on "app" and "experiences." Apps-periences sounds like "excess experiences," which could imply emotional baggage. That makes sense. Apps are applications on a phone, so the therapy angle works because the phone is overwhelmed by all the apps. \n\nLet me check if that's clear. The setup is straightforward, leading the listener to think about why a smartphone would need therapy. The punchline connects "apps" with "experiences," creating a pun. It's simple and doesn't rely on any obscure references, so most people should get it. Also, it's not offensive or inappropriate. Yeah, that should work. I'll go with that.\n\n\nWhy did the smartphone go to therapy? \nBecause it had too many "apps"-periences! 📱😅 \n\n(Get it? Like "app" + "experiences" = emotional baggage? Okay, I’ll see myself out…)","role":"assistant","name":null},"logprobs":null,"finish_reason":null}]}

里面的参数model,system_fingerprint,usage.completion_tokens 和usage.prompt_tokens都是空的,或者错误的。

这样没有办法统计TPS 之类的参数。

复现步骤

  1. 启动模型:!ktransformers --model_path deepseek-ai/DeepSeek-R1 --gguf_path ./DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M --port 10002

  2. 执行:
    curl -X 'POST' 'http://0.0.0.0:10002/v1/chat/completions' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{
    "messages": [
    {
    "content": "tell a joke",
    "role": "user"
    }
    ],
    "model": "DeepSeek-R1",
    "stream": false
    }'

环境信息

  1. 操作系统: 0001-com-ubuntu-server-jammy-22_04-lts-gen2(22.04.202502280)

  2. GPU : A10

@qiyuxinlin
Copy link
Contributor

已收到您的反馈,我们需要一段时间加入上述评估,感谢您的指正

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