writing out num_tokens to yaml
fixes for making the tests work