For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
Struct_sampler_apply_penalties
struct Struct_sampler_apply_penalties
Registers the sampler.apply_penalties graph op with the graph compiler.
Implemented traitsโ
Methodsโ
executeโ
static def execute[logit_type: DType, penalty_type: DType, rank: Int, target: StringSlice[ImmStaticOrigin], _trace_name: StringSlice[ImmStaticOrigin]](logits: ManagedTensorSlice[IOSpec[_, _].MutableInput, static_spec=logits.static_spec], compressed_frequency_data: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=compressed_frequency_data.static_spec], frequency_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=frequency_offsets.static_spec], frequency_penalty: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=frequency_penalty.static_spec], presence_penalty: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=presence_penalty.static_spec], repetition_penalty: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=repetition_penalty.static_spec], ctx: DeviceContext)