High-resolution diode-laser spectroscopy has been performed on atomic beams of natural Gd and Dy. Isotope shifts of the even-mass isotopes have been measured for two transitions in Gd I and one transition in Dy I. Specific mass shifts, as well as field shifts, have been derived for transitions of 4 f 7 5 d 6 s 2 –4 f 7 6 s 2 6 p in Gd I, and 4 f 10 6 s 2 –4 f 9 5 d 6 s 2 in Dy I; the specific mass shift is much larger than the normal mass shift. It has been found that the specific mass shift of the 4 f 10 6 s 2 –4 f 9 5 d 6 s 2 transition in Dy I is about one order of magnitude larger than that of the 4 f 7 5 d 6 s 2 –4 f 7 6 s 2 6 p transition in Gd I. This shows that the specific mass shift, related to the correlation effect between electrons, strongly depends on the orbital angular momentum of electrons.