Analyzing GPU Memory Leaks with Torch Memory Snapshot Recently, we ran into some GPU memory leak issues in both RL training and SGLang's own inference. Yesterday, I finally figured out the specific cause of the leaks. This article shares our debugging process using Torch Memory Snapshot and our solutions to these memory leak problems.