Skip to content

< Back


StatelessExecutor

Namespace: LLama

This executor infer the input as one-time job. Previous inputs won't impact on the response to current input.

1
public class StatelessExecutor : LLama.Abstractions.ILLamaExecutor

Inheritance ObjectStatelessExecutor
Implements ILLamaExecutor
Attributes NullableContextAttribute, NullableAttribute

Properties

IsMultiModal

1
public bool IsMultiModal { get; }

Property Value

Boolean

ClipModel

1
public LLavaWeights ClipModel { get; }

Property Value

LLavaWeights

Images

1
public List<Byte[]> Images { get; }

Property Value

List<Byte[]>

Context

The context used by the executor when running the inference.

1
public LLamaContext Context { get; private set; }

Property Value

LLamaContext

ApplyTemplate

If true, applies the default template to the prompt as defined in the rules for llama_chat_apply_template template.

1
public bool ApplyTemplate { get; set; }

Property Value

Boolean

SystemMessage

The system message to use with the prompt. Only used when StatelessExecutor.ApplyTemplate is true.

1
public string SystemMessage { get; set; }

Property Value

String

Constructors

StatelessExecutor(LLamaWeights, IContextParams, ILogger)

Create a new stateless executor which will use the given model

1
public StatelessExecutor(LLamaWeights weights, IContextParams params, ILogger logger)

Parameters

weights LLamaWeights

params IContextParams

logger ILogger

Methods

InferAsync(String, IInferenceParams, CancellationToken)

1
public IAsyncEnumerable<string> InferAsync(string prompt, IInferenceParams inferenceParams, CancellationToken cancellationToken)

Parameters

prompt String

inferenceParams IInferenceParams

cancellationToken CancellationToken

Returns

IAsyncEnumerable<String>


< Back