cpp: save interim changes to transformer