LLamaSharp/docs/xmldocs/llama.common.inferenceparam...

5.6 KiB

InferenceParams

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 ObjectInferenceParams
Implements IInferenceParams, IEquatable<InferenceParams>

Properties

TokensKeep

number of tokens to keep from initial prompt

public int TokensKeep { get; set; }

Property Value

Int32

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

Int32

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

IReadOnlyList<String>

TopK

public int TopK { get; set; }

Property Value

Int32

TopP

public float TopP { get; set; }

Property Value

Single

MinP

public float MinP { get; set; }

Property Value

Single

TfsZ

public float TfsZ { get; set; }

Property Value

Single

TypicalP

public float TypicalP { get; set; }

Property Value

Single

Temperature

public float Temperature { get; set; }

Property Value

Single

RepeatPenalty

public float RepeatPenalty { get; set; }

Property Value

Single

RepeatLastTokensCount

public int RepeatLastTokensCount { get; set; }

Property Value

Int32

FrequencyPenalty

public float FrequencyPenalty { get; set; }

Property Value

Single

PresencePenalty

public float PresencePenalty { get; set; }

Property Value

Single

Mirostat

public MirostatType Mirostat { get; set; }

Property Value

MirostatType

MirostatTau

public float MirostatTau { get; set; }

Property Value

Single

MirostatEta

public float MirostatEta { get; set; }

Property Value

Single

PenalizeNL

public bool PenalizeNL { get; set; }

Property Value

Boolean

Grammar

public SafeLLamaGrammarHandle Grammar { get; set; }

Property Value

SafeLLamaGrammarHandle

SamplingPipeline

public ISamplingPipeline SamplingPipeline { get; set; }

Property Value

ISamplingPipeline

Constructors

InferenceParams()

public InferenceParams()

Methods

ToString()

public string ToString()

Returns

String

PrintMembers(StringBuilder)

protected bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

Boolean

GetHashCode()

public int GetHashCode()

Returns

Int32

Equals(Object)

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

Equals(InferenceParams)

public bool Equals(InferenceParams other)

Parameters

other InferenceParams

Returns

Boolean

<Clone>$()

public InferenceParams <Clone>$()

Returns

InferenceParams