EngineCreateRequest class
Everything litert_lm_engine_create is made from, decided on the calling
isolate. Plain values only, so it crosses to the isolate that builds the
engine by copy: the settings are created, used and freed there
(createEngineOffMainIsolate), and no settings pointer is ever valid on
two isolates.
- Annotations
-
- @visibleForTesting
- @immutable
Constructors
- EngineCreateRequest({required String modelPath, required String backend, required int maxTokens, required RuntimeLogLevel logLevel, String? visionBackend, String? audioBackend, String? cacheDir, int maxNumImages = 0, bool? enableSpeculativeDecoding, int? speculativeDecodingMode, int? numThreads, int? activationDataType, LiteRtLmLogLevel? nativeLogLevel, String? dispatchLibDir, bool? useHwMaskingForNpu, int? kernelBatchSize, bool blockSigprof = false, bool listWeightBanks = false})
-
const
Properties
- activationDataType → int?
-
The C API's number; null leaves the engine's own choice.
final
- audioBackend → String?
-
Null builds the engine without an audio encoder.
final
- backend → String
-
Text backend wire name: 'cpu', 'gpu' or 'npu'.
final
- blockSigprof → bool
-
Runs the create with SIGPROF blocked (see withSigprofBlocked).
final
- cacheDir → String?
-
final
- dispatchLibDir → String?
-
Where LiteRT loads the NPU dispatch from; null off the NPU.
final
- enableSpeculativeDecoding → bool?
-
Null leaves the model's own default.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kernelBatchSize → int?
-
Flushes the GPU command queue every N ops (#364); null leaves the
engine's default.
final
- listWeightBanks → bool
-
Lists the Intel NPU weight banks before and after the create, so the
caller can claim the ones it wrote.
final
- logLevel → RuntimeLogLevel
-
The caller's currentRuntimeLogLevel: a spawned isolate starts with its own
copy at the default level.
final
- maxNumImages → int
-
Applied only when positive.
final
- maxTokens → int
-
final
- modelPath → String
-
final
- nativeLogLevel → LiteRtLmLogLevel?
-
Applied with
litert_lm_set_min_log_levelbefore the settings are made; null leaves the level as it is.final - numThreads → int?
-
The CPU executor's threads; null leaves LiteRT-LM's default.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speculativeDecodingMode → int?
-
LiteRtLmSpeculativeDecodingModeset through a speculative decoding config (adaptive has no boolean); null sets none.final - useHwMaskingForNpu → bool?
-
What
use_hw_masking_for_npuis set to (npuHwMaskingdecides); null leaves LiteRT-LM's default.final - visionBackend → String?
-
Null builds the engine without a vision encoder.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited