flutter_llama 1.2.0
flutter_llama: ^1.2.0 copied to clipboard
Flutter plugin for running LLM inference with llama.cpp and GGUF models on Android and iOS
Changelog #
All notable changes to this project will be documented in this file.
1.2.0 - 2026-10-11 #
Added #
- Agent API (doc/agent.md):
chat/chatStreamwith the model's own template, tool calls constrained by grammar (ToolSpec,ToolChoice), JSON-schema / GBNF output, and reasoning on or off;classify(label log-probabilities or embeddings),countTokens,countChatTokens,embed,modelInfo;canLoad: whether a model fits the device's memory and disk before downloading;LlamaLifecycle: unload on background, idle or memory pressure.
- Open-model catalogue
ModelCatalog/OpenModels: Qwen3, Granite 3.3, Phi-4-mini and SmolLM2, Apache-2.0 or MIT only, with licence, sizes and tasks (doc/models.md). - Desktop. Linux through FFI onto the shared core (
src/core). The Windows build files are included. - Android GPU.
- The CPU and Vulkan backends are separate modules loaded at run time, so minSdk stays 24.
nGpuLayers: -1is auto: it offloads only where the GPU beats the CPU (Mali and PowerVR stay on the CPU).getModelInfo()['backends']lists the devices.
- The example app has an agent tour (open models, chat with a tool, classify).
Fixed #
- Android release builds: consumer R8 rules keep the JNI result classes. Before, the first
getModelInfocrashed withNoSuchMethodErrorunder R8. - Android, Linux and Windows build from a pub.dev install: CMake fetches llama.cpp at the pinned commit
(
945501f5e) when the checkout is not next to the package. Android needs CMake 3.22.1.
Changed #
- Requires Dart 3.4 / Flutter 3.22.
- The 1.1 API (
loadModel,generate,generateStream,PresetModels) is unchanged.
1.1.2 - 2025-01-28 #
Changed #
- Optimized package size by excluding debug symbols and build artifacts
- Added comprehensive .pubignore to reduce package size from 234 MB to 20 MB
1.1.1 - 2025-01-28 #
1.0.1 - 2025-01-27 #
1.0.0 - 2025-01-27 #
Added #
- Initial stable release
- Full support for llama.cpp GGUF models on iOS and macOS
- GPU acceleration via Metal
- CPU optimization via Accelerate framework
- Streaming text generation
- Batch processing support
- Multiple model format support
- Comprehensive documentation
- Example application with demos
- Integration tests