ISamplingPipeline
Namespace: LLama.Sampling
Convert a span of logits into a single sampled token. This interface can be implemented to completely customise the sampling process.
1 | |
Implements IDisposable
Attributes NullableContextAttribute
Methods
Sample(SafeLLamaContextHandle, Int32)
Sample a single token from the given context at the given position
1 | |
Parameters
ctx SafeLLamaContextHandle
The context being sampled from
index Int32
Position to sample logits from
Returns
Apply(SafeLLamaContextHandle, LLamaTokenDataArray)
Apply this pipeline to a set of token data
1 | |
Parameters
data LLamaTokenDataArray
Reset()
Reset all internal state of the sampling pipeline
1 | |
Accept(LLamaToken)
Update the pipeline, with knowledge that a particular token was just accepted
1 | |
Parameters
token LLamaToken