Thin-film shape memory alloys (SMAs) have become excellent candidates for microactuator fabrication in MEMS due to their capability to achieve very high work densities, produce large deformations, and generate high stresses. In general, the material behavior of SMAs is nonlinear and hysteretic. To achieve the full potential of SMA actuators, it is necessary to develop models that characterize the nonlinearities and hysteresis inherent to the constituent materials. We develop a model that quantifies the nonlinearities and hysteresis inherent to SMAs. The model is based on free energy principles combined with stochastic homogenization techniques. The fully thermomechanical model predicts rate-dependent, polycrystalline SMA behavior, and it accommodates heat transfer issues pertinent to thin-film SMAs. We illustrate aspects of the model through comparison with thin-film SMA superelastic and shape memory effect hysteresis data.