[GH-ISSUE #349] 怎样才能确保相同输入内容,多次生成的结果完全一致呢? #270

Closed
opened 2026-10-26 21:18:20 +00:00 by bsakaguchi · 10 comments
Owner

Originally created by @Pcyslist on GitHub (Feb 10, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/349

我调整了以下参数:
top_p=1
temp=0
seed=123
然而生成的内容还是不一致,谁能帮帮我,大佬。、

Originally created by @Pcyslist on GitHub (Feb 10, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/349 我调整了以下参数: top_p=1 temp=0 seed=123 然而生成的内容还是不一致,谁能帮帮我,大佬。、
bsakaguchi 2026-10-26 21:18:20 +00:00
Author
Owner

@jerry000lin commented on GitHub (Feb 10, 2025):

用 top_k =1?top_p 是越小越一致

<!-- gh-comment-id:2646872072 --> @jerry000lin commented on GitHub (Feb 10, 2025): 用 top_k =1?top_p 是越小越一致
Author
Owner

@deepsicker commented on GitHub (Feb 10, 2025):

我调整了以下参数: top_p=1 temp=0 seed=123 然而生成的内容还是不一致,谁能帮帮我,大佬。、

你要确保上下文窗口一致,还要保证在相同的设备/软件环境下运行。或者 可以把之前生成的内容缓存起来,直接调用。

解释

  • 上下文 窗口不一致 模型的注意力会改变,所以会影响模型的输出。如果你用的是会话模型,模型的上下文窗口肯定不一样
  • 硬件环境不一样 一般部署工具ollama 等都会根据你的硬件选择不同精度的模型,模型精度不一样结果肯定不一样
<!-- gh-comment-id:2646883238 --> @deepsicker commented on GitHub (Feb 10, 2025): > 我调整了以下参数: top_p=1 temp=0 seed=123 然而生成的内容还是不一致,谁能帮帮我,大佬。、 你要确保上下文窗口一致,还要保证在相同的设备/软件环境下运行。或者 可以把之前生成的内容缓存起来,直接调用。 ### 解释 - 上下文 窗口不一致 模型的注意力会改变,所以会影响模型的输出。如果你用的是会话模型,模型的上下文窗口肯定不一样 - 硬件环境不一样 一般部署工具ollama 等都会根据你的硬件选择不同精度的模型,模型精度不一样结果肯定不一样
Author
Owner

@Pcyslist commented on GitHub (Feb 10, 2025):

我调整了以下参数: top_p=1 temp=0 seed=123 然而生成的内容还是不一致,谁能帮帮我,大佬。、

你要确保上下文窗口一致,还要保证在相同的设备/软件环境下运行。或者 可以把之前生成的内容缓存起来,直接调用。

解释

  • 上下文 窗口不一致 模型的注意力会改变,所以会影响模型的输出。如果你用的是会话模型,模型的上下文窗口肯定不一样
  • 硬件环境不一样 一般部署工具ollama 等都会根据你的硬件选择不同精度的模型,模型精度不一样结果肯定不一样

@deepsicker
上下文窗口怎么设置一致?如果我使用/v1/completions而不是/v1/chat/completions是否就不涉及上下文窗口的问题了,再者如果我使用/v1/chat/completions,但第一次调用后,我重开一个新的会话,还是输入同样的内容,是否上下文窗口也就一致了?

如果是这样的话,那我的上下文窗口确实是一致的,你说的硬件软件环境也是一致的,可惜多次生成的结果依然得不到完全一致。

<!-- gh-comment-id:2647872772 --> @Pcyslist commented on GitHub (Feb 10, 2025): > > 我调整了以下参数: top_p=1 temp=0 seed=123 然而生成的内容还是不一致,谁能帮帮我,大佬。、 > > 你要确保上下文窗口一致,还要保证在相同的设备/软件环境下运行。或者 可以把之前生成的内容缓存起来,直接调用。 > > ### 解释 > * 上下文 窗口不一致 模型的注意力会改变,所以会影响模型的输出。如果你用的是会话模型,模型的上下文窗口肯定不一样 > * 硬件环境不一样 一般部署工具ollama 等都会根据你的硬件选择不同精度的模型,模型精度不一样结果肯定不一样 @deepsicker 上下文窗口怎么设置一致?如果我使用/v1/completions而不是/v1/chat/completions是否就不涉及上下文窗口的问题了,再者如果我使用/v1/chat/completions,但第一次调用后,我重开一个新的会话,还是输入同样的内容,是否上下文窗口也就一致了? 如果是这样的话,那我的上下文窗口确实是一致的,你说的硬件软件环境也是一致的,可惜多次生成的结果依然得不到完全一致。
Author
Owner

@liangchenwsl commented on GitHub (Feb 16, 2025):

你自己 cache 一下 q和 a 就行,100% 一致.

<!-- gh-comment-id:2661250003 --> @liangchenwsl commented on GitHub (Feb 16, 2025): 你自己 cache 一下 q和 a 就行,100% 一致.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 25, 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:2749699024 --> @github-actions[bot] commented on GitHub (Mar 25, 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

@Pcyslist commented on GitHub (Mar 25, 2025):

it is still a question

---原始邮件---
发件人: @.>
发送时间: 2025年3月25日(周二) 上午8:10
收件人: @.
>;
抄送: @.@.>;
主题: Re: [deepseek-ai/DeepSeek-R1] 怎样才能确保相同输入内容,多次生成的结果完全一致呢? (Issue #349)

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!

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
github-actions[bot] left a comment (deepseek-ai/DeepSeek-R1#349)

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!

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:2749709306 --> @Pcyslist commented on GitHub (Mar 25, 2025): it is still a question ---原始邮件--- 发件人: ***@***.***&gt; 发送时间: 2025年3月25日(周二) 上午8:10 收件人: ***@***.***&gt;; 抄送: ***@***.******@***.***&gt;; 主题: Re: [deepseek-ai/DeepSeek-R1] 怎样才能确保相同输入内容,多次生成的结果完全一致呢? (Issue #349) 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! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***&gt; github-actions[bot] left a comment (deepseek-ai/DeepSeek-R1#349) 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! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***&gt;
Author
Owner

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

@Pcyslist commented on GitHub (May 30, 2025):

keep opening

---原始邮件---
发件人: @.>
发送时间: 2025年5月30日(周五) 上午8:10
收件人: @.
>;
抄送: @.@.>;
主题: Re: [deepseek-ai/DeepSeek-R1] 怎样才能确保相同输入内容,多次生成的结果完全一致呢? (Issue #349)

github-actions[bot] left a comment (deepseek-ai/DeepSeek-R1#349)

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!

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:2920890048 --> @Pcyslist commented on GitHub (May 30, 2025): keep opening ---原始邮件--- 发件人: ***@***.***&gt; 发送时间: 2025年5月30日(周五) 上午8:10 收件人: ***@***.***&gt;; 抄送: ***@***.******@***.***&gt;; 主题: Re: [deepseek-ai/DeepSeek-R1] 怎样才能确保相同输入内容,多次生成的结果完全一致呢? (Issue #349) github-actions[bot] left a comment (deepseek-ai/DeepSeek-R1#349) 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! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***&gt;
Author
Owner

@github-actions[bot] commented on GitHub (Jul 14, 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:3067418137 --> @github-actions[bot] commented on GitHub (Jul 14, 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 (Jul 28, 2025):

false

<!-- gh-comment-id:3124818262 --> @github-actions[bot] commented on GitHub (Jul 28, 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#270
No description provided.