The galaxy Luminosity Function ( LF ) has been estimated in the rest frame B luminosity at 0 < z < 1.25 and at 1700 Å for 2.5 < z < 4.5 from deep multicolor surveys in the HDF-N , HDF-S , NTT-DF . The results have been compared with a recent version of galaxy formation models in the framework of hierarchical clustering in a flat Cold Dark Matter Universe with cosmological constant . The results show a general greement for z \lesssim 1 , although the model LF has a steeper average slope at the faint end ; at z \sim 3 such feature results in an overprediction of the number of faint ( I _ { AB } \sim 27 ) galaxies , while the agreement at the bright end becomes critically sensitive to the details of dust absorption at such redshifts . The discrepancies at the faint end show that a refined treatement of the physical processes involving smaller galaxies is to be pursued in the models , in terms of aggregation processes and/or stellar feedback heavily affecting the luminosity of the low luminosity objects . The implications of our results on the evolution of the cosmological star formation rate are discussed .