official-stockfish / nnue-pytorch

Stockfish NNUE (Chess evaluation) trainer in Pytorch
GNU General Public License v3.0
320 stars 99 forks source link

Is it possible to convert a NNUE file (weights and biases) to emulate an older version? #244

Closed ginkgo20 closed 1 year ago

ginkgo20 commented 1 year ago

For example :

Is it possible to convert nn-e8321e467bf6.nnue file to emulate nn-8a08400ed089.nnue file?


image


image


vondele commented 1 year ago

not that I know.

vondele commented 1 year ago

I think you might be able to 'inject' some smaller networks in a larger one for some versions (e.g. larger sized network, with a suitable set of zeros could mimic a smaller one). We don't have the tools to do that, and I won't know which versions would allow for this.

You might also be able to train a network on the output of another network, but that's practically not going to lead to a true conversion (sometimes called a distillation).

ginkgo20 commented 1 year ago

When NNUE file size reduce then we don't need to convert NNUE file to older version , Thanks @MaximMolchanov