Could be a fuel shortage. Disconnect the fuel line at the carb and make sure the fuel is flowing freely.
Or could be electrical - if it is not charging the battery, it will run until the battery is flat. Rev the bike with the lights on full. The lights should brighten as the revs increase.
Neil Melbourne, December 2007