Instructions to use LiquidAI/LFM2.5-8B-A1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2.5-8B-A1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LiquidAI/LFM2.5-8B-A1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-8B-A1B") model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-8B-A1B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LiquidAI/LFM2.5-8B-A1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2.5-8B-A1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2.5-8B-A1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2.5-8B-A1B
- SGLang
How to use LiquidAI/LFM2.5-8B-A1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LiquidAI/LFM2.5-8B-A1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2.5-8B-A1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LiquidAI/LFM2.5-8B-A1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2.5-8B-A1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LiquidAI/LFM2.5-8B-A1B with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2.5-8B-A1B
Broad Knolwedge < Intelligence
Everyone is complaining about it's lack of broad knowledge. This model runs at about 2/3 the speed of cloud model, Xiaomi MiMo-V2.5-Pro for solving programming problems, I've been testing it vs Mimo on the top 5000 programming problems on StackOverflow vs Mimo and in my latest run after I fixed the Jinja problem, here's what Mimo says about comparing Mimo Vs LFM2.5:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SOLUTION QUALITY BY MODEL
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
LFM2.5 (local) mimo (cloud)
ββββββββββββββ ββββββββββββ
Total solved 8,410 25,355
QUALITY METRICS:
βββββββββββββββββββββββββββββββββββββ
β Contains code blocks 86% 43% β
β Has explanation 89% 48% β
β Avg solution length 2,731 chars 2,193 chars β
β Median length 1,976 chars 439 chars β
ββββββββββββββββββββββββββββββββββββ
BY DIFFICULTY:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β LFM2.5 β mimo β
β β avg code expl β avg code expl β
ββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Hard (30+) β 3095 88% 92% β 2755 60% 72% β
β Medium β 2872 85% 90% β 2579 45% 47% β
β Easy β 2456 87% 84% β 1708 39% 42% β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SPEED:
β Hard 69.6s 63.2s β
β Medium 50.7s 32.8s β
β Easy 36.9s 29.6s β
Key findings:
- LFM2.5 produces much higher quality - 86% have code vs 43% for mimo
- LFM2.5 median is 4.5x longer (1,976 vs 439 chars) - mimo often gives short answers
- mimo is ~30% faster but produces lower quality output
The median difference is striking - mimo's median solution is only 439 chars (often just a brief explanation without code), while LFM2.5 consistently produces detailed solutions with code.
Recommendation: For training data quality, prioritize LFM2.5 solutions. Consider re-solving some mimo solutions with LFM2.5 for better training traces.
it's bad for agent like hermes.
It can't use properly skills and tools.
It lacks understanding of a lot of things.
It don't even try to explore other possibilities.
I hope they fix this model.
The tests that I've done with it show that it has amazing raw potential! But clearly it's still crippled in it's output generation and it's not a 1.5T model it's an 8B moe - it will always need to be a specialized model because of it's size, but also due to it's size it's VERY fast, and this means it's embedded use case (which is what it is designed for) IS AMAZING. Embedded use means specialized, it's intended for low latency commands, that also might interface with the 350M model that they have, which is ever lower latency, this isn't just a toy model like the Qwen3.6-35B that you can play with in Hermes. You're looking at an uncut gem and thinking that it should be a diamond ring.