  M-theory compactified on a $G_2$ manifold with resolved $E_8$ singularities
realizes 4d $\mathcal{N} = 1$ supersymmetric gauge theories coupled to gravity
with three families of Standard Model fermions. Beginning with one $E_8$
singularity, three fermion families emerge when $E_8$ is broken by geometric
engineering deformations to a smaller subgroup with equal rank. In this paper,
we use the local geometry of the theory to explain the origin of the three
families and their mass hierarchy. We linearize the blowing-up of 2-cycles
associated with resolving $E_8$ singularities. After imposing explicit
constraints on the effectively stabilized moduli, we arrive at Yukawa couplings
for the quarks and leptons. We fit the high scale Yukawa couplings
approximately which results in the quark masses agreeing reasonably well with
the observations, implying that the experimental hierarchy of the masses is
achievable within this framework. The hierarchy separation of the top quark
from the charm and up is a stringy effect, while the spitting of the charm and
up also depends on the Higgs sector. The Higgs sector cannot be reduced to
having a single vev; all three vevs must be non-zero.Three extra $U(1)$'s
survive to the low scale but are not massless, so Z' states are motivated to
occur in the spectrum, but may be massive.
