A general framework for implementing state-to-state collision models in the DSMC method is presented. In developing a state-to-state DSMC collision model, one key as- pect is to propose effcient algorithms to correctly simulate the state-to-state collision cross-sections, hence the state-to-state collision (or transition) rates. This includes the calculation of the total collision rate, the selection of potential collision pairs, and the pro- cedure to perform actual state-to-state collisions in the DSMC method. To achieve these tasks in a computationally effcient manner, we proposed the detailed implementation of a general rovibrational state-to-state collision model for the DSMC method. The proposed model implementation successfully achieved microscopic reversibility, detailed balance, and equipartition of energy under equilibrium conditions. This was first demonstrated using qualitatively-constructed state-to-state cross-sections. With the algorithms verified, we further developed a vibrational state-to-state DSMC collision model using the transition probabilities of the forced harmonic oscillator (FHO) model, where the transition prob- abilities are modified to satisfy microscopic reversibility, and a power law temperature dependent viscosity is imposed. Furthermore, DSMC simulation results of isothermal vi- bration relaxation using the modified FHO cross-sections are compared with master equa- tion simulation results, where the transition rates in the master equation are obtained from integrating the state-to-state cross-sections used in the DSMC simulation. Overall, excel- lent agreement is observed for both the vibrational temperature relaxation history and the time dependent vibrational energy distribution functions, between DSMC and master equation simulations.