Could be a whole bunch of things but if the motor starts ok and runs well up to half throttle I would look to the fuel pump or the fuel pick up tube. An air leak in the fuel line could also be the problem.
Quick test. When the motor starts to fail pump the primer bulb. If the motor picks up then it is a fuel problem not ignition.