Skip to main content
← Back to Text Models LFM2-24B-A2B is Liquid AI’s largest Mixture-of-Experts model, combining 24B total parameters with only 2B active parameters per forward pass. This delivers the quality of much larger models with the efficiency needed for laptops and single-GPU deployments.

Specifications

PropertyValue
Parameters24B (2B active)
Context Length32K tokens
ArchitectureLFM2 (MoE)

MoE Efficiency

24B quality, 2B inference cost

Laptop-Ready

Runs on laptops and single GPUs

Tool Calling

Native function calling support

Quick Start

Install:
pip install "transformers>=5.0.0" torch accelerate
Download & Run:
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "LiquidAI/LFM2-24B-A2B"
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    dtype="bfloat16",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)

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

output = model.generate(input_ids, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.05, max_new_tokens=512)
response = tokenizer.decode(output[0][len(input_ids[0]):], skip_special_tokens=True)
print(response)