GithubHelp home page GithubHelp logo

Comments (5)

lucasart avatar lucasart commented on May 22, 2024

answering my own question: documentation here

sorry for the stupid question. closing.

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on May 22, 2024

I see you implemented the .bin format already. If you even want to tackle .binpack here's more info https://github.com/nodchip/Stockfish/blob/master/docs/binpack.md. You can also use the nnue_training_data_formats.h file directly (just note that bit from nodchip's code which may or may not be correctly attributed according to GPL), though it's C++ so may need a wrapper of some sort.

from nnue-pytorch.

lucasart avatar lucasart commented on May 22, 2024

I don't understand the purpose of binpack format, actually. If you just store all positions sequentially, indeed, you can do some compression trick there. But, don't you want to sparsely sample real games to produce the data, rather than take all positions that occur during games? This seems to be done ex-post in this repo. But, I think it's easier to do it ex-ante, and sample with the required frequency to produce a smaller .bin file. That way, you can remove some unnecessary logic on both side (producer -> no binpack stuff needed, consumer -> no sampling needed in training scripts).

For now, I just have a constant (user defined) sampling frequency. Perhaps something like freq*exp(-lambda*ply) would be better?

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on May 22, 2024

But, don't you want to sparsely sample real games to produce the data

If someone shows that this helps training we could consider it, but as far as I know it has no visible impact. We have an option in the pytorch trainer that skips entries with some probabilities, but also nothing particuarily interesting there, even with skipping like 10 on average. So we take 15x file size reduction instead.

edit. btw. .binpack files are always smaller than .bin even if all positions are unrelated

from nnue-pytorch.

glinscott avatar glinscott commented on May 22, 2024

I don't understand the purpose of binpack format, actually. If you just store all positions sequentially, indeed, you can do some compression trick there. But, don't you want to sparsely sample real games to produce the data, rather than take all positions that occur during games? This seems to be done ex-post in this repo. But, I think it's easier to do it ex-ante, and sample with the required frequency to produce a smaller .bin file. That way, you can remove some unnecessary logic on both side (producer -> no binpack stuff needed, consumer -> no sampling needed in training scripts).

When training, we do many passes through the dataset, and the sampling skips different positions on each pass through. So we end up seeing all positions in the dataset over a training run. So binpack compression is a big win in terms of data size, since we do want all these positions.

from nnue-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.