Mirostate2SamplingPipeline
Namespace: LLama.Sampling
A sampling pipeline which uses mirostat (v2) to select tokens
public class Mirostate2SamplingPipeline : BaseSamplingPipeline, ISamplingPipeline, System.IDisposable
Inheritance Object → BaseSamplingPipeline → Mirostate2SamplingPipeline
Implements ISamplingPipeline, IDisposable
Properties
Mu
Currently learned mu value
public float Mu { get; }
Property Value
Tau
target entropy
public float Tau { get; set; }
Property Value
Eta
learning rate
public float Eta { get; set; }
Property Value
Grammar
Grammar to constrain valid tokens
public SafeLLamaGrammarHandle Grammar { get; set; }
Property Value
Constructors
Mirostate2SamplingPipeline()
public Mirostate2SamplingPipeline()
Methods
ProcessLogits(SafeLLamaContextHandle, Span<Single>, ReadOnlySpan<LLamaToken>)
protected void ProcessLogits(SafeLLamaContextHandle ctx, Span<float> logits, ReadOnlySpan<LLamaToken> lastTokens)
Parameters
logits
Span<Single>
lastTokens
ReadOnlySpan<LLamaToken>
ProcessTokenDataArray(SafeLLamaContextHandle, LLamaTokenDataArray, ReadOnlySpan<LLamaToken>)
protected LLamaToken ProcessTokenDataArray(SafeLLamaContextHandle ctx, LLamaTokenDataArray candidates, ReadOnlySpan<LLamaToken> lastTokens)
Parameters
candidates
LLamaTokenDataArray
lastTokens
ReadOnlySpan<LLamaToken>
Returns
Reset()
public void Reset()
Clone()
public ISamplingPipeline Clone()