Djacon commited on
Commit
404469e
Β·
1 Parent(s): 1862d48

Load model

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ __pycache__
inference.py CHANGED
@@ -1,7 +1,8 @@
1
  import torch
2
  from transformers import BertForSequenceClassification, AutoTokenizer
3
 
4
- path = 'Djacon/rubert-tiny2-russian-emotion-detection'
 
5
  model = BertForSequenceClassification.from_pretrained(path)
6
  tokenizer = AutoTokenizer.from_pretrained(path)
7
 
 
1
  import torch
2
  from transformers import BertForSequenceClassification, AutoTokenizer
3
 
4
+ # path = 'Djacon/rubert-tiny2-russian-emotion-detection'
5
+ path = './model/'
6
  model = BertForSequenceClassification.from_pretrained(path)
7
  tokenizer = AutoTokenizer.from_pretrained(path)
8
 
model/config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "cointegrated/rubert-tiny2",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "emb_size": 312,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 312,
13
+ "id2label": {
14
+ "0": "\u0440\u0430\u0434\u043e\u0441\u0442\u044c",
15
+ "1": "\u0438\u043d\u0442\u0435\u0440\u0435\u0441",
16
+ "2": "\u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435",
17
+ "3": "\u043f\u0435\u0447\u0430\u043b\u044c",
18
+ "4": "\u0433\u043d\u0435\u0432",
19
+ "5": "\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435",
20
+ "6": "\u0441\u0442\u0440\u0430\u0445",
21
+ "7": "\u0432\u0438\u043d\u0430",
22
+ "8": "\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e"
23
+ },
24
+ "initializer_range": 0.02,
25
+ "intermediate_size": 600,
26
+ "label2id": {
27
+ "\u0432\u0438\u043d\u0430": 7,
28
+ "\u0433\u043d\u0435\u0432": 4,
29
+ "\u0438\u043d\u0442\u0435\u0440\u0435\u0441": 1,
30
+ "\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u043e": 8,
31
+ "\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435": 5,
32
+ "\u043f\u0435\u0447\u0430\u043b\u044c": 3,
33
+ "\u0440\u0430\u0434\u043e\u0441\u0442\u044c": 0,
34
+ "\u0441\u0442\u0440\u0430\u0445": 6,
35
+ "\u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435": 2
36
+ },
37
+ "layer_norm_eps": 1e-12,
38
+ "max_position_embeddings": 2048,
39
+ "model_type": "bert",
40
+ "num_attention_heads": 12,
41
+ "num_hidden_layers": 3,
42
+ "pad_token_id": 0,
43
+ "position_embedding_type": "absolute",
44
+ "problem_type": "multi_label_classification",
45
+ "torch_dtype": "float32",
46
+ "transformers_version": "4.27.4",
47
+ "type_vocab_size": 2,
48
+ "use_cache": true,
49
+ "vocab_size": 83828
50
+ }
model/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:baa8b75048ac99f0750260215fff263060119a72c804c40c97f4cec4b7fb3af9
3
+ size 116809380
model/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
+ }
model/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
model/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_basic_tokenize": true,
4
+ "do_lower_case": false,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 2048,
7
+ "never_split": null,
8
+ "pad_token": "[PAD]",
9
+ "sep_token": "[SEP]",
10
+ "special_tokens_map_file": null,
11
+ "strip_accents": null,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }
model/vocab.txt ADDED
The diff for this file is too large to render. See raw diff