llama_sampler_i class final

user code can implement the interface below in order to create custom llama_sampler

Inheritance
Implemented types
Available extensions

Constructors

llama_sampler_i()

Properties

accept Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl, llama_token token)>>
can be NULL
getter/setter pair
address Pointer<T>

Available on T, provided by the StructAddress extension

The memory address of the underlying data.
no setter
apply Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl, Pointer<llama_token_data_array> cur_p)>>
required
getter/setter pair
backend_accept Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl, Pointer<ggml_context> ctx, Pointer<ggml_cgraph> gf, Pointer<ggml_tensor> selected_token)>>
call after .backend_apply()
getter/setter pair
backend_apply Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl, Pointer<ggml_context> ctx, Pointer<ggml_cgraph> gf, Pointer<llama_sampler_data> data)>>
call after .backend_init()
getter/setter pair
backend_init Pointer<NativeFunction<Bool Function(Pointer<llama_sampler> smpl, ggml_backend_buffer_type_t buft)>>
return true if the backend supports all ops needed by the sampler note: call once per sampler
getter/setter pair
backend_set_input Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl)>>
called before graph execution to set inputs for the current ubatch
getter/setter pair
clone Pointer<NativeFunction<Pointer<llama_sampler> Function(Pointer<llama_sampler> smpl)>>
can be NULL if ctx is NULL
getter/setter pair
free Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl)>>
can be NULL if ctx is NULL
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name Pointer<NativeFunction<Pointer<Char> Function(Pointer<llama_sampler> smpl)>>
can be NULL
getter/setter pair
reset Pointer<NativeFunction<Void Function(Pointer<llama_sampler> smpl)>>
can be NULL
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited