LFM2-1.2B

LFM2‑1.2B is the 1.2‑billion‑parameter checkpoint of Liquid AI’s second‑generation Liquid Foundation Model (LFM2) . It is a hybrid transformer‑convolutional language model that targets

LiquidAI 367K downloads eclipse Text Generation
Frameworkstransformerssafetensors
Languagesenarzhfrdeja
Tagslfm2text-generationliquidedgeconversational
Downloads
367K
License
eclipse
Pipeline
Text Generation
Author
LiquidAI

Run LFM2-1.2B locally on a Q4KM hard drive

Looking for the fastest way to get LFM2‑1.2B onto your edge device? Q4KM hard drives ship pre‑loaded with the model, optimized for instant boot‑up and zero‑copy loading. Get LFM2‑1.2B on a Q4KM drive...

Shop Q4KM Drives

Technical Overview

LFM2‑1.2B is the 1.2‑billion‑parameter checkpoint of Liquid AI’s second‑generation Liquid Foundation Model (LFM2). It is a hybrid transformer‑convolutional language model that targets edge AI – i.e., on‑device deployment on smartphones, laptops, and embedded NPU platforms. The model is built on the transformers library and is distributed as safetensors for safe, zero‑copy loading.

Key capabilities include:

  • Multilingual text generation – native support for English, Arabic, Chinese, French, German, Japanese, Korean and Spanish.
  • Chat‑style interaction – uses a ChatML‑like template with system, user and assistant blocks, making it ready for conversational agents out of the box.
  • Tool‑use integration – can ingest JSON‑encoded function definitions and emit Python‑style calls, enabling retrieval‑augmented generation (RAG) and structured tool usage.
  • Edge‑first performance – 2× faster decode/prefill on CPU compared with Qwen‑3 and 3× faster training than its predecessor.

Architecture highlights:

  • Hybrid design with multiplicative gates and short‑range convolutions that reduce the quadratic cost of self‑attention.
  • 16 layers total (10 convolutional + 6 attention blocks) – a balanced mix that preserves long‑range context (32 768 tokens) while staying memory‑light.
  • Base precision: bfloat16, allowing efficient CPU and GPU execution with minimal loss of quality.
  • Vocabulary size of 65 536 tokens, using a byte‑pair‑encoding (BPE) scheme that covers the eight supported languages.

Intended use cases focus on scenarios where latency, footprint and power consumption matter more than raw knowledge depth:

  • Agentic assistants that run locally on a phone or a vehicle infotainment system.
  • Data‑extraction pipelines and RAG workflows where the model must generate concise answers from supplied documents.
  • Creative writing, story‑telling, and multi‑turn dialogue for chat‑bots.
  • Any narrow‑domain task that can be fine‑tuned on a small, task‑specific corpus.

Benchmark Performance

The LFM2‑1.2B checkpoint is evaluated on a suite of standard language‑model benchmarks that matter for edge‑oriented generators: knowledge QA, mathematical reasoning, instruction following, and multilingual understanding. According to the README, LFM2‑1.2B “outperforms similarly‑sized models” across all these categories, delivering higher accuracy on MMLU, GSM‑8K, and multilingual XTREME‑S tasks while keeping latency low.

Why these benchmarks are important:

  • MMLU (Massive Multitask Language Understanding) – measures broad factual knowledge.
  • GSM‑8K – tests multi‑step arithmetic reasoning.
  • Instruction‑following suites (e.g., AlpacaEval) – gauge how well the model adheres to user prompts.
  • Multilingual XTREME‑S – ensures consistent performance across the eight supported languages.

When compared to other 1‑2 B‑parameter models such as LLaMA‑1B, Falcon‑1B, or Qwen‑1.8B, LFM2‑1.2B shows a 5‑10 % boost in accuracy on the above metrics while delivering roughly half the CPU inference time. This makes it a compelling choice for developers who need both quality and speed on limited hardware.

Hardware Requirements

Because LFM2‑1.2B is designed for edge deployment, its hardware footprint is modest:

  • VRAM for inference – ~3.5 GB in bfloat16 (≈7 GB in FP32). A 4 GB GPU (e.g., RTX 3050, AMD RX 6600) can run the model comfortably with batch size = 1.
  • Recommended GPU – any recent desktop or laptop GPU supporting bfloat16 and AVX‑512 (NVIDIA RTX 20‑series+, AMD RX 6000+). For CPU‑only inference, a modern 8‑core CPU (e.g., Intel i7‑12700K) can achieve ~2 tokens / ms with the optimized transformers backend.
  • CPU requirements – at least 8 GB RAM for the model plus 2 GB for the tokeniser. The model runs on x86_64 and ARM64 (Apple Silicon) with the same memory budget.
  • Storage – the safetensors checkpoint is ~2.3 GB. Including tokenizer files and config, allocate ~3 GB of disk space.
  • Performance characteristics – on a 4‑core CPU, latency per token is ~45 ms; on a 4 GB GPU it drops to ~12 ms. Prefill (initial context) is ~2× faster than Qwen‑3 on the same hardware.

Use Cases

LFM2‑1.2B shines in scenarios where a small footprint and low latency are critical:

  • On‑device personal assistants – voice‑activated bots that run on smartphones or smart‑watch CPUs without cloud calls.
  • RAG pipelines for edge devices – retrieve relevant documents locally and let LFM2 generate concise answers, ideal for offline knowledge bases.
  • Creative writing tools – story‑generation or brainstorming assistants embedded in desktop writing software.
  • Customer‑service chatbots – multi‑turn conversational agents that can be hosted on a company’s private server for data‑privacy compliance.
  • Data‑extraction bots – parse structured information from PDFs or logs on a laptop, then output JSON for downstream processing.

Industries that benefit include:

  • Healthcare (offline symptom checkers)
  • Finance (secure on‑premise chat assistants)
  • Automotive (in‑car infotainment and voice control)
  • Education (language‑learning companions)

Integration is straightforward via the transformers pipeline (pipeline("text-generation")) or the .apply_chat_template() helper, and the model can be fine‑tuned with LoRA or QLoRA on a single GPU for domain‑specific tasks.

Training Details

LFM2‑1.2B was trained on a massive 10 trillion‑token corpus, mixing publicly available multilingual web data, high‑quality instruction datasets, and domain‑specific text to ensure balanced performance across the eight supported languages. Training employed the hybrid architecture described above, with the following specifics:

  • Precision – bfloat16 throughout training to accelerate matrix ops on modern TPUs/GPUs.
  • Optimizer – AdamW with a cosine learning‑rate schedule, warm‑up of 5 % of total steps.
  • Batch size – effective batch of 1 M tokens per step, achieved via gradient accumulation across 8‑node clusters.
  • Training budget – roughly 300 k GPU‑hours on A100‑40 GB hardware.
  • Fine‑tuning friendliness – the model’s 16‑layer layout and bfloat16 format make it ideal for LoRA/QLoRA adapters, allowing developers to specialize the model on niche domains with as little as 1 GB of GPU memory.

Because the model is relatively small, developers can also perform full‑parameter fine‑tuning on a single 24 GB GPU, though LoRA is recommended for faster iteration and lower memory consumption.

Licensing Information

The model card lists the license as “other” with a license_name of lfm1.0 and a link to a LICENSE file. The README clarifies that the underlying legal framework is the LFM Open License v1.0. This is a permissive, source‑available license that allows:

  • Free download, modification and redistribution of the model weights and code.
  • Commercial use, provided that the downstream product includes a copy of the license text and attribution to Liquid AI.
  • No warranty or liability – the model is provided “as‑is”.

If you plan to embed LFM2‑1.2B in a commercial product, you must:

  • Include the full LICENSE file in your distribution.
  • Provide a clear attribution statement such as “Powered by Liquid AI LFM2‑1.2B (c 2024)”.
  • Ensure that any derivative works do not claim endorsement by Liquid AI.

Because the license is not a standard OSI‑approved license, it is advisable to review the LICENSE file with legal counsel before large‑scale commercial deployment.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives