We study a one-dimensional particle system in which particles travel deterministically in between stochastic collisions. As the total number of particles tends to infinity, the empirical density converges to a solution of a discrete Boltzmann equation. We establish the large deviation principle for the convergence with a rate function that is given by a variational formula. Some of the properties of the rate function are discussed and a nonvariational expression for the rate function is given.