Instructions to use DemoAuguste/Qwen3.8-27B-Quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DemoAuguste/Qwen3.8-27B-Quant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DemoAuguste/Qwen3.8-27B-Quant") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DemoAuguste/Qwen3.8-27B-Quant") model = AutoModelForMultimodalLM.from_pretrained("DemoAuguste/Qwen3.8-27B-Quant", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DemoAuguste/Qwen3.8-27B-Quant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DemoAuguste/Qwen3.8-27B-Quant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DemoAuguste/Qwen3.8-27B-Quant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DemoAuguste/Qwen3.8-27B-Quant
- SGLang
How to use DemoAuguste/Qwen3.8-27B-Quant 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 "DemoAuguste/Qwen3.8-27B-Quant" \ --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": "DemoAuguste/Qwen3.8-27B-Quant", "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 "DemoAuguste/Qwen3.8-27B-Quant" \ --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": "DemoAuguste/Qwen3.8-27B-Quant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DemoAuguste/Qwen3.8-27B-Quant with Docker Model Runner:
docker model run hf.co/DemoAuguste/Qwen3.8-27B-Quant
Qwen3.8-27B ยท SLQ 4.75 bpp๏ผGSM8K + MMLU ๆ ๆ๏ผ
ๆฌไปๅบๆฏ Qwen/Qwen3.8-27B ็ SLQ๏ผStatistically-Lossless Quantization๏ผๆททๅ็ฒพๅบฆๆ้๏ผ ๅบไบ IST-DASLab/SLQ ๅฎๆนๆตๆฐด็บฟ๏ผGPTQ ้ๅฑ่ฏฏๅทฎ่กฅๅฟ๏ผๅจ Ascend 910B3 NPU ไธๅฎๆ้ๅ๏ผๅนถ้ๅฏน GSM8K ้ฟ้พๆจ็ไธ MMLU ็ฅ่ฏ้ขๅไบๆ กๅ้้ๆไธ่ฏฏๅทฎ้ฉฑๅจไฝๅฎฝๅ้ ใ
- ๅนณๅไฝๅฎฝ๏ผๅไน 4.594 bpp๏ผๅซ group=128 ็ scale/zero ๅผ้ๅ 4.7505 bpp๏ผๅๆฐๅ ๆ๏ผ
- ๆ้ๆ ผๅผ๏ผfake-quant๏ผBF16 ๅญๅจไบ้ๅฏน็งฐ INT ๆดๆฐๆ ผ็น๏ผๅฝๅ checkpoint ไปๆฏ BF16 ไฝ็งฏ๏ผ ็ INT ๆๅ ๅ็่ฎบไฝ็งฏ โ20.9 GB๏ผ็บฆ 2.6ร ๅ็ผฉ๏ผ
- ่ฏๆต็ป่ฎบ๏ผๅ จ้๏ผไธ BF16 ๅไธ่ฏๆตๅ่ฎฎใ้ ๅฏนๆฃ้ช๏ผ๏ผ
| ๆฐๆฎ้ | ๆฌๆจกๅ | BF16 | ฮ | ๆขๅค็ | McNemar p |
|---|---|---|---|---|---|
| GSM8K test 1319๏ผ8-shot CoT, greedy๏ผ | 96.513% | 96.285% | +0.227 pp | 100.24% | 0.629 |
| MMLU test 14042๏ผ5-shot๏ผ | 84.553% | 84.774% | โ0.221 pp | 99.74% | 0.093 |
ไธ้กน้ขๆณจๅๅคๅฎ๏ผฮ โฅ โ0.5 ppใๆขๅค็ โฅ 99.5%ใMcNemar p > 0.05๏ผๅจไธคไธชๆฐๆฎ้ไธๅ้่ฟ๏ผ่ฏฆ่ง evaluation.mdใ
้ๅ้ ็ฝฎ
- ๆนๆณ๏ผSLQ ๅฎๆนๅ้ถๆฎตๆตๆฐด็บฟ + GPTQ๏ผๅๅฑ Hessianใcal_bits=4 ๅบ่ดฏไผ ๆญใgroup_size=128ใ้ๅฏน็งฐ INT๏ผ
- ๆ กๅ้๏ผ262,144 tokens / 32ร8192๏ผ๏ผๆฐๅญฆ CoT 43.75%๏ผๅซไธ่ฏๆตๅๆ็ 8-shot prompt๏ผใMMLU-auxiliary 21.88%ใ FineWeb-Edu 28.12%ใ้ฟๆ 6.25%
- ไฝๅฎฝๅ้ ๏ผMLP๏ผgate/up/down๏ผ4-bit๏ผๅ ถไฝๆๅฝฑ๏ผq/k/v/oใin_proj_qkv/a/b/zใout_proj๏ผ6-bit ๏ผ496 ไธช็บฟๆงๅฑ๏ผ192 ร 4-bitใ304 ร 6-bit๏ผembedding / lm_head / norm / ่ง่งๅกไธ้ๅ๏ผ
quantization_config.txtไธบ้ๅฑไฝๅฎฝ้ ็ฝฎ๏ผlayer_name: bits๏ผ
ไฝฟ็จ
ๆจ่็จ vLLM-Ascend v0.30.0๏ผ่ฏฅๆถๆ Qwen3_5ForConditionalGeneration ้่ฆๅฏนๅบ็ๆฌ๏ผ๏ผ
vllm serve DemoAuguste/Qwen3.8-27B-Quant \
--trust-remote-code --dtype bfloat16 \
--max-model-len 4096 --tensor-parallel-size 2
transformers ็ดๆฅๅ ่ฝฝๆถๆณจๆๆ config.json ็ architectures ้ๆฉ็ฑป๏ผVLM๏ผQwen3_5ForConditionalGeneration๏ผ๏ผ
AutoModelForCausalLM ๅฏ่ฝ่งฃๆๅฐไธๅซ language_model. ๅ็ผ็็ฑป่้้ปๅ ่ฝฝ้ๆบๆ้ใ
่ฏๆตๅฃๅพ๏ผไธ BF16 ๅฏนๆฏ๏ผ
- ๅไธๆจ็้ๅใTP=2ใthinking ๅ
ณ้ญใgreedy๏ผGSM8K 8-shot CoT๏ผlm-eval
gsm8k_cot_llama้ๅญ prompt๏ผ๏ผ MMLU 5-shot letter log-prob ๆๅ๏ผ้้ข็ปๆไธ้ ๅฏน bootstrap/McNemar ่งevaluation.md - ไฝๅฎฝ-็ฒพๅบฆๅๆฒฟ๏ผGSM8K / MMLU๏ผ๏ผ3.6 bpp โ 94.390% / 79.625%๏ผ3.8 โ 95.982% / 82.552%๏ผ 4.0 โ 95.906% / 83.457%๏ผ4.156 โ 96.133% / 84.105%๏ผ4.7505 โ 96.513% / 84.553%๏ผๆฌๆจกๅ๏ผ
้ๅถ
- ๅฝๅไธบ fake-quant checkpoint๏ผBF16 ๅญๅจๆดๆฐๆ ผ็น๏ผ๏ผๅ ๆญคๅฐๆ ๅฎ้ ๆพๅญ/ๅญๅจๆถ็๏ผ INT ๆๅ ไธๅฏนๅบ kernel ๅ ่ฝฝๆฏๅ็ปญๅทฅไฝใ
- ่ฏๆตไป ่ฆ็ GSM8K ไธ MMLU๏ผๅ ถไปไปปๅก๏ผไปฃ็ ใ้ฟไธไธๆใๅคๆจกๆ๏ผๆช้ช่ฏใ
- ๆ กๅ้ๆททๅไบๅ ฌๅผ่ฏๆต้็่ฎญ็ปไพงๆฐๆฎ๏ผGSM8K trainใMATH-500ใMMLU auxiliary_train๏ผ๏ผๆชไฝฟ็จ GSM8K/MMLU test ๆฐๆฎใ
Citation
@inproceedings{helcig2026slq,
title = {Statistically-Lossless Quantization of Large Language Models},
author = {Michael Helcig and Eldar Kurtic and Dan Alistarh},
booktitle = {Conference on Language Modeling (COLM)},
year = {2026},
}
Base model: Qwen/Qwen3.8-27Bใ
- Downloads last month
- 208
Model tree for DemoAuguste/Qwen3.8-27B-Quant
Base model
Qwen/Qwen3.8-27B