Update README.md
Browse files
README.md
CHANGED
|
@@ -5,11 +5,16 @@ base_model:
|
|
| 5 |
|
| 6 |
This is the [Qwen/Qwen2-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct) model, converted to OpenVINO, with int4 weights for the language model, int8 weights for the other models.
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
Use OpenVINO GenAI to run inference on this model:
|
| 9 |
|
| 10 |
- Install OpenVINO GenAI nightly and pillow:
|
| 11 |
```
|
| 12 |
-
pip install --upgrade
|
| 13 |
```
|
| 14 |
- Download a test image: `curl -O "https://storage.openvinotoolkit.org/test_data/images/dog.jpg"`
|
| 15 |
- Run inference:
|
|
@@ -22,7 +27,6 @@ from PIL import Image
|
|
| 22 |
|
| 23 |
# Choose GPU instead of CPU in the line below to run the model on Intel integrated or discrete GPU
|
| 24 |
pipe = openvino_genai.VLMPipeline("./Qwen2-VL-2B-Instruct-ov-int4", "CPU")
|
| 25 |
-
pipe.start_chat()
|
| 26 |
|
| 27 |
image = Image.open("dog.jpg")
|
| 28 |
image_data = np.array(image.getdata()).reshape(1, image.size[1], image.size[0], 3).astype(np.uint8)
|
|
|
|
| 5 |
|
| 6 |
This is the [Qwen/Qwen2-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct) model, converted to OpenVINO, with int4 weights for the language model, int8 weights for the other models.
|
| 7 |
|
| 8 |
+
To download the model, run `pip install huggingface-hub[cli]` and then:
|
| 9 |
+
```
|
| 10 |
+
huggingface-cli download helenai/Qwen2-VL-2B-Instruct-ov-int4 --local-dir Qwen2-VL-2B-Instruct-ov-int4
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
Use OpenVINO GenAI to run inference on this model:
|
| 14 |
|
| 15 |
- Install OpenVINO GenAI nightly and pillow:
|
| 16 |
```
|
| 17 |
+
pip install --upgrade openvino-genai pillow
|
| 18 |
```
|
| 19 |
- Download a test image: `curl -O "https://storage.openvinotoolkit.org/test_data/images/dog.jpg"`
|
| 20 |
- Run inference:
|
|
|
|
| 27 |
|
| 28 |
# Choose GPU instead of CPU in the line below to run the model on Intel integrated or discrete GPU
|
| 29 |
pipe = openvino_genai.VLMPipeline("./Qwen2-VL-2B-Instruct-ov-int4", "CPU")
|
|
|
|
| 30 |
|
| 31 |
image = Image.open("dog.jpg")
|
| 32 |
image_data = np.array(image.getdata()).reshape(1, image.size[1], image.size[0], 3).astype(np.uint8)
|