Sounds like a fuelling problem. If it started to die, and then, moments later died completely, I'd say fuelling. It doesn't sound like you ran out of fuel (if you were able to ride home) and I am sure you tried putting it on reserve to see if that made any difference. So, what I am trying to say is, perhaps there is a blockage in a fuel filter or some thing? These bikes are getting old and I know that when fuel tanks get a bit of rust in them they can block up fuel filters quite easily. Could be worth shaking the tank out to see if any rust comes out over a bucket.
The other possibility is a loose ignition connection. Though usually that would only affect one cylinder, so you'd still have some power...
_________________
MC21 Honda NSR250. TYGA 300 conversion.