The U.K. government has formally agreed to work with the U.S. in developing safety tests for advanced AI models.