offline_slm 0.0.2
offline_slm: ^0.0.2 copied to clipboard
A fast, privacy-focused Flutter package for running offline Small Language Models (SLMs) and drop-in AI chatbots locally on device.
Changelog #
0.0.2 #
- Dynamic Simulation Engine: Upgraded
MockSLMEnginewith intelligent on-device simulations for Python scripts, coding Q&A, math arithmetic, string manipulation, and natural conversational banter. - iOS Stability Fix: Replaced
SelectableText.richcontaining animatedWidgetSpaninChatBubblewithText.richand an explicit copy-to-clipboard button, resolving iOSSystemContextMenuControllerassertions during token streaming. - Automated Engine Switching:
OfflineChatControllernow automatically selectsMockSLMEnginefor.simpresets andLlamaEnginefor.ggufmodels while honoring custom engines. - Responsive Status Bar: Added
Flexiblewith text overflow ellipsis toModelStatusBarto prevent rendering overflow on narrow mobile screens. - Sample App: Linked official standalone demo repository at offline_SLM_app.
0.0.1 #
- Initial release of
offline_slm. - Core engine interfaces (
SLMEngine,LlamaEngine,MockSLMEngine). - Native C/C++ FFI bridge with CMake and Podspec configurations for Android, iOS, macOS, Windows, and Linux.
- Background isolate execution for zero-jank 60/120fps UI token streaming.
- Chat state controller (
OfflineChatController) with history management, sliding context window, cancellation support, and JSON serialization. - Chat prompt templating for ChatML (SmolLM2, Qwen 2.5), Meta Llama 3.2, Google Gemma 2, Microsoft Phi-3.5, and Mistral.
- Mobile model catalog with presets for SmolLM2 (135M, 360M, 1.7B), Qwen 2.5 (0.5B), Llama 3.2 (1B), and Phi-3.5 Mini.
- Resumable/streaming
ModelDownloaderwith speed calculation, progress tracking, and atomic file saving. - Complete drop-in UI kit:
OfflineChatWidget,OfflineChatTheme,ChatBubblewith animated typing cursor and metrics pill,ChatInputBar,ModelStatusBar, andPromptSuggestions. - Full Flutter example app showcasing drop-in and custom configurations.