Run this model with HF Jobs
Run andriadze/text-pic-request-identifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/andriadze/text-pic-request-identifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/andriadze/text-pic-request-identifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use andriadze/text-pic-request-identifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andriadze/text-pic-request-identifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="andriadze/text-pic-request-identifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("andriadze/text-pic-request-identifier") model = AutoModelForSequenceClassification.from_pretrained("andriadze/text-pic-request-identifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("andriadze/text-pic-request-identifier")
model = AutoModelForSequenceClassification.from_pretrained("andriadze/text-pic-request-identifier", device_map="auto")text-pic-request-identifier
This model is a fine-tuned version of distilbert/distilbert-base-uncased on an synthetic dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0015
- Accuracy: 0.9996
Model description
Model identifies if user is asking for a picture or a text.
Intended uses & limitations
Intended use for chat applications to either route the message to a text model or an image model.
Model will return 'pic' or 'text'
Training and evaluation data
Model was trained on synthetic dataset consisting of around ~25k messages. Messages were generated by different LLM's including gpt4,gpt4o,gpt4o-mini,gpt3.5-turbo
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.0391 | 1.0 | 844 | 0.0021 | 0.9996 |
| 0.0021 | 2.0 | 1688 | 0.0015 | 0.9996 |
Framework versions
- Transformers 4.44.0
- Pytorch 2.3.1
- Datasets 2.21.0
- Tokenizers 0.19.1
How to use
from transformers import (
pipeline
)
picClassifier = pipeline("text-classification", model="andriadze/text-pic-request-identifier")
res = picClassifier('Can you send me a selfie?')
- Downloads last month
- 5
Model tree for andriadze/text-pic-request-identifier
Base model
distilbert/distilbert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="andriadze/text-pic-request-identifier")