Namespace: LLama.Sampling
A sampling pipeline which always selects the most likely token
public class GreedySamplingPipeline : BaseSamplingPipeline, ISamplingPipeline, System.IDisposable
Inheritance Object → BaseSamplingPipeline → GreedySamplingPipeline
Implements ISamplingPipeline, IDisposable
Grammar to constrain valid tokens
public SafeLLamaGrammarHandle Grammar { get; set; }
public GreedySamplingPipeline()
protected void ProcessLogits(SafeLLamaContextHandle ctx, Span<float> logits, ReadOnlySpan<LLamaToken> lastTokens)
logits Span<Single>
lastTokens ReadOnlySpan<LLamaToken>
protected LLamaToken ProcessTokenDataArray(SafeLLamaContextHandle ctx, LLamaTokenDataArray candidates, ReadOnlySpan<LLamaToken> lastTokens)
candidates LLamaTokenDataArray
lastTokens ReadOnlySpan<LLamaToken>
public ISamplingPipeline Clone()