sylwia-kuros commited on
Commit
bb2fe88
1 Parent(s): f495e05

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +54 -0
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # starcoder2-7b-fp16-ov
6
+
7
+ * Model creator: [BigCode](https://huggingface.co/bigcode)
8
+ * Original model: [bigcode/starcoder2-7b](https://huggingface.co/bigcode/starcoder2-7b)
9
+
10
+ ## Description
11
+
12
+ This is [bigcode/starcoder2-7b](https://huggingface.co/bigcode/starcoder2-7b) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2024/documentation/openvino-ir-format.html) (Intermediate Representation) format.
13
+
14
+ ## Compatibility
15
+
16
+ The provided OpenVINO™ IR model is compatible with:
17
+
18
+ * OpenVINO version 2024.1.0 and higher
19
+ * Optimum Intel 1.16.0 and higher
20
+
21
+ ## Running Model Inference
22
+
23
+ 1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
24
+
25
+ ```
26
+ pip install optimum[openvino]
27
+ ```
28
+
29
+ 2. Run model inference:
30
+
31
+ ```
32
+ from transformers import AutoTokenizer
33
+ from optimum.intel.openvino import OVModelForCausalLM
34
+
35
+ model_id = "OpenVINO/starcoder2-7b-fp16-ov"
36
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
37
+ model = OVModelForCausalLM.from_pretrained(model_id)
38
+
39
+ inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
40
+
41
+ outputs = model.generate(**inputs, max_length=200)
42
+ text = tokenizer.batch_decode(outputs)[0]
43
+ print(text)
44
+ ```
45
+
46
+ 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).
47
+
48
+ ## Legal information
49
+
50
+ 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-7b](https://huggingface.co/bigcode/starcoder2-7b).
51
+
52
+ ## Disclaimer
53
+
54
+ 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.