Upload commited on
Commit
e66d572
1 Parent(s): df95ac1

Step 18149

Browse files
Files changed (3) hide show
  1. README.md +88 -32
  2. config.json +3 -3
  3. pytorch_model.bin +2 -2
README.md CHANGED
@@ -1,50 +1,106 @@
 
1
  ---
2
- tags: autonlp
3
  language: bn
4
- widget:
5
- - text: "I love AutoNLP 🤗"
6
- datasets:
7
- - albertvillanova/autonlp-data-baselines-indic_glue-multi_class_classification
 
 
 
 
 
 
 
8
  ---
9
 
10
- # Model Trained Using AutoNLP
11
 
12
- - Problem type: Multi-class Classification
13
- - Model ID: 1351187
14
 
15
- ## Validation Metrics
16
 
17
- - Loss: 0.46760785579681396
18
- - Accuracy: 0.8412473423104181
19
- - Macro F1: 0.8151341402067301
20
- - Micro F1: 0.8412473423104181
21
- - Weighted F1: 0.8458231431392536
22
- - Macro Precision: 0.804355047657178
23
- - Micro Precision: 0.8412473423104181
24
- - Weighted Precision: 0.8606653801556983
25
- - Macro Recall: 0.8328042776824057
26
- - Micro Recall: 0.8412473423104181
27
- - Weighted Recall: 0.8412473423104181
28
 
 
 
 
 
 
 
 
 
29
 
30
- ## Usage
31
 
32
- You can use cURL to access this model:
33
 
34
- ```
35
- $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/albertvillanova/autonlp-baselines-indic_glue-multi_class_classification-1351187
36
- ```
37
 
38
- Or Python API:
 
39
 
 
 
 
 
 
 
 
 
40
  ```
41
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
42
 
43
- model = AutoModelForSequenceClassification.from_pretrained("albertvillanova/autonlp-baselines-indic_glue-multi_class_classification-1351187", use_auth_token=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- tokenizer = AutoTokenizer.from_pretrained("albertvillanova/autonlp-baselines-indic_glue-multi_class_classification-1351187", use_auth_token=True)
46
 
47
- inputs = tokenizer("I love AutoNLP", return_tensors="pt")
48
 
49
- outputs = model(**inputs)
50
- ```
 
 
 
 
1
+
2
  ---
 
3
  language: bn
4
+ tags:
5
+ - collaborative
6
+ - bengali
7
+ - SequenceClassification
8
+ license: apache-2.0
9
+ datasets: IndicGlue
10
+ metrics:
11
+ - Loss
12
+ - Accuracy
13
+ - Precision
14
+ - Recall
15
  ---
16
 
17
+ # sahajBERT News Article Classification
18
 
19
+ ## Model description
 
20
 
21
+ [sahajBERT](https://huggingface.co/neuropark/sahajBERT) fine-tuned for news article classification using the `sna.bn` split of [IndicGlue](https://huggingface.co/datasets/indic_glue).
22
 
23
+ The model is trained for classifying articles into 5 different classes:
 
 
 
 
 
 
 
 
 
 
24
 
25
+ | Label id | Label |
26
+ |:--------:|:----:|
27
+ |0 | kolkata|
28
+ |1 | state|
29
+ |2 | national|
30
+ |3 | sports|
31
+ |4 | entertainment|
32
+ |5 | international|
33
 
34
+ ## Intended uses & limitations
35
 
36
+ #### How to use
37
 
38
+ You can use this model directly with a pipeline for Sequence Classification:
39
+ ```python
40
+ from transformers import AlbertForSequenceClassification, TextClassificationPipeline, PreTrainedTokenizerFast
41
 
42
+ # Initialize tokenizer
43
+ tokenizer = PreTrainedTokenizerFast.from_pretrained("neuropark/sahajBERT-NCC")
44
 
45
+ # Initialize model
46
+ model = AlbertForSequenceClassification.from_pretrained("neuropark/sahajBERT-NCC")
47
+
48
+ # Initialize pipeline
49
+ pipeline = TextClassificationPipeline(tokenizer=tokenizer, model=model)
50
+
51
+ raw_text = "এই ইউনিয়নে ৩ টি মৌজা ও ১০ টি গ্রাম আছে ।" # Change me
52
+ output = pipeline(raw_text)
53
  ```
 
54
 
55
+ #### Limitations and bias
56
+
57
+ <!-- Provide examples of latent issues and potential remediations. -->
58
+ WIP
59
+
60
+ ## Training data
61
+
62
+ The model was initialized with pre-trained weights of [sahajBERT](https://huggingface.co/neuropark/sahajBERT) at step 18149 and trained on the `sna.bn` split of [IndicGlue](https://huggingface.co/datasets/indic_glue).
63
+
64
+ ## Training procedure
65
+
66
+ Coming soon!
67
+ <!-- ```bibtex
68
+ @inproceedings{...,
69
+ year={2020}
70
+ }
71
+ ``` -->
72
+
73
+ ## Eval results
74
+
75
+ accuracy: 0.920623671155209
76
+
77
+ loss: 0.2719293534755707
78
+
79
+ macro_f1: 0.8924089161713425
80
+
81
+ macro_precision: 0.891858452957785
82
+
83
+ macro_recall: 0.8978917764271065
84
+
85
+ micro_f1: 0.920623671155209
86
+
87
+ micro_precision: 0.920623671155209
88
+
89
+ micro_recall: 0.920623671155209
90
+
91
+ weighted_f1: 0.9205158122362266
92
+
93
+ weighted_precision: 0.9236142214371135
94
+
95
+ weighted_recall: 0.920623671155209
96
+
97
 
 
98
 
99
+ ### BibTeX entry and citation info
100
 
101
+ Coming soon!
102
+ <!-- ```bibtex
103
+ @inproceedings{...,
104
+ year={2020}
105
+ }
106
+ ``` -->
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "AutoNLP",
3
  "_num_labels": 6,
4
  "architectures": [
5
  "AlbertForSequenceClassification"
@@ -34,7 +34,7 @@
34
  "5": 5
35
  },
36
  "layer_norm_eps": 1e-12,
37
- "max_length": 64,
38
  "max_position_embeddings": 512,
39
  "model_type": "albert",
40
  "net_structure_type": 0,
@@ -45,7 +45,7 @@
45
  "pad_token_id": 0,
46
  "padding": "max_length",
47
  "position_embedding_type": "absolute",
48
- "transformers_version": "4.5.1",
49
  "type_vocab_size": 2,
50
  "vocab_size": 32000
51
  }
1
  {
2
+ "_name_or_path": "albertvillanova/autonlp-indic_glue-multi_class_classification-218510d-1261095",
3
  "_num_labels": 6,
4
  "architectures": [
5
  "AlbertForSequenceClassification"
34
  "5": 5
35
  },
36
  "layer_norm_eps": 1e-12,
37
+ "max_length": 128,
38
  "max_position_embeddings": 512,
39
  "model_type": "albert",
40
  "net_structure_type": 0,
45
  "pad_token_id": 0,
46
  "padding": "max_length",
47
  "position_embedding_type": "absolute",
48
+ "transformers_version": "4.6.1",
49
  "type_vocab_size": 2,
50
  "vocab_size": 32000
51
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:61e8371df57f6d4a19d894cf5806b64b6cd1b9d987a79f2dec6633be1cd7c055
3
- size 71800683
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:004246afd25a31f2276508f7fbfff866db2c4b3ce7dad33239ad8568d01c3f24
3
+ size 71800235