installModel static method
InferenceInstallationBuilder
installModel({
- required ModelType modelType,
- ModelFileType fileType = ModelFileType.task,
Start building an inference model installation
Returns type-safe builder for installing inference models with optional LoRA weights. The model will be automatically set as the active inference model after installation.
Parameters:
modelType
: Model type (gemmaIt, deepSeek, qwen, etc.) - RequiredfileType
: File type (task or binary) - Defaults to task
Example:
// Install Gemma model
await FlutterGemma.installModel(
modelType: ModelType.gemmaIt,
)
.fromNetwork('https://example.com/model.task', token: 'hf_...')
.withProgress((p) => print('$p%'))
.install();
// Install DeepSeek with LoRA weights
await FlutterGemma.installModel(
modelType: ModelType.deepSeek,
)
.fromNetwork('https://example.com/model.task')
.withLoraFromNetwork('https://example.com/lora.bin')
.install();
Implementation
static InferenceInstallationBuilder installModel({
required ModelType modelType,
ModelFileType fileType = ModelFileType.task,
}) {
return InferenceInstallationBuilder(
modelType: modelType,
fileType: fileType,
);
}