# Mirostate2SamplingPipeline Namespace: LLama.Sampling A sampling pipeline which uses mirostat (v2) to select tokens ```csharp public class Mirostate2SamplingPipeline : BaseSamplingPipeline, ISamplingPipeline, System.IDisposable ``` Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [BaseSamplingPipeline](./llama.sampling.basesamplingpipeline.md) → [Mirostate2SamplingPipeline](./llama.sampling.mirostate2samplingpipeline.md)
Implements [ISamplingPipeline](./llama.sampling.isamplingpipeline.md), [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Properties ### **Mu** Currently learned mu value ```csharp public float Mu { get; } ``` #### Property Value [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
### **Tau** target entropy ```csharp public float Tau { get; set; } ``` #### Property Value [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
### **Eta** learning rate ```csharp public float Eta { get; set; } ``` #### Property Value [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
### **Grammar** Grammar to constrain valid tokens ```csharp public SafeLLamaGrammarHandle Grammar { get; set; } ``` #### Property Value [SafeLLamaGrammarHandle](./llama.native.safellamagrammarhandle.md)
## Constructors ### **Mirostate2SamplingPipeline()** ```csharp public Mirostate2SamplingPipeline() ``` ## Methods ### **ProcessLogits(SafeLLamaContextHandle, Span<Single>, ReadOnlySpan<LLamaToken>)** ```csharp protected void ProcessLogits(SafeLLamaContextHandle ctx, Span logits, ReadOnlySpan lastTokens) ``` #### Parameters `ctx` [SafeLLamaContextHandle](./llama.native.safellamacontexthandle.md)
`logits` [Span<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.span-1)
`lastTokens` [ReadOnlySpan<LLamaToken>](https://docs.microsoft.com/en-us/dotnet/api/system.readonlyspan-1)
### **ProcessTokenDataArray(SafeLLamaContextHandle, LLamaTokenDataArray, ReadOnlySpan<LLamaToken>)** ```csharp protected LLamaToken ProcessTokenDataArray(SafeLLamaContextHandle ctx, LLamaTokenDataArray candidates, ReadOnlySpan lastTokens) ``` #### Parameters `ctx` [SafeLLamaContextHandle](./llama.native.safellamacontexthandle.md)
`candidates` [LLamaTokenDataArray](./llama.native.llamatokendataarray.md)
`lastTokens` [ReadOnlySpan<LLamaToken>](https://docs.microsoft.com/en-us/dotnet/api/system.readonlyspan-1)
#### Returns [LLamaToken](./llama.native.llamatoken.md)
### **Reset()** ```csharp public void Reset() ``` ### **Clone()** ```csharp public ISamplingPipeline Clone() ``` #### Returns [ISamplingPipeline](./llama.sampling.isamplingpipeline.md)