Fix infinite looping for MiMo - #163
Conversation
|
Nice one @Barragek0, this is a clean fix and the upstream research checks out. Verified on my side: checked out the branch, tests 324/324, compile clean. Also confirmed Context for anyone reading later: this is a third mitigation on top of what we shipped for #36 (budget_tokens cap + suffix-repetition detection in the stream extractor). A sampling-level penalty makes sense, and applying it with reasoning off matches the upstream analysis, the loop just fires less often there. Two things:
Once the CHANGELOG entry is sorted I'll merge with a merge commit so your three commits stay intact. |
📝 What does this change?
Adds
repetition_penalty: 1.2to MiMo payloads to fix infinite-thinking-loop observed in MiMo v2.5 / v2.5 Pro.XiaomiMiMo/MiMo-Code#914 - Important excerpt from the
Root Cause Analysissection: NVIDIA community notes that repetition_penalty=1.2 mitigates MiMo "Thought Loop" failure modeContrary to most information I found on this issue, it does seem to happen when reasoning is off in MiMo too, it just seems to be less frequent, so I added it for both reasoning on and off.
🧪 How did you test it?
Tested with MiMo v2.5 / v2.5 Pro on High and Off reasoning effort, no longer loops endlessly.
✅ Checklist
npm run compilepassesnpm run lintpassesnpm testpasses (324/324)npm run packageproduces a VSIX