mirror of
https://git.datalinker.icu/deepseek-ai/DeepSeek-V3.git
synced 2025-12-09 12:54:33 +08:00
Added a simple repetition detection inside the generate() loop to stop the model from endlessly producing patterns like “A5A5A5...”. - Imported `re` for regex pattern matching. - Stops generation if “A5” repeats 10+ times or the same token appears 10 times. - Prints a warning and exits safely instead of looping infinitely. Fixes: #1008