LiteRtLmBackendPreference enum

Preferred LiteRT-LM runtime backend for .litertlm models.

Use ModelParams.device, which every runtime honours and which throws LlamaUnsupportedException when the device is unavailable. This selector keeps working until 1.0, so a load can still pick a LiteRT-LM device apart from the llama.cpp one.

Inheritance
Available extensions
Annotations
  • @Deprecated('Use ModelParams.device. This will be removed in 1.0.')

Values

auto → const LiteRtLmBackendPreference

Let llamadart choose a platform default.

const LiteRtLmBackendPreference(null)
cpu → const LiteRtLmBackendPreference

Run LiteRT-LM on CPU.

const LiteRtLmBackendPreference('cpu')
gpu → const LiteRtLmBackendPreference

Run LiteRT-LM on the platform GPU delegate when available.

const LiteRtLmBackendPreference('gpu')
npu → const LiteRtLmBackendPreference

Run LiteRT-LM on Android NPU delegate when available.

const LiteRtLmBackendPreference('npu')

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
nativeName → String?
Native LiteRT-LM backend name, or null for automatic selection.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<LiteRtLmBackendPreference>
A constant List of the values in this enum, in order of their declaration.