InferenceParams
Namespace: LLama.Common
The paramters used for inference.
public class InferenceParams : LLama.Abstractions.IInferenceParams, System.IEquatable`1[[LLama.Common.InferenceParams, LLamaSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]
Inheritance Object → InferenceParams
Implements IInferenceParams, IEquatable<InferenceParams>
Properties
TokensKeep
number of tokens to keep from initial prompt
public int TokensKeep { get; set; }
Property Value
MaxTokens
how many new tokens to predict (n_predict), set to -1 to inifinitely generate response until it complete.
public int MaxTokens { get; set; }
Property Value
LogitBias
logit bias for specific tokens
public Dictionary<LLamaToken, float> LogitBias { get; set; }
Property Value
Dictionary<LLamaToken, Single>
AntiPrompts
Sequences where the model will stop generating further tokens.
public IReadOnlyList<string> AntiPrompts { get; set; }
Property Value
TopK
public int TopK { get; set; }
Property Value
TopP
public float TopP { get; set; }
Property Value
MinP
public float MinP { get; set; }
Property Value
TfsZ
public float TfsZ { get; set; }
Property Value
TypicalP
public float TypicalP { get; set; }
Property Value
Temperature
public float Temperature { get; set; }
Property Value
RepeatPenalty
public float RepeatPenalty { get; set; }
Property Value
RepeatLastTokensCount
public int RepeatLastTokensCount { get; set; }
Property Value
FrequencyPenalty
public float FrequencyPenalty { get; set; }
Property Value
PresencePenalty
public float PresencePenalty { get; set; }
Property Value
Mirostat
public MirostatType Mirostat { get; set; }
Property Value
MirostatTau
public float MirostatTau { get; set; }
Property Value
MirostatEta
public float MirostatEta { get; set; }
Property Value
PenalizeNL
public bool PenalizeNL { get; set; }
Property Value
Grammar
public SafeLLamaGrammarHandle Grammar { get; set; }
Property Value
SamplingPipeline
public ISamplingPipeline SamplingPipeline { get; set; }
Property Value
Constructors
InferenceParams()
public InferenceParams()
Methods
ToString()
public string ToString()
Returns
PrintMembers(StringBuilder)
protected bool PrintMembers(StringBuilder builder)
Parameters
builder
StringBuilder
Returns
GetHashCode()
public int GetHashCode()
Returns
Equals(Object)
public bool Equals(object obj)
Parameters
obj
Object
Returns
Equals(InferenceParams)
public bool Equals(InferenceParams other)
Parameters
other
InferenceParams
Returns
<Clone>$()
public InferenceParams <Clone>$()