-
Notifications
You must be signed in to change notification settings - Fork 93
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 tests for CKY #53
Conversation
Hi Yanpeng, This is great, thanks.
|
Could that also be the issue here as well? |
working on it now.
Yes. But speed is not a big concern. TopK consumes quite a lot of GPU memory with large K. I will give you more details later. |
Yes, it could be. I set |
ce8123e
to
b0d3f42
Compare
Gotcha. Maybe we can add a GPU topk. |
I tested It might be far from being practically usable since re-ranking based parsers require more than 15 best parses (e.g., Richard Socher et. al., 2013 require top 200 parses), and most sentences are longer than 25. What is the GPU topk? The current |
Gotcha. Let me know if you personally need topk for research. I can take a look at some memory reduction ideas. I mostly included it because it was fun. For some semirings I wrote custom cuda implementations to save memory. We could do that for topk. |
Yes. My project involves analyzing the top k parses of a parser. I can do k passes to get k best parses without memory issues. But I find this repo amazing! So It would be great to include a memory-efficient implementation of |
This PR fixes several bugs in k-best parsing with
dist.topk()
and includes a simple test to test the function.I made incremental changes so that existing modules relying on the
CKY
will not be affected.