Generalizing disorder couplings of the SYK model by means of SU(N) matrices we formulate a lattice model of fermions in d+1 dimensions. Integration of fermions yields an effective theory of Yang-Mills fields in d dimensions, the latter approaching the standard Yang-Mills theory in the case of heavy fermions and the classical limit of vanishing coupling constant of the theory. Quantum mechanically, the theory is solved using large N approximation of the dual effective theory of Hermitian matrices in d dimensions. The theory is asymptotically free and confines the color. In case of massless fermions the emerging theory is an asymptotic safe QCD theory. We discuss also the relationship of this theory to the SYK model.