Skip to contents

top_p() creates a dials parameter for nucleus sampling (the share of probability mass the model samples from), for tuning llm_predict() specifications or building grids for optimize_grid(). Like temperature(), it applies to gpt-6-luna only when its reasoning effort is "none".

Usage

top_p(range = c(0, 1), trans = NULL)

Arguments

range

Range of values (default c(0, 1)).

trans

Optional transformation from the scales package; NULL (the default) means none.

Value

A dials quantitative parameter.

Examples

top_p()
#> Top P (quantitative)
#> Range: [0, 1]
top_p(range = c(0.5, 1))
#> Top P (quantitative)
#> Range: [0.5, 1]