You can fix looping with proper repetition penalties. Turn on the one called “DRY” that PeW invented and got merged into llama cpp