Hard for any of us here to say for sure. By your description, it sounds as maybe your spark is breaking up, like you are on the rev limiter early. This is a pretty common issue with the old Yamaha's. It can be caused by a bad over heat temp sensor, bad CDI, coil, stator coil assy, etc.
If it...