--- library_name: pytorch license: other tags: - llm - generative_ai - android pipeline_tag: text-generation --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/lfm2_5_1_2b_instruct/web-assets/model_demo.png) # LFM2.5-1.2B-Instruct: Optimized for Qualcomm Devices LFM2.5 is a family of hybrid language models from Liquid AI designed for fast, high-quality on-device deployment. The 1.2B Instruct model is tuned for instruction following, chat, and tool use. This is based on the implementation of LFM2.5-1.2B-Instruct found [here](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/lfm2_5_1_2b_instruct) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Deploying LFM2.5-1.2B-Instruct on-device Follow the [GenieX quickstart](https://geniex.aihub.qualcomm.com/en/get-started/quickstart) to install GenieX and deploy the model on a target device. ## Getting Started There are two ways to deploy this model on your device: ### Option 1: Download Pre-Exported Models Below are pre-exported model assets ready for deployment. | Runtime | Precision | Chipset | SDK Versions | Download | |---|---|---|---|---| | GENIEX_LLAMACPP | q4_0 | Universal | | [Download](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct-GGUF/resolve/main/LFM2.5-1.2B-Instruct-Q4_0.gguf) For more device-specific assets and performance metrics, visit **[LFM2.5-1.2B-Instruct on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/lfm2_5_1_2b_instruct)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/lfm2_5_1_2b_instruct) Python library to compile and export the model with your own: - Custom weights (e.g., fine-tuned checkpoints) - Custom input shapes - Target device and runtime configurations This option is ideal if you need to customize the model beyond the default configuration provided here. See our repository for [LFM2.5-1.2B-Instruct on GitHub](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/lfm2_5_1_2b_instruct) for usage instructions. ## Model Details **Model Type:** Model_use_case.text_generation **Model Stats:** - Model architecture: Hybrid architecture combining short-range gated convolutions with grouped-query attention (LFM2). - Response Rate: Rate of response generation after the first response token. - Supported languages: English, Arabic, Chinese, French, German, Japanese, Korean, Spanish ## Performance Summary | Model | Runtime | Precision | Chipset | Context Length | Response Rate (tokens per second) |---|---|---|---|---|--- | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 512 | 78.912682 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 512 | 68.929121 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 512 | 77.238483 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 4096 | 53.612768 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 4096 | 57.566562 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 4096 | 66.097198 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 512 | 124.63231 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 512 | 87.676878 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 512 | 102.519004 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 4096 | 106.095167 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 4096 | 75.894038 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X2 Elite | 4096 | 80.600778 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 512 | 90.398353 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 512 | 71.232721 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 512 | 54.377656 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 4096 | 80.653902 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 4096 | 62.998885 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Snapdragon® X Elite | 4096 | 46.882531 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 512 | 27.097093 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 512 | 11.770244 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 512 | 44.492459 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 4096 | 12.983892 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 4096 | 9.651086 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-8275 | 4096 | 36.81164 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 512 | 61.756092 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 512 | 27.354829 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 512 | 70.257483 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 512 | 90.398353 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 512 | 71.232721 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 512 | 54.377656 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 512 | 80.363343 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 512 | 72.259121 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 512 | 56.965983 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 4096 | 46.920322 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 4096 | 23.106241 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-9075 | 4096 | 61.622244 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 4096 | 80.653902 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 4096 | 62.998885 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ IQ-X7181 | 4096 | 46.882531 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 4096 | 45.639921 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 4096 | 57.849112 | LFM2.5-1.2B-Instruct | GENIEX_LLAMACPP | q4_0 | Qualcomm® Dragonwing™ Q-8750 | 4096 | 46.243552 ## License * The license for the original implementation of LFM2.5-1.2B-Instruct can be found [here](https://www.liquid.ai/lfm-license). ## References * [Introducing LFM2.5: The Next Generation of On-Device AI](https://www.liquid.ai/blog/introducing-lfm2-5-the-next-generation-of-on-device-ai) * [Source Model Implementation](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com). ## Usage and Limitations This model may not be used for or in connection with any of the following applications: - Accessing essential private and public services and benefits; - Administration of justice and democratic processes; - Assessing or recognizing the emotional state of a person; - Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics; - Education and vocational training; - Employment and workers management; - Exploitation of the vulnerabilities of persons resulting in harmful behavior; - General purpose social scoring; - Law enforcement; - Management and operation of critical infrastructure; - Migration, asylum and border control management; - Predictive policing; - Real-time remote biometric identification in public spaces; - Recommender systems of social media platforms; - Scraping of facial images (from the internet or otherwise); and/or - Subliminal manipulation