How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="LiquidAI/LFM2.5-24B-A2B-FP8")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-24B-A2B-FP8")
model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-24B-A2B-FP8", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links
Liquid AI
Try LFM • Docs • Discord

LFM2.5-24B-A2B-FP8

FP8 version of LFM2.5-24B-A2B for GPU inference.

Linear weights are quantized to FP8 with 128×128 blocks and dynamic activation quantization. The embedding, MoE routing gates and convolution weights are kept in their original precision.

Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2.5-24B-A2B

Use with SGLang

python -m sglang.launch_server --model-path LiquidAI/LFM2.5-24B-A2B-FP8

License

This model is released under the LFM 1.0 License.

Downloads last month
34,546
Safetensors
Model size
24B params
Tensor type
F32
·
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for LiquidAI/LFM2.5-24B-A2B-FP8

Quantized
(84)
this model