[GH-ISSUE #37] 关于vllm使用的疑问 #24

Closed
opened 2026-10-26 21:01:47 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @xuyifan-0731 on GitHub (Feb 1, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-LLM/issues/37

你好!在使用官方提供的vllm代码的时候,我有一个问题:
prompts = [tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False) for messages in messages_list]
这一步操作之后,实际的生成结果是一个字符串序列。但是诸如<|begin▁of▁sentence|>等其实应该是作为special token拼接的。请问这样使用是否是正确的?

Originally created by @xuyifan-0731 on GitHub (Feb 1, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-LLM/issues/37 你好!在使用官方提供的vllm代码的时候,我有一个问题: prompts = [tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False) for messages in messages_list] 这一步操作之后,实际的生成结果是一个字符串序列。但是诸如<|begin▁of▁sentence|>等其实应该是作为special token拼接的。请问这样使用是否是正确的?
bsakaguchi 2026-10-26 21:01:47 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@luofuli commented on GitHub (Feb 4, 2024):

你好!在使用官方提供的vllm代码的时候,我有一个问题: prompts = [tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False) for messages in messages_list] 这一步操作之后,实际的生成结果是一个字符串序列。但是诸如<|begin▁of▁sentence|>等其实应该是作为special token拼接的。请问这样使用是否是正确的?

Thanks for pointing out this bug. We've already fixed it.
https://github.com/deepseek-ai/DeepSeek-LLM/pull/39/commits/ebec08a377ab5a770472d8353ecd75137e9f1f36

<!-- gh-comment-id:1925798778 --> @luofuli commented on GitHub (Feb 4, 2024): > 你好!在使用官方提供的vllm代码的时候,我有一个问题: prompts = [tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False) for messages in messages_list] 这一步操作之后,实际的生成结果是一个字符串序列。但是诸如<|begin▁of▁sentence|>等其实应该是作为special token拼接的。请问这样使用是否是正确的? Thanks for pointing out this bug. We've already fixed it. https://github.com/deepseek-ai/DeepSeek-LLM/pull/39/commits/ebec08a377ab5a770472d8353ecd75137e9f1f36
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-LLM#24
No description provided.