genkit_llamadart
3.9.0, released 9 days ago by leehack.com
Genkit Dart plugin for local AI through llamadart: GGUF, LiteRT-LM, chat, tool calling, and embeddings
What it does
Runs local LLMs and on-device AI in Genkit Dart and Flutter applications. Supports GGUF and LiteRT-LM models for offline chat, token streaming, tool calling, structured JSON output, embeddings, batch transcription, speech synthesis, and image generation.
AI-written summary of version 3.8.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need offline, on-device AI capabilities in a Dart or Flutter application.
- You want to use Genkit with local GGUF models or LiteRT-LM bundles via llamadart.
Skip it when
- You rely entirely on cloud-based LLM APIs and have no need for local on-device inference.
- Your target environment lacks support for native runtimes and companions.
Strengths
- Enables completely offline local AI inference in application processes.
- Supports chat, streaming, tool calling, structured JSON output, embeddings, and media tasks.
Weaknesses
- Requires platform-specific companion runtimes and configuration (e.g., Apple companions for iOS/macOS).
- Feature support heavily depends on the loaded model and backend runtime.
Setup
- Kind
- Pure Dart
- Effort
- High
- Code generation
- No
- Direct dependencies
- 5
Requires Dart 3.12+, Genkit 1.x, and llamadart 0.19.x. Flutter apps need runtime companion packages like llamadart_llama_cpp_flutter or llamadart_litert_lm_flutter, with specific OS version requirements.
import 'package:genkit/genkit.dart';
import 'package:genkit_llamadart/genkit_llamadart.dart';
Future<void> main(List<String> args) async {
final prepared = await llamaDart.prepareModel(
name: 'local-chat',
source: ModelSource.parse('hf://unsloth/Qwen3.5-0.8B-GGUF/Qwen3.5-0.8B-Q4_K_M.gguf?revision=6ab461498e2023f6e3c1baea90a8f0fe38ab64d0'),
modelParams: const ModelParams(contextSize: 4096, device: ComputeDevice.cpu),
);
final ai = prepared.createGenkit();
try {
final response = await ai.generate(prompt: 'Say hello in one sentence.');
print(response.text);
} finally {
await prepared.dispose();
await ai.shutdown();
}
}Alternatives
Packages that do the same job and could replace genkit_llamadart.
- firebase_ai
Choose firebase_ai if you prefer using cloud-hosted Gemini models via Firebase rather than running local models on-device.
86Compare - tflite_flutter
Choose tflite_flutter if you want to run custom TensorFlow Lite models directly without Genkit overhead.
68Compare
Works with
Packages commonly used together with genkit_llamadart: ones it builds on, ones built on it, and its own family.
- cryptogenkit_llamadart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- llamadartgenkit_llamadart depends on itOn‑device LLM inference for Dart/Flutter across native and web
- genkitgenkit_llamadart depends on itGenerative AI library for Dart and Flutter supporting text generation, tools, and flows.
- schemanticgenkit_llamadart depends on itGenerate type-safe data classes and runtime JSON Schemas from abstract class definitions.