To build the bare minimum version of libtorch for Android, lite interpreter probably worths a try. Here is the link to the recipe (Prototype) Introduce lite interpreter workflow in Android and iOS — PyTorch Tutorials 1.8.0 documentation 2. Turn on BUILD_LITE_INTERPRETER can help reducing the size. lite interpreter + custom build will reduce size even more, since it build libtorch only with the operators used by models.
As a note, lite interpreter is in prototype stage and still under development.
In terms of training, @iseeyuan do you know the answer?