As above it’s not possible.
I’m not sure if you mean memory as in RAM or flash storage, but if you can find them, the Mini 4 has 2GB of RAM and the Mini 5 has 3GB of RAM. 64GB is the minimum storage on the Mini 5, rather than the 16GB the earlier Minis had. The Mini 3 had the same internal specs as the earlier Mini 2, with 1GB RAM.
The Mini 5 is a far better iPad than the 4 if you might want to use it for other tasks also.