m-newhauser commited on
Commit
f6c62a6
1 Parent(s): cdc5ffb
Files changed (3) hide show
  1. README.md +36 -27
  2. config.json +4 -10
  3. tf_model.h5 +2 -2
README.md CHANGED
@@ -1,38 +1,47 @@
1
  ---
2
- language:
3
- - en
4
- license: lgpl-3.0
5
  tags:
6
- - text-classification
7
- - transformers
8
- - tf
9
- metrics:
10
- - accuracy
11
- - f1
12
- - precision
13
- - recall
14
- widget:
15
- - text: This pandemic has shown us clearly the vulgarity of our healthcare "system." Highest costs in the world, yet not enough nurses or doctors. Many millions uninsured, while insurance company profits soar. The struggle continues. Healthcare is a human right. Medicare for all.
16
- example_title: "Bernie Sanders"
17
  ---
18
 
 
 
 
19
  # distilbert-political-tweets
20
 
21
- *Note: model needs to be trained on more current data*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- 🗣 🇺🇸 Classify sentiment as Democratic or Republican.
24
 
25
- # Model
26
 
27
- [DistilBERT base model (uncased)](https://huggingface.co/distilbert-base-uncased) for sequence classification fine-tuned on ~10,000 randomly selected tweets from Democratic and Republican senators from FiveThirtyEight's [twitter-ratio/senators](https://fivethirtyeight.datasettes.com/fivethirtyeight/twitter-ratio%2Fsenators#export) dataset.
28
 
29
- # Evaluation
30
 
31
- The model was evaluated on a validation dataset of ~3,000 unseen random tweets:
32
- ```python
33
- {'eval_accuracy': 0.9348,
34
- 'eval_f1': 0.9386,
35
- 'eval_loss': 0.1975,
36
- 'eval_precision': 0.9281,
37
- 'eval_recall': 0.9494}
38
- ```
 
1
  ---
 
 
 
2
  tags:
3
+ - generated_from_keras_callback
4
+ model-index:
5
+ - name: distilbert-political-tweets
6
+ results: []
 
 
 
 
 
 
 
7
  ---
8
 
9
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
10
+ probably proofread and complete it, then remove this comment. -->
11
+
12
  # distilbert-political-tweets
13
 
14
+ This model was trained from scratch on an unknown dataset.
15
+ It achieves the following results on the evaluation set:
16
+
17
+
18
+ ## Model description
19
+
20
+ More information needed
21
+
22
+ ## Intended uses & limitations
23
+
24
+ More information needed
25
+
26
+ ## Training and evaluation data
27
+
28
+ More information needed
29
+
30
+ ## Training procedure
31
+
32
+ ### Training hyperparameters
33
+
34
+ The following hyperparameters were used during training:
35
+ - optimizer: None
36
+ - training_precision: float32
37
 
38
+ ### Training results
39
 
 
40
 
 
41
 
42
+ ### Framework versions
43
 
44
+ - Transformers 4.16.2
45
+ - TensorFlow 2.8.0
46
+ - Datasets 1.18.3
47
+ - Tokenizers 0.11.6
 
 
 
 
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "/content/drive/MyDrive/ColabData/models/distilbert-political-tweets-model",
3
  "activation": "gelu",
4
  "architectures": [
5
  "DistilBertForSequenceClassification"
@@ -8,24 +8,18 @@
8
  "dim": 768,
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
11
- "id2label": {
12
- "0": "Democrat",
13
- "1": "Republican"
14
- },
15
  "initializer_range": 0.02,
16
- "id2label": {
17
- "0": "Democrat",
18
- "1": "Republican"
19
- },
20
  "max_position_embeddings": 512,
21
  "model_type": "distilbert",
22
  "n_heads": 12,
23
  "n_layers": 6,
24
  "pad_token_id": 0,
 
25
  "qa_dropout": 0.1,
26
  "seq_classif_dropout": 0.2,
27
  "sinusoidal_pos_embds": false,
28
  "tie_weights_": true,
29
- "transformers_version": "4.6.0",
 
30
  "vocab_size": 30522
31
  }
 
1
  {
2
+ "_name_or_path": "/content/drive/MyDrive/colab_data/models/distilbert-political-tweets",
3
  "activation": "gelu",
4
  "architectures": [
5
  "DistilBertForSequenceClassification"
 
8
  "dim": 768,
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
 
 
 
 
11
  "initializer_range": 0.02,
 
 
 
 
12
  "max_position_embeddings": 512,
13
  "model_type": "distilbert",
14
  "n_heads": 12,
15
  "n_layers": 6,
16
  "pad_token_id": 0,
17
+ "problem_type": "single_label_classification",
18
  "qa_dropout": 0.1,
19
  "seq_classif_dropout": 0.2,
20
  "sinusoidal_pos_embds": false,
21
  "tie_weights_": true,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.16.2",
24
  "vocab_size": 30522
25
  }
tf_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:35cf968214e3e508dd3f0a78c565dff7094b8ee33f977682e71e3396260ec824
3
- size 267951896
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1d81f72c88328d81fe9e02483c71829ea44d09c8128b381daca374e05ed1dd9
3
+ size 267956392