Skip to content

ResettableLLamaModel

Namespace: LLama

A LLamaModel what could be reset. Note that using this class will consume about 10% more memories.

public class ResettableLLamaModel : LLamaModel, System.IDisposable

Inheritance ObjectLLamaModelResettableLLamaModel
Implements IDisposable

Properties

OriginalState

The initial state of the model

public Byte[] OriginalState { get; set; }

Property Value

Byte[]

ContextSize

The context size.

public int ContextSize { get; }

Property Value

Int32

Params

The model params set for this model.

public ModelParams Params { get; set; }

Property Value

ModelParams

NativeHandle

The native handle, which is used to be passed to the native APIs. Please avoid using it unless you know what is the usage of the Native API.

public SafeLLamaContextHandle NativeHandle { get; }

Property Value

SafeLLamaContextHandle

Encoding

The encoding set for this model to deal with text input.

public Encoding Encoding { get; }

Property Value

Encoding

Constructors

ResettableLLamaModel(ModelParams, String)

public ResettableLLamaModel(ModelParams Params, string encoding)

Parameters

Params ModelParams

encoding String

Methods

Reset()

Reset the state to the initial state.

public void Reset()