Build with LFM2 Models and the LEAP SDK
🌊 Documentation | 🤗 Hugging Face | 🚀 LEAP Edge SDK | 📚 Tutorials | 🏗️ Community Examples
This repository contains examples, tutorials, and applications for building with Liquid AI open-weight models and the open-source LEAP SDK.
Whether you're looking to fine-tune models, deploy to edge devices, or build complete applications, you'll find resources here to get started.
- Fine-tune an LFM2 model - Customize Liquid models to your specific use case
- Deploy to an edge device - Run models on mobile, both Android and iOS.
- End-to-end tutorials - Complete walkthroughs from setup to production.
- Examples built by our community - Working demos you can run and modify
LFM2 is a generation of hybrid models, designed for on-device deployment, ranging from 350M up to 8B parameters.
These models are particularly suited for agentic tasks, data extraction, RAG, creative writing, and multi-turn conversations. We do not recommend using them for tasks that are knowledge-intensive or require programming skills.
| Model | Technique | |
|---|---|---|
| LFM2-8B-A1B | Supervised Fine Tuning (TRL) | |
| Direct Preference Optimization (TRL) | ||
| LFM2-2.6B | Supervised Fine Tuning (TRL) | |
| Supervised Fine Tuning (Axolotl) | ||
| Supervised Fine Tuning (Unsloth) | ||
| Direct Preference Optimization (TRL) | ||
| LFM2-1.2B | Supervised Fine Tuning (TRL) | |
| Supervised Fine Tuning (Axolotl) | ||
| Supervised Fine Tuning (Unsloth) | ||
| Direct Preference Optimization (TRL) | ||
| LFM2-700M | Supervised Fine Tuning (TRL) | |
| Supervised Fine Tuning (Axolotl) | ||
| Supervised Fine Tuning (Unsloth) | ||
| Direct Preference Optimization (TRL) | ||
| LFM2-350M | Supervised Fine Tuning (TRL) | |
| Supervised Fine Tuning (Axolotl) | ||
| Supervised Fine Tuning (Unsloth) | ||
| Direct Preference Optimization (TRL) |
Need a model for data extraction, RAG, tool use, or math reasoning? Start with our Nano checkpoints—they're already specialized for these tasks.
| Model | Use Cases |
|---|---|
| • LFM2-1.2B-Extract • LFM2-350M-Extract |
• Extracting invoice details from emails into structured JSON • Converting regulatory filings into XML for compliance systems • Transforming customer support tickets into YAML for analytics pipelines • Populating knowledge graphs with entities and attributes from unstructured reports |
| LFM2-1.2B-RAG | • Chatbot to ask questions about the documentation of a particular product. • Custom support with an internal knowledge base to provide grounded answers. • Academic research assistant with multi-turn conversations about research papers and course materials. |
| LFM2-1.2B-Tool | • Mobile and edge devices requiring instant API calls, database queries, or system integrations without cloud dependency. • Real-time assistants in cars, IoT devices, or customer support, where response latency is critical. • Resource-constrained environments like embedded systems or battery-powered devices needing efficient tool execution. |
| LFM2‑350M‑Math | • Mathematical problem solving. • Reasoning tasks. |
Note
The supported languages for these models are: English, Arabic, Chinese, French, German, Japanese, Korean, Portuguese, and Spanish.
Need support for another language?
Join the Liquid AI Discord Community and request it! Our community is working on expanding language support, and your input helps us prioritize which languages to tackle next. Connect with fellow developers, share your use cases, and collaborate on multilingual AI solutions.
LFM2-VL is our first series of vision-language models, designed for on-device deployment.
| Model | Technique | |
|---|---|---|
| LFM2-VL-1.6B | Supervised Fine Tuning (TRL) | |
| LFM2-VL-450M | Supervised Fine Tuning (TRL) |
The LEAP Edge SDK is our native framework for running LFM2 models on mobile devices.
Written for Android (Kotlin) and iOS (Swift), the goal of the Edge SDK is to make Small Language Model deployment as easy as calling a cloud LLM API endpoint, for any app developer.
| Platform | Example | |
|---|---|---|
| Android | LeapChat: A simple chat-style app allowing the users to chat with the model | |
| SloganApp: Single turn generation for marketing. The UI is implemented with Android Views. | ||
| ShareAI: Website summary generator | ||
| Recipe Generator: Structured output generation with the LEAP SDK | ||
| Visual Language Model example | ||
| iOS | LeapChat: A comprehensive chat application demonstrating advanced LeapSDK features including real-time streaming, conversation management, and modern UI components. | |
| LeapSloganExample: A simple SwiftUI app demonstrating basic LeapSDK integration for text generation. | ||
| Recipe Generator: Structured output generation | ||
| Audio demo: A SwiftUI app demonstrating audio input and output with the LeapSDK for on-device AI inference. |
Complete end-to-end tutorials that take you from setup to deployment.
| Tutorial | Repository |
|---|---|
| Super fast and accurate image classification on edge devices | |
| Let's build a Chess game using small and local Large Language Models |
Working applications that demonstrate Liquid models in action.
| Project | Repository |
|---|---|
| TranslatorLens: Building An Offline Translation Camera |
We welcome contributions!
- Open a PR with a link to your project github repo in the
Examples built by our communitysection.
- Documentation: https://leap.liquid.ai/docs
- Discord: Join our community 🤗