The cheaper ones are direct drive to the line spool.
They run no where near 12,000 rpm, most run no more than 3,600.
It is nothing like a small rc airplane glow engine which are deigned for those speeds.
If a weed wacker engine ran at 12,000 rpm the line spools would explode, and you could just imagine how dangerous it would be with a brush cutting blade on it, and hitting a rock in the flower garden.
Now, a person could lean out a weed wacker engine and get some extra rpm out of it, but it will only run at that speed for about 2-3 mins before the piston melts and fuses to the cylinder.
Now that's quite a feat getting 1800 watts out of a 19 -23cc weed wacker engine, when my store bought 63 cc 2 stroke genset (which is about 3 hp) only puts out 800 watts ( a little over 6 amps) @115 volts. (But it runs all day and is very quiet).