Let $K$ be a local function field of characteristic $l$, $mathbb{F}$ be a finite field over $mathbb{F}_p$ where $l e p$, and $overline{rho}: G_K rightarrow text{GL}_n (mathbb{F})$ be a continuous representation. We apply the Taylor-Wiles-Kisin method over certain global function fields to construct a mod $p$ cycle map $overline{text{cyc}}$, from mod $p$ representations of $text{GL}_n (mathcal{O}_K)$ to the mod $p$ fibers of the framed universal deformation ring $R_{overline{rho}}^square$. This allows us to obtain a function field analog of the Breuil--Mezard conjecture. Then we use the technique of close fields to show that our result is compatible with the Breuil-Mezard conjecture for local number fields in the case of $l e p$, obtained by Shotton.