Comment by rhdunn
24 days ago
It's fairly straightforward to write a function that detects looping output -- I wrote one for promptfoo in [1].
For training you would need to hook it up to a LoRA training harness, identify the looping weight direction, and adjust the weights accordingly. I've not (yet) looked into how to do this.
Probably this is the type of thing the 'Swift' or 'ThinkingCap' variants of the Qwen models did I guess. Identify the 'actually', 'but wait' directions and minimize them...