MiMo-Code icon indicating copy to clipboard operation
MiMo-Code copied to clipboard

Text repetition detected: repeated n-grams after 2 recovery attempts. Session terminated.

Open sui-an opened this issue 5 months ago • 4 comments

Question

Image 正常对话执行过程会出现这个,不知道为什么,哪里重复了看不懂。

版本 0.1.4

sui-an avatar Jun 30 '26 04:06 sui-an

我让mimocode自己解释了一下这个问题,如下,这个思路是AI给的不是用户给的,如果重复是否应该让大模型换思路或者正常输入告诉用户换思路实现,就这样直接session停止了,根本不知道什么问题

这是 MiMoCode 的重复检测机制触发了。原因是:
1. 同一轮对话里反复尝试同一个思路 — 比如刚才修 tooltip 问题,我多次改 SmartTooltip 的定位方式,但每次改完效果一样,系统检测到我的输出和之前几轮的 n-gram 重叠度太高,就强制中断了。
2. 触发条件:最近 500 tokens 内出现滑动窗口匹配的重复短语,经过 2 次 recovery 尝试后仍重复,session 直接终止。
怎么避免:
- 被提示"repetition detected"时,换一个完全不同的思路,而不是换个措辞说同样的话
- 如果一个方案试了两次没效果,停下来分析根因再动手,不要反复微调同一个位置
- 简洁回复,少说重复的总结性话
简单说就是:换思路比换说法更重要,系统看的是 token 级别的重复,不是语义。

sui-an avatar Jun 30 '26 04:06 sui-an

I use 0.1.0, there is no that feature and this is the best version

ARTNKL avatar Jun 30 '26 18:06 ARTNKL

Same issue with DeepSeek V4 Flash.

nmfisher avatar Jul 01 '26 15:07 nmfisher

Same issue with DeepSeek V4 Flash.

So it's the issue of the Agent, not LLM

sui-an avatar Jul 02 '26 01:07 sui-an