helenai commited on
Commit
a55d0bd
1 Parent(s): 73f567c

commit files to HF hub

Browse files
README.md CHANGED
@@ -17,9 +17,9 @@ from transformers import AutoTokenizer, pipeline
17
  # model_id should be set to either a local directory or a model available on the HuggingFace hub.
18
  model_id = "helenai/Alireza1044-albert-base-v2-sst2-ov"
19
  tokenizer = AutoTokenizer.from_pretrained(model_id)
20
- model = OVModelForSequenceClassification.from_pretrained(model_id)
21
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
22
- result = pipe("I like you. I love you")
23
  print(result)
24
  ```
25
 
 
17
  # model_id should be set to either a local directory or a model available on the HuggingFace hub.
18
  model_id = "helenai/Alireza1044-albert-base-v2-sst2-ov"
19
  tokenizer = AutoTokenizer.from_pretrained(model_id)
20
+ model = OVModelForSequenceClassification.from_pretrained(model_id, revision=')
21
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
22
+ result = pipe("hello world")
23
  print(result)
24
  ```
25
 
config.json CHANGED
@@ -29,7 +29,7 @@
29
  "position_embedding_type": "absolute",
30
  "problem_type": "single_label_classification",
31
  "torch_dtype": "float32",
32
- "transformers_version": "4.27.4",
33
  "type_vocab_size": 2,
34
  "vocab_size": 30000
35
  }
 
29
  "position_embedding_type": "absolute",
30
  "problem_type": "single_label_classification",
31
  "torch_dtype": "float32",
32
+ "transformers_version": "4.40.2",
33
  "type_vocab_size": 2,
34
  "vocab_size": 30000
35
  }
inference.py CHANGED
@@ -4,7 +4,7 @@ from transformers import AutoTokenizer, pipeline
4
  # model_id should be set to either a local directory or a model available on the HuggingFace hub.
5
  model_id = "helenai/Alireza1044-albert-base-v2-sst2-ov"
6
  tokenizer = AutoTokenizer.from_pretrained(model_id)
7
- model = OVModelForSequenceClassification.from_pretrained(model_id)
8
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
9
- result = pipe("I like you. I love you")
10
  print(result)
 
4
  # model_id should be set to either a local directory or a model available on the HuggingFace hub.
5
  model_id = "helenai/Alireza1044-albert-base-v2-sst2-ov"
6
  tokenizer = AutoTokenizer.from_pretrained(model_id)
7
+ model = OVModelForSequenceClassification.from_pretrained(model_id, revision=')
8
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
9
+ result = pipe("hello world")
10
  print(result)
openvino_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fe73cb0deb84633a57528c6d5e216a2b1207d00073006970c58c73881e16e361
3
- size 46744732
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21592c3bde341ffa5ece610bf933beb54beb7927be0d1674c1c375bec6a19a5a
3
+ size 46744764
openvino_model.xml CHANGED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json CHANGED
@@ -1,7 +1,25 @@
1
  {
2
- "bos_token": "[CLS]",
3
- "cls_token": "[CLS]",
4
- "eos_token": "[SEP]",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "mask_token": {
6
  "content": "[MASK]",
7
  "lstrip": true,
@@ -9,7 +27,25 @@
9
  "rstrip": false,
10
  "single_word": false
11
  },
12
- "pad_token": "<pad>",
13
- "sep_token": "[SEP]",
14
- "unk_token": "<unk>"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
 
1
  {
2
+ "bos_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "[CLS]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "[SEP]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
  "mask_token": {
24
  "content": "[MASK]",
25
  "lstrip": true,
 
27
  "rstrip": false,
28
  "single_word": false
29
  },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "[SEP]",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
  }
tokenizer.json CHANGED
@@ -104,7 +104,8 @@
104
  {
105
  "type": "Metaspace",
106
  "replacement": "▁",
107
- "add_prefix_space": true
 
108
  }
109
  ]
110
  },
@@ -186,7 +187,8 @@
186
  "decoder": {
187
  "type": "Metaspace",
188
  "replacement": "▁",
189
- "add_prefix_space": true
 
190
  },
191
  "model": {
192
  "type": "Unigram",
@@ -120192,6 +120194,7 @@
120192
  "▁eloquent",
120193
  -13.532299041748049
120194
  ]
120195
- ]
 
120196
  }
120197
  }
 
104
  {
105
  "type": "Metaspace",
106
  "replacement": "▁",
107
+ "prepend_scheme": "always",
108
+ "split": true
109
  }
110
  ]
111
  },
 
187
  "decoder": {
188
  "type": "Metaspace",
189
  "replacement": "▁",
190
+ "prepend_scheme": "always",
191
+ "split": true
192
  },
193
  "model": {
194
  "type": "Unigram",
 
120194
  "▁eloquent",
120195
  -13.532299041748049
120196
  ]
120197
+ ],
120198
+ "byte_fallback": false
120199
  }
120200
  }
tokenizer_config.json CHANGED
@@ -1,22 +1,64 @@
1
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "bos_token": "[CLS]",
 
3
  "cls_token": "[CLS]",
4
  "do_lower_case": true,
5
  "eos_token": "[SEP]",
6
  "keep_accents": false,
7
- "mask_token": {
8
- "__type": "AddedToken",
9
- "content": "[MASK]",
10
- "lstrip": true,
11
- "normalized": true,
12
- "rstrip": false,
13
- "single_word": false
14
- },
15
  "model_max_length": 512,
 
16
  "pad_token": "<pad>",
 
 
17
  "remove_space": true,
18
  "sep_token": "[SEP]",
19
- "special_tokens_map_file": null,
20
  "tokenizer_class": "AlbertTokenizer",
 
 
21
  "unk_token": "<unk>"
22
  }
 
1
  {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<pad>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<unk>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
  "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": true,
46
  "cls_token": "[CLS]",
47
  "do_lower_case": true,
48
  "eos_token": "[SEP]",
49
  "keep_accents": false,
50
+ "mask_token": "[MASK]",
51
+ "max_length": 128,
 
 
 
 
 
 
52
  "model_max_length": 512,
53
+ "pad_to_multiple_of": null,
54
  "pad_token": "<pad>",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
  "remove_space": true,
58
  "sep_token": "[SEP]",
59
+ "stride": 0,
60
  "tokenizer_class": "AlbertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
  "unk_token": "<unk>"
64
  }