OpenVINO
bloom
katuni4ka commited on
Commit
15f0937
1 Parent(s): 45d3a93

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -1
README.md CHANGED
@@ -15,7 +15,7 @@ The provided OpenVINO™ IR model is compatible with:
15
  * OpenVINO version 2024.4.0 and higher
16
  * Optimum Intel 1.20.0 and higher
17
 
18
- ## Running Model Inference
19
 
20
  1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
21
 
@@ -42,6 +42,36 @@ print(text)
42
 
43
  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).
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  ## Limitations
46
 
47
  Check the original model card for [original model card](https://huggingface.co/bigscience/bloomz-3b) for limitations.
 
15
  * OpenVINO version 2024.4.0 and higher
16
  * Optimum Intel 1.20.0 and higher
17
 
18
+ ## Running Model Inference with [Optimum Intel](https://huggingface.co/docs/optimum/intel/index)
19
 
20
  1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
21
 
 
42
 
43
  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).
44
 
45
+ ## Running Model Inference with [OpenVINO GenAI](https://github.com/openvinotoolkit/openvino.genai)
46
+
47
+ 1. Install packages required for using OpenVINO GenAI.
48
+ ```
49
+ pip install openvino-genai huggingface_hub
50
+ ```
51
+
52
+ 2. Download model from HuggingFace Hub
53
+
54
+ ```
55
+ import huggingface_hub as hf_hub
56
+
57
+ model_id = "OpenVINO/bloomz-3b-fp16-ov"
58
+ model_path = "bloomz-3b-fp16-ov"
59
+
60
+ hf_hub.snapshot_download(model_id, local_dir=model_path)
61
+
62
+ ```
63
+
64
+ 3. Run model inference:
65
+
66
+ ```
67
+ import openvino_genai as ov_genai
68
+
69
+ device = "CPU"
70
+ pipe = ov_genai.LLMPipeline(model_path, device)
71
+ print(pipe.generate("What is OpenVINO?", max_length=200))
72
+ ```
73
+
74
+ More GenAI usage examples can be found in OpenVINO GenAI library [docs](https://github.com/openvinotoolkit/openvino.genai/blob/master/src/README.md) and [samples](https://github.com/openvinotoolkit/openvino.genai?tab=readme-ov-file#openvino-genai-samples)
75
  ## Limitations
76
 
77
  Check the original model card for [original model card](https://huggingface.co/bigscience/bloomz-3b) for limitations.