Commit From AutoTrain
Browse files- .gitattributes +3 -0
- README.md +56 -0
- config.json +88 -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 |
+
- jogoni/autotrain-data-cuad-document-type
|
11 |
+
co2_eq_emissions:
|
12 |
+
emissions: 4.141997048700727
|
13 |
+
---
|
14 |
+
|
15 |
+
# Model Trained Using AutoTrain
|
16 |
+
|
17 |
+
- Problem type: Multi-class Classification
|
18 |
+
- Model ID: 2883884341
|
19 |
+
- CO2 Emissions (in grams): 4.1420
|
20 |
+
|
21 |
+
## Validation Metrics
|
22 |
+
|
23 |
+
- Loss: 0.541
|
24 |
+
- Accuracy: 0.938
|
25 |
+
- Macro F1: 0.869
|
26 |
+
- Micro F1: 0.938
|
27 |
+
- Weighted F1: 0.925
|
28 |
+
- Macro Precision: 0.875
|
29 |
+
- Micro Precision: 0.938
|
30 |
+
- Weighted Precision: 0.927
|
31 |
+
- Macro Recall: 0.884
|
32 |
+
- Micro Recall: 0.938
|
33 |
+
- Weighted Recall: 0.938
|
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/jogoni/autotrain-cuad-document-type-2883884341
|
42 |
+
```
|
43 |
+
|
44 |
+
Or Python API:
|
45 |
+
|
46 |
+
```
|
47 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
48 |
+
|
49 |
+
model = AutoModelForSequenceClassification.from_pretrained("jogoni/autotrain-cuad-document-type-2883884341", use_auth_token=True)
|
50 |
+
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained("jogoni/autotrain-cuad-document-type-2883884341", 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,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoTrain",
|
3 |
+
"_num_labels": 27,
|
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": "Affiliate_Agreements",
|
15 |
+
"1": "Agency Agreements",
|
16 |
+
"2": "Co_Branding",
|
17 |
+
"3": "Collaboration",
|
18 |
+
"4": "Consulting Agreements",
|
19 |
+
"5": "Development",
|
20 |
+
"6": "Distributor",
|
21 |
+
"7": "Endorsement",
|
22 |
+
"8": "Endorsement Agreement",
|
23 |
+
"9": "Franchise",
|
24 |
+
"10": "Hosting",
|
25 |
+
"11": "IP",
|
26 |
+
"12": "Joint Venture",
|
27 |
+
"13": "Joint Venture _ Filing",
|
28 |
+
"14": "License_Agreements",
|
29 |
+
"15": "Maintenance",
|
30 |
+
"16": "Manufacturing",
|
31 |
+
"17": "Marketing",
|
32 |
+
"18": "Non_Compete_Non_Solicit",
|
33 |
+
"19": "Outsourcing",
|
34 |
+
"20": "Promotion",
|
35 |
+
"21": "Reseller",
|
36 |
+
"22": "Service",
|
37 |
+
"23": "Sponsorship",
|
38 |
+
"24": "Strategic Alliance",
|
39 |
+
"25": "Supply",
|
40 |
+
"26": "Transportation"
|
41 |
+
},
|
42 |
+
"initializer_range": 0.02,
|
43 |
+
"intermediate_size": 3072,
|
44 |
+
"label2id": {
|
45 |
+
"Affiliate_Agreements": 0,
|
46 |
+
"Agency Agreements": 1,
|
47 |
+
"Co_Branding": 2,
|
48 |
+
"Collaboration": 3,
|
49 |
+
"Consulting Agreements": 4,
|
50 |
+
"Development": 5,
|
51 |
+
"Distributor": 6,
|
52 |
+
"Endorsement": 7,
|
53 |
+
"Endorsement Agreement": 8,
|
54 |
+
"Franchise": 9,
|
55 |
+
"Hosting": 10,
|
56 |
+
"IP": 11,
|
57 |
+
"Joint Venture": 12,
|
58 |
+
"Joint Venture _ Filing": 13,
|
59 |
+
"License_Agreements": 14,
|
60 |
+
"Maintenance": 15,
|
61 |
+
"Manufacturing": 16,
|
62 |
+
"Marketing": 17,
|
63 |
+
"Non_Compete_Non_Solicit": 18,
|
64 |
+
"Outsourcing": 19,
|
65 |
+
"Promotion": 20,
|
66 |
+
"Reseller": 21,
|
67 |
+
"Service": 22,
|
68 |
+
"Sponsorship": 23,
|
69 |
+
"Strategic Alliance": 24,
|
70 |
+
"Supply": 25,
|
71 |
+
"Transportation": 26
|
72 |
+
},
|
73 |
+
"layer_norm_eps": 1e-12,
|
74 |
+
"max_length": 512,
|
75 |
+
"max_position_embeddings": 512,
|
76 |
+
"model_type": "bert",
|
77 |
+
"num_attention_heads": 12,
|
78 |
+
"num_hidden_layers": 12,
|
79 |
+
"pad_token_id": 0,
|
80 |
+
"padding": "max_length",
|
81 |
+
"position_embedding_type": "absolute",
|
82 |
+
"problem_type": "single_label_classification",
|
83 |
+
"torch_dtype": "float32",
|
84 |
+
"transformers_version": "4.25.1",
|
85 |
+
"type_vocab_size": 2,
|
86 |
+
"use_cache": true,
|
87 |
+
"vocab_size": 30522
|
88 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:305623e531c24ce5b842e7e36d477d0236863a4981050aa6816eda6e731b2dd9
|
3 |
+
size 438084789
|
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
|
|