Specifications
Fine-tuning
TRL compatible (SFT, DPO, GRPO)
Custom Training
Build domain-specific models
32K Context
Extended context for long documents
Quick Start
- Transformers
- vLLM
- SGLang
Install:Download & Run:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
π New: LFM2.5-VL-450M β our smallest vision model is now available! Learn more β
Pre-trained 1.2B parameter base model for fine-tuning and custom applications
| Property | Value |
|---|---|
| Parameters | 1.2B |
| Context Length | 32K tokens |
| Architecture | LFM2.5 (Dense) |
pip install "transformers>=5.2.0" torch accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "LiquidAI/LFM2.5-1.2B-Base"
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
dtype="bfloat16",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Base model uses raw text completion (not chat template)
inputs = tokenizer("The future of AI is", return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(output[0], skip_special_tokens=True))
pip install vllm==0.14
from vllm import LLM, SamplingParams
llm = LLM(model="LiquidAI/LFM2.5-1.2B-Base")
sampling_params = SamplingParams(
temperature=0.8,
min_p=0.05,
max_tokens=512,
)
# Base model uses raw text completion
output = llm.generate("The future of AI is", sampling_params)
print(output[0].outputs[0].text)
uv pip install "sglang>=0.5.10"
sglang serve \
--model-path LiquidAI/LFM2.5-1.2B-Base \
--host 0.0.0.0 \
--port 30000
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="None")
# Base model uses raw text completion (not chat)
response = client.completions.create(
model="LiquidAI/LFM2.5-1.2B-Base",
prompt="The future of AI is",
temperature=0.8,
max_tokens=512,
)
print(response.choices[0].text)
Was this page helpful?