sylwia-kuros commited on
Commit
815973d
1 Parent(s): 882045d

Update README.md

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