Text Generation
OpenVINO
Transformers
English
optimum-intel
qwen3
computer-science
software-engineering
programming
coding
int4
quantized
cpu
gpu
npu
Instructions to use Irfanuruchi/Qwen3-4B-Computer-Science-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Irfanuruchi/Qwen3-4B-Computer-Science-Models with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Irfanuruchi/Qwen3-4B-Computer-Science-Models")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Irfanuruchi/Qwen3-4B-Computer-Science-Models", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Irfanuruchi/Qwen3-4B-Computer-Science-Models with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Irfanuruchi/Qwen3-4B-Computer-Science-Models" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Irfanuruchi/Qwen3-4B-Computer-Science-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Irfanuruchi/Qwen3-4B-Computer-Science-Models
- SGLang
How to use Irfanuruchi/Qwen3-4B-Computer-Science-Models with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Irfanuruchi/Qwen3-4B-Computer-Science-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Irfanuruchi/Qwen3-4B-Computer-Science-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Irfanuruchi/Qwen3-4B-Computer-Science-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Irfanuruchi/Qwen3-4B-Computer-Science-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Irfanuruchi/Qwen3-4B-Computer-Science-Models with Docker Model Runner:
docker model run hf.co/Irfanuruchi/Qwen3-4B-Computer-Science-Models
File size: 5,891 Bytes
892dba9 4ad30f9 892dba9 4ad30f9 892dba9 4ad30f9 e0393ca 892dba9 e0393ca 892dba9 4ad30f9 892dba9 4ad30f9 892dba9 4ad30f9 892dba9 e0393ca 4ad30f9 af7da8a e0393ca 892dba9 e0393ca 4ad30f9 892dba9 4ad30f9 892dba9 e0393ca af7da8a e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 892dba9 9ee712c 892dba9 e0393ca 892dba9 e0393ca 892dba9 4ad30f9 892dba9 4ad30f9 892dba9 4ad30f9 892dba9 4ad30f9 892dba9 e0393ca 892dba9 e0393ca 892dba9 e0393ca 4ad30f9 | 1 2 3 4 5 6 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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | ---
language:
- en
license: apache-2.0
base_model: Irfanuruchi/Qwen3-4B-Computer-Science
base_model_relation: quantized
library_name: optimum-intel
pipeline_tag: text-generation
inference: false
tags:
- qwen3
- computer-science
- software-engineering
- programming
- coding
- openvino
- optimum-intel
- int4
- quantized
- transformers
- cpu
- gpu
- npu
---
# Qwen3-4B-Computer-Science OpenVINO INT4
This repository provides an **OpenVINO INT4** deployment of **Qwen3-4B-Computer-Science**, optimized for efficient inference using **Intel® OpenVINO™** and **Optimum Intel**.
The model is designed for software engineering and computer science workloads while significantly reducing storage requirements and memory usage through INT4 weight compression. It enables efficient deployment across OpenVINO-supported hardware while preserving the capabilities of the original model.
---
# Model Information
| Property | Value |
|----------|-------|
| Base Model | Irfanuruchi/Qwen3-4B-Computer-Science |
| Base Architecture | Qwen3 |
| Parameters | ~4 Billion |
| Deployment Format | OpenVINO IR |
| Weight Compression | INT4 Asymmetric |
| Compression Group Size | 128 |
| Runtime | Intel® OpenVINO™ Runtime |
| Library | Optimum Intel |
| Supported Hardware | OpenVINO-supported devices* |
| License | Apache License 2.0 |
> **\*** Supported execution devices depend on the installed OpenVINO Runtime, operating system, drivers, and available hardware. Depending on the platform, inference may be executed on supported CPUs, integrated GPUs, NPUs, or other OpenVINO-compatible accelerators.
---
# Features
- OpenVINO IR deployment format
- INT4 asymmetric weight compression
- Reduced storage footprint
- Lower memory usage
- Efficient inference on OpenVINO-supported hardware
- Compatible with Optimum Intel and Hugging Face Transformers
- Exported tokenizer and detokenizer
- Chat template included
- Ready for local deployment
---
# Export Configuration
The model was exported using:
```bash
optimum-cli export openvino \
--model Irfanuruchi/Qwen3-4B-Computer-Science \
--task text-generation-with-past \
--weight-format int4 \
Qwen3-4B-Computer-Science-OpenVINO-INT4
```
Compression summary:
- **252 transformer layers** compressed using **INT4 asymmetric** with **group size 128**
- **1 auxiliary layer** stored using **INT8 per-channel**
---
# Installation
```bash
pip install -U openvino optimum-intel transformers
```
---
# Example Usage
```python
from transformers import AutoTokenizer
from optimum.intel.openvino import OVModelForCausalLM
model_id = "Irfanuruchi/Qwen3-4B-Computer-Science-OpenVINO-INT4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = OVModelForCausalLM.from_pretrained(
model_id,
device="CPU",
)
messages = [
{
"role": "system",
"content": "You are a computer science assistant."
},
{
"role": "user",
"content": "Explain Floyd's cycle detection algorithm."
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False,
)
response = tokenizer.decode(
outputs[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True,
)
print(response)
```
---
# Validation
The exported model was successfully validated using:
- Intel® OpenVINO™ Runtime 2026.2.1
- Local OpenVINO inference
- Chat template support
- Greedy decoding
- Software engineering benchmark prompts
Validation confirmed successful generation of technically correct programming responses, including algorithm implementation and complexity analysis.
---
# Intended Use
This model is intended for:
- Software engineering assistance
- Computer science education
- Programming support
- Code generation
- Code review
- Debugging
- Algorithm design
- Technical documentation
- Technical question answering
---
# Model Family
The **Qwen3-4B-Computer-Science** release family currently includes:
| Model | Status |
|------|:------:|
| Transformers BF16 | ✅ |
| GGUF (Multiple Quantization Variants) | ✅ |
| AWQ | ✅ |
| MLX 4-bit | ✅ |
| MLX 8-bit | ✅ |
| MLX BF16 | ✅ |
| OpenVINO INT4 | ✅ |
Each release is maintained in its own repository with runtime-specific documentation, usage examples, integrity verification files, and configuration tailored to its target inference backend.
---
# Credits
This release builds upon the work of several open-source projects and communities:
- **Qwen Team** for the Qwen3 foundation model architecture.
- **Intel® OpenVINO™ Toolkit** for the OpenVINO Runtime and deployment framework.
- **Hugging Face** for the Transformers ecosystem and the Optimum Intel integration.
- **Optimum Intel** for OpenVINO model export and runtime integration.
This repository provides an **OpenVINO INT4 deployment** of the original **Qwen3-4B-Computer-Science** model for efficient inference on OpenVINO-supported hardware.
---
# Limitations
Like other large language models, this model may occasionally:
- Generate incorrect or incomplete code
- Hallucinate APIs or implementation details
- Produce inefficient implementations
- Misinterpret ambiguous instructions
INT4 weight compression may introduce minor quality differences compared to higher-precision variants.
All generated code should be reviewed and tested before use in production or safety-critical environments.
---
# License
This repository is distributed under the **Apache License 2.0**.
This release is an OpenVINO INT4 conversion of the original **Qwen3-4B-Computer-Science** model and retains the licensing and attribution requirements applicable to the original project.
See the included **LICENSE** file for the complete license text. |