-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add history to the NNCache key #546
Conversation
So my test is ongoing - but its still looking likely to be ~50 Elo win for this new version of hash key (I'm at 230 games in a gauntlet of enabled and disabled vs pawny 1.2). So the nps regression is pretty clearly overcome by what must be an even larger Elo win in visit quality. To expand on my comment above that this is a 'bug fix'. Upon further reflection there is actually a fair amount of symmetry between this and the promotion bug (both effectively lie to training, one by evaluating all promotions as knights, the other by reusing results without checking history match) - although more subtle and probably not quite as significant, this bug has been in the training for much longer. Unlike the pawn promotion bug, this one has a performance cost to fix, but like the pawn promotion bug I think we should expect to see significant improvements in net quality once we start training with the bug removed. An argument could be made to remove the NNCache entirely, but I'll provide 3 reasons why this is not ideal.
|
I'm all for this PR, although I must admit I'm even more convinced that we should test a Leela without history at all |
Completed gauntlet - new key is +61 Elo, +/- 35 compared to old key under 40/1 time control vs Pawny. |
Cache hit rate drops as expected. (Under training conditions. That is, 'current' training conditions, still using tree reuse, without tree reuse these rates would be considerably higher on both sides.) |
I ran an additional test where each successful lookup also performed NN eval and compared the results with a 0.1% tolerance. |
2+2 with syzygy against SM 120, so not fair
restesting with both getting sm 120
so far its going better... |
I think 2+2 (and higher) on a good gpu could quite plausibly be a regression. The false positive cache hits in the old key would happen more frequently in a larger tree and performance is a powerful Elo factor. |
its even now, so it's not too bad hopefully at least...
i'm running 5 concurrent on 1080 ti with 1 thread each, so each one is maybe 500-1000 nps only
|
Yeah my tests were ~500nps on 1+1 ish. |
continuation of same... stopping it now
|
I'm still testing this, but a previous version with history planes 2-7 using key and simple xor instead of full_key and *31 xor was +50 +/- 46 Elo in self play at 40/1 time control.
This version trades even more NNCache hits for NN evaluation accuracy, so it may do better or worse, hard to tell at this point. But I thought my logic for the previous version wasn't quite 'zero' enough. This version is 'just a bug fix', where the other one is being a bit 'smart' about assuming what the NN gets out of the history.
Note: I don't intend this to be submitted as a command line option - once I've demonstrated that the Elo gain is positive under time control I'll remove the command line option from the PR. I'm just using it for my testing purposes.