mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[PR #156] Wrap a DeepSeek-VL2 user turn with the sft markers #153
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL2#153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepSeek-VL2/pull/156
Author: @SashaMIT
Created: 9/28/2026
Status: 🔄 Open
Base:
main← Head:codered-v2-user-turn📝 Commits (1)
781426aWrap a DeepSeek-VL2 user turn with the sft markers.📊 Changes
2 files changed (+36 additions, -1 deletions)
View changed files
📝
deepseek_vl2/models/conversation.py(+1 -1)➕
tests/test_deepseekv2_prompt.py(+35 -0)📄 Description
Hello!came back asHello!<|end▁of▁sentence|>. The deepseekv2 template only wraps a user turn when the role is the literalUser. The registered role is|<User>|, so that check never matches and the user text is stored with the assistant end marker.The check now uses the template's own user role.
Hello!is wrapped as<|sft▁begin|>\nHello!and then the sft end marker.Hi!still ends with<|end▁of▁sentence|>. The deepseek v1 template still starts with<|User|>: Hello!and still ends with<|Assistant|>:.Test plan
python -m unittest tests.test_deepseekv2_prompt(red on tip:Hello!<|end▁of▁sentence|>Hi!<|end▁of▁sentence|>vs the wrapped user turn; green after: 2 tests pass)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.