How to use from
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 "yw223/Qwen3-8B-OmniQuant-2bit" \
    --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": "yw223/Qwen3-8B-OmniQuant-2bit",
		"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 "yw223/Qwen3-8B-OmniQuant-2bit" \
        --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": "yw223/Qwen3-8B-OmniQuant-2bit",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

Qwen3-8B-OmniQuant-2bit

This repository contains a W2A16 OmniQuant checkpoint derived from Qwen/Qwen3-8B.

Quantization configuration

  • Method: OmniQuant
  • Weight precision: 2-bit
  • Activation precision: 16-bit
  • Group size: 128
  • Optimization epochs: 40
  • Learnable weight clipping (LWC): enabled
  • Learnable equivalent transformation (LET): disabled
  • Calibration dataset: C4 English validation split
  • Calibration samples: 128
  • Calibration sequence length: 512
  • Calibration seed: 42

Evaluation

Dataset Split Sequence length Perplexity
WikiText2 test 2048 39.6147

The evaluation used the full tokenized WikiText2 test corpus with non-overlapping 2048-token windows.

Checkpoint format

This follows OmniQuant's fake-quantized Hugging Face save path. It is not a packed low-bit runtime checkpoint, so its storage and loading memory can remain close to FP16 despite representing W2A16 quantized weights.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "yw223/Qwen3-8B-OmniQuant-2bit"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

Transformers may report unused weight_quantizer.scales and weight_quantizer.zeros entries when loading. The fake-quantized model weights still load through the standard Transformers path used for the reported PPL.

License

Use of this checkpoint is subject to the license and terms of the base model.

Downloads last month
7
Safetensors
Model size
8B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yw223/Qwen3-8B-OmniQuant-2bit

Finetuned
Qwen/Qwen3-8B
Finetuned
(1993)
this model

Dataset used to train yw223/Qwen3-8B-OmniQuant-2bit