commit files to HF hub
Browse files- README.md +4 -2
- config.json +1 -1
- inference.py +2 -2
- openvino_model.bin +2 -2
- openvino_model.xml +0 -0
- tokenizer.json +2 -2
README.md
CHANGED
@@ -7,9 +7,11 @@ tags:
|
|
7 |
|
8 |
# mistralai/Mistral-7B-Instruct-v0.2
|
9 |
|
10 |
-
This is the [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) model
|
|
|
|
|
11 |
```python
|
12 |
-
from optimum.intel
|
13 |
from transformers import AutoTokenizer, pipeline
|
14 |
|
15 |
# model_id should be set to either a local directory or a model available on the HuggingFace hub.
|
|
|
7 |
|
8 |
# mistralai/Mistral-7B-Instruct-v0.2
|
9 |
|
10 |
+
This is the [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) model converted to [OpenVINO](https://openvino.ai), 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.
|
config.json
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
"sliding_window": null,
|
22 |
"tie_word_embeddings": false,
|
23 |
"torch_dtype": "bfloat16",
|
24 |
-
"transformers_version": "4.
|
25 |
"use_cache": true,
|
26 |
"vocab_size": 32000
|
27 |
}
|
|
|
21 |
"sliding_window": null,
|
22 |
"tie_word_embeddings": false,
|
23 |
"torch_dtype": "bfloat16",
|
24 |
+
"transformers_version": "4.40.2",
|
25 |
"use_cache": true,
|
26 |
"vocab_size": 32000
|
27 |
}
|
inference.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
from optimum.intel
|
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/mistralai-Mistral-7B-Instruct-v0.2-ov"
|
6 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
7 |
-
model = OVModelForCausalLM.from_pretrained(model_id
|
8 |
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
9 |
result = pipe("hello world")
|
10 |
print(result)
|
|
|
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/mistralai-Mistral-7B-Instruct-v0.2-ov"
|
6 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
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
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:45dc61bad946196600fbbc9cd6cdaf4a87bb28f49abfe63c8c0f078e96ef4ffb
|
3 |
+
size 14500241654
|
openvino_model.xml
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bdc45dc7f18a5c55e0dcb36f4f187a7c429d6aaa1693a17d20422b85081642d9
|
3 |
+
size 1795331
|