Instructions to use gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym
- SGLang
How to use gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym 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 "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym with Docker Model Runner:
docker model run hf.co/gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym
Qwen3-1.7B — GPTQ Int4 (group_size 256, symmetric)
A 4-bit GPTQ quantization of Qwen/Qwen3-1.7B.
The model keeps the original architecture and tokenizer; only the linear weights in the
transformer blocks are quantized to 4-bit.
Quantization format
This checkpoint uses the standard packed GPTQ layout (qweight / qzeros / scales /
g_idx per quantized linear).
| field | value |
|---|---|
| method | gptq |
| bits | 4 |
| group_size | 256 |
symmetric (sym) |
true |
activation reorder (desc_act) |
false |
| checkpoint format | gptq_v2 |
| recommended backend | exllama_v2 |
| Marlin compatible | no (Marlin requires group_size 128) |
Weights are stored in the gptq_v2 convention, i.e. dequantization is
w = scale * (q - zero). Most current loaders (GPTQModel, recent AutoGPTQ, vLLM, Transformers)
read the checkpoint_format field in quantize_config.json and select the convention
automatically. Because group_size = 256, the Marlin kernel is not eligible; use the
exllama_v2 / Triton / CUDA backends instead.
How to run
Transformers + GPTQModel
from transformers import AutoTokenizer
from gptqmodel import GPTQModel
repo = "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym"
tok = AutoTokenizer.from_pretrained(repo)
model = GPTQModel.load(repo)
msgs = [{"role": "user", "content": "Explain what 4-bit quantization does, briefly."}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Transformers (AutoGPTQ backend)
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, device_map="auto")
vLLM
vllm serve gitarist/Qwen3-1.7B-GPTQ-Int4-g256-sym --quantization gptq
Evaluation
Perplexity on WikiText‑2 (raw, test split; 2048-token windows) and mean per‑token KL divergence of the quantized model's next‑token distribution against the original FP16 model, measured on the same text.
| model | WikiText‑2 PPL | ΔPPL vs FP16 | mean KL vs FP16 |
|---|---|---|---|
| Qwen3‑1.7B (FP16, reference) | 16.670 | — | 0.000 |
| this model (Int4, g256, sym) | 17.110 | +0.440 | 0.273 |
Lower is better for all columns. The 4-bit model stays within ~0.44 perplexity of the FP16 baseline.
License
Inherits the license of the base model, Qwen/Qwen3-1.7B (Apache-2.0). This is a derivative quantized artifact.
- Downloads last month
- 13