Minimal number of relations in finite 2-groups with 2, 3, and 4 generators

I have received helpful answers to my two previous questions that focused on the symmetric group of degree 3 and the dihedral group of order 8. If $d$ is the minimal number of generators of a finite group, and $r$ is the minimal number of relations of the group, then in both examples $d = 2$, but for the given symmetric group we have $r = 2$ and for the given dihedral group we have $r = 3$. This holds for some generalizations of these groups as well.

If we focus now on 2-groups, I would like to know if there are any examples of finite 2-groups with $d = 2$ and $r = 2$, $d = 3$ and $r = 3$, or $d = 4$ and $r = 5$. This all goes back to sharpening the Golod/Shafarevich inequality, which says that for finite $p$-groups, $r > \large\frac{d^2}{4}$. I would like to know if in some particular cases (in particular if $d = 4$) if we can sharpen this further as $r > {\large\frac{d^2}{4}} + 1$ when $p = 2$.