Empirical evidence shows that R&D productivity decreases with firm size. I provide an explanation to this fact by developing a model of science production where heterogeneous researchers are endogenously allocated to different firms. The main assumption is that firms invest in research to increase their absorptive capacity: the ability to use and understand knowledge produced outside of the firm. Firms create absorptive capacity by building labs and hiring researchers in a competitive market. Because of externalities, firms underinvest in labs. More interestingly, researchers and labs are substitutes in the revenue function, even though they are complements in the research production function. As a consequence, the greater the investment in research, the lower the productivity of the researcher working for the firm. This generates a novel form of inefficiency: for any given investment, the allocation of researchers to firms is non optimal.