Downloads · 30 days
25
4% of all-time downloads
GazTrab/LFM2.5-50M-Vietnamese
LFM2.5-50M-Vietnamese is a text generation model from GazTrab. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/
Downloads · 30 days
25
4% of all-time downloads
All-time downloads
646
Public
Parameters
48M
107 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors96 MB · 86%
From the Hugging Face model README
A 48M-parameter model based on LiquidAI/LFM2.5-1.2B-Instruct, scaled down and further pre-trained on a large Vietnamese text corpus. LFM2.5 is a hybrid conv-attention architecture from Liquid AI, designed for efficient inference with linear-time complexity in sequence length.
| Property | Value |
|---|---|
| Base model | LiquidAI/LFM2.5-1.2B-Instruct |
| Architecture | LFM2.5 (conv + full attention hybrid) |
| Parameters | 48M (96MB safetensors) |
| Hidden size | 256 |
| Layers | 9 (6 conv + 3 full attention) |
| Attention heads | 4 (1 KV head, GQA) |
| Max position | 2,048 tokens |
| Tokenizer | Qwen2.5 (151K vocab, BPE) |
| Precision | bfloat16 |
The base architecture from LiquidAI/LFM2.5-1.2B-Instruct was scaled down to 50M parameters (9 layers, hidden_size=256) and then continued pre-training was performed on Vietnamese text.
| Step | Loss |
|---|---|
| 10,000 | 6.337 |
| 20,000 | 5.567 |
| 30,000 | 5.098 |
| 50,000 | 4.629 |
| 80,000 | 4.245 |
| 100,000 | 4.194 |
| 120,000 | 4.103 |
| 140,000 | 4.103 |
| 160,000 | 4.109 |
| 178,000 | 4.055 |
Loss plateaued around step 120K at ~4.08. The model was trained for 0.5 epochs of the full dataset (2.46B tokens out of ~5.8B total).
This model is intended as a backbone for downstream Vietnamese NLP tasks, not as a standalone text generator. At 48M parameters it is too small for general-purpose generation but well-suited as a feature extractor or for fine-tuning on specific tasks.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"GazTrab/lfm2.5-50m-vietnamese",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained("GazTrab/lfm2.5-50m-vietnamese")
# Get hidden states for downstream tasks
inputs = tokenizer("dien thoai samsung galaxy", return_tensors="pt")
outputs = model(**inputs, output_hidden_states=True)
last_hidden = outputs.hidden_states[-1] # [1, seq_len, 256]
# Or use as a token classifier backbone
# See: https://huggingface.co/docs/transformers/tasks/token_classification
This model was developed as part of a search system project. The goal was to build a lightweight NER backbone that could:
The LFM2.5 architecture was chosen after benchmarking against Qwen2.5 and Qwen3.5 at similar parameter counts, as it achieved the best speed-accuracy tradeoff with its hybrid conv-attention design.
@misc{LFM2.5-50M-Vietnamese,
title={LFM2.5 50M Vietnamese: Continued Pre-Training of LFM2.5 on Vietnamese Corpus},
author={GazTrab},
year={2026},
url={https://huggingface.co/GazTrab/LFM2.5-50M-Vietnamese}
}