InstructExecutor
Namespace: LLama
The LLama executor for instruct mode.
1 |
|
Inheritance Object → StatefulExecutorBase → InstructExecutor
Implements ILLamaExecutor
Attributes NullableContextAttribute, NullableAttribute
Fields
_logger
The logger used by this executor.
1 |
|
_pastTokensCount
The tokens that were already processed by the model.
1 |
|
_consumedTokensCount
The tokens that were consumed by the model during the current inference.
1 |
|
_n_session_consumed
1 |
|
_n_matching_session_tokens
1 |
|
_pathSession
The path of the session file.
1 |
|
_embeds
A container of the tokens to be processed and after processed.
1 |
|
_embed_inps
A container for the tokens of input.
1 |
|
_session_tokens
1 |
|
_last_n_tokens
The last tokens generated by the model.
1 |
|
Properties
Context
The context used by the executor.
1 |
|
Property Value
IsMultiModal
1 |
|
Property Value
ClipModel
1 |
|
Property Value
Images
1 |
|
Property Value
Constructors
InstructExecutor(LLamaContext, String, String, ILogger)
1 |
|
Parameters
context
LLamaContext
instructionPrefix
String
instructionSuffix
String
logger
ILogger
Methods
GetStateData()
1 |
|
Returns
LoadState(ExecutorBaseState)
1 |
|
Parameters
data
ExecutorBaseState
Returns
SaveState(String)
1 |
|
Parameters
filename
String
Returns
LoadState(String)
1 |
|
Parameters
filename
String
Returns
GetLoopCondition(InferStateArgs)
1 |
|
Parameters
args
InferStateArgs
Returns
PreprocessInputs(String, InferStateArgs)
1 |
|
Parameters
text
String
args
InferStateArgs
Returns
PostProcess(IInferenceParams, InferStateArgs)
1 |
|
Parameters
inferenceParams
IInferenceParams
args
InferStateArgs
Returns
Task<ValueTuple<Boolean, IReadOnlyList<String>>>
InferInternal(IInferenceParams, InferStateArgs)
1 |
|
Parameters
inferenceParams
IInferenceParams
args
InferStateArgs