Based on the concept of localized shear transformation zones (STZ), a thermodynamically consistent model for the viscoplastic deformation of amorphous solids is developed. The approach consists of a dynamic description of macroscopic viscoplasticity that is enriched by the evolution of number density and internal structure of the STZ for detailing the origin of viscoplastic flow. So doing, the activation of STZ upon deformation and their subsequent internal re-arrangements are treated as two distinct processes. The detail of the model permits to relate it to small-scale information obtained from experiments or atomistic computer simulations, e.g., in the form of STZ-activation energies and an approximate STZ-volume. The model is illustrated on the example of polycarbonate.