sylwia-kuros commited on
Commit
a3fcb33
1 Parent(s): b8f95c0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -3
README.md CHANGED
@@ -1,3 +1,66 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ ---
6
+
7
+ # zephyr-7b-beta-int8-ov
8
+
9
+ * Model creator: [Hugging Face H4](https://huggingface.co/HuggingFaceH4)
10
+ * Original model: [zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta)
11
+
12
+
13
+ ## Description
14
+
15
+ This is [zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2024/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to int8 by [NNCF](https://github.com/openvinotoolkit/nncf).
16
+
17
+ ## Quantization Parameters
18
+
19
+ Weight compression was performed using `nncf.compress_weights` with the following parameters:
20
+
21
+ * mode: **INT8_ASYM**
22
+ * sensitivity_metric: **weight_quantization_error**
23
+
24
+ For more information on quantization, check the [OpenVINO model optimization guide](https://docs.openvino.ai/2024/openvino-workflow/model-optimization-guide/weight-compression.html).
25
+
26
+ ## Compatibility
27
+
28
+ The provided OpenVINO™ IR model is compatible with:
29
+
30
+ * OpenVINO version 2024.1.0 and higher
31
+ * Optimum Intel 1.16.0 and higher
32
+
33
+ ## Running Model Inference
34
+
35
+ 1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
36
+
37
+ ```
38
+ pip install optimum[openvino]
39
+ ```
40
+
41
+ 2. Run model inference:
42
+
43
+ ```
44
+ from transformers import AutoTokenizer
45
+ from optimum.intel.openvino import OVModelForCausalLM
46
+
47
+ model_id = "OpenVINO/zephyr-7b-beta-int8-ov"
48
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
49
+ model = OVModelForCausalLM.from_pretrained(model_id)
50
+
51
+ inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
52
+
53
+ outputs = model.generate(**inputs, max_length=200)
54
+ text = tokenizer.batch_decode(outputs)[0]
55
+ print(text)
56
+ ```
57
+
58
+ For more examples and possible optimizations, refer to the [OpenVINO Large Language Model Inference Guide](https://docs.openvino.ai/2024/learn-openvino/llm_inference_guide.html).
59
+
60
+ ## Limitations
61
+
62
+ Check the original model card for [limitations](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta#intended-uses--limitations).
63
+
64
+ ## Legal information
65
+
66
+ The original model is distributed under mit license. More details can be found in [original model card](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta).