$\mathcal{N}=8$ Gauged supergravity from $d=11$ supergravity

In this lecture video on maximal supergravity, H. Nicolai mentions that dimensional reduction of $d=11$ supergravity on $T^7$ gives us $\mathcal{N}=8, d=4$ (ungauged) supergravity found by Cremer-Julia. However, compactification on $S^7$ gives us $SO(8)$ gauged supergrvavity. According to my understanding, in gauged supergravity the abelian vector fields of the original $N=8$ supergravity are made non-abelian, which then introduces minimal coupling between the vector fields and other fields of the theory. Is there an intuitive way to see how different compactifications yield different versions of $\mathcal{N}=8$ supergravity? In particular, what makes the vector fields abelian in one, and non-abelian in the other?

P.S. I hope this doesn't require any knowledge of superstring theory, only field theoretic understanding will do.

$T^7$ is basically $S^1\times S^1\times...$ seven times and is just an extended version of compactification on $S^1$ where an abelian vector field gauges the U(1) isometry of $S^1$. In a general case of classical solution admitting $M_4\times M_7$ structure with $M_7$ admitting isometry group G, the massless states of the compactified theory include Yang-Mills fields gauging the group G. $S^7=SO(8)/SO(7)$ admits the isometry group SO(8).
Theorem- For a compactification of the form $M_4\times M_k$, the massless states of the compactified theory include Yang-Mills fields gauging the group G, which serves as an isometry group of $M_k$.