ISamplingPipelineExtensions
Namespace: LLama.Sampling
Extensions methods for ISamplingPipeline
public static class ISamplingPipelineExtensions
Inheritance Object → ISamplingPipelineExtensions
Methods
Sample(ISamplingPipeline, SafeLLamaContextHandle, Span<Single>, List<LLamaToken>)
Sample a single token from the given logits
public static LLamaToken Sample(ISamplingPipeline pipeline, SafeLLamaContextHandle ctx, Span<float> logits, List<LLamaToken> lastTokens)
Parameters
pipeline ISamplingPipeline
ctx SafeLLamaContextHandle
The context being sampled from
logits Span<Single>
The logits produced by the model
lastTokens List<LLamaToken>
A list of tokens recently returned by the model