Ylides can be generated through various methods. The most common approach involves the deprotonation of a phosphonium, sulfonium, or ammonium salt using a strong base. For instance, phosphonium ylides are typically formed by treating a phosphonium salt with a strong base like sodium hydride (NaH) or potassium tert-butoxide (KOtBu). Similarly, sulfonium ylides can be prepared by deprotonating sulfonium salts.