It could very easily be a bad CDI box. There are ways to test them with a multimeter. I had a dirt bike that would run perfect at idle and part throttle, but once it got over a certain RPM it would pop/sputter and die. I got a CDI box from a salvage yard and it ran perfect after that.