  For any $m \geq 1$, let $H_m$ denote the quantity $\liminf_{n \to \infty}
(p_{n+m}-p_n)$. A celebrated recent result of Zhang showed the finiteness of
$H_1$, with the explicit bound $H_1 \leq 70000000$. This was then improved by
us (the Polymath8 project) to $H_1 \leq 4680$, and then by Maynard to $H_1 \leq
600$, who also established for the first time a finiteness result for $H_m$ for
$m \geq 2$, and specifically that $H_m \ll m^3 e^{4m}$. If one also assumes the
Elliott-Halberstam conjecture, Maynard obtained the bound $H_1 \leq 12$,
improving upon the previous bound $H_1 \leq 16$ of Goldston, Pintz, and
Y{\i}ld{\i}r{\i}m, as well as the bound $H_m \ll m^3 e^{2m}$.
  In this paper, we extend the methods of Maynard by generalizing the Selberg
sieve further, and by performing more extensive numerical calculations. As a
consequence, we can obtain the bound $H_1 \leq 246$ unconditionally, and $H_1
\leq 6$ under the assumption of the generalized Elliott-Halberstam conjecture.
Indeed, under the latter conjecture we show the stronger statement that for any
admissible triple $(h_1,h_2,h_3)$, there are infinitely many $n$ for which at
least two of $n+h_1,n+h_2,n+h_3$ are prime. We modify the "parity problem"
argument of Selberg to show that this result is the best possible that one can
obtain from purely sieve-theoretic considerations. For larger $m$, we use the
distributional results obtained previously by our project to obtain the
unconditional asymptotic bound $H_m \ll m e^{(4-\frac{24}{181})m}$, or $H_m \ll
m e^{2m}$ under the assumption of the Elliott-Halberstam conjecture. We also
obtain explicit upper bounds for $H_m$ when $m=2,3,4,5$.
