Llama.cpp imatrix quantizations of Qwen/QwQ-32B-Preview

Using llama.cpp commit 3ad5451 for quantization.

All quants were made using the imatrix option and Bartowski's calibration file.


Perplexity table (the lower the better)

Quant Size (MB) PPL Size (%) Accuracy (%) PPL error rate
IQ1_S 6937 10.7622 11.10 54.42 0.15
IQ1_M 7564 9.2039 12.10 63.64 0.13
IQ2_XXS 8610 7.5917 13.78 77.15 0.11
IQ2_XS 9496 7.1233 15.19 82.23 0.10
IQ2_S 9906 7.0558 15.85 83.01 0.10
IQ2_M 10742 6.7367 17.19 86.95 0.09
Q2_K_S 10955 6.9707 17.53 84.03 0.10
Q2_K 11742 6.7073 18.79 87.33 0.09
IQ3_XXS 12244 6.3673 19.59 91.99 0.09
IQ3_XS 13070 6.2584 20.91 93.59 0.08
Q3_K_S 13725 6.2372 21.96 93.91 0.08
IQ3_S 13768 6.1756 22.03 94.85 0.08
IQ3_M 14124 6.1781 22.60 94.81 0.08
Q3_K_M 15196 6.0711 24.31 96.48 0.08
Q3_K_L 16448 6.0467 26.32 96.87 0.08
IQ4_XS 16873 5.9536 27.00 98.38 0.08
IQ4_NL 17816 5.9556 28.51 98.35 0.08
Q4_0 17844 5.9980 28.55 97.65 0.08
Q4_K_S 17914 5.9378 28.66 98.64 0.08
Q4_K_M 18931 5.9273 30.29 98.82 0.08
Q4_1 19683 5.9349 31.49 98.69 0.08
Q5_K_S 21589 5.8895 34.54 99.45 0.08
Q5_0 21657 5.9057 34.65 99.18 0.08
Q5_K_M 22184 5.8872 35.49 99.49 0.08
Q5_1 23495 5.8896 37.59 99.45 0.08
Q6_K 25640 5.8667 41.02 99.84 0.08
Q8_0 33207 5.8646 53.13 99.88 0.08
F16 62499 5.8574 100 100 0.08

QwQ-32B-Preview

Introduction

QwQ-32B-Preview is an experimental research model developed by the Qwen Team, focused on advancing AI reasoning capabilities. As a preview release, it demonstrates promising analytical abilities while having several important limitations:

  1. Language Mixing and Code-Switching: The model may mix languages or switch between them unexpectedly, affecting response clarity.
  2. Recursive Reasoning Loops: The model may enter circular reasoning patterns, leading to lengthy responses without a conclusive answer.
  3. Safety and Ethical Considerations: The model requires enhanced safety measures to ensure reliable and secure performance, and users should exercise caution when deploying it.
  4. Performance and Benchmark Limitations: The model excels in math and coding but has room for improvement in other areas, such as common sense reasoning and nuanced language understanding.

Specification:

  • Type: Causal Language Models
  • Training Stage: Pretraining & Post-training
  • Architecture: transformers with RoPE, SwiGLU, RMSNorm, and Attention QKV bias
  • Number of Parameters: 32.5B
  • Number of Paramaters (Non-Embedding): 31.0B
  • Number of Layers: 64
  • Number of Attention Heads (GQA): 40 for Q and 8 for KV
  • Context Length: Full 32,768 tokens

For more details, please refer to our blog. You can also check Qwen2.5 GitHub, and Documentation.

Requirements

The code of Qwen2.5 has been in the latest Hugging face transformers and we advise you to use the latest version of transformers.

With transformers<4.37.0, you will encounter the following error:

KeyError: 'qwen2'

Quickstart

Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/QwQ-32B-Preview"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "How many r in strawberry."
messages = [
    {"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]

Citation

If you find our work helpful, feel free to give us a cite.

@misc{qwq-32b-preview,
    title = {QwQ: Reflect Deeply on the Boundaries of the Unknown},
    url = {https://qwenlm.github.io/blog/qwq-32b-preview/},
    author = {Qwen Team},
    month = {November},
    year = {2024}
}

@article{qwen2,
      title={Qwen2 Technical Report}, 
      author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
      journal={arXiv preprint arXiv:2407.10671},
      year={2024}
}
Downloads last month
271
GGUF
Model size
32.8B params
Architecture
qwen2

1-bit

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and HF Inference API was unable to determine this model’s pipeline type.

Model tree for ThomasBaruzier/QwQ-32B-Preview-GGUF

Base model

Qwen/Qwen2.5-32B
Quantized
(126)
this model

Collection including ThomasBaruzier/QwQ-32B-Preview-GGUF