The optical device includes an optical modulator positioned on a base. The modulator includes a ridge extending upward from the base. The ridge includes an electro-absorption medium through which light signals are guided. A thermal conductor is positioned so as to conduct thermal energy away from the ridge. The distance between the thermal conductor and the ridge changes along a length of at least a portion of the ridge.