Ceaser1717 21a919d79f
Fix: prevent infinite “A5A5A5...” repetition loop during text generation (Issue #1008)
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
2025-10-21 16:02:03 +05:30
..
2025-08-27 15:30:21 +08:00
2025-01-28 13:16:54 +01:00
2025-08-27 17:12:13 +08:00
2025-08-27 17:12:13 +08:00
2024-12-26 19:01:57 +08:00