Instructions to use davanstrien/lfm25-arxiv-new-dataset-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davanstrien/lfm25-arxiv-new-dataset-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="davanstrien/lfm25-arxiv-new-dataset-classifier", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("davanstrien/lfm25-arxiv-new-dataset-classifier", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("davanstrien/lfm25-arxiv-new-dataset-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- uv-script
|
| 4 |
+
- text-classification
|
| 5 |
+
- hf-jobs
|
| 6 |
+
base_model: LiquidAI/LFM2.5-Encoder-350M
|
| 7 |
+
datasets:
|
| 8 |
+
- librarian-bots/arxiv-new-datasets-v2
|
| 9 |
+
pipeline_tag: text-classification
|
| 10 |
+
library_name: transformers
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# lfm25-arxiv-new-dataset-classifier
|
| 14 |
+
|
| 15 |
+
[LiquidAI/LFM2.5-Encoder-350M](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M) fine-tuned for
|
| 16 |
+
single-label text classification on
|
| 17 |
+
[librarian-bots/arxiv-new-datasets-v2](https://huggingface.co/datasets/librarian-bots/arxiv-new-datasets-v2).
|
| 18 |
+
|
| 19 |
+
- **Labels (2)**: `new_dataset`, `not_new_dataset`
|
| 20 |
+
- **Date**: 2026-07-29 08:25 UTC
|
| 21 |
+
|
| 22 |
+
> [!NOTE]
|
| 23 |
+
> 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.
|
| 24 |
+
|
| 25 |
+
## Evaluation
|
| 26 |
+
|
| 27 |
+
| Metric | Value |
|
| 28 |
+
|--------|-------|
|
| 29 |
+
| accuracy | 0.7850 |
|
| 30 |
+
| f1_macro | 0.6441 |
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 36 |
+
|
| 37 |
+
model = AutoModelForSequenceClassification.from_pretrained("davanstrien/lfm25-arxiv-new-dataset-classifier", trust_remote_code=True)
|
| 38 |
+
tokenizer = AutoTokenizer.from_pretrained("davanstrien/lfm25-arxiv-new-dataset-classifier", trust_remote_code=True)
|
| 39 |
+
|
| 40 |
+
inputs = tokenizer("your text here", return_tensors="pt", truncation=True)
|
| 41 |
+
print(model.config.id2label[model(**inputs).logits.argmax().item()])
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Reproduction
|
| 45 |
+
|
| 46 |
+
Produced on [Hugging Face Jobs](https://huggingface.co/docs/huggingface_hub/guides/jobs) (`gpu`) with the [`train-classifier.py`](https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-classifier.py) recipe from [uv-scripts](https://huggingface.co/uv-scripts). Run it yourself:
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
hf jobs uv run --flavor gpu --secrets HF_TOKEN \
|
| 50 |
+
https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-classifier.py \
|
| 51 |
+
librarian-bots/arxiv-new-datasets-v2 davanstrien/lfm25-arxiv-new-dataset-classifier --label-column labels
|
| 52 |
+
```
|