{ "

Sampling from Language Models with Temperature

\n

Here we sample from the following probability distribution where _^_0_^_ is the vocabulary, _^_1_^_ are the logits of the distribution and T is the temperature:

\n

_^_2_^_

\n

_^_3_^_ is normal random sampling.

\n

Here's an experiment that uses these sampling techniques.

\n": "

\u4ece\u5e26\u6e29\u5ea6\u7684\u8bed\u8a00\u6a21\u578b\u4e2d\u91c7\u6837

\n

\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u4ece\u4ee5\u4e0b\u6982\u7387\u5206\u5e03\u4e2d\u62bd\u6837\uff0c\u5176\u4e2d_^_0_^_\u662f\u8bcd\u6c47\uff0c_^_1_^_\u662f\u5206\u5e03\u7684\u5bf9\u6570\uff0cT \u662f\u6e29\u5ea6\uff1a

\n

_^_2_^_

\n

_^_3_^_\u662f\u6b63\u5e38\u7684\u968f\u673a\u62bd\u6837\u3002

\n

\u8fd9\u662f\u4e00\u4e2a\u4f7f\u7528\u8fd9\u4e9b\u91c7\u6837\u6280\u672f\u7684\u5b9e\u9a8c\u3002

\n", "

Sampler with Temperature

\n": "

\u5e26\u6e29\u5ea6\u7684\u91c7\u6837\u5668

\n", "

Sample from logits

\n": "

\u6765\u81ea logits \u7684\u6837\u672c

\n", "

Create a categorical distribution with temperature adjusted logits

\n": "

\u4f7f\u7528\u6e29\u5ea6\u8c03\u6574\u540e\u7684\u5bf9\u6570\u521b\u5efa\u5206\u7c7b\u5206\u5e03

\n", "

Sample

\n": "

\u6837\u672c

\n", "\n": "\n", "A PyTorch implementation of sampling from language models with temperature.": "\u4f7f\u7528\u6e29\u5ea6\u4ece\u8bed\u8a00\u6a21\u578b\u4e2d\u91c7\u6837\u7684 PyTorch \u5b9e\u73b0\u3002", "Sampling from Language Models with Temperature": "\u4ece\u5e26\u6e29\u5ea6\u7684\u8bed\u8a00\u6a21\u578b\u4e2d\u91c7\u6837" }