LogitSamplers
Documentation for LogitSamplers.
LogitSamplers.Min_p
LogitSamplers.Temperature
LogitSamplers.Top_nσ
LogitSamplers.Top_pk
LogitSamplers.logitsample
LogitSamplers.Min_p
— TypeMin_p(pbase)
A logit transform that masks out logits below pbase
times the maximum probability.
See: https://arxiv.org/pdf/2407.01082
LogitSamplers.Temperature
— TypeTemperature(T)
A logit transform that scales (divides) the logits by a temperature parameter.
LogitSamplers.Top_nσ
— TypeTop_nσ(n)
A logit transform that masks out logits below n
standard deviations of the maximum logit.
Top-nσ is temperature-invariant, i.e. the candidate set does not change with temperature.
See: https://arxiv.org/pdf/2411.07641
LogitSamplers.Top_pk
— TypeTop_pk(p, k)
A logit transform that masks out logits outside the top p
cumulative probability or top k
logits.
LogitSamplers.logitsample
— Functionlogitsample([rng], logits)
Sample an index from a logit distribution using the Gumbel argmax trick.