Irfanuruchi commited on
Commit
892dba9
·
verified ·
1 Parent(s): 9ee712c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +180 -46
README.md CHANGED
@@ -1,74 +1,208 @@
1
- # Qwen3-4B-Computer-Science Models
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- Official model releases for the **Qwen3-4B-Computer-Science** project.
4
 
5
- This collection provides officially maintained releases of the model across multiple inference runtimes and hardware platforms, allowing users to choose the format best suited to their deployment environment.
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  ---
8
 
9
- ## Available Formats
10
 
11
- | Format | Status | Primary Runtime |
12
- |---------|:------:|-----------------|
13
- | BF16 | ✅ | Transformers |
14
- | GGUF | ✅ | llama.cpp, Ollama, LM Studio |
15
- | AWQ | ✅ | Compressed-Tensors compatible runtimes |
16
- | MLX 4-bit | ✅ | Apple MLX |
17
- | MLX 8-bit | ✅ | Apple MLX |
18
- | MLX BF16 | ✅ | Apple MLX |
19
- | OpenVINO INT4 | ✅ | OpenVINO + Optimum Intel |
20
 
21
  ---
22
 
23
- ## Included Models
24
 
25
- ### Qwen3-4B-Computer-Science
26
- Original BF16 release intended for Hugging Face Transformers, fine-tuning, and general inference.
27
 
28
- ### Qwen3-4B-Computer-Science-GGUF
29
- GGUF release for efficient inference with llama.cpp-compatible runtimes such as Ollama and LM Studio.
 
 
 
 
 
30
 
31
- ### Qwen3-4B-Computer-Science-AWQ
32
- Activation-Aware Weight Quantization (AWQ) release using the Compressed-Tensors format for supported inference frameworks.
33
 
34
- ### Qwen3-4B-Computer-Science-MLX-4bit
35
- Optimized 4-bit MLX release for Apple Silicon devices.
36
 
37
- ### Qwen3-4B-Computer-Science-MLX-8bit
38
- Optimized 8-bit MLX release providing a balance between quality and memory usage.
39
 
40
- ### Qwen3-4B-Computer-Science-MLX-BF16
41
- Full-precision BF16 MLX release for maximum inference quality on Apple Silicon.
42
 
43
- ### Qwen3-4B-Computer-Science-OpenVINO-INT4
44
- OpenVINO INT4 release optimized for efficient CPU inference using Intel OpenVINO and Optimum Intel.
 
45
 
46
  ---
47
 
48
- ## Purpose
 
 
 
 
 
 
 
 
49
 
50
- The objective of this collection is to provide officially maintained releases of the same model across multiple deployment formats while preserving consistent behavior and compatibility with their respective inference ecosystems.
 
 
 
51
 
52
- Each repository includes:
 
 
 
 
 
 
 
 
 
53
 
54
- - Documentation
55
- - Runtime-specific usage examples
56
- - License information
57
- - SHA256 integrity verification files
58
- - Configuration files required for the target runtime
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  ---
61
 
62
- ## Model Family
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
- This release family currently includes:
65
 
66
- - ✅ Transformers BF16
67
- - ✅ GGUF
68
- - ✅ AWQ
69
- - ✅ MLX 4-bit
70
- - ✅ MLX 8-bit
71
- - ✅ MLX BF16
72
- - ✅ OpenVINO INT4
73
 
74
- Additional deployment formats may be added in future releases as the ecosystem evolves.
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ base_model: Irfanuruchi/Qwen3-4B-Computer-Science
6
+ base_model_relation: quantized
7
+ library_name: optimum-intel
8
+ pipeline_tag: text-generation
9
+ inference: false
10
+ tags:
11
+ - qwen3
12
+ - qwen3-for-causal-lm
13
+ - computer-science
14
+ - software-engineering
15
+ - programming
16
+ - coding
17
+ - openvino
18
+ - optimum-intel
19
+ - int4
20
+ - quantized
21
+ - cpu
22
+ - transformers
23
+ ---
24
+
25
+ # Qwen3-4B-Computer-Science OpenVINO INT4
26
+
27
+ This repository provides an **OpenVINO INT4** version of **Qwen3-4B-Computer-Science**, optimized for efficient inference using **Intel OpenVINO** and **Optimum Intel**.
28
+
29
+ The model is optimized for software engineering and computer science workloads while significantly reducing storage requirements and memory usage through INT4 weight compression, enabling efficient CPU inference on OpenVINO-supported hardware.
30
 
31
+ ---
32
 
33
+ # Model Information
34
+
35
+ | Property | Value |
36
+ |----------|-------|
37
+ | Base Model | Irfanuruchi/Qwen3-4B-Computer-Science |
38
+ | Base Architecture | Qwen3 |
39
+ | Parameters | ~4 Billion |
40
+ | Model Format | OpenVINO IR |
41
+ | Weight Compression | INT4 Asymmetric |
42
+ | Compression Group Size | 128 |
43
+ | Runtime | OpenVINO Runtime |
44
+ | Library | Optimum Intel |
45
+ | Primary Hardware | CPU |
46
+ | License | Apache License 2.0 |
47
 
