We present preliminary results of an ESO large programme (AMAZE) aimed at determining the evolution of the mass-metallicity relation in star forming galaxies at z>3, by means of deep near-IR spectroscopy with SINFONI at the VLT. When compared with previous surveys, the mass-metallicity relation inferred at z∼3.3 shows an evolution significantly stronger than observed at lower redshifts, even in massive systems. There are also indications that in low mass galaxies the metallicity evolution is stronger relative to high mass systems, an effect which can be considered the chemical version of the galaxy downsizing. When compared to theoretical models, the mass-metallicity relation observed at z∼3.3 is difficult to reconcile with the predictions by simulations of hierarchical evolution of galaxies.