File size: 2,177 Bytes
150e487
 
 
8207ba4
150e487
 
 
 
 
 
 
0e540ce
 
3d740c8
 
 
 
 
 
 
150e487
 
 
 
 
 
 
0e540ce
 
 
150e487
 
 
 
 
 
0e540ce
150e487
 
 
0e540ce
 
 
 
150e487
 
 
7edb749
150e487
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c36b71
 
 
 
 
1aa2658
2c36b71
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
license: apache-2.0
base_model: distilbert/distilbert-base-uncased
library_name: transformers
tags:
- generated_from_trainer
metrics:
- accuracy
model-index:
- name: text-pic-request-identifier
  results: []
datasets:
- andriadze/pic-text-requests-synth
widget:
  - text: "I'd love to see that"
    output:
      - label: pic
        score: 0.99
      - label: text
        score: 0.01
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# text-pic-request-identifier

This model is a fine-tuned version of [distilbert/distilbert-base-uncased](https://huggingface.co/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

```python
from transformers import (
    pipeline
)

picClassifier = pipeline("text-classification", model="andriadze/text-pic-request-identifier")
res = picClassifier('Can you send me a selfie?')
```