  Lyman-$\alpha$ forest data are known to be a good probe of the small scale
matter power. In this paper, we explore the redshift evolution of the
observable effective optical depth $\tau_{\rm eff} (z)$ from the Lyman-$\alpha$
data as a discriminator between dark matter models that differ from the
$\Lambda$CDM model on small scales. We consider the
  thermal warm dark matter (WDM) and the ultra-light axion (ULA) models for the
following set of parameters: the mass of ULA, $m_a \simeq
10^{-24}\hbox{--}10^{-22} \, \rm eV$ and WDM mass, $m_{\rm wdm} = 0.1 \hbox{--}
4.6 \, \rm keV$. We simulate the line-of-sight HI density and velocity fields
using semi-analytic methods. The simulated effective optical depth for the
alternative dark matter models diverges from the $\Lambda$CDM model for $z
\gtrsim 3$, which provides a meaningful probe of the matter power at small
scales. Using likelihood analysis, we compare the simulated data with the
high-resolution Lyman-$\alpha$ cloud data in the
  redshift range $2 < z < 4.2$. The one-dimensional posterior probabilities of
the relevant masses peak at $m_a \simeq 5 \times 10^{-23} \, \rm eV$ and
$m_{\rm wdm} \simeq 1.1 \, \rm keV$. The posterior probabilities remain flat
for larger masses, which shows that the data is compatible with the
$\Lambda$CDM model.
