Instructions to use HoangHa/lfm2.5-230m-title-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HoangHa/lfm2.5-230m-title-v0 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-230M") model = PeftModel.from_pretrained(base_model, "HoangHa/lfm2.5-230m-title-v0") - Transformers
How to use HoangHa/lfm2.5-230m-title-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HoangHa/lfm2.5-230m-title-v0")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HoangHa/lfm2.5-230m-title-v0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HoangHa/lfm2.5-230m-title-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HoangHa/lfm2.5-230m-title-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoangHa/lfm2.5-230m-title-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HoangHa/lfm2.5-230m-title-v0
- SGLang
How to use HoangHa/lfm2.5-230m-title-v0 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HoangHa/lfm2.5-230m-title-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoangHa/lfm2.5-230m-title-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HoangHa/lfm2.5-230m-title-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoangHa/lfm2.5-230m-title-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use HoangHa/lfm2.5-230m-title-v0 with Docker Model Runner:
docker model run hf.co/HoangHa/lfm2.5-230m-title-v0
Meddies Title SFT v0
Meddies Title SFT v0 is a private research candidate for generating short sidebar titles from user queries. It is a PEFT LoRA adapter for LiquidAI/LFM2.5-230M, trained on title examples in 17 languages.
Status: private, internal research. This is not a production release.
Intended use
Use this adapter only to generate one short session title from a query, with the same system and user prompt contract used during training. The 17 represented languages are:
German, English, Spanish, Filipino, French, Indonesian, Japanese, Korean, Lao, Malay, Burmese, Portuguese, Russian, Tamil, Thai, Vietnamese, and Chinese.
It is not a general assistant, clinical decision model, factual answerer, safety classifier, or replacement for application-level title validation.
Loading the adapter
Access to both this private repository and the base model is required.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "LiquidAI/LFM2.5-230M"
adapter_id = "Meddies/lfm2.5-230m-title-v0"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
def generate_title(messages):
"""Generate from messages built with the frozen Meddies title prompt."""
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
)
inputs = {key: value.to(model.device) for key, value in inputs.items()}
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=32, do_sample=False)
return tokenizer.decode(
output[0, inputs["input_ids"].shape[1]:],
skip_special_tokens=True,
).strip()
Build messages with the versioned system prompt and language-specific user prompt from the Meddies title pipeline; do not substitute a generic instruction when comparing this candidate with recorded results. The example preserves and passes the tokenizer-produced attention_mask during generation.
Training
| Item | Recorded value |
|---|---|
| Base model revision | 40cb2ad3b3044d5a41eee083a6103c8b523afa45 |
| Objective | Response-only causal-language-model SFT |
| Training rows | 68,961 |
| Validation rows | 3,639 |
| Languages | 17 |
| Epochs | 1 completed and certified |
| Optimizer steps | 4,311 |
| Useful non-masked target tokens | 1,687,393 |
| Maximum sequence length | 8,192 tokens |
| Learning rate | 0.0004 |
| Per-device batch size | 2 |
| Gradient accumulation | 4 |
| Seed | 3407 |
| LoRA rank / alpha | 128 / 256 |
| LoRA targets | All linear modules selected by the training stack |
| Checkpoint interval / retention | 500 optimizer steps / at most 3 checkpoints |
The training run used transformers==5.5.0, peft==0.19.1, torch==2.10.0, and unsloth==2026.5.2. The finalization receipt reports two Tesla T4 GPUs. The source SFT dataset was HoangHa/meddies-title, configuration title_sft_v0, pinned to revision 13ec07308f8bdcd0ababf66513d829beea9fa097.
The split and post-truncation guards checked that training, validation, and reserved benchmark queries did not collide. Twenty-four training queries and one validation query required middle truncation under the 8,192-token limit.
Evaluation
The completed checkpoint was evaluated on the full 3,639-row validation split:
- Validation loss:
1.254838228225708 - Evaluation throughput:
10.271samples/second
A separate 3,400-group benchmark was reserved by manifest, but no benchmark outcome is reported here. Validation loss measures the held-out SFT objective; it is not evidence of title usefulness, sidebar fit, factual fidelity, language quality, or production readiness.
Checkpoint-time qualitative diagnostics emitted an attention-mask warning because the padding token equaled the end-of-sequence token. Therefore, this card makes no qualitative claim from those diagnostic generations. Any qualitative evaluation must be rerun with an explicit attention mask and the frozen prompt contract.
Limitations
- The adapter is specialized for title generation and may behave unpredictably outside that task or outside its training prompt format.
- Coverage across 17 languages does not establish equal quality across languages, scripts, domains, or query lengths.
- The recorded validation loss is not a user-facing quality metric.
- The reserved benchmark has not been reported in this card.
- Application code must still enforce language, grapheme-length, privacy, and output-format constraints.
- This candidate has not been established as safe for clinical decisions or as a source of medical facts.
Reproducibility and provenance
| Artifact | SHA-256 |
|---|---|
adapter_model.safetensors |
c814264e190f10322df63f4ba859ca4d1b53a4923c435c6e6d9591f969563213 |
adapter_config.json |
7adab715ac3bd3bd38117e5f8301d6574ef618b8a3a753ee6782162ac204d3ea |
| SFT payload | 480df3973bb2e7d719830864d8baac8f60e0a09cab6e59b92bacfd89ad55a914 |
| Group-safe split manifest | fd3a91fb61414ea09df48f43e3227d3276ba0bf11f991a8792630c77b43c5302 |
| Benchmark manifest | 8fec57443c1af3e07dd472d4ebdde57148c69e4f1b0180d83c995095d07f25c6 |
| Benchmark case IDs | 73fd5d8ca4640c333fbad7fa8f6bb9c62b4edd4930c2da2fdcf7f1a8feec9de5 |
Training-trajectory train.py |
034d6fb3cf80c90edb8294f96c2dbd56da10f67aadeff15e8b21b70e3d30dfb8 |
Finalization train.py |
0b99ca40b9e76477ab18d90d7b41d241f511ed4f8ed0bab265f7957874c881d7 |
The finalization receipt records global step 4311 of expected step 4311, effective epoch 1.0, completed_one_epoch: true, and certified: true.
- Downloads last month
- 15