What is the molar mass of a compound with 0.5 atoms in its molecular formula?
You should use 0.5 lithium atoms in the molecular mass. Alternatively you can multiply the formula indices by two to obtain $\ce{LiFe_2(PO_4)_2}$. This formula describes exactly the same compound but it's much more readable, for instance is now clear that the substance contains one $\ce{Li(I)}$, one $\ce{Fe(II)}$, one $\ce{Fe(III)}$ and two phosphate anions per $2n$ electrons transfered.

Here the value of $n$ is multiplied by 2 because you also have your stoichometry multiplied by 2. If you use $\ce{Li_{0.5}Fe(PO_4)}$ to calculate $M$ then the value of $n$ stays unchanged.