In the U.S., cognitive non-routine (CNR) occupations associated with higher wages are disproportionately represented in larger cities. To study the allocation of workers across cities, we propose and quantify a spatial equilibrium model with multiple industries that employ CNR and alternative (non-CNR) occupations. Productivity is city-industry-occupation specific and partly determined by externalities across local workers. We estimate that the productivity of CNR workers in a city depends significantly on both its share of CNR workers and total employment. Together with heterogeneous preferences for locations, these externalities imply equilibrium allocations that are not efficient. An optimal policy that benefits workers equally across occupations incentivizes the formation of cognitive hubs, leading to larger fractions of CNR workers in some of today's largest cities. At the same time, these cities become smaller to mitigate congestion effects while cities that are initially small increase in size. Large and small cities end up expanding industries in which they already concentrate, while medium-size cities tend to diversify across industries. The optimal allocation thus features transfers to non-CNR workers who move from large to small cities consistent with the implied change in the industrial composition landscape. Finally, we show that the optimal policy reinforces equilibrium trends observed since 1980. However, these trends were in part driven by low growth in real-estate productivity in CNR-abundant cities that reduced welfare. * Preliminary draft. erossi@princeton.edu, pierre.sarte@rich.frb.org, felipe.schwartzman@rich.frb.org. We thank Mike Finnegan, Daniel Ober-Reynolds, and Jackson Evert for excellent research assistance. We also thank David Albouy for useful comments. The views expressed here are those of the authors and do not reflect those of the Federal Reserve Bank of Richmond or the Federal Reserve System. General city amenities that would be equally appealing to both occupations are unlikely to be a deciding factor in attracting the best workers to abundant cities. Indeed, we show that while real wages of CNR workers increase with a city's CNR intensity, real wages of non-CNR workers do not. Therefore, amenities alone are not driving the pattern of wages across space. For an alternative view, see Couture et al. (2018). 4 Specifically, we follow Jaimovich and Siu (2018), and define CNR occupations to include occupations with SOC-2 classifications 11 to 29 and non-CNR occupations to include SOC-2 classifications 35 to 55. 5 We include as control variables education, potential experience, race, gender, English proficiency, number of years in the U.S., marital status, having had a child in the last year, citizenship status, and veteran status. 6 In particular, suppose that technologies were similar across cities, and that the share of CNR workers were driven by the supply of those workers. Then, with decreasing marginal returns to worker type, increases in the relative supply of CNR workers wo...