There are a few possible explanations: (1) the CUDA driver is not loaded in persistent mode, so you are benefitting from it being preloaded when another process is running (but this should only be a few seconds of difference); (2) the crypto mining software is maxing out your GPU’s application clocks, which will make your model run faster. You can test for this by setting nvidia-smi -ac yourself to the maximum clock values.