Model

rv-clients/rv-clients-distilbert-sst2

Upload folder using huggingface_hub

rv-clients committed on October 20, 2026

8034567fde668e8b8f41514d7590f414aaa696faParent 9bfc074Browse files

7 files changed+238 -0

.gitattributes

Added+9 -0
Lines 0 to 0 become lines 1 to 9
@@ -0,0 +1,9 @@
1Added: *.bin.* filter=lfs diff=lfs merge=lfs -text
2Added: *.lfs.* filter=lfs diff=lfs merge=lfs -text
3Added: *.bin filter=lfs diff=lfs merge=lfs -text
4Added: *.h5 filter=lfs diff=lfs merge=lfs -text
5Added: *.tflite filter=lfs diff=lfs merge=lfs -text
6Added: *.tar.gz filter=lfs diff=lfs merge=lfs -text
7Added: *.ot filter=lfs diff=lfs merge=lfs -text
8Added: *.onnx filter=lfs diff=lfs merge=lfs -text
9Added: model.safetensors filter=lfs diff=lfs merge=lfs -text

README.md

Added+197 -0
Lines 0 to 0 become lines 1 to 197
@@ -0,0 +1,197 @@
1Added: ---
2Added: language: en
3Added: license: apache-2.0
4Added: datasets:
5Added: - sst2
6Added: - glue
7Added: model-index:
8Added: - name: distilbert-base-uncased-finetuned-sst-2-english
9Added: results:
10Added: - task:
11Added: type: text-classification
12Added: name: Text Classification
13Added: dataset:
14Added: name: glue
15Added: type: glue
16Added: config: sst2
17Added: split: validation
18Added: metrics:
19Added: - type: accuracy
20Added: value: 0.9105504587155964
21Added: name: Accuracy
22Added: verified: true
23Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiN2YyOGMxYjY2Y2JhMjkxNjIzN2FmMjNiNmM2ZWViNGY3MTNmNWI2YzhiYjYxZTY0ZGUyN2M1NGIxZjRiMjQwZiIsInZlcnNpb24iOjF9.uui0srxV5ZHRhxbYN6082EZdwpnBgubPJ5R2-Wk8HTWqmxYE3QHidevR9LLAhidqGw6Ih93fK0goAXncld_gBg
24Added: - type: precision
25Added: value: 0.8978260869565218
26Added: name: Precision
27Added: verified: true
28Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMzgwYTYwYjA2MmM0ZTYwNDk0M2NmNTBkZmM2NGNhYzQ1OGEyN2NkNDQ3Mzc2NTQyMmZiNDJiNzBhNGVhZGUyOSIsInZlcnNpb24iOjF9.eHjLmw3K02OU69R2Au8eyuSqT3aBDHgZCn8jSzE3_urD6EUSSsLxUpiAYR4BGLD_U6-ZKcdxVo_A2rdXqvUJDA
29Added: - type: recall
30Added: value: 0.9301801801801802
31Added: name: Recall
32Added: verified: true
33Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMGIzM2E3MTI2Mzc2MDYwNmU3ZTVjYmZmZDBkNjY4ZTc5MGY0Y2FkNDU3NjY1MmVkNmE3Y2QzMzAwZDZhOWY1NiIsInZlcnNpb24iOjF9.PUZlqmct13-rJWBXdHm5tdkXgETL9F82GNbbSR4hI8MB-v39KrK59cqzFC2Ac7kJe_DtOeUyosj34O_mFt_1DQ
34Added: - type: auc
35Added: value: 0.9716626673402374
36Added: name: AUC
37Added: verified: true
38Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMDM0YWIwZmQ4YjUwOGZmMWU2MjI1YjIxZGQ2MzNjMzRmZmYxMzZkNGFjODhlMDcyZDM1Y2RkMWZlOWQ0MWYwNSIsInZlcnNpb24iOjF9.E7GRlAXmmpEkTHlXheVkuL1W4WNjv4JO3qY_WCVsTVKiO7bUu0UVjPIyQ6g-J1OxsfqZmW3Leli1wY8vPBNNCQ
39Added: - type: f1
40Added: value: 0.9137168141592922
41Added: name: F1
42Added: verified: true
43Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMGU4MjNmOGYwZjZjMDQ1ZTkyZTA4YTc1MWYwOTM0NDM4ZWY1ZGVkNDY5MzNhYTQyZGFlNzIyZmUwMDg3NDU0NyIsInZlcnNpb24iOjF9.mW5ftkq50Se58M-jm6a2Pu93QeKa3MfV7xcBwvG3PSB_KNJxZWTCpfMQp-Cmx_EMlmI2siKOyd8akYjJUrzJCA
44Added: - type: loss
45Added: value: 0.39013850688934326
46Added: name: loss
47Added: verified: true
48Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTZiNzAyZDc0MzUzMmE1MGJiN2JlYzFiODE5ZTNlNGE4MmI4YzRiMTc2ODEzMTUwZmEzOTgxNzc4YjJjZTRmNiIsInZlcnNpb24iOjF9.VqIC7uYC-ZZ8ss9zQOlRV39YVOOLc5R36sIzCcVz8lolh61ux_5djm2XjpP6ARc6KqEnXC4ZtfNXsX2HZfrtCQ
49Added: - task:
50Added: type: text-classification
51Added: name: Text Classification
52Added: dataset:
53Added: name: sst2
54Added: type: sst2
55Added: config: default
56Added: split: train
57Added: metrics:
58Added: - type: accuracy
59Added: value: 0.9885521685548412
60Added: name: Accuracy
61Added: verified: true
62Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiY2I3NzU3YzhmMDkxZTViY2M3OTY1NmI0ZTdmMDQxNjNjYzJiZmQxNzczM2E4YmExYTY5ODY0NDBkY2I4ZjNkOCIsInZlcnNpb24iOjF9.4Gtk3FeVc9sPWSqZIaeUXJ9oVlPzm-NmujnWpK2y5s1Vhp1l6Y1pK5_78wW0-NxSvQqV6qd5KQf_OAEpVAkQDA
63Added: - type: precision
64Added: value: 0.9881965062029833
65Added: name: Precision Macro
66Added: verified: true
67Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDdlZDMzY2I3MTAwYTljNmM4MGMyMzU2YjAzZDg1NDYwN2ZmM2Y5OWZhMjUyMGJiNjY1YmZiMzFhMDI2ODFhNyIsInZlcnNpb24iOjF9.cqmv6yBxu4St2mykRWrZ07tDsiSLdtLTz2hbqQ7Gm1rMzq9tdlkZ8MyJRxtME_Y8UaOG9rs68pV-gKVUs8wABw
68Added: - type: precision
69Added: value: 0.9885521685548412
70Added: name: Precision Micro
71Added: verified: true
72Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZjFlYzAzNmE1YjljNjUwNzBjZjEzZDY0ZDQyMmY5ZWM2OTBhNzNjYjYzYTk1YWE1NjU3YTMxZDQwOTE1Y2FkNyIsInZlcnNpb24iOjF9.jnCHOkUHuAOZZ_ZMVOnetx__OVJCS6LOno4caWECAmfrUaIPnPNV9iJ6izRO3sqkHRmxYpWBb-27GJ4N3LU-BQ
73Added: - type: precision
74Added: value: 0.9885639626373408
75Added: name: Precision Weighted
76Added: verified: true
77Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZGUyODFjNjBlNTE2MTY3ZDAxOGU1N2U0YjUyY2NiZjhkOGVmYThjYjBkNGU3NTRkYzkzNDQ2MmMwMjkwMWNiMyIsInZlcnNpb24iOjF9.zTNabMwApiZyXdr76QUn7WgGB7D7lP-iqS3bn35piqVTNsv3wnKjZOaKFVLIUvtBXq4gKw7N2oWxvWc4OcSNDg
78Added: - type: recall
79Added: value: 0.9886145346602994
80Added: name: Recall Macro
81Added: verified: true
82Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTU1YjlhODU3YTkyNTdiZDcwZGFlZDBiYjY0N2NjMGM2NTRiNjQ3MDNjNGMxOWY2ZGQ4NWU1YmMzY2UwZTI3YSIsInZlcnNpb24iOjF9.xaLPY7U-wHsJ3DDui1yyyM-xWjL0Jz5puRThy7fczal9x05eKEQ9s0a_WD-iLmapvJs0caXpV70hDe2NLcs-DA
83Added: - type: recall
84Added: value: 0.9885521685548412
85Added: name: Recall Micro
86Added: verified: true
87Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiODE0YTU0MDBlOGY4YzU0MjY5MzA3OTk2OGNhOGVkMmU5OGRjZmFiZWI2ZjY5ODEzZTQzMTI0N2NiOTVkNDliYiIsInZlcnNpb24iOjF9.SOt1baTBbuZRrsvGcak2sUwoTrQzmNCbyV2m1_yjGsU48SBH0NcKXicidNBSnJ6ihM5jf_Lv_B5_eOBkLfNWDQ
88Added: - type: recall
89Added: value: 0.9885521685548412
90Added: name: Recall Weighted
91Added: verified: true
92Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZWNkNmM0ZGRlNmYxYzIwNDk4OTI5MzIwZWU1NzZjZDVhMDcyNDFlMjBhNDQxODU5OWMwMWNhNGEzNjY3ZGUyOSIsInZlcnNpb24iOjF9.b15Fh70GwtlG3cSqPW-8VEZT2oy0CtgvgEOtWiYonOovjkIQ4RSLFVzVG-YfslaIyfg9RzMWzjhLnMY7Bpn2Aw
93Added: - type: f1
94Added: value: 0.9884019815052447
95Added: name: F1 Macro
96Added: verified: true
97Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYmM4NjQ5Yjk5ODRhYTU1MTY3MmRhZDBmODM1NTg3OTFiNWM4NDRmYjI0MzZkNmQ1MzE3MzcxODZlYzBkYTMyYSIsInZlcnNpb24iOjF9.74RaDK8nBVuGRl2Se_-hwQvP6c4lvVxGHpcCWB4uZUCf2_HoC9NT9u7P3pMJfH_tK2cpV7U3VWGgSDhQDi-UBQ
98Added: - type: f1
99Added: value: 0.9885521685548412
100Added: name: F1 Micro
101Added: verified: true
102Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDRmYWRmMmQ0YjViZmQxMzhhYTUyOTE1MTc0ZDU1ZjQyZjFhMDYzYzMzZDE0NzZlYzQyOTBhMTBhNmM5NTlkMiIsInZlcnNpb24iOjF9.VMn_psdAHIZTlW6GbjERZDe8MHhwzJ0rbjV_VJyuMrsdOh5QDmko-wEvaBWNEdT0cEKsbggm-6jd3Gh81PfHAQ
103Added: - type: f1
104Added: value: 0.9885546181087554
105Added: name: F1 Weighted
106Added: verified: true
107Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMjUyZWFhZDZhMGQ3MzBmYmRiNDVmN2FkZDBjMjk3ODk0OTAxNGZkMWE0NzU5ZjI0NzE0NGZiNzM0N2Y2NDYyOSIsInZlcnNpb24iOjF9.YsXBhnzEEFEW6jw3mQlFUuIrW7Gabad2Ils-iunYJr-myg0heF8NEnEWABKFE1SnvCWt-69jkLza6SupeyLVCA
108Added: - type: loss
109Added: value: 0.040652573108673096
110Added: name: loss
111Added: verified: true
112Added: verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZTc3YjU3MjdjMzkxODA5MjU5NGUyY2NkMGVhZDg3ZWEzMmU1YWVjMmI0NmU2OWEyZTkzMTVjNDZiYTc0YjIyNCIsInZlcnNpb24iOjF9.lA90qXZVYiILHMFlr6t6H81Oe8a-4KmeX-vyCC1BDia2ofudegv6Vb46-4RzmbtuKeV6yy6YNNXxXxqVak1pAg
113Added: ---
114Added:
115Added: # DistilBERT base uncased finetuned SST-2
116Added:
117Added: ## Table of Contents
118Added: - [Model Details](#model-details)
119Added: - [How to Get Started With the Model](#how-to-get-started-with-the-model)
120Added: - [Uses](#uses)
121Added: - [Risks, Limitations and Biases](#risks-limitations-and-biases)
122Added: - [Training](#training)
123Added:
124Added: ## Model Details
125Added: **Model Description:** This model is a fine-tune checkpoint of [DistilBERT-base-uncased](https://huggingface.co/distilbert-base-uncased), fine-tuned on SST-2.
126Added: This model reaches an accuracy of 91.3 on the dev set (for comparison, Bert bert-base-uncased version reaches an accuracy of 92.7).
127Added: - **Developed by:** Hugging Face
128Added: - **Model Type:** Text Classification
129Added: - **Language(s):** English
130Added: - **License:** Apache-2.0
131Added: - **Parent Model:** For more details about DistilBERT, we encourage users to check out [this model card](https://huggingface.co/distilbert-base-uncased).
132Added: - **Resources for more information:**
133Added: - [Model Documentation](https://huggingface.co/docs/transformers/main/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification)
134Added: - [DistilBERT paper](https://arxiv.org/abs/1910.01108)
135Added:
136Added: ## How to Get Started With the Model
137Added:
138Added: Example of single-label classification:
139Added: ​​
140Added: ```python
141Added: import torch
142Added: from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
143Added:
144Added: tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
145Added: model = DistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
146Added:
147Added: inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
148Added: with torch.no_grad():
149Added: logits = model(**inputs).logits
150Added:
151Added: predicted_class_id = logits.argmax().item()
152Added: model.config.id2label[predicted_class_id]
153Added:
154Added: ```
155Added:
156Added: ## Uses
157Added:
158Added: #### Direct Use
159Added:
160Added: This model can be used for topic classification. You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the model hub to look for fine-tuned versions on a task that interests you.
161Added:
162Added: #### Misuse and Out-of-scope Use
163Added: The model should not be used to intentionally create hostile or alienating environments for people. In addition, the model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.
164Added:
165Added:
166Added: ## Risks, Limitations and Biases
167Added:
168Added: Based on a few experimentations, we observed that this model could produce biased predictions that target underrepresented populations.
169Added:
170Added: For instance, for sentences like `This film was filmed in COUNTRY`, this binary classification model will give radically different probabilities for the positive label depending on the country (0.89 if the country is France, but 0.08 if the country is Afghanistan) when nothing in the input indicates such a strong semantic shift. In this [colab](https://colab.research.google.com/gist/ageron/fb2f64fb145b4bc7c49efc97e5f114d3/biasmap.ipynb), [Aurélien Géron](https://twitter.com/aureliengeron) made an interesting map plotting these probabilities for each country.
171Added:
172Added: <img src="https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/map.jpeg" alt="Map of positive probabilities per country." width="500"/>
173Added:
174Added: We strongly advise users to thoroughly probe these aspects on their use-cases in order to evaluate the risks of this model. We recommend looking at the following bias evaluation datasets as a place to start: [WinoBias](https://huggingface.co/datasets/wino_bias), [WinoGender](https://huggingface.co/datasets/super_glue), [Stereoset](https://huggingface.co/datasets/stereoset).
175Added:
176Added:
177Added:
178Added: # Training
179Added:
180Added:
181Added: #### Training Data
182Added:
183Added:
184Added: The authors use the following Stanford Sentiment Treebank([sst2](https://huggingface.co/datasets/sst2)) corpora for the model.
185Added:
186Added: #### Training Procedure
187Added:
188Added: ###### Fine-tuning hyper-parameters
189Added:
190Added:
191Added: - learning_rate = 1e-5
192Added: - batch_size = 32
193Added: - warmup = 600
194Added: - max_seq_length = 128
195Added: - num_train_epochs = 3.0
196Added:
197Added:

config.json

Added+31 -0
Lines 0 to 0 become lines 1 to 31
@@ -0,0 +1,31 @@
1Added: {
2Added: "activation": "gelu",
3Added: "architectures": [
4Added: "DistilBertForSequenceClassification"
5Added: ],
6Added: "attention_dropout": 0.1,
7Added: "dim": 768,
8Added: "dropout": 0.1,
9Added: "finetuning_task": "sst-2",
10Added: "hidden_dim": 3072,
11Added: "id2label": {
12Added: "0": "NEGATIVE",
13Added: "1": "POSITIVE"
14Added: },
15Added: "initializer_range": 0.02,
16Added: "label2id": {
17Added: "NEGATIVE": 0,
18Added: "POSITIVE": 1
19Added: },
20Added: "max_position_embeddings": 512,
21Added: "model_type": "distilbert",
22Added: "n_heads": 12,
23Added: "n_layers": 6,
24Added: "output_past": true,
25Added: "pad_token_id": 0,
26Added: "qa_dropout": 0.1,
27Added: "seq_classif_dropout": 0.2,
28Added: "sinusoidal_pos_embds": false,
29Added: "tie_weights_": true,
30Added: "vocab_size": 30522
31Added: }

map.jpeg

Added

Binary file not shown.

model.safetensors

Added

Large (LFS-tracked) file content changed — 255 MB

tokenizer_config.json

Added+1 -0
Lines 0 to 0 become lines 1 to 1
@@ -0,0 +1,1 @@
1Added: {"model_max_length": 512, "do_lower_case": true}(no newline at end of file)

vocab.txt

Added

This file is too large to display.