Deepseek wrote a decent paper on this https://github.com/deepseek-ai/DeepSeek-Math-V2/blob/main/De...