Skip to content

< Back


ModelParams

Namespace: LLama.Common

The parameters for initializing a LLama model.

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

Properties

EqualityContract

1
protected Type EqualityContract { get; }

Property Value

Type

ContextSize

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

Property Value

Nullable<UInt32>

MainGpu

1
public int MainGpu { get; set; }

Property Value

Int32

SplitMode

1
public Nullable<GPUSplitMode> SplitMode { get; set; }

Property Value

Nullable<GPUSplitMode>

TensorBufferOverrides

1
public List<TensorBufferOverride> TensorBufferOverrides { get; set; }

Property Value

List<TensorBufferOverride>

GpuLayerCount

1
public int GpuLayerCount { get; set; }

Property Value

Int32

SeqMax

1
public uint SeqMax { get; set; }

Property Value

UInt32

UseMemorymap

1
public bool UseMemorymap { get; set; }

Property Value

Boolean

UseMemoryLock

1
public bool UseMemoryLock { get; set; }

Property Value

Boolean

ModelPath

1
public string ModelPath { get; set; }

Property Value

String

Threads

1
public Nullable<int> Threads { get; set; }

Property Value

Nullable<Int32>

BatchThreads

1
public Nullable<int> BatchThreads { get; set; }

Property Value

Nullable<Int32>

BatchSize

1
public uint BatchSize { get; set; }

Property Value

UInt32

UBatchSize

1
public uint UBatchSize { get; set; }

Property Value

UInt32

Embeddings

1
public bool Embeddings { get; set; }

Property Value

Boolean

TensorSplits

1
public TensorSplitsCollection TensorSplits { get; set; }

Property Value

TensorSplitsCollection

CheckTensors

1
public bool CheckTensors { get; }

Property Value

Boolean

MetadataOverrides

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

Property Value

List<MetadataOverride>

RopeFrequencyBase

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

Property Value

Nullable<Single>

RopeFrequencyScale

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

Property Value

Nullable<Single>

YarnExtrapolationFactor

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

Property Value

Nullable<Single>

YarnAttentionFactor

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

Property Value

Nullable<Single>

YarnBetaFast

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

Property Value

Nullable<Single>

YarnBetaSlow

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

Property Value

Nullable<Single>

YarnOriginalContext

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

Property Value

Nullable<UInt32>

YarnScalingType

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

Property Value

Nullable<RopeScalingType>

TypeK

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

Property Value

Nullable<GGMLType>

TypeV

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

Property Value

Nullable<GGMLType>

NoKqvOffload

1
public bool NoKqvOffload { get; set; }

Property Value

Boolean

FlashAttention

1
public bool FlashAttention { get; set; }

Property Value

Boolean

DefragThreshold

1
public Nullable<float> DefragThreshold { get; set; }

Property Value

Nullable<Single>

PoolingType

1
public LLamaPoolingType PoolingType { get; set; }

Property Value

LLamaPoolingType

AttentionType

1
public LLamaAttentionType AttentionType { get; set; }

Property Value

LLamaAttentionType

VocabOnly

1
public bool VocabOnly { get; set; }

Property Value

Boolean

Encoding

1
public Encoding Encoding { get; set; }

Property Value

Encoding

Constructors

ModelParams(String)

1
public ModelParams(string modelPath)

Parameters

modelPath String
The model path.

ModelParams(ModelParams)

1
protected ModelParams(ModelParams original)

Parameters

original ModelParams

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

1
public bool Equals(ModelParams other)

Parameters

other ModelParams

Returns

Boolean

<Clone>$()

1
public ModelParams <Clone>$()

Returns

ModelParams


< Back