Skip to content

Pytorch: Speed up get_log_probs function #5

@binhvq

Description

@binhvq

Hi lopuhin.
Thanks for your sharing.
I used your model to predict the next word, but I found the forecast speed relatively slow, probably because of the lm.inference.get_log_probs function to predict the probability of all both words in sentences. Meanwhile, the problem of predicting the next word only requires the probability of the last word.
Screenshot from 2019-05-03 12-48-25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions