Improve language tag
Browse filesHi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.
README.md
CHANGED
@@ -1,106 +1,119 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
license_link: https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/LICENSE
|
4 |
-
base_model:
|
5 |
-
|
6 |
-
base_model_relation: quantized
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
```
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
license_link: https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/LICENSE
|
4 |
+
base_model:
|
5 |
+
- Qwen/Qwen2.5-7B-Instruct
|
6 |
+
base_model_relation: quantized
|
7 |
+
language:
|
8 |
+
- zho
|
9 |
+
- eng
|
10 |
+
- fra
|
11 |
+
- spa
|
12 |
+
- por
|
13 |
+
- deu
|
14 |
+
- ita
|
15 |
+
- rus
|
16 |
+
- jpn
|
17 |
+
- kor
|
18 |
+
- vie
|
19 |
+
- tha
|
20 |
+
- ara
|
21 |
+
---
|
22 |
+
# Qwen2.5-7B-Instruct-int8-ov
|
23 |
+
* Model creator: [Qwen](https://huggingface.co/Qwen)
|
24 |
+
* Original model: [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
25 |
+
|
26 |
+
## Description
|
27 |
+
This is [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2025/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to INT8 by [NNCF](https://github.com/openvinotoolkit/nncf).
|
28 |
+
|
29 |
+
## Quantization Parameters
|
30 |
+
|
31 |
+
Weight compression was performed using `nncf.compress_weights` with the following parameters:
|
32 |
+
|
33 |
+
* mode: **INT8_ASYM**
|
34 |
+
|
35 |
+
For more information on quantization, check the [OpenVINO model optimization guide](https://docs.openvino.ai/2025/openvino-workflow/model-optimization-guide/weight-compression.html).
|
36 |
+
|
37 |
+
## Compatibility
|
38 |
+
|
39 |
+
The provided OpenVINO™ IR model is compatible with:
|
40 |
+
|
41 |
+
* OpenVINO version 2025.1.0 and higher
|
42 |
+
* Optimum Intel 1.24.0 and higher
|
43 |
+
|
44 |
+
## Running Model Inference with [Optimum Intel](https://huggingface.co/docs/optimum/intel/index)
|
45 |
+
|
46 |
+
1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
|
47 |
+
|
48 |
+
```
|
49 |
+
pip install optimum[openvino]
|
50 |
+
```
|
51 |
+
|
52 |
+
2. Run model inference:
|
53 |
+
|
54 |
+
```
|
55 |
+
from transformers import AutoTokenizer
|
56 |
+
from optimum.intel.openvino import OVModelForCausalLM
|
57 |
+
|
58 |
+
model_id = "OpenVINO/qwen2.5-7b-instruct-int8-ov"
|
59 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
60 |
+
model = OVModelForCausalLM.from_pretrained(model_id)
|
61 |
+
|
62 |
+
inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
|
63 |
+
|
64 |
+
outputs = model.generate(**inputs, max_length=200)
|
65 |
+
text = tokenizer.batch_decode(outputs)[0]
|
66 |
+
print(text)
|
67 |
+
```
|
68 |
+
|
69 |
+
For more examples and possible optimizations, refer to the [Inference with Optimum Intel](https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-optimum-intel.html).
|
70 |
+
|
71 |
+
## Running Model Inference with [OpenVINO GenAI](https://github.com/openvinotoolkit/openvino.genai)
|
72 |
+
|
73 |
+
|
74 |
+
1. Install packages required for using OpenVINO GenAI.
|
75 |
+
```
|
76 |
+
pip install openvino-genai huggingface_hub
|
77 |
+
```
|
78 |
+
|
79 |
+
2. Download model from HuggingFace Hub
|
80 |
+
|
81 |
+
```
|
82 |
+
import huggingface_hub as hf_hub
|
83 |
+
|
84 |
+
model_id = "OpenVINO/qwen2.5-7b-instruct-int8-ov"
|
85 |
+
model_path = "qwen2.5-7b-instruct-int8-ov"
|
86 |
+
|
87 |
+
hf_hub.snapshot_download(model_id, local_dir=model_path)
|
88 |
+
|
89 |
+
```
|
90 |
+
|
91 |
+
3. Run model inference:
|
92 |
+
|
93 |
+
```
|
94 |
+
import openvino_genai as ov_genai
|
95 |
+
|
96 |
+
device = "CPU"
|
97 |
+
pipe = ov_genai.LLMPipeline(model_path, device)
|
98 |
+
print(pipe.generate("What is OpenVINO?", max_length=200))
|
99 |
+
```
|
100 |
+
|
101 |
+
More GenAI usage examples can be found in OpenVINO GenAI library [docs](https://docs.openvino.ai/2025/openvino-workflow-generative/inference-with-genai.html) and [samples](https://github.com/openvinotoolkit/openvino.genai?tab=readme-ov-file#openvino-genai-samples)
|
102 |
+
|
103 |
+
You can find more detaild usage examples in OpenVINO Notebooks:
|
104 |
+
|
105 |
+
- [LLM](https://openvinotoolkit.github.io/openvino_notebooks/?search=LLM)
|
106 |
+
- [RAG text generation](https://openvinotoolkit.github.io/openvino_notebooks/?search=RAG+system&tasks=Text+Generation)
|
107 |
+
- [Convert models from ModelScope to OpenVINO](https://openvinotoolkit.github.io/openvino_notebooks/?search=Convert+models+from+ModelScope+to+OpenVINO)
|
108 |
+
|
109 |
+
## Limitations
|
110 |
+
|
111 |
+
Check the original [model card](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) for limitations.
|
112 |
+
|
113 |
+
## Legal information
|
114 |
+
|
115 |
+
The original model is distributed under [Apache License Version 2.0](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct/blob/main/LICENSE) license. More details can be found in [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct).
|
116 |
+
|
117 |
+
## Disclaimer
|
118 |
+
|
119 |
+
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.
|