The efficiency of the generator itself is the kW of electrical power output divided by the kW of mechanical energy applied to the input shaft (typically 90%).
The efficiency of a gen-set is the kW of electrical power output divided by the kW of fuel used to run the prime mover. Typically, small gasoline-powered generators are about 12% efficient, and diesel-powered generators are about 23% efficient. Commercial coal-fired plants can reach 40% efficient.