mirror of
https://github.com/deepseek-ai/DeepSeek-R1.git
synced 2026-11-05 00:47:42 +00:00
[GH-ISSUE #633] DeepSeek-R1-Distill-Qwen-7B的chat template在train中把<think></think>标签之间的文字删掉 #509
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-R1#509
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?
Originally created by @ethanelasky on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/633
当我用huggingface的tokenizer来tokenize 包含reasoning的prompt的时候,我的reasoning总是被apply_chat_template删掉。
相关的Jinja code(在tokenizer_config.json里): {% if '' in content %}{% set content = content.split('')[-1] %}{% endif %}
apply_chat_template前,我的助理prompt长这样:
\nOkay, let's tackle the question: "Is the protein Papilin secreted?" \n\nFirst, I need to recall what Papilin is. From what I remember, Papilin is a type of proteoglycan. Proteoglycans are proteins that have glycosaminoglycan chains attached. They are often found in the extracellular matrix, which would suggest they are secreted because the extracellular matrix is outside the cell.\n\nNow, the question is whether Papilin is secreted. Since proteoglycans are typically components of the extracellular matrix, they must be secreted by cells to get there. The extracellular matrix is produced by cells secreting various proteins and other molecules, so if Papilin is part of that, it's likely secreted.\n\nI should check if there's any specific information about Papilin's secretion. But given that the documents provided are empty, I can't reference them. Based on my existing knowledge, Papilin's role in the extracellular matrix as a proteoglycan implies that it is indeed a secreted protein. There's no conflicting information here, so the answer should be yes.\n\n\nOkay, let's tackle the question: "Is the protein Papilin secreted?" \n\nFirst, I need to recall what Papilin is. From what I remember, Papilin is a type of proteoglycan. Proteoglycans are proteins that have glycosaminoglycan chains attached. They are often found in the extracellular matrix, which would suggest they are secreted because the extracellular matrix is outside the cell.\n\nNow, the question is whether Papilin is secreted. Since proteoglycans are typically components of the extracellular matrix, they must be secreted by cells to get there. The extracellular matrix is produced by cells secreting various proteins and other molecules, so if Papilin is part of that, it's likely secreted.\n\nI should check if there's any specific information about Papilin's secretion. But given that the documents provided are empty, I can't reference them. Based on my existing knowledge, Papilin's role in the extracellular matrix as a proteoglycan implies that it is indeed a secreted protein. There's no conflicting information here, so the answer should be yes.\n\n
apply_chat_template后(这里是全prompt):
<|begin▁of▁sentence|><|User|>\nGiven a question and relevant documents, provide a concise, exact answer.\nFirst, read the documents carefully, then extract or synthesize a precise answer.\nIf the provided documents are not helpful, you must answer based on your own knowledge.\nThe answer should be as brief as possible while being complete and accurate.\n\nQuestion: Is the protein Papilin secreted?\n\nDocuments:\nSAMPLE_FORMATTED_CONTEXTS\n<|Assistant|>\n\boxed{yes}<|end▁of▁sentence|>
@github-actions[bot] commented on GitHub (Jun 4, 2025):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Jun 21, 2025):
false