How to properly set the training precision of a DP model in deepmd-kit v2.1.0 #1643
-
Hello, I'm using deepmd-kit 2.1.0. I noticed that there is an environment variable DP_INTERFACE_PREC which can be set to "high" or "low", to control high (double) or low (float) precision of training. However, even I set it to "low", I find that the tensors in the descriptor and fitting net are mainly fp64. I also noticed that there is a training parameter precision that can be added in the input.json. The value of his training parameter can be selected among “default”, “float16”, “float32” and “float64”. If I set it to "float32" , the tensors in the model are mainly fp32. It seems that this training parameter meets my needs more than the DP_INTERFACE_PREC env variable, but I don't know if this is a recommended way to control the precision of training. I alse wonder the relationship of the env variable and the training parameter mentioned above, for example, how does it influence the training if I set DP_INTERFACE_PREC to "high" and also set the training parameter precision to "float32"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I noticed that the default value for |
Beta Was this translation helpful? Give feedback.
I noticed that the default value for
precision
isfloat64
, but notdefault
. @wanghan-iapcm Shall we change it todefault
?