Team Ai
Modelpublic

davanstrien/lfm25-encoder-agnews-smoke

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes19downloads
Model Card

lfm25-encoder-agnews-smoke

LiquidAI/LFM2.5-Encoder-350M fine-tuned for single-label text classification on fancyzhx/ag_news.

  • —Labels (4): World, Sports, Business, Sci/Tech
  • —Date: 2026-07-28 16:37 UTC
[!NOTE] This model uses a custom classification head (mean pooling over a backbone without a native sequence-classification class), so loading requires trust_remote_code=True. vLLM serving requires a standard architecture.

Evaluation

MetricValue
accuracy0.7575
f1_macro0.7568

Usage

python
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model = AutoModelForSequenceClassification.from_pretrained("davanstrien/lfm25-encoder-agnews-smoke", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("davanstrien/lfm25-encoder-agnews-smoke", trust_remote_code=True)

inputs = tokenizer("your text here", return_tensors="pt", truncation=True)
print(model.config.id2label[model(**inputs).logits.argmax().item()])

Reproduction

Produced on Hugging Face Jobs (gpu) with the `train-classifier.py` recipe from uv-scripts. Run it yourself:

bash
hf jobs uv run --flavor gpu --secrets HF_TOKEN \
    https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-classifier.py \
    fancyzhx/ag_news davanstrien/lfm25-encoder-agnews-smoke