Skip to content

generate function with sampling without temperature rescaling #91

Answered by rasbt
nicolaleo asked this question in Q&A
Discussion options

You must be logged in to vote

Good question. Yes, you can sample via torch.multinomial without temperature scaling (default). And you can also simulate the greedy decoding via argmax if you set the temperature to 0.

Actually, Exercise 5.2 is kind of related to what you are asking :)

What are the different combinations of settings for the generate function to force deterministic behavior, that is, disabling the random sampling such that it always produces the same outputs similar to the generate_simple function?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rasbt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants