  We study M-theory compactified on twisted 7-tori with $G_2$-holonomy. The
effective 4d supergravity has 7 chiral multiplets, each with a unit logarithmic
K\"ahler potential. We propose octonion, Fano plane based superpotentials,
codifying the error correcting Hamming (7,4) code. The corresponding 7-moduli
models have Minkowski vacua with one flat direction. We also propose
superpotentials based on octonions/error correcting codes for Minkowski vacua
models with two flat directions. We update phenomenological $\alpha$-attractor
models of inflation with $3\alpha=7,6,5,4,3,1$, based on inflation along these
flat directions. These inflationary models reproduce the benchmark targets for
detecting B-modes, predicting 7 different values of $r = 12\alpha/N_{e}^{2}$ in
the range $10^{-2}\gtrsim r \gtrsim 10^{-3}$, to be explored by future
cosmological observations.
