katuni4ka commited on
Commit
0a66857
1 Parent(s): b65c40a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -12
README.md CHANGED
@@ -4,7 +4,7 @@ language:
4
  - en
5
  ---
6
 
7
- # Mistral-7b-Instruct-v0.1-int8-ov
8
 
9
  * Model creator: [Mistral AI](https://huggingface.co/mistralai)
10
  * Original model: [Mistral-7b-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
@@ -25,10 +25,10 @@ For more information on quantization, check the [OpenVINO model optimization gui
25
 
26
  The provided OpenVINO™ IR model is compatible with:
27
 
28
- * OpenVINO version 2024.1.0 and higher
29
  * Optimum Intel 1.16.0 and higher
30
 
31
- ## Running Model Inference
32
 
33
  1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
34
 
@@ -42,18 +42,11 @@ pip install optimum[openvino]
42
  from transformers import AutoTokenizer
43
  from optimum.intel.openvino import OVModelForCausalLM
44
 
45
- model_id = "OpenVINO/mistral-7b-instrcut-v0.1-int8-ov"
46
  tokenizer = AutoTokenizer.from_pretrained(model_id)
47
  model = OVModelForCausalLM.from_pretrained(model_id)
48
 
49
-
50
- messages = [
51
- {"role": "user", "content": "What is your favourite condiment?"},
52
- {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
53
- {"role": "user", "content": "Do you have mayonnaise recipes?"}
54
- ]
55
-
56
- inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
57
 
58
  outputs = model.generate(inputs, max_new_tokens=20)
59
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
 
4
  - en
5
  ---
6
 
7
+ # Mistral-7b-Instruct-v0.1-int4-ov
8
 
9
  * Model creator: [Mistral AI](https://huggingface.co/mistralai)
10
  * Original model: [Mistral-7b-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
 
25
 
26
  The provided OpenVINO™ IR model is compatible with:
27
 
28
+ * OpenVINO version 2024.2.0 and higher
29
  * Optimum Intel 1.16.0 and higher
30
 
31
+ ## Running Model Inference with [Optimum Intel](https://huggingface.co/docs/optimum/intel/index)
32
 
33
  1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
34
 
 
42
  from transformers import AutoTokenizer
43
  from optimum.intel.openvino import OVModelForCausalLM
44
 
45
+ model_id = "OpenVINO/mistral-7b-instrcut-v0.1-int4-ov"
46
  tokenizer = AutoTokenizer.from_pretrained(model_id)
47
  model = OVModelForCausalLM.from_pretrained(model_id)
48
 
49
+ inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
 
 
 
 
 
 
 
50
 
51
  outputs = model.generate(inputs, max_new_tokens=20)
52
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))