Class SamplerParams
public sealed class SamplerParams : LiteRTLMNativeHandle
- Inheritance
-
objectSamplerParams
- Inherited Members
Constructors
SamplerParams(SamplerType)
Creates a managed wrapper around LiteRT LM sampler parameters for a specific sampler type. The caller is responsible for disposing the wrapper using Dispose().
public SamplerParams(SamplerType samplerType)
Parameters
samplerTypeSamplerTypeThe sampler type to use.
Exceptions
- InvalidOperationException
Thrown if the native object could not be created.
Methods
ReleaseUnmanagedResources()
protected override void ReleaseUnmanagedResources()
SetSeed(int)
Sets the seed.
public void SetSeed(int seed)
Parameters
seedint
SetTemperature(float)
Sets the temperature.
public void SetTemperature(float temperature)
Parameters
temperaturefloat
SetTopK(int)
Sets the top-k value.
public void SetTopK(int topK)
Parameters
topKint
SetTopP(float)
Sets the top-p value.
public void SetTopP(float topP)
Parameters
topPfloat