Text Generation
Transformers
Safetensors
English
qwen3_5_text
qwen
gptq
quantized
math
causal-lm
conversational
8-bit precision
Instructions to use mssfj/Qwen3.5-9B-GPTQ-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mssfj/Qwen3.5-9B-GPTQ-INT8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mssfj/Qwen3.5-9B-GPTQ-INT8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mssfj/Qwen3.5-9B-GPTQ-INT8") model = AutoModelForCausalLM.from_pretrained("mssfj/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 mssfj/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 "mssfj/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": "mssfj/Qwen3.5-9B-GPTQ-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mssfj/Qwen3.5-9B-GPTQ-INT8
- SGLang
How to use mssfj/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 "mssfj/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": "mssfj/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 "mssfj/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": "mssfj/Qwen3.5-9B-GPTQ-INT8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mssfj/Qwen3.5-9B-GPTQ-INT8 with Docker Model Runner:
docker model run hf.co/mssfj/Qwen3.5-9B-GPTQ-INT8
File size: 1,699 Bytes
847048e 1a0637f 847048e aa84aea 847048e 0d158cf 847048e aa84aea 847048e aa84aea 847048e aa84aea 847048e aa84aea 847048e aa84aea 847048e aa84aea | 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 | ---
language:
- en
license: apache-2.0
base_model: Qwen/Qwen3.5-9B
tags:
- qwen
- gptq
- quantized
- math
- causal-lm
library_name: transformers
pipeline_tag: text-generation
---
# 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-103K` split `train`
- Max calibration samples: 128
- Max sequence length: 16384
## Reproduction
```bash
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.
- `vLLM` loads this checkpoint as `gptq_marlin`.
|