Downloads · 30 days
20
17% of all-time downloads
ertghiu256/LFM2.5-1.2B-Instruction-following
LFM2.5-1.2B-Instruction-following is a text generation model from ertghiu256. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
LFM2.5-1.2B-Instruction-following is a fine-tuned variant of Liquid AI's efficient LFM2.5 architecture, optimized for robust instruction following in noisy environments.
Downloads · 30 days
20
17% of all-time downloads
All-time downloads
117
Public
Parameters
1.2B
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
LFM2.5-1.2B-Instruction-following is a fine-tuned variant of Liquid AI's efficient LFM2.5 architecture, optimized for robust instruction following in noisy environments.
It is specifically engineered to parse through extreme human noise—typos, SMS shorthand, internet slang, and emojis—while maintaining the base model's lightning-fast inference speed and structured reasoning capabilities.
Note: This is a specialized tool for deterministic tasks (RAG, tool calling, JSON extraction) and was fine-tuned using LoRA on a small, curated dataset (800 samples) for demonstration and edge-deployment purposes. It is not a general-purpose SOTA model, nor is it a fine-tune of LLaMA.
teh), slang (u, pls, fr), and emojis (💀).The Supervised Fine-Tuning (SFT) run used the following exact configuration:
| Hyperparameter | Value |
|---|---|
| Base Model | LiquidAI/LFM2.5-1.2B |
| Task Type | Noise-robust instruction fine-tuning |
| Dataset | 800 samples (600 clean Q&A, 200 corrupted prompts with typos/slang) |
| Framework | Unsloth (Optimized LoRA) |
| LoRA Rank | 16 |
| Learning Rate | 3e-5 |
| Max Steps | 100 |
| Per Device Batch Size | 2 |
| Gradient Accumulation Steps | 4 |
| Effective Batch Size | 8 (2 * 4) |
| Total Trainable Params | ~18.28 Million |
| Training Time | ~22 minutes on a single consumer GPU |
The LoRA adapter acts as an input "filter"—cleaning up the noise so the frozen reasoning engine can function deterministically.
To achieve the best balance of accuracy and stability (avoiding hallucinations), use these strict, production-tested settings:
| Parameter | Recommended Value (Precision Mode) |
|---|---|
| Temperature | 0.2 |
| Top_k | 20 |
| Top_p | 0.1 |
| Min_p | 0.1 |
Why this works: The combination of top_k=20 and min_p=0.1 acts as a hard "stupidity firewall" that kills off extremely rare or off-topic tokens, ensuring the model picks the most statistically probable and correct token path. This is effectively greedy decoding with a tiny safety valve, perfect for RAG and tool-calling tasks.
For general chat, you can raise the temperature slightly (e.g., 0.4), but note that higher temperatures may increase the risk of hallucinations.
Load the model directly with the standard Hugging Face Transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "ertghiu256/LFM2.5-1.2B-Instruction-following"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
# Example: Parsing extreme noise
prompt = "teh capita l of france? pls respond quick"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=128,
temperature=0.2,
top_p=0.1,
top_k=20,
min_p=0.1
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Built in 22 minutes. Runs in milliseconds. Deploy it anywhere. 🚀
This lfm2 model was trained 2x faster with Unsloth and Huggingface's TRL library.
@article{liquidai2025lfm2,
title={LFM2 Technical Report},
author={Liquid AI},
journal={arXiv preprint arXiv:2511.23404},
year={2025}
}