Namespace: LLama.Common
The parameters 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>
number of tokens to keep from initial prompt
public int TokensKeep { get; set; }
how many new tokens to predict (n_predict), set to -1 to inifinitely generate response
until it complete.
public int MaxTokens { get; set; }
logit bias for specific tokens
public Dictionary<LLamaToken, float> LogitBias { get; set; }
Dictionary<LLamaToken, Single>
Sequences where the model will stop generating further tokens.
public IReadOnlyList<string> AntiPrompts { get; set; }
public int TopK { get; set; }
public float TopP { get; set; }
public float MinP { get; set; }
public float TfsZ { get; set; }
public float TypicalP { get; set; }
public float Temperature { get; set; }
public float RepeatPenalty { get; set; }
public int RepeatLastTokensCount { get; set; }
public float FrequencyPenalty { get; set; }
public float PresencePenalty { get; set; }
public MirostatType Mirostat { get; set; }
public float MirostatTau { get; set; }
public float MirostatEta { get; set; }
public bool PenalizeNL { get; set; }
public SafeLLamaGrammarHandle Grammar { get; set; }
public ISamplingPipeline SamplingPipeline { get; set; }
public InferenceParams()
public string ToString()
protected bool PrintMembers(StringBuilder builder)
builder StringBuilder
public int GetHashCode()
public bool Equals(object obj)
obj Object
public bool Equals(InferenceParams other)
other InferenceParams
public InferenceParams <Clone>$()