Text Generation
Transformers
Safetensors
qwen3
awq
quantized
2-bit
conversational
text-generation-inference
8-bit precision
compressed-tensors
Instructions to use yw223/Qwen3-8B-AWQ-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yw223/Qwen3-8B-AWQ-2bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yw223/Qwen3-8B-AWQ-2bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yw223/Qwen3-8B-AWQ-2bit") model = AutoModelForCausalLM.from_pretrained("yw223/Qwen3-8B-AWQ-2bit") 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 yw223/Qwen3-8B-AWQ-2bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yw223/Qwen3-8B-AWQ-2bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yw223/Qwen3-8B-AWQ-2bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yw223/Qwen3-8B-AWQ-2bit
- SGLang
How to use yw223/Qwen3-8B-AWQ-2bit 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 "yw223/Qwen3-8B-AWQ-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-AWQ-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-AWQ-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-AWQ-2bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yw223/Qwen3-8B-AWQ-2bit with Docker Model Runner:
docker model run hf.co/yw223/Qwen3-8B-AWQ-2bit
Qwen3-8B AWQ 2-bit
This repository contains an AWQ-style weight-only quantized derivative of Qwen/Qwen3-8B.
Quantization
- Method: AWQ
- Weight bits: 2
- Activation precision: 16-bit
- Scheme: W2A16 asymmetric group quantization
- Group size: 128
- Calibration dataset:
c4 - Backend path: Hugging Face
transformers+llm-compressor - Experimental low-bit AWQ: yes
Validation
Validation has not been run yet.
License and Use
This model is derived from Qwen/Qwen3-8B and is released under the Apache 2.0 license. Use and redistribution must comply with the upstream model license and Hugging Face model terms.
Run Metadata
{
"activation_dtype": "float16_or_bfloat16",
"base_model": "Qwen/Qwen3-8B",
"bits": 2,
"config": "/nas/longleaf/home/yuanwu/Bias_Compressed_LLM/Quantization/AWQ/configs/qwen3_8b.yaml",
"created_at": "2026-06-22T08:00:12.160687+00:00",
"elapsed_seconds": 831.79,
"environment": {
"cuda_available": true,
"cuda_devices": [
{
"capability": "8.9",
"index": 0,
"name": "NVIDIA L40S",
"total_memory_gb": 44.39
}
],
"platform": "Linux-5.14.0-611.16.1.el9_7.x86_64-x86_64-with-glibc2.34",
"python": "3.10.20",
"torch": "2.11.0+cu130",
"torch_cuda": "13.0"
},
"experimental_low_bit_awq": true,
"method": "AWQ",
"output_dir": "/users/y/u/yuanwu/Bias_Compressed_LLM/awq_outputs/Qwen3-8B-AWQ-2bit",
"scheme": "W2A16"
}
- Downloads last month
- 27