Instructions to use davanstrien/dataset-rows16-task-classifier-4096 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davanstrien/dataset-rows16-task-classifier-4096 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="davanstrien/dataset-rows16-task-classifier-4096", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("davanstrien/dataset-rows16-task-classifier-4096", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("davanstrien/dataset-rows16-task-classifier-4096", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| tags: | |
| - uv-script | |
| - text-classification | |
| - hf-jobs | |
| base_model: LiquidAI/LFM2.5-Encoder-350M | |
| datasets: | |
| - davanstrien/dataset-rows16-with-task-categories | |
| pipeline_tag: text-classification | |
| library_name: transformers | |
| # dataset-rows16-task-classifier-4096 | |
| [LiquidAI/LFM2.5-Encoder-350M](https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M) fine-tuned for | |
| multi-label text classification on | |
| [davanstrien/dataset-rows16-with-task-categories](https://huggingface.co/datasets/davanstrien/dataset-rows16-with-task-categories). | |
| - **Labels (35)**: `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`, `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`, `token-classification`, … (35 total) | |
| - **Date**: 2026-07-30 09:39 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 | |
| | Metric | Value | | |
| |--------|-------| | |
| | f1_micro @ 0.5 | 0.6343 | | |
| | f1_macro @ 0.5 | 0.4691 | | |
| | f1_micro @ tuned | 0.6464 | | |
| | f1_macro @ tuned | 0.5545 | | |
| Per-label decision thresholds tuned on the eval split are stored in | |
| `config.classifier_thresholds`. | |
| **Choosing an operating point**: the stored thresholds maximise per-label F1. For | |
| precision-first use (e.g. auto-applying labels), act only on predictions well above | |
| their threshold — sigmoid probabilities are a usable confidence signal, and filtering | |
| to high-confidence predictions trades coverage for precision. Route the rest to review. | |
| ## Usage | |
| ```python | |
| import torch | |
| from transformers import AutoModelForSequenceClassification, AutoTokenizer | |
| model = AutoModelForSequenceClassification.from_pretrained("davanstrien/dataset-rows16-task-classifier-4096", trust_remote_code=True) | |
| tokenizer = AutoTokenizer.from_pretrained("davanstrien/dataset-rows16-task-classifier-4096", trust_remote_code=True) | |
| inputs = tokenizer("your text here", return_tensors="pt", truncation=True) | |
| probs = torch.sigmoid(model(**inputs).logits)[0] | |
| thresholds = torch.tensor(model.config.classifier_thresholds) # tuned on validation | |
| labels = [model.config.id2label[i] for i in (probs >= thresholds).nonzero().flatten().tolist()] | |
| print(labels) | |
| ``` | |
| ## Reproduction | |
| 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: | |
| ```bash | |
| hf jobs uv run --flavor gpu --secrets HF_TOKEN \ | |
| https://huggingface.co/datasets/uv-scripts/classification/raw/main/train-classifier.py \ | |
| davanstrien/dataset-rows16-with-task-categories davanstrien/dataset-rows16-task-classifier-4096 --label-column labels | |
| ``` | |