Refine transformer mechanism to set context of transformer to include the model spec.