Text Generation
Transformers
Safetensors
English
qwen3_5_text
qwen
gptq
quantized
math
causal-lm
conversational
8-bit precision
Instructions to use lullyli/Qwen3.5-9B-GPTQ-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lullyli/Qwen3.5-9B-GPTQ-INT8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lullyli/Qwen3.5-9B-GPTQ-INT8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("lullyli/Qwen3.5-9B-GPTQ-INT8") model = AutoModelForMultimodalLM.from_pretrained("lullyli/Qwen3.5-9B-GPTQ-INT8") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lullyli/Qwen3.5-9B-GPTQ-INT8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lullyli/Qwen3.5-9B-GPTQ-INT8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lullyli/Qwen3.5-9B-GPTQ-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lullyli/Qwen3.5-9B-GPTQ-INT8
- SGLang
How to use lullyli/Qwen3.5-9B-GPTQ-INT8 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 "lullyli/Qwen3.5-9B-GPTQ-INT8" \ --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": "lullyli/Qwen3.5-9B-GPTQ-INT8", "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 "lullyli/Qwen3.5-9B-GPTQ-INT8" \ --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": "lullyli/Qwen3.5-9B-GPTQ-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lullyli/Qwen3.5-9B-GPTQ-INT8 with Docker Model Runner:
docker model run hf.co/lullyli/Qwen3.5-9B-GPTQ-INT8
Qwen3.5-9B-GPTQ-INT8
This model is a GPTQ-quantized version of Qwen/Qwen3.5-9B with a normalized text-only config.json.
Quantization
- Method: GPTQ
- Bits: 8
- Group size: 128
- desc_act: False
- damp_percent: 0.1
- Calibration preset: math_qa_cot
- Calibration dataset:
zwhe99/DeepMath-103Ksplittrain - Max calibration samples: 128
- Max sequence length: 16384
Reproduction
uv run python quantization/quantize_qwen35_9b_gptq.py \
--model-name Qwen/Qwen3.5-9B \
--output-dir /workspace/lowbit-math-reasoning/experiments/models/Qwen3.5-9B-GPTQ-INT8 \
--dataset-name zwhe99/DeepMath-103K \
--dataset-config '' \
--dataset-split train \
--calibration-preset math_qa_cot \
--question-column question \
--answer-column r1_solution_1 \
--text-column r1_solution_1 \
--max-calibration-samples 128 \
--max-seq-len 16384 \
--bits 8 \
--group-size 128 \
--damp-percent 0.1
The current quantization script rewrites config.json after save_pretrained() so the exported checkpoint uses the same text-only qwen3_5_text layout as the working INT4 checkpoint.
Validation
This normalized-config checkpoint was re-evaluated on GSM8K and matched the original INT8 accuracy while improving throughput substantially.
- Original INT8: EM 0.96, 105.98 tok/s
- Fixed-config INT8: EM 0.96, 150.84 tok/s
Notes
- This repository contains quantized weights only.
- The checkpoint is intended for text-only evaluation.
vLLMloads this checkpoint asgptq_marlin.
- Downloads last month
- 28