Using smaller PyTorch version for only using softmax/BCELoss calculations

Hi Everyone,
If i would like to use PyTorch only for calculation of loss, softmax,sigmoid, and these kind of unheavy jobs, which I won’t train any models and I’ll just receive PyTorch arrays, is there any smaller version of PyTorch that I can use only for softmax/sigmoid/loss kind of things? I don’t want to fully install PyTorch. I’ll receive PyTorch model output arrays. I can write softmax/sigmoid functions by myself on smaller package such as numpy, but i would like to keep it consistent and work with all PyTorch functions, but current PyTorch is heavy. PyTorch-cpu is not that heavy, I’m aware, but, is there any alternative that I couldn’t see/think of to use PyTorch functions on metrics?

Does torchscript meet your requirements? TorchScript — PyTorch 1.10 documentation

You could also instead just copy out the implementation of those functions in your mini library or leverage something like module0 — MiniTorch 0.1 documentation