Skip to content

[Bug]: 无限压缩 #1558

Closed
Closed

Description

@zfsn1995

Summary

Image

Area

Desktop app

Reproduction or evidence

改动了,模型设置

Environment, if relevant

0.2.13-dev
win11 25h2
edge
deepseek
glm
小米的模型不会无限压缩

Activity

  1. wsp1911 commented on Jul 16, 2026

    @wsp1911
    Collaborator

    最大输出tokens不能比上下文窗口还大,350K上下文可以把最大输出tokens设置为32K/64K。我们改一下前端输入校验

  2. self-assigned this
    on Jul 16, 2026
  3. zfsn1995 commented on Jul 16, 2026

    @zfsn1995
    Author

    反过来可能会出现达到最大限度,模型不接受信息,我也无法触发压缩,直接就卡死了。

  4. wsp1911 commented on Jul 16, 2026

    @wsp1911
    Collaborator

    “反过来”意思是把上下文窗口大小设为393216,最大输出tokens设为353216吗?(话说这两个数字怎么来的)
    建议试一下:上下文窗口大小 400000,最大输出tokens 32000

  5. zfsn1995 commented on Jul 16, 2026

    @zfsn1995
    Author

    我一开始都设置为393216 deepseek的最大允许设计值,结果对话到了后面模型不接受继续对话了
    然后我就把窗口改小,让他在deepseek允许的最大值之前能触发压缩

  6. wsp1911 commented on Jul 16, 2026

    @wsp1911
    Collaborator

    这俩不是一个概念,上下文窗口大小是模型能处理的最大长度,最大输出tokens是本次请求允许最多输出多少token
    deepseek-v4模型的上下文窗口最大都是1M,最大输出tokens是384K

    Image

    改成这样试试:上下文窗口大小 1000000,最大输出tokens 32000

  7. zfsn1995 commented on Jul 16, 2026

    @zfsn1995
    Author

    主要是我上个版本这么设置是正常的,能对话很长才进行压缩。

  8. zfsn1995 commented on Jul 16, 2026

    @zfsn1995
    Author

    我先按你说的试试

  9. wsp1911 commented on Jul 16, 2026

    @wsp1911
    Collaborator

    旧版本压缩用的是百分比阈值,没考虑最大输出tokens,容易出现供应商报上下文窗口溢出的错误。
    新版本计算有效上下文窗口时会扣掉最大输出tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions