LLamaSharp/docs/xmldocs/llama.common.modelparams.md

7.8 KiB

ModelParams

Namespace: LLama.Common

The parameters for initializing a LLama model.

public class ModelParams : LLama.Abstractions.ILLamaParams, LLama.Abstractions.IModelParams, LLama.Abstractions.IContextParams, System.IEquatable`1[[LLama.Common.ModelParams, LLamaSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inheritance ObjectModelParams
Implements ILLamaParams, IModelParams, IContextParams, IEquatable<ModelParams>

Properties

ContextSize

public Nullable<uint> ContextSize { get; set; }

Property Value

Nullable<UInt32>

MainGpu

public int MainGpu { get; set; }

Property Value

Int32

SplitMode

public GPUSplitMode SplitMode { get; set; }

Property Value

GPUSplitMode

GpuLayerCount

public int GpuLayerCount { get; set; }

Property Value

Int32

Seed

public uint Seed { get; set; }

Property Value

UInt32

UseMemorymap

public bool UseMemorymap { get; set; }

Property Value

Boolean

UseMemoryLock

public bool UseMemoryLock { get; set; }

Property Value

Boolean

ModelPath

public string ModelPath { get; set; }

Property Value

String

LoraAdapters

public AdapterCollection LoraAdapters { get; set; }

Property Value

AdapterCollection

LoraBase

public string LoraBase { get; set; }

Property Value

String

Threads

public Nullable<uint> Threads { get; set; }

Property Value

Nullable<UInt32>

BatchThreads

public Nullable<uint> BatchThreads { get; set; }

Property Value

Nullable<UInt32>

BatchSize

public uint BatchSize { get; set; }

Property Value

UInt32

EmbeddingMode

public bool EmbeddingMode { get; set; }

Property Value

Boolean

TensorSplits

public TensorSplitsCollection TensorSplits { get; set; }

Property Value

TensorSplitsCollection

MetadataOverrides

public List<MetadataOverride> MetadataOverrides { get; set; }

Property Value

List<MetadataOverride>

RopeFrequencyBase

public Nullable<float> RopeFrequencyBase { get; set; }

Property Value

Nullable<Single>

RopeFrequencyScale

public Nullable<float> RopeFrequencyScale { get; set; }

Property Value

Nullable<Single>

YarnExtrapolationFactor

public Nullable<float> YarnExtrapolationFactor { get; set; }

Property Value

Nullable<Single>

YarnAttentionFactor

public Nullable<float> YarnAttentionFactor { get; set; }

Property Value

Nullable<Single>

YarnBetaFast

public Nullable<float> YarnBetaFast { get; set; }

Property Value

Nullable<Single>

YarnBetaSlow

public Nullable<float> YarnBetaSlow { get; set; }

Property Value

Nullable<Single>

YarnOriginalContext

public Nullable<uint> YarnOriginalContext { get; set; }

Property Value

Nullable<UInt32>

YarnScalingType

public Nullable<RopeScalingType> YarnScalingType { get; set; }

Property Value

Nullable<RopeScalingType>

TypeK

public Nullable<GGMLType> TypeK { get; set; }

Property Value

Nullable<GGMLType>

TypeV

public Nullable<GGMLType> TypeV { get; set; }

Property Value

Nullable<GGMLType>

NoKqvOffload

public bool NoKqvOffload { get; set; }

Property Value

Boolean

DefragThreshold

public float DefragThreshold { get; set; }

Property Value

Single

DoPooling

public bool DoPooling { get; set; }

Property Value

Boolean

VocabOnly

public bool VocabOnly { get; set; }

Property Value

Boolean

Encoding

public Encoding Encoding { get; set; }

Property Value

Encoding

Constructors

ModelParams(String)

public ModelParams(string modelPath)

Parameters

modelPath String
The model path.

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(ModelParams)

public bool Equals(ModelParams other)

Parameters

other ModelParams

Returns

Boolean

<Clone>$()

public ModelParams <Clone>$()

Returns

ModelParams