Run this model with HF Jobs
Run LiquidAI/LFM2.5-Encoder-350M-Prompt-Router on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M-Prompt-Router. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M-Prompt-Router on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use LiquidAI/LFM2.5-Encoder-350M-Prompt-Router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2.5-Encoder-350M-Prompt-Router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True) model = AutoModel.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
LFM2.5-Encoder-350-Prompt-Router
A full fine-tune of LFM2.5-Encoder-350M with a zero-shot routing head that scores a prompt against user-defined routing lanes in a single encoder pass.
Find more details about our encoders in our blog post.
๐ป Demos: Try this fine-tuned model running in a CPU-only Hugging Face space: Zero-shot prompt routing โ define your own routing lanes as free text. The model scores the whole prompt against every lane in one pass.
Usage
โ ๏ธ Loads custom code via
trust_remote_code=True(the model wraps atrust_remote_codeencoder).
Install the required packages:
pip install torch transformers
Run zero-shot prompt routing:
from transformers import AutoModel, AutoTokenizer
model_id = "LiquidAI/LFM2.5-Encoder-350-Prompt-Router"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True).eval()
routes = ["Coding", "Sales", "Creative writing", "General knowledge"]
prompt = "Can you help me debug a failing Python unit test?"
print(model.route(prompt, routes, tokenizer=tokenizer))
๐ฌ Contact
- Got questions or want to connect? Join our Discord community
- If you are interested in custom solutions with edge deployment, please contact our sales team.
Citation
@article{liquidAI2026Encoders,
author = {Liquid AI},
title = {LFM2.5-Encoders: Fast at Long Context, Even on CPU},
journal = {Liquid AI Blog},
year = {2026},
note = {www.liquid.ai/blog/lfm2-5-encoders},
}
- Downloads last month
- 723