-
Notifications
You must be signed in to change notification settings - Fork 47
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
Stand-alone text generation and scoring scripts #2
Comments
Thank you @binhvq 👍 But right now I'm moving to Tensorflow 2.0 to be able to support multi-GPU training easily, plan to get back to easy text scoring and generation once it's done. |
@binhvq keeping it open as this is something to be done, I hope you don't mind the title change. |
Hi lopuhin! Thanks |
Scoring is implemented in https://github.com/lopuhin/transformer-lm/blob/master/lm/inference.py |
@virgulvirgul I don't have it, but if you have log probabilities for next token, you can take an exponent to get real probabilities, then select say top 40 of them, and then select next token using this probabilities (e.g. passing probabilities into |
implemented this approach, works great for my model so far:
|
Hi lopuhin!
I using your code very nice in training and generate sample in training, please write code for load model, weights... and generate text from other python file.
Thanks you!
The text was updated successfully, but these errors were encountered: