Text2Text Generation
Transformers
Safetensors
English
t5
Eval Results
text-generation-inference
Inference Endpoints
File size: 14,229 Bytes
a398dee
e751c2a
 
635dcb8
e751c2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
635dcb8
 
 
 
 
 
 
 
 
 
e751c2a
 
 
 
 
 
635dcb8
e751c2a
 
 
635dcb8
e751c2a
635dcb8
e751c2a
635dcb8
e751c2a
635dcb8
e751c2a
635dcb8
 
 
 
 
 
 
e751c2a
635dcb8
 
 
 
 
 
 
e751c2a
635dcb8
 
 
 
 
 
 
e751c2a
635dcb8
 
 
e751c2a
635dcb8
e751c2a
635dcb8
e751c2a
635dcb8
e751c2a
635dcb8
a398dee
 
e751c2a
a398dee
 
 
 
 
 
 
 
 
e751c2a
c5d57c2
 
a398dee
e751c2a
c5d57c2
e751c2a
 
c5d57c2
a398dee
c5d57c2
a398dee
c5d57c2
 
a398dee
 
 
c5d57c2
 
 
a398dee
c5d57c2
 
 
 
 
a398dee
c5d57c2
a398dee
c5d57c2
 
 
 
 
 
 
 
 
 
 
e751c2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c5d57c2
 
 
 
 
 
 
 
 
 
 
e751c2a
 
635dcb8
 
 
 
 
 
 
 
e751c2a
635dcb8
 
 
 
a398dee
 
 
 
 
 
 
 
e751c2a
c5d57c2
e751c2a
 
 
a398dee
 
 
c5d57c2
3d855ec
c5d57c2
 
a398dee
 
 
 
c5d57c2
a398dee
c5d57c2
a398dee
 
 
 
 
c5d57c2
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
---
base_model: google/flan-t5-xl
datasets:
- 2024-mcm-everitt-ryan/job-bias-synthetic-human-benchmark-v2
language: en
license: apache-2.0
model_id: flan-t5-xl-job-bias-seq2seq-cls
model_description: The model is a multi-label classifier designed to detect various
  types of bias within job descriptions.
developers: Tristan Everitt and Paul Ryan
model_card_authors: See developers
model_card_contact: See developers
repo: https://gitlab.computing.dcu.ie/everitt2/2024-mcm-everitt-ryan
compute_infrastructure: Linux 6.5.0-35-generic x86_64
software: Python 3.10.12
hardware_type: x86_64
hours_used: N/A
cloud_provider: N/A
cloud_region: N/A
co2_emitted: N/A
direct_use: "\n    ```python\n    from transformers import pipeline\n\n    pipe =\
  \ pipeline(\"text-classification\", model=\"2024-mcm-everitt-ryan/flan-t5-xl-job-bias-seq2seq-cls\"\
  , return_all_scores=True)\n\n    results = pipe(\"Join our dynamic and fast-paced\
  \ team as a Junior Marketing Specialist. We seek a tech-savvy and energetic individual\
  \ who thrives in a vibrant environment. Ideal candidates are digital natives with\
  \ a fresh perspective, ready to adapt quickly to new trends. You should have recent\
  \ experience in social media strategies and a strong understanding of current digital\
  \ marketing tools. We're looking for someone with a youthful mindset, eager to bring\
  \ innovative ideas to our young and ambitious team. If you're a recent graduate\
  \ or early in your career, this opportunity is perfect for you!\")\n    print(results)\n\
  \    ```\n    >> [[\n    {'label': 'age', 'score': 0.9883460402488708}, \n    {'label':\
  \ 'disability', 'score': 0.00787709467113018}, \n    {'label': 'feminine', 'score':\
  \ 0.007224376779049635}, \n    {'label': 'general', 'score': 0.09967829287052155},\
  \ \n    {'label': 'masculine', 'score': 0.0035264550242573023}, \n    {'label':\
  \ 'racial', 'score': 0.014618005603551865}, \n    {'label': 'sexuality', 'score':\
  \ 0.005568435415625572}\n    ]]\n\n\n    Classification Report:\n    \n        \
  \              precision    recall  f1-score   support\n    \n      disability \
  \      0.88      0.46      0.61        80\n        feminine       0.94      0.91\
  \      0.92        80\n         neutral       0.37      0.93      0.53        80\n\
  \       masculine       0.85      0.65      0.74        80\n       sexuality   \
  \    1.00      0.74      0.85        80\n          racial       0.92      0.76 \
  \     0.84        80\n             age       0.90      0.66      0.76        80\n\
  \         general       0.78      0.57      0.66        80\n    \n       micro avg\
  \       0.73      0.71      0.72       640\n       macro avg       0.83      0.71\
  \      0.74       640\n    weighted avg       0.83      0.71      0.74       640\n\
  \     samples avg       0.74      0.76      0.75       640\n    \n    "
model-index:
- name: flan-t5-xl-job-bias-seq2seq-cls
  results:
  - task:
      type: multi_label_classification
    dataset:
      name: 2024-mcm-everitt-ryan/job-bias-synthetic-human-benchmark-v2
      type: mix_human-eval_synthetic
    metrics:
    - type: loss
      value: 0.5446141958236694
    - type: accuracy
      value: 0.7157534246575342
    - type: f1_micro
      value: 0.7205067300079177
    - type: precision_micro
      value: 0.7303370786516854
    - type: recall_micro
      value: 0.7109375
    - type: roc_auc_micro
      value: 0.8346354166666666
    - type: f1_macro
      value: 0.7384575431979781
    - type: precision_macro
      value: 0.8304220819578764
    - type: recall_macro
      value: 0.7109375
    - type: roc_auc_macro
      value: 0.8346354166666667
    - type: f1_samples
      value: 0.7474722765818657
    - type: precision_samples
      value: 0.7448630136986302
    - type: recall_samples
      value: 0.7575627853881278
    - type: roc_auc_samples
      value: 0.8572794357469016
    - type: f1_weighted
      value: 0.738457543197978
    - type: precision_weighted
      value: 0.8304220819578763
    - type: recall_weighted
      value: 0.7109375
    - type: roc_auc_weighted
      value: 0.8346354166666666
    - type: runtime
      value: 125.4002
    - type: samples_per_second
      value: 4.657
    - type: steps_per_second
      value: 0.582
    - type: epoch
      value: 3.0
---

# Model Card for flan-t5-xl-job-bias-seq2seq-cls

<!-- Provide a quick summary of what the model is/does. -->



## Model Details

<!-- Provide a longer summary of what this model is. -->

The model is a multi-label classifier designed to detect various types of bias within job descriptions.
NOTE: This model was not used in the paper and it was trained without the use of QLoRA.
It serves only as a comparison for the model trained using QLoRA: [flan-t5-xl-job-bias-qlora-seq2seq-cls](https://huggingface.co/2024-mcm-everitt-ryan/flan-t5-xl-job-bias-qlora-seq2seq-cls)

- **Developed by:** Tristan Everitt and Paul Ryan
- **Model type:** Encoder-Decoder
- **Language(s) (NLP):** en
- **License:** apache-2.0
- **Finetuned from model:** google/flan-t5-xl

### Model Sources

- **Repository:** https://github.com/2024-mcm-everitt-ryan
- **Paper:** In Progress

## Uses

The primary target audience for these models are researchers dedicated to identifying biased language in job descriptions.

### Out-of-Scope Use

Due to the limitations inherent in large-scale language models, they should not be utilised in applications requiring factual or accurate outputs. These models do not distinguish between fact and fiction, and implicit biases are inherently subjective.

Moreover, as language models mirror the biases present in their training data, they should not be deployed in systems that directly interact with humans unless the deployers have first conducted a thorough analysis of relevant biases for the specific use case.

## Bias, Risks, and Limitations

It is imperative that all users, both direct and downstream, are aware of the risks, biases, and limitations associated with this model. Important considerations include:

- Bias in Training Data: The model may inherit and perpetuate biases from the data it was trained on.
- Subjectivity of Bias: Bias detection is inherently subjective, and perceptions of bias can differ across contexts and users.
- Accuracy Concerns: The model’s outputs are not guaranteed to be true or accurate, making it unsuitable for applications that require reliable information.
- Human Interaction Risks: When incorporated into systems that interact with humans, the model’s biases may affect interactions and decision-making, potentially leading to unintended consequences.

It is crucial for users to conduct comprehensive evaluations and consider these factors when applying the model in any context.


## How to Get Started with the Model

Use the code below to get started with the model.

    ```python
    from transformers import pipeline

    pipe = pipeline("text-classification", model="2024-mcm-everitt-ryan/flan-t5-xl-job-bias-seq2seq-cls", return_all_scores=True)

    results = pipe("Join our dynamic and fast-paced team as a Junior Marketing Specialist. We seek a tech-savvy and energetic individual who thrives in a vibrant environment. Ideal candidates are digital natives with a fresh perspective, ready to adapt quickly to new trends. You should have recent experience in social media strategies and a strong understanding of current digital marketing tools. We're looking for someone with a youthful mindset, eager to bring innovative ideas to our young and ambitious team. If you're a recent graduate or early in your career, this opportunity is perfect for you!")
    print(results)
    ```
    >> [[
    {'label': 'age', 'score': 0.9883460402488708}, 
    {'label': 'disability', 'score': 0.00787709467113018}, 
    {'label': 'feminine', 'score': 0.007224376779049635}, 
    {'label': 'general', 'score': 0.09967829287052155}, 
    {'label': 'masculine', 'score': 0.0035264550242573023}, 
    {'label': 'racial', 'score': 0.014618005603551865}, 
    {'label': 'sexuality', 'score': 0.005568435415625572}
    ]]


<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
## Training Details

### Training Data

<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->

- [2024-mcm-everitt-ryan/benchmark](https://huggingface.co/datasets/2024-mcm-everitt-ryan/benchmark)

### Results

                      precision    recall  f1-score   support
    
      disability       0.88      0.46      0.61        80
        feminine       0.94      0.91      0.92        80
         neutral       0.37      0.93      0.53        80
       masculine       0.85      0.65      0.74        80
       sexuality       1.00      0.74      0.85        80
          racial       0.92      0.76      0.84        80
             age       0.90      0.66      0.76        80
         general       0.78      0.57      0.66        80
    
       micro avg       0.73      0.71      0.72       640
       macro avg       0.83      0.71      0.74       640
    weighted avg       0.83      0.71      0.74       640
     samples avg       0.74      0.76      0.75       640


## Environmental Impact

<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->

Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).

- **Hardware Type:** x86_64
- **Hours used:** 2.08
- **Cloud Provider:** N/A
- **Compute Region:** N/A
- **Carbon Emitted:** N/A

### Compute Infrastructure

- Linux 5.15.0-78-generic x86_64
- MemTotal:       N/A
- 256 X AMD EPYC 7702 64-Core Processor
- GPU_0: NVIDIA L40S


#### Software

python 3.10.12, accelerate 0.32.1, aiohttp 3.9.5, aiosignal 1.3.1, anyio 4.2.0, argon2-cffi 23.1.0, argon2-cffi-bindings 21.2.0, arrow 1.3.0, asttokens 2.4.1, async-lru 2.0.4, async-timeout 4.0.3, attrs 23.2.0, awscli 1.33.26, Babel 2.14.0, beautifulsoup4 4.12.3, bitsandbytes 0.43.1, bleach 6.1.0, blinker 1.4, botocore 1.34.144, certifi 2024.2.2, cffi 1.16.0, charset-normalizer 3.3.2, click 8.1.7, cloudpickle 3.0.0, colorama 0.4.6, comm 0.2.1, cryptography 3.4.8, dask 2024.7.0, datasets 2.20.0, dbus-python 1.2.18, debugpy 1.8.0, decorator 5.1.1, defusedxml 0.7.1, dill 0.3.8, distro 1.7.0, docutils 0.16, einops 0.8.0, entrypoints 0.4, evaluate 0.4.2, exceptiongroup 1.2.0, executing 2.0.1, fastjsonschema 2.19.1, filelock 3.13.1, flash-attn 2.6.1, fqdn 1.5.1, frozenlist 1.4.1, fsspec 2024.2.0, h11 0.14.0, hf_transfer 0.1.6, httpcore 1.0.2, httplib2 0.20.2, httpx 0.26.0, huggingface-hub 0.23.4, idna 3.6, importlib_metadata 8.0.0, iniconfig 2.0.0, ipykernel 6.29.0, ipython 8.21.0, ipython-genutils 0.2.0, ipywidgets 8.1.1, isoduration 20.11.0, jedi 0.19.1, jeepney 0.7.1, Jinja2 3.1.3, jmespath 1.0.1, joblib 1.4.2, json5 0.9.14, jsonpointer 2.4, jsonschema 4.21.1, jsonschema-specifications 2023.12.1, jupyter-archive 3.4.0, jupyter_client 7.4.9, jupyter_contrib_core 0.4.2, jupyter_contrib_nbextensions 0.7.0, jupyter_core 5.7.1, jupyter-events 0.9.0, jupyter-highlight-selected-word 0.2.0, jupyter-lsp 2.2.2, jupyter-nbextensions-configurator 0.6.3, jupyter_server 2.12.5, jupyter_server_terminals 0.5.2, jupyterlab 4.1.0, jupyterlab_pygments 0.3.0, jupyterlab_server 2.25.2, jupyterlab-widgets 3.0.9, keyring 23.5.0, launchpadlib 1.10.16, lazr.restfulclient 0.14.4, lazr.uri 1.0.6, locket 1.0.0, lxml 5.1.0, MarkupSafe 2.1.5, matplotlib-inline 0.1.6, mistune 3.0.2, more-itertools 8.10.0, mpmath 1.3.0, multidict 6.0.5, multiprocess 0.70.16, nbclassic 1.0.0, nbclient 0.9.0, nbconvert 7.14.2, nbformat 5.9.2, nest-asyncio 1.6.0, networkx 3.2.1, nltk 3.8.1, notebook 6.5.5, notebook_shim 0.2.3, numpy 1.26.3, nvidia-cublas-cu12 12.1.3.1, nvidia-cuda-cupti-cu12 12.1.105, nvidia-cuda-nvrtc-cu12 12.1.105, nvidia-cuda-runtime-cu12 12.1.105, nvidia-cudnn-cu12 8.9.2.26, nvidia-cufft-cu12 11.0.2.54, nvidia-curand-cu12 10.3.2.106, nvidia-cusolver-cu12 11.4.5.107, nvidia-cusparse-cu12 12.1.0.106, nvidia-nccl-cu12 2.19.3, nvidia-nvjitlink-cu12 12.3.101, nvidia-nvtx-cu12 12.1.105, oauthlib 3.2.0, overrides 7.7.0, packaging 23.2, pandas 2.2.2, pandocfilters 1.5.1, parso 0.8.3, partd 1.4.2, peft 0.11.1, pexpect 4.9.0, pillow 10.2.0, pip 24.1.2, platformdirs 4.2.0, pluggy 1.5.0, polars 1.1.0, prometheus-client 0.19.0, prompt-toolkit 3.0.43, protobuf 5.27.2, psutil 5.9.8, ptyprocess 0.7.0, pure-eval 0.2.2, pyarrow 16.1.0, pyarrow-hotfix 0.6, pyasn1 0.6.0, pycparser 2.21, Pygments 2.17.2, PyGObject 3.42.1, PyJWT 2.3.0, pyparsing 2.4.7, pytest 8.2.2, python-apt 2.4.0+ubuntu3, python-dateutil 2.8.2, python-json-logger 2.0.7, pytz 2024.1, PyYAML 6.0.1, pyzmq 24.0.1, referencing 0.33.0, regex 2024.5.15, requests 2.32.3, rfc3339-validator 0.1.4, rfc3986-validator 0.1.1, rpds-py 0.17.1, rsa 4.7.2, s3transfer 0.10.2, safetensors 0.4.3, scikit-learn 1.5.1, scipy 1.14.0, SecretStorage 3.3.1, Send2Trash 1.8.2, sentence-transformers 3.0.1, sentencepiece 0.2.0, setuptools 69.0.3, six 1.16.0, sniffio 1.3.0, soupsieve 2.5, stack-data 0.6.3, sympy 1.12, tabulate 0.9.0, terminado 0.18.0, threadpoolctl 3.5.0, tiktoken 0.7.0, tinycss2 1.2.1, tokenizers 0.19.1, tomli 2.0.1, toolz 0.12.1, torch 2.2.0, torchaudio 2.2.0, torchdata 0.7.1, torchtext 0.17.0, torchvision 0.17.0, tornado 6.4, tqdm 4.66.4, traitlets 5.14.1, transformers 4.42.4, triton 2.2.0, types-python-dateutil 2.8.19.20240106, typing_extensions 4.9.0, tzdata 2024.1, uri-template 1.3.0, urllib3 2.2.2, wadllib 1.3.6, wcwidth 0.2.13, webcolors 1.13, webencodings 0.5.1, websocket-client 1.7.0, wheel 0.42.0, widgetsnbextension 4.0.9, xxhash 3.4.1, yarl 1.9.4, zipp 1.0.0

## Citation

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

**BibTeX:**

In Progress