Commit From AutoTrain
Browse files- .gitattributes +3 -0
- README.md +56 -0
- config.json +124 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +3 -0
- tokenizer_config.json +14 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
|
@@ -32,3 +32,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- autotrain
|
| 4 |
+
- text-classification
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
widget:
|
| 8 |
+
- text: "I love AutoTrain 🤗"
|
| 9 |
+
datasets:
|
| 10 |
+
- NicholasSynovic/autotrain-data-luc-comp429-victorian-authorship-classification
|
| 11 |
+
co2_eq_emissions:
|
| 12 |
+
emissions: 4.1359796275464005
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Model Trained Using AutoTrain
|
| 16 |
+
|
| 17 |
+
- Problem type: Multi-class Classification
|
| 18 |
+
- Model ID: 52472123757
|
| 19 |
+
- CO2 Emissions (in grams): 4.1360
|
| 20 |
+
|
| 21 |
+
## Validation Metrics
|
| 22 |
+
|
| 23 |
+
- Loss: 1.425
|
| 24 |
+
- Accuracy: 0.636
|
| 25 |
+
- Macro F1: 0.504
|
| 26 |
+
- Micro F1: 0.636
|
| 27 |
+
- Weighted F1: 0.624
|
| 28 |
+
- Macro Precision: 0.523
|
| 29 |
+
- Micro Precision: 0.636
|
| 30 |
+
- Weighted Precision: 0.630
|
| 31 |
+
- Macro Recall: 0.508
|
| 32 |
+
- Micro Recall: 0.636
|
| 33 |
+
- Weighted Recall: 0.636
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
You can use cURL to access this model:
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/NicholasSynovic/autotrain-luc-comp429-victorian-authorship-classification-52472123757
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Or Python API:
|
| 45 |
+
|
| 46 |
+
```
|
| 47 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
+
|
| 49 |
+
model = AutoModelForSequenceClassification.from_pretrained("NicholasSynovic/autotrain-luc-comp429-victorian-authorship-classification-52472123757", use_auth_token=True)
|
| 50 |
+
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained("NicholasSynovic/autotrain-luc-comp429-victorian-authorship-classification-52472123757", use_auth_token=True)
|
| 52 |
+
|
| 53 |
+
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
| 54 |
+
|
| 55 |
+
outputs = model(**inputs)
|
| 56 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "AutoTrain",
|
| 3 |
+
"_num_labels": 45,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"BertForSequenceClassification"
|
| 6 |
+
],
|
| 7 |
+
"attention_probs_dropout_prob": 0.1,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"gradient_checkpointing": false,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 768,
|
| 13 |
+
"id2label": {
|
| 14 |
+
"0": "1",
|
| 15 |
+
"1": "10",
|
| 16 |
+
"2": "11",
|
| 17 |
+
"3": "12",
|
| 18 |
+
"4": "13",
|
| 19 |
+
"5": "14",
|
| 20 |
+
"6": "15",
|
| 21 |
+
"7": "16",
|
| 22 |
+
"8": "17",
|
| 23 |
+
"9": "18",
|
| 24 |
+
"10": "19",
|
| 25 |
+
"11": "2",
|
| 26 |
+
"12": "20",
|
| 27 |
+
"13": "21",
|
| 28 |
+
"14": "22",
|
| 29 |
+
"15": "23",
|
| 30 |
+
"16": "24",
|
| 31 |
+
"17": "25",
|
| 32 |
+
"18": "26",
|
| 33 |
+
"19": "27",
|
| 34 |
+
"20": "28",
|
| 35 |
+
"21": "29",
|
| 36 |
+
"22": "3",
|
| 37 |
+
"23": "30",
|
| 38 |
+
"24": "32",
|
| 39 |
+
"25": "33",
|
| 40 |
+
"26": "34",
|
| 41 |
+
"27": "35",
|
| 42 |
+
"28": "36",
|
| 43 |
+
"29": "37",
|
| 44 |
+
"30": "38",
|
| 45 |
+
"31": "39",
|
| 46 |
+
"32": "4",
|
| 47 |
+
"33": "40",
|
| 48 |
+
"34": "41",
|
| 49 |
+
"35": "42",
|
| 50 |
+
"36": "43",
|
| 51 |
+
"37": "44",
|
| 52 |
+
"38": "45",
|
| 53 |
+
"39": "46",
|
| 54 |
+
"40": "48",
|
| 55 |
+
"41": "50",
|
| 56 |
+
"42": "6",
|
| 57 |
+
"43": "8",
|
| 58 |
+
"44": "9"
|
| 59 |
+
},
|
| 60 |
+
"initializer_range": 0.02,
|
| 61 |
+
"intermediate_size": 3072,
|
| 62 |
+
"label2id": {
|
| 63 |
+
"1": 0,
|
| 64 |
+
"10": 1,
|
| 65 |
+
"11": 2,
|
| 66 |
+
"12": 3,
|
| 67 |
+
"13": 4,
|
| 68 |
+
"14": 5,
|
| 69 |
+
"15": 6,
|
| 70 |
+
"16": 7,
|
| 71 |
+
"17": 8,
|
| 72 |
+
"18": 9,
|
| 73 |
+
"19": 10,
|
| 74 |
+
"2": 11,
|
| 75 |
+
"20": 12,
|
| 76 |
+
"21": 13,
|
| 77 |
+
"22": 14,
|
| 78 |
+
"23": 15,
|
| 79 |
+
"24": 16,
|
| 80 |
+
"25": 17,
|
| 81 |
+
"26": 18,
|
| 82 |
+
"27": 19,
|
| 83 |
+
"28": 20,
|
| 84 |
+
"29": 21,
|
| 85 |
+
"3": 22,
|
| 86 |
+
"30": 23,
|
| 87 |
+
"32": 24,
|
| 88 |
+
"33": 25,
|
| 89 |
+
"34": 26,
|
| 90 |
+
"35": 27,
|
| 91 |
+
"36": 28,
|
| 92 |
+
"37": 29,
|
| 93 |
+
"38": 30,
|
| 94 |
+
"39": 31,
|
| 95 |
+
"4": 32,
|
| 96 |
+
"40": 33,
|
| 97 |
+
"41": 34,
|
| 98 |
+
"42": 35,
|
| 99 |
+
"43": 36,
|
| 100 |
+
"44": 37,
|
| 101 |
+
"45": 38,
|
| 102 |
+
"46": 39,
|
| 103 |
+
"48": 40,
|
| 104 |
+
"50": 41,
|
| 105 |
+
"6": 42,
|
| 106 |
+
"8": 43,
|
| 107 |
+
"9": 44
|
| 108 |
+
},
|
| 109 |
+
"layer_norm_eps": 1e-12,
|
| 110 |
+
"max_length": 512,
|
| 111 |
+
"max_position_embeddings": 512,
|
| 112 |
+
"model_type": "bert",
|
| 113 |
+
"num_attention_heads": 12,
|
| 114 |
+
"num_hidden_layers": 12,
|
| 115 |
+
"pad_token_id": 0,
|
| 116 |
+
"padding": "max_length",
|
| 117 |
+
"position_embedding_type": "absolute",
|
| 118 |
+
"problem_type": "single_label_classification",
|
| 119 |
+
"torch_dtype": "float32",
|
| 120 |
+
"transformers_version": "4.25.1",
|
| 121 |
+
"type_vocab_size": 2,
|
| 122 |
+
"use_cache": true,
|
| 123 |
+
"vocab_size": 30522
|
| 124 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:650e3f3934dfd4c989a8ec64dd34c023bf1fde167a710656bfd52d5126717f21
|
| 3 |
+
size 438140149
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb374d6bc042c22455946f4e09a89d29882a199fdaf8fb25be00dc8b8857a448
|
| 3 |
+
size 711661
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"do_lower_case": true,
|
| 4 |
+
"mask_token": "[MASK]",
|
| 5 |
+
"model_max_length": 512,
|
| 6 |
+
"name_or_path": "AutoTrain",
|
| 7 |
+
"pad_token": "[PAD]",
|
| 8 |
+
"sep_token": "[SEP]",
|
| 9 |
+
"special_tokens_map_file": null,
|
| 10 |
+
"strip_accents": null,
|
| 11 |
+
"tokenize_chinese_chars": true,
|
| 12 |
+
"tokenizer_class": "BertTokenizer",
|
| 13 |
+
"unk_token": "[UNK]"
|
| 14 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|