Cavitation in normal and superfluid liquid 4 He at saturated vapor pressure and slightly elevated pressures has been experimentally studied in a flow due to quartz forks vibrating at high amplitudes. Above the temperature-and pressure-dependent critical velocity, heterogeneous cavitation is observed both visually and electrically, as a breakdown of the resonance response of the fork. We compare our results with available experimental and discuss them using existing theoretical models. In particular, we show that thermal effects leading to local overheating of the vicinity of the fork have to be taken into account, especially in normal liquid 4 He.PACS: 47.55.dp Drop and bubble formation.