[GH-ISSUE #594] DeepSeek-R1-distill-qwen 7B 不输出</think>? #478

Closed
opened 2026-10-26 21:21:58 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Siki-cloud on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/594

在vllm上执行DeepSeek-R1-distill-qwen 7B 在 AIME2024上的推理,发现模型压根就不输出 tag 是怎么回事? 没有执行思考过吗?

以下是我的执行代码:

llm = LLM(model='./model/DeepSeek-R1-Distill-Qwen-7B',...) 
math_problem = [f"{question}\n<think>\n"]  
        
outputs = llm.generate(math_problem, sampling_params)

这是我的一个example output,text 字段并没有think 的标签啊,这是怎么回事?

CompletionOutput(index=0, text='Alright, so I have this problem where Aya goes for a 9-kilometer walk every morning and then stops at a coffee shop. The problem gives me two different scenarios with different walking speeds and different total times, including the time she spends in the coffee shop. I need to find out how long the walk takes when she walks at a speed of \\( s + \\frac{1}{2} \\) kilometers per hour, including the coffee break time.\n\nFirst, let me parse the information given.\n\n1. When she walks at speed \\( s \\) km/h, the entire trip (walk + coffee shop) takes 4 hours. Out of these 4 hours, \\( t \\) minutes are spent in the coffee shop. So, the time she spends walking at this speed is \\( 4 - \\frac{t}{60} \\) hours.\n\n2. When she walks at speed \\( s + 2 \\) km/h, the entire trip takes 2 hours and 24 minutes. Converting 2 hours 24 minutes to hours: 24 minutes is \\( \\frac{24}{60} = 0.4 \\) hours, so total time is \\( 2.4 \\) hours. Again, \\( t \\) minutes are spent in the coffee shop, so the walking time is \\( 2.4 - \\frac{t}{60} \\) hours.\n\nSince the walking distance is always 9 km, I can set up two equations based on the time taken to walk 9 km at each speed.\n\nFirst scenario:\nWalking speed: \\( s \\) km/h\nTime walking: \\( \\frac{9}{s} \\) hours\nTotal time: \\( \\frac{9}{s} + \\frac{t}{60} = 4 \\) hours\n\nSecond scenario:\nWalking speed: \\( s + 2 \\) km/h\nTime walking: \\( \\frac{9}{s + 2} \\) hours\nTotal time: \\( \\frac{9}{s + 2} + \\frac{t}{60} = 2.4 \\) hours\n\nSo, I have two equations:\n1. \\( \\frac{9}{s} + \\frac{t}{60} = 4 \\)\n2. \\( \\frac{9}{s + 2} + \\frac{t}{60} = 2.4 \\)\n\nI can subtract the second equation from the first to eliminate \\( \\frac{t}{60} \\):\n\\( \\frac{9}{s} - \\frac{9}{s + 2} = 4 - 2.4 \\)\nSimplify the right side: \\( 4 - 2.4 = 1.6 \\)\nSo, \\( 9 \\left( \\frac{1}{s} - \\frac{1}{s + 2} \\right) = 1.6 \\)\n\nLet me compute the left side:\n\\( \\frac{1}{s} - \\frac{1}{s + 2} = \\frac{(s + 2) - s}{s(s + 2)} = \\frac{2}{s(s + 2)} \\)\nThus:\n\\( 9 \\times \\frac{2}{s(s + 2)} = 1.6 \\)\nSimplify:\n\\( \\frac{18}{s(s + 2)} = 1.6 \\)\nMultiply both sides by \\( s(s + 2) \\):\n\\( 18 = 1.6 s(s + 2) \\)\nDivide both sides by 1.6:\n\\( \\frac{18}{1.6} = s(s + 2) \\)\nCalculating \\( \\frac{18}{1.6} \\): 18 divided by 1.6 is the same as 180 divided by 16, which is 11.25.\n\nSo, \\( s(s + 2) = 11.25 \\)\nWhich simplifies to:\n\\( s^2 + 2s - 11.25 = 0 \\)\n\nLet me solve this quadratic equation for \\( s \\). The quadratic is \\( s^2 + 2s - 11.25 = 0 \\).\n\nUsing the quadratic formula:\n\\( s = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a} \\)\nWhere \\( a = 1 \\), \\( b = 2 \\), \\( c = -11.25 \\).\n\nSo,\n\\( s = \\frac{-2 \\pm \\sqrt{4 + 45}}{2} = \\frac{-2 \\pm \\sqrt{49}}{2} = \\frac{-2 \\pm 7}{2} \\)\n\nWe have two solutions:\n1. \\( s = \\frac{-2 + 7}{2} = \\frac{5}{2} = 2.5 \\) km/h\n2. \\( s = \\frac{-2 - 7}{2} = \\frac{-9}{2} = -4.5 \\) km/h\n\nSince speed cannot be negative, \\( s = 2.5 \\) km/h.\n\nNow that I have \\( s \\), I can find \\( t \\) from one of the initial equations.\n\nUsing the first equation:\n\\( \\frac{9}{2.5} + \\frac{t}{60} = 4 \\)\nCompute \\( \\frac{9}{2.5} \\): 2.5 goes into 9 three times with 2 remaining, so 3.6 hours.\n\nSo,\n\\( 3.6 + \\frac{t}{60} = 4 \\)\nSubtract 3.6:\n\\( \\frac{t}{60} = 0.4 \\)\nMultiply both sides by 60:\n\\( t = 24 \\) minutes.\n\nSo, \\( t = 24 \\) minutes.\n\nNow, the question asks for the time taken when she walks at \\( s + \\frac{1}{2} \\) km/h.\n\nCompute \\( s + \\frac{1}{2} = 2.5 + 0.5 = 3 \\) km/h.\n\nSo, her walking speed is now 3 km/h.\n\nCompute the walking time:\n\\( \\frac{9}{3} = 3 \\) hours.\n\nSo, walking time is 3 hours. But we need the total time including the coffee shop, which is \\( t \\) minutes.\n\nWait, hold on. The total time is walking time plus coffee shop time. So, if she walks at 3 km/h, her walking time is 3 hours. The coffee shop time is still \\( t = 24 \\) minutes.\n\nBut wait, the total time is 3 hours + 24 minutes, which is 3.4 hours, but the question says "the number of minutes the walk takes her, including the t minutes spent in the coffee shop." So, it\'s total time in minutes.\n\nSo, 3 hours is 180 minutes, plus 24 minutes is 204 minutes.\n\nWait, but hold on. Let me check if that\'s correct.\n\nWait, the question says: "Find the number of minutes the walk takes her, including the t minutes spent in the coffee shop."\n\nSo, if she walks at 3 km/h, her walking time is 3 hours, which is 180 minutes, and then she spends 24 minutes in the coffee shop, so total time is 180 + 24 = 204 minutes.\n\nWait, but hold on. Wait, when she walks at s, the total time is 4 hours, which includes walking time and coffee shop time. Similarly, when she walks at s + 2, the total time is 2.4 hours, which includes walking and coffee.\n\nTherefore, when she walks at 3 km/h, the total time is walking time (3 hours) plus coffee shop time (24 minutes). So, total time is 3 hours and 24 minutes, which is 204 minutes.\n\nAlternatively, perhaps I should check whether the coffee shop time remains the same as t? Wait, the problem says "including t minutes spent in the coffee shop," so regardless of the walking speed, she spends t minutes in the coffee shop.\n\nTherefore, when she walks at s + 1/2 km/h, the total time is walking time at that speed plus t minutes.\n\nSo, walking time at 3 km/h is 3 hours, which is 180 minutes, plus 24 minutes in the coffee shop, so 204 minutes total.\n\nBut let me double-check my calculations because sometimes these problems can have nuances.\n\nWait, let me retrace:\n\n1. Found that s = 2.5 km/h.\n\n2. Then, t was found to be 24 minutes.\n\n3. So, when she walks at '
Originally created by @Siki-cloud on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/594 在vllm上执行DeepSeek-R1-distill-qwen 7B 在 AIME2024上的推理,发现模型压根就不输出 </think> tag 是怎么回事? 没有执行思考过吗? 以下是我的执行代码: ```python llm = LLM(model='./model/DeepSeek-R1-Distill-Qwen-7B',...) math_problem = [f"{question}\n<think>\n"] outputs = llm.generate(math_problem, sampling_params) ``` 这是我的一个example output,text 字段并没有think 的标签啊,这是怎么回事? ``` CompletionOutput(index=0, text='Alright, so I have this problem where Aya goes for a 9-kilometer walk every morning and then stops at a coffee shop. The problem gives me two different scenarios with different walking speeds and different total times, including the time she spends in the coffee shop. I need to find out how long the walk takes when she walks at a speed of \\( s + \\frac{1}{2} \\) kilometers per hour, including the coffee break time.\n\nFirst, let me parse the information given.\n\n1. When she walks at speed \\( s \\) km/h, the entire trip (walk + coffee shop) takes 4 hours. Out of these 4 hours, \\( t \\) minutes are spent in the coffee shop. So, the time she spends walking at this speed is \\( 4 - \\frac{t}{60} \\) hours.\n\n2. When she walks at speed \\( s + 2 \\) km/h, the entire trip takes 2 hours and 24 minutes. Converting 2 hours 24 minutes to hours: 24 minutes is \\( \\frac{24}{60} = 0.4 \\) hours, so total time is \\( 2.4 \\) hours. Again, \\( t \\) minutes are spent in the coffee shop, so the walking time is \\( 2.4 - \\frac{t}{60} \\) hours.\n\nSince the walking distance is always 9 km, I can set up two equations based on the time taken to walk 9 km at each speed.\n\nFirst scenario:\nWalking speed: \\( s \\) km/h\nTime walking: \\( \\frac{9}{s} \\) hours\nTotal time: \\( \\frac{9}{s} + \\frac{t}{60} = 4 \\) hours\n\nSecond scenario:\nWalking speed: \\( s + 2 \\) km/h\nTime walking: \\( \\frac{9}{s + 2} \\) hours\nTotal time: \\( \\frac{9}{s + 2} + \\frac{t}{60} = 2.4 \\) hours\n\nSo, I have two equations:\n1. \\( \\frac{9}{s} + \\frac{t}{60} = 4 \\)\n2. \\( \\frac{9}{s + 2} + \\frac{t}{60} = 2.4 \\)\n\nI can subtract the second equation from the first to eliminate \\( \\frac{t}{60} \\):\n\\( \\frac{9}{s} - \\frac{9}{s + 2} = 4 - 2.4 \\)\nSimplify the right side: \\( 4 - 2.4 = 1.6 \\)\nSo, \\( 9 \\left( \\frac{1}{s} - \\frac{1}{s + 2} \\right) = 1.6 \\)\n\nLet me compute the left side:\n\\( \\frac{1}{s} - \\frac{1}{s + 2} = \\frac{(s + 2) - s}{s(s + 2)} = \\frac{2}{s(s + 2)} \\)\nThus:\n\\( 9 \\times \\frac{2}{s(s + 2)} = 1.6 \\)\nSimplify:\n\\( \\frac{18}{s(s + 2)} = 1.6 \\)\nMultiply both sides by \\( s(s + 2) \\):\n\\( 18 = 1.6 s(s + 2) \\)\nDivide both sides by 1.6:\n\\( \\frac{18}{1.6} = s(s + 2) \\)\nCalculating \\( \\frac{18}{1.6} \\): 18 divided by 1.6 is the same as 180 divided by 16, which is 11.25.\n\nSo, \\( s(s + 2) = 11.25 \\)\nWhich simplifies to:\n\\( s^2 + 2s - 11.25 = 0 \\)\n\nLet me solve this quadratic equation for \\( s \\). The quadratic is \\( s^2 + 2s - 11.25 = 0 \\).\n\nUsing the quadratic formula:\n\\( s = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a} \\)\nWhere \\( a = 1 \\), \\( b = 2 \\), \\( c = -11.25 \\).\n\nSo,\n\\( s = \\frac{-2 \\pm \\sqrt{4 + 45}}{2} = \\frac{-2 \\pm \\sqrt{49}}{2} = \\frac{-2 \\pm 7}{2} \\)\n\nWe have two solutions:\n1. \\( s = \\frac{-2 + 7}{2} = \\frac{5}{2} = 2.5 \\) km/h\n2. \\( s = \\frac{-2 - 7}{2} = \\frac{-9}{2} = -4.5 \\) km/h\n\nSince speed cannot be negative, \\( s = 2.5 \\) km/h.\n\nNow that I have \\( s \\), I can find \\( t \\) from one of the initial equations.\n\nUsing the first equation:\n\\( \\frac{9}{2.5} + \\frac{t}{60} = 4 \\)\nCompute \\( \\frac{9}{2.5} \\): 2.5 goes into 9 three times with 2 remaining, so 3.6 hours.\n\nSo,\n\\( 3.6 + \\frac{t}{60} = 4 \\)\nSubtract 3.6:\n\\( \\frac{t}{60} = 0.4 \\)\nMultiply both sides by 60:\n\\( t = 24 \\) minutes.\n\nSo, \\( t = 24 \\) minutes.\n\nNow, the question asks for the time taken when she walks at \\( s + \\frac{1}{2} \\) km/h.\n\nCompute \\( s + \\frac{1}{2} = 2.5 + 0.5 = 3 \\) km/h.\n\nSo, her walking speed is now 3 km/h.\n\nCompute the walking time:\n\\( \\frac{9}{3} = 3 \\) hours.\n\nSo, walking time is 3 hours. But we need the total time including the coffee shop, which is \\( t \\) minutes.\n\nWait, hold on. The total time is walking time plus coffee shop time. So, if she walks at 3 km/h, her walking time is 3 hours. The coffee shop time is still \\( t = 24 \\) minutes.\n\nBut wait, the total time is 3 hours + 24 minutes, which is 3.4 hours, but the question says "the number of minutes the walk takes her, including the t minutes spent in the coffee shop." So, it\'s total time in minutes.\n\nSo, 3 hours is 180 minutes, plus 24 minutes is 204 minutes.\n\nWait, but hold on. Let me check if that\'s correct.\n\nWait, the question says: "Find the number of minutes the walk takes her, including the t minutes spent in the coffee shop."\n\nSo, if she walks at 3 km/h, her walking time is 3 hours, which is 180 minutes, and then she spends 24 minutes in the coffee shop, so total time is 180 + 24 = 204 minutes.\n\nWait, but hold on. Wait, when she walks at s, the total time is 4 hours, which includes walking time and coffee shop time. Similarly, when she walks at s + 2, the total time is 2.4 hours, which includes walking and coffee.\n\nTherefore, when she walks at 3 km/h, the total time is walking time (3 hours) plus coffee shop time (24 minutes). So, total time is 3 hours and 24 minutes, which is 204 minutes.\n\nAlternatively, perhaps I should check whether the coffee shop time remains the same as t? Wait, the problem says "including t minutes spent in the coffee shop," so regardless of the walking speed, she spends t minutes in the coffee shop.\n\nTherefore, when she walks at s + 1/2 km/h, the total time is walking time at that speed plus t minutes.\n\nSo, walking time at 3 km/h is 3 hours, which is 180 minutes, plus 24 minutes in the coffee shop, so 204 minutes total.\n\nBut let me double-check my calculations because sometimes these problems can have nuances.\n\nWait, let me retrace:\n\n1. Found that s = 2.5 km/h.\n\n2. Then, t was found to be 24 minutes.\n\n3. So, when she walks at ' ```
bsakaguchi 2026-10-26 21:21:58 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 13, 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!

<!-- gh-comment-id:2874618077 --> @github-actions[bot] commented on GitHub (May 13, 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!
Author
Owner

@github-actions[bot] commented on GitHub (Jun 9, 2025):

false

<!-- gh-comment-id:2954349081 --> @github-actions[bot] commented on GitHub (Jun 9, 2025): false
Sign in to join this conversation.
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-R1#478
No description provided.