PyTorch inference_mode memory savings need autograd review
For a low-traffic PyTorch 2.x inference service, the design goal is to reduce per-request memory and compute overhead without breaking model code that depends on autograd. The documented torch.inference_mode() context manager suppresses autograd recording and view/version tracking, but its inference tensors have restrictions that differ from torch.no_grad()