helenai commited on
Commit
fab73e3
1 Parent(s): cf178af

commit files to HF hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - openvino
6
+ ---
7
+
8
+ # xverse/XVERSE-7B
9
+
10
+ This is the [xverse/XVERSE-7B](https://huggingface.co/xverse/XVERSE-7B) model converted to [OpenVINO](https://openvino.ai) with INT8 weights compression for accelerated inference.
11
+
12
+ An example of how to do inference on this model:
13
+ ```python
14
+ from optimum.intel import OVModelForCausalLM
15
+ from transformers import AutoTokenizer, pipeline
16
+
17
+ # model_id should be set to either a local directory or a model available on the HuggingFace hub.
18
+ model_id = "helenai/xverse-XVERSE-7B-ov"
19
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
20
+ model = OVModelForCausalLM.from_pretrained(model_id)
21
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
22
+ result = pipe("hello world")
23
+ print(result)
24
+ ```
25
+
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "xverse/XVERSE-7B",
3
+ "architectures": [
4
+ "XverseForCausalLM"
5
+ ],
6
+ "auto_map": {
7
+ "AutoConfig": "xverse/XVERSE-7B--configuration_xverse.XverseConfig",
8
+ "AutoModelForCausalLM": "xverse/XVERSE-7B--modeling_xverse.XverseForCausalLM"
9
+ },
10
+ "bos_token_id": 2,
11
+ "eos_token_id": 3,
12
+ "hidden_act": "silu",
13
+ "hidden_size": 4096,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 11008,
16
+ "is_decoder": true,
17
+ "max_position_embeddings": 8192,
18
+ "max_tokenizer_truncation": 6144,
19
+ "model_type": "xverse",
20
+ "num_attention_heads": 32,
21
+ "num_hidden_layers": 32,
22
+ "pad_token_id": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "tie_word_embeddings": false,
25
+ "torch_dtype": "bfloat16",
26
+ "transformers_version": "4.39.3",
27
+ "use_cache": true,
28
+ "vocab_size": 100534
29
+ }
inference.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from optimum.intel import OVModelForCausalLM
2
+ from transformers import AutoTokenizer, pipeline
3
+
4
+ # model_id should be set to either a local directory or a model available on the HuggingFace hub.
5
+ model_id = "helenai/xverse-XVERSE-7B-ov"
6
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7
+ model = OVModelForCausalLM.from_pretrained(model_id)
8
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
9
+ result = pipe("hello world")
10
+ print(result)
openvino_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c085f94a5939120dd962e7dd823af93eeccca9630d4d67850ab5fc6695efcfb
3
+ size 7313716564
openvino_model.xml ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:930bbe2e4026c0d6ad252202b06f7a6f75165b544e5ccf3ae847b1f4f46a732e
3
+ size 2105140
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<sep>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "<|startoftext|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "<|endofprompt|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "<|endofknowledge|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "bos_token": "<|startoftext|>",
53
+ "clean_up_tokenization_spaces": true,
54
+ "eos_token": "<|endoftext|>",
55
+ "model_max_length": 1000000000000000019884624838656,
56
+ "pad_token": "<pad>",
57
+ "tokenizer_class": "PreTrainedTokenizerFast"
58
+ }