sotanengel/Qwen2.5-Coder-32B-Instruct-GPTQ-Int4
011
Qwen2.5-Coder-32B-Instruct-GPTQ-Int4
Overview
This is a quantized version of Qwen/Qwen2.5-Coder-32B-Instruct using GPTQ with Quantization Error Propagation (QEP).
Quantization Details
QEP (Quantization Error Propagation) compensates quantization errors by propagating correction terms to subsequent layers, resulting in higher accuracy than standard GPTQ.
Hardware Requirements
Note: L4 (24 GB) has been verified to run this model when usinggptqmodelwith the Marlin kernel. Thetransformers+ standard GPTQ backend may be insufficient due to peak VRAM usage.
Benchmark Results (Coding Tasks)
Evaluated on 6 coding prompts (2 basic / 2 intermediate / 2 advanced) using gptqmodel + Marlin kernel on NVIDIA L4 (24 GB).
Performance Summary
Task-level Quality
Overall Assessment
Summary: Sufficient for draft and boilerplate generation. Algorithm fixes and strict correctness require human review or automated tests.
Runtime Notes
- Marlin JIT compilation requires
CUDA_HOMEand the CUDA toolkit to be present on the first run. - CPU fallback is disabled (fail-fast) — a GPU is required.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"sotanengel/Qwen2.5-Coder-32B-Instruct-GPTQ-Int4",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(
"sotanengel/Qwen2.5-Coder-32B-Instruct-GPTQ-Int4"
)
messages = [{"role": "user", "content": "Write a quicksort in Python."}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))gptqmodel + Marlin (recommended for L4)
from gptqmodel import GPTQModel
model = GPTQModel.load(
"sotanengel/Qwen2.5-Coder-32B-Instruct-GPTQ-Int4",
device="cuda:0",
)Deployment Options
- vLLM: OpenAI-compatible API server
- SGLang: High-performance LLM serving
- Docker Model Runner: Containerized deployment
License
Apache 2.0 (same as original model)
Credits
- Original Model: Qwen/Qwen2.5-Coder-32B-Instruct by Qwen Team / Alibaba Cloud
- Quantization: OneCompression by Fujitsu Ltd.
