davanstrien HF Staff commited on
Commit
10e27bc
·
verified ·
1 Parent(s): d908f50

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - uv-script
4
+ - text-classification
5
+ - hf-jobs
6
+ base_model: LiquidAI/LFM2.5-Encoder-350M
7
+ datasets:
8
+ - davanstrien/dataset-cards-with-task-categories
9
+ pipeline_tag: text-classification
10
+ library_name: transformers
11
+ ---
12
+
13
+ # dataset-card-task-classifier
14
+
15
+ [LiquidAI/LFM2.5-Encoder-350M](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M) fine-tuned for
16
+ multi-label text classification on
17
+ [davanstrien/dataset-cards-with-task-categories](https://huggingface.co/datasets/davanstrien/dataset-cards-with-task-categories).
18
+
19
+ - **Labels (36)**: `audio-classification`, `audio-to-audio`, `automatic-speech-recognition`, `feature-extraction`, `fill-mask`, `image-classification`, `image-feature-extraction`, `image-segmentation`, `image-text-to-text`, `image-to-3d`, `image-to-image`, `image-to-text`, `multiple-choice`, `object-detection`, `other`, `question-answering`, `reinforcement-learning`, `robotics`, `sentence-similarity`, `summarization`, `table-question-answering`, `tabular-classification`, `tabular-regression`, `text-classification`, `text-generation`, `text-retrieval`, `text-to-image`, `text-to-speech`, `text-to-video`, `time-series-forecasting`, … (36 total)
20
+ - **Date**: 2026-07-28 17:46 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
+ | f1_micro @ 0.5 | 0.6892 |
30
+ | f1_macro @ 0.5 | 0.5736 |
31
+ | f1_micro @ tuned | 0.7043 |
32
+ | f1_macro @ tuned | 0.6379 |
33
+
34
+ Per-label decision thresholds tuned on the eval split are stored in
35
+ `config.classifier_thresholds`.
36
+
37
+ ## Usage
38
+
39
+ ```python
40
+ import torch
41
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
42
+
43
+ model = AutoModelForSequenceClassification.from_pretrained("davanstrien/dataset-card-task-classifier", trust_remote_code=True)
44
+ tokenizer = AutoTokenizer.from_pretrained("davanstrien/dataset-card-task-classifier", trust_remote_code=True)
45
+
46
+ inputs = tokenizer("your text here", return_tensors="pt", truncation=True)
47
+ probs = torch.sigmoid(model(**inputs).logits)[0]
48
+ thresholds = torch.tensor(model.config.classifier_thresholds) # tuned on validation
49
+ labels = [model.config.id2label[i] for i in (probs >= thresholds).nonzero().flatten().tolist()]
50
+ print(labels)
51
+ ```
52
+
53
+ ## Reproduction
54
+
55
+ 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:
56
+
57
+ ```bash
58
+ hf jobs uv run --flavor gpu --secrets HF_TOKEN \
59
+ https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-classifier.py \
60
+ davanstrien/dataset-cards-with-task-categories davanstrien/dataset-card-task-classifier --label-column labels
61
+ ```