Skip to content

< Back


InferenceParams

Namespace: LLama.Common

The parameters used for inference.

1
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>
Attributes NullableContextAttribute, NullableAttribute

Properties

EqualityContract

1
protected Type EqualityContract { get; }

Property Value

Type

TokensKeep

number of tokens to keep from initial prompt when applying context shifting

1
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.

1
public int MaxTokens { get; set; }

Property Value

Int32

AntiPrompts

Sequences where the model will stop generating further tokens.

1
public IReadOnlyList<string> AntiPrompts { get; set; }

Property Value

IReadOnlyList<String>

SamplingPipeline

1
public ISamplingPipeline SamplingPipeline { get; set; }

Property Value

ISamplingPipeline

DecodeSpecialTokens

1
public bool DecodeSpecialTokens { get; set; }

Property Value

Boolean

Constructors

InferenceParams(InferenceParams)

1
protected InferenceParams(InferenceParams original)

Parameters

original InferenceParams

InferenceParams()

1
public InferenceParams()

Methods

ToString()

1
public string ToString()

Returns

String

PrintMembers(StringBuilder)

1
protected bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

Boolean

GetHashCode()

1
public int GetHashCode()

Returns

Int32

Equals(Object)

1
public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

Equals(InferenceParams)

1
public bool Equals(InferenceParams other)

Parameters

other InferenceParams

Returns

Boolean

<Clone>$()

1
public InferenceParams <Clone>$()

Returns

InferenceParams


< Back