Skip to main content

offline_slm 0.0.2 copy "offline_slm: ^0.0.2" to clipboard
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 MockSLMEngine with intelligent on-device simulations for Python scripts, coding Q&A, math arithmetic, string manipulation, and natural conversational banter.
  • iOS Stability Fix: Replaced SelectableText.rich containing animated WidgetSpan in ChatBubble with Text.rich and an explicit copy-to-clipboard button, resolving iOS SystemContextMenuController assertions during token streaming.
  • Automated Engine Switching: OfflineChatController now automatically selects MockSLMEngine for .sim presets and LlamaEngine for .gguf models while honoring custom engines.
  • Responsive Status Bar: Added Flexible with text overflow ellipsis to ModelStatusBar to 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 ModelDownloader with speed calculation, progress tracking, and atomic file saving.
  • Complete drop-in UI kit: OfflineChatWidget, OfflineChatTheme, ChatBubble with animated typing cursor and metrics pill, ChatInputBar, ModelStatusBar, and PromptSuggestions.
  • Full Flutter example app showcasing drop-in and custom configurations.
1
likes
160
points
117
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A fast, privacy-focused Flutter package for running offline Small Language Models (SLMs) and drop-in AI chatbots locally on device.

Repository (GitHub)
View/report issues

Topics

#ai #llm #offline #chatbot #slm

License

MIT (license)

Dependencies

ffi, flutter, http, llama_cpp_dart, path, path_provider, plugin_platform_interface

More

Packages that depend on offline_slm

Packages that implement offline_slm