sylwia-kuros commited on
Commit
b704d54
1 Parent(s): 2b6ed62

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: bigcode-openrail-m
3
+ ---
4
+
5
+ # starcoder2-15b-int8-ov
6
+
7
+ * Model creator: [BigCode](https://huggingface.co/bigcode)
8
+ * Original model: [bigcode/starcoder2-15b](https://huggingface.co/bigcode/starcoder2-15b)
9
+
10
+ ## Description
11
+
12
+ This is [bigcode/starcoder2-15b](https://huggingface.co/bigcode/starcoder2-15b) 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).
13
+
14
+ ## Quantization Parameters
15
+
16
+ Weight compression was performed using `nncf.compress_weights` with the following parameters:
17
+
18
+
19
+ * mode: **INT8_ASYM**
20
+ * ratio: **1.0**
21
+
22
+ For more information on quantization, check the [OpenVINO model optimization guide](https://docs.openvino.ai/2024/openvino-workflow/model-optimization-guide/weight-compression.html).
23
+
24
+ ## Compatibility
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
+
35
+ ```
36
+ pip install optimum[openvino]
37
+ ```
38
+
39
+ 2. Run model inference:
40
+
41
+ ```
42
+ from transformers import AutoTokenizer
43
+ from optimum.intel.openvino import OVModelForCausalLM
44
+
45
+ model_id = "OpenVINO/starcoder2-15b-int8-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_length=200)
52
+ text = tokenizer.batch_decode(outputs)[0]
53
+ print(text)
54
+ ```
55
+
56
+ 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).
57
+
58
+ ## Legal information
59
+
60
+ The original model is distributed under [bigcode-openrail-m](https://www.bigcode-project.org/docs/pages/bigcode-openrail/) license. More details can be found in [bigcode/starcoder2-15b](https://huggingface.co/bigcode/starcoder2-15b).
61
+
62
+ ## Disclaimer
63
+
64
+ Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See [Intel’s Global Human Rights Principles](https://www.intel.com/content/dam/www/central-libraries/us/en/documents/policy-human-rights.pdf). Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.