48
  ---
49
 
50
+ # Features
51
 
52
+ - Optimized OpenVINO IR format
53
+ - INT4 asymmetric weight compression
54
+ - Reduced storage footprint
55
+ - Lower memory usage
56
+ - CPU-optimized inference
57
+ - Compatible with Hugging Face Transformers through Optimum Intel
58
+ - Exported tokenizer and detokenizer
59
+ - Chat template included
60
+ - Ready for local deployment
61
 
62
  ---
63
 
64
+ # Export Configuration
65
 
66
+ The model was exported using:
 
67
 
68
+ ```bash
69
+ optimum-cli export openvino \
70
+ --model Irfanuruchi/Qwen3-4B-Computer-Science \
71
+ --task text-generation-with-past \
72
+ --weight-format int4 \
73
+ Qwen3-4B-Computer-Science-OpenVINO-INT4
74
+ ```
75
 
76
+ Compression summary:
 
77
 
78
+ - **252 transformer layers** compressed using **INT4 asymmetric** with **group size 128**
79
+ - **1 auxiliary layer** stored using **INT8 per-channel**
80
 
81
+ ---
 
82
 
83
+ # Installation
 
84
 
85
+ ```bash
86
+ pip install -U openvino optimum-intel transformers
87
+ ```
88
 
89
  ---
90
 
91
+ # Example Usage
92
+
93
+ ```python
94
+ from transformers import AutoTokenizer
95
+ from optimum.intel.openvino import OVModelForCausalLM
96
+
97
+ model_id = "Irfanuruchi/Qwen3-4B-Computer-Science-OpenVINO-INT4"
98
+
99
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
100
 
101
+ model = OVModelForCausalLM.from_pretrained(
102
+ model_id,
103
+ device="CPU",
104
+ )
105
 
106
+ messages = [
107
+ {
108
+ "role": "system",
109
+ "content": "You are a computer science assistant."
110
+ },
111
+ {
112
+ "role": "user",
113
+ "content": "Explain Floyd's cycle detection algorithm."
114
+ },
115
+ ]
116
 
117
+ prompt = tokenizer.apply_chat_template(
118
+ messages,
119
+ tokenize=False,
120
+ add_generation_prompt=True,
121
+ )
122
+
123
+ inputs = tokenizer(prompt, return_tensors="pt")
124
+
125
+ outputs = model.generate(
126
+ **inputs,
127
+ max_new_tokens=256,
128
+ do_sample=False,
129
+ )
130
+
131
+ response = tokenizer.decode(
132
+ outputs[0][inputs["input_ids"].shape[1]:],
133
+ skip_special_tokens=True,
134
+ )
135
+
136
+ print(response)
137
+ ```
138
 
139
  ---
140
 
141
+ # Validation
142
+
143
+ The exported model was successfully validated using:
144
+
145
+ - OpenVINO 2026.2.1
146
+ - CPU inference
147
+ - Chat template support
148
+ - Greedy decoding
149
+ - Software engineering benchmark prompts
150
+
151
+ Validation confirmed successful generation of technically correct programming responses, including algorithm implementation and complexity analysis.
152
+
153
+ ---
154
+
155
+ # Intended Use
156
+
157
+ This model is intended for:
158
+
159
+ - Software engineering assistance
160
+ - Computer science education
161
+ - Programming support
162
+ - Code generation
163
+ - Code review
164
+ - Debugging
165
+ - Algorithm design
166
+ - Technical documentation
167
+ - Technical question answering
168
+
169
+ ---
170
+
171
+ # Model Family
172
+
173
+ The **Qwen3-4B-Computer-Science** release family currently includes:
174
+
175
+ | Model | Status |
176
+ |------|:------:|
177
+ | Transformers BF16 | ✅ |
178
+ | GGUF (Multiple Quantization Variants) | ✅ |
179
+ | AWQ | ✅ |
180
+ | MLX 4-bit | ✅ |
181
+ | MLX 8-bit | ✅ |
182
+ | MLX BF16 | ✅ |
183
+ | OpenVINO INT4 | ✅ |
184
+
185
+ Each release is maintained in its own repository with runtime-specific documentation, usage examples, integrity verification files, and configuration for its respective inference backend.
186
+
187
+ ---
188
+
189
+ # Limitations
190
+
191
+ Like other large language models, this model may occasionally:
192
+
193
+ - Generate incorrect or incomplete code
194
+ - Hallucinate APIs or implementation details
195
+ - Produce inefficient implementations
196
+ - Misinterpret ambiguous instructions
197
+
198
+ All generated code should be reviewed and tested before use in production or safety-critical environments.
199
+
200
+ INT4 weight compression may introduce minor quality differences compared with higher-precision model variants.
201
+
202
+ ---
203
 
204
+ # License
205
 
206
+ This repository is distributed under the **Apache License 2.0**.
 
 
 
 
 
 
207
 
208
+ See the included **LICENSE** file for the complete license text and applicable attribution requirements.