The properties of dust attenuation at rest-frame UV wavelengths are inferred from very high-quality FORS2 spectra of 78 galaxies from the GMASS survey at 1<z<2.5. These objects complement a previously investigated sample of 108 UV-luminous galaxies at similar redshifts, selected from the FDF spectroscopic survey, the K20 survey, and the GDDS. The shape of the UV extinction curve is constrained by a parametric description of the rest-frame UV continuum. The UV bump is further characterised by fitting Lorentzian-like profiles. Spectra exhibit a significant 2175A feature in at least 30% of the cases. If attenuation is dominated by dust ejected from the galaxy main body via superwinds, UV extinction curves in-between those of the SMC and LMC characterise the sample galaxies. The fraction of galaxies with extinction curves differing from the SMC one increases, if more dust resides in the galactic plane or dust attenuation depends on stellar age. On average, the width of the manifested UV bumps is about 60% of the values typical of the LMC and Milky Way. This suggests the presence of dust similar to that found in the LMC2 supershell close to 30Dor. The presence of the carriers of the UV bump at 1<z<2.5 argues for outflows from AGB stars being copious then. Consistent with their higher SFRs, the GMASS galaxies with a manifested UV bump are more luminous at rest-frame 8mum, where the emission is dominated by PAHs (also products of AGB stars). In addition, they exhibit stronger UV absorption features, mostly of interstellar origin, which indicates overall more evolved stellar populations. We conclude that diversification of the small-size dust component has already started in the most evolved star-forming systems at 1<z<2.5.