mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[PR #157] Fix system prompt propagation in conversation inputs #154
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#154
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/157
Author: @qorud02
Created: 10/5/2026
Status: 🔄 Open
Base:
main← Head:fix-conversation-system-prompt📝 Commits (1)
1489a56Fix system prompt propagation in conversation inputs📊 Changes
2 files changed (+160 additions, -2 deletions)
View changed files
📝
deepseek_vl2/models/processing_deepseek_vl_v2.py(+2 -2)➕
tests/test_system_prompt.py(+158 -0)📄 Description
Passing
system_promptto the processor withconversationscurrently changes the displayedsft_format, but leaves the actualinput_idsunchanged. Forward it through the existingsystemsargument toformat_messages_v2and use it for the first conversation turn. Preserve empty/default template behavior and the precedence of an explicit firstsystemordeepseekapi-sysmessage.Fixes #134.
Validation:
python -m unittest discover -s tests -v: 6 tests pass; the original code fails the missing-system-token assertions.python -m compileall -q deepseek_vl2 tests inference.py web_demo.py: passes.The tests execute the actual processor and PyTorch tensor paths with a small character tokenizer. They cover first-turn propagation, label masking, explicit-system precedence, template defaults and batched output. Model generation, real Llama tokenization and image processing were not exercised.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.