MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / _sample_topp

Method _sample_topp

fairseq/search.py:174–217  ·  view source on GitHub ↗

Sample among the smallest set of elements whose cumulative probability mass exceeds p. See `"The Curious Case of Neural Text Degeneration" (Holtzman et al., 2019) `_. Args: lprobs: (bsz x input_beam_size x vocab_size)

(self, lprobs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

stepMethod · 0.95

Calls 2

cumsumMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected