Skip to main content
← Back to Text Models LFM2-700M is a compact model balancing capability and efficiency. Suitable for deployment on a wide range of devices including phones, tablets, and laptops with limited resources.

Specifications

PropertyValue
Parameters700M
Context Length32K tokens
ArchitectureLFM2 (Dense)

Edge Deployment

Optimized for resource-constrained devices

Low Latency

Fast inference for real-time applications

Fine-tunable

TRL compatible (SFT, DPO, GRPO)

Quick Start

Install:
pip install transformers torch
Download & Run:
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2-700M", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2-700M")

input_ids = tokenizer.apply_chat_template(
    [{"role": "user", "content": "What is machine learning?"}],
    add_generation_prompt=True, return_tensors="pt"
).to(model.device)

output = model.generate(input_ids, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))