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
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-24B-A2B β our largest 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.0.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)
Was this page helpful?