The thermodynamically consistent framework accounting for the thermomechanical behavior of the microstructure is addressed using the finite-element implementation. In particular, two different classes of the strain gradient plasticity (SGP) theories are proposed: In the first theory, the dissipation potential is dependent on the gradient of the plastic strain, as a result, the nonrecoverable microstresses do not have a value of zero. In the second theory, the dissipation potential is independent of the gradient of the plastic strain, in which the nonrecoverable microstresses do not exist. Recently, Fleck et al. pointed out that the nonrecoverable microstresses always generate the stress jump phenomenon under the nonproportional loading condition. In this work, a one-dimensional finite-element solution for the proposed strain gradient plasticity model is developed for investigating the stress jump phenomenon. The proposed strain gradient plasticity model and the corresponding finite-element code are validated by comparing with the experimental data from the two sets of microscale thin film experiments. In both experimental validations, it is shown that the calculated numerical results of the proposed model are in good agreement with the experimental measurements. The stretch-passivation problems are then numerically solved for investigating the stress jump phenomenon under the nonproportional loading condition.