Llama.cpp hybrid layer quantization of Qwen2.5-Omni-3B by Qwen
Original model: https://huggingface.co/Qwen/Qwen2.5-Omni-3B
The hybrid quant employs different quantization levels on a per layer basis to enable both high performance and small file size at the same time. This particular quant achieves a ~3G gguf with the same perplexity as a ~3.6G Q8_0 GGUF. The quants employed are all K to avoid slow CPU or older GPU processing of IQ quants. For this file the Q8_0_H layer quants are as follows:
Q5_K_L : attn_v = q8_0 attn_o = q6_k ffn_d = q6_k
Q6_K_S : Q6_K
Q6_K_M : attn_v = q8_0 ffn_d = q8_0
Q6_K_L : attn_v = q8_0 attn_o = q8_0 ffn_d = q8_0
LAYER_TYPES='[
[0 ,"Q8_0" ],[1 ,"Q6_K_L"],[2 ,"Q6_K_M"],[3 ,"Q6_K_S"],[4 ,"Q5_K_L"],[5 ,"Q5_K_M"],[6 ,"Q5_K_L"],
[7 ,"Q6_K_S"],[8 ,"Q5_K_L"],[9 ,"Q6_K_S"],[10,"Q5_K_L"],[11,"Q6_K_S"],[12,"Q5_K_L"],[13,"Q6_K_S"],
[14,"Q6_K_M"],[15,"Q6_K_S"],[16,"Q6_K_M"],[17,"Q6_K_S"],[18,"Q6_K_M"],[19,"Q6_K_S"],[20,"Q6_K_M"],
[21,"Q6_K_M"],[22,"Q6_K_L"],[23,"Q6_K_M"],[24,"Q6_K_L"],[25,"Q6_K_M"],[26,"Q6_K_L"],[27,"Q8_0" ]
]'
FLAGS="--token-embedding-type Q8_0 --output-tensor-type Q8_0 --layer-types-high"
A Q6_K_H quant is also available:
Q5_K_L : attn_v = q8_0 attn_o = q6_k ffn_d = q6_k
Q6_K_S : Q6_K
Q6_K_M : attn_v = q8_0 ffn_d = q8_0
Q6_K_L : attn_v = q8_0 attn_o = q8_0 ffn_d = q8_0
LAYER_TYPES='[
[0 ,"Q6_K_L"],[1 ,"Q6_K_M"],[2 ,"Q6_K_S"],[3 ,"Q5_K_L"],[4 ,"Q5_K_M"],[5 ,"Q5_K_M"],[6 ,"Q5_K_M"],
[7 ,"Q5_K_L"],[8 ,"Q5_K_M"],[9 ,"Q5_K_L"],[10,"Q5_K_M"],[11,"Q5_K_L"],[12,"Q5_K_M"],[13,"Q5_K_L"],
[14,"Q6_K_S"],[15,"Q5_K_L"],[16,"Q6_K_S"],[17,"Q5_K_L"],[18,"Q6_K_S"],[19,"Q5_K_L"],[20,"Q6_K_S"],
[21,"Q6_K_M"],[22,"Q6_K_S"],[23,"Q6_K_M"],[24,"Q6_K_S"],[25,"Q6_K_M"],[26,"Q6_K_M"],[27,"Q6_K_L"]
]'
FLAGS="--token-embedding-type Q6_K --output-tensor-type Q6_K --layer-types-high"
A Q4_K_H quant is also available:
Q4_K_L : Q4_K_M + attn_o = q6_k
Q5_K_L : attn_v = q8_0 attn_o = q6_k ffn_d = q6_k
Q6_K_S : Q6_K
LAYER_TYPES='[
[0 ,"Q6_K_S"],[1 ,"Q5_K_L"],[2 ,"Q5_K_M"],[3 ,"Q5_K_S"],[4 ,"Q4_K_L"],[5 ,"Q4_K_M"],[6 ,"Q4_K_S"],
[7 ,"Q4_K_S"],[8 ,"Q4_K_S"],[9 ,"Q4_K_S"],[10,"Q4_K_S"],[11,"Q4_K_S"],[12,"Q4_K_S"],[13,"Q4_K_S"],
[14,"Q4_K_M"],[15,"Q4_K_S"],[16,"Q4_K_M"],[17,"Q4_K_S"],[18,"Q4_K_M"],[19,"Q4_K_S"],[20,"Q4_K_M"],
[21,"Q4_K_S"],[22,"Q4_K_M"],[23,"Q4_K_L"],[24,"Q5_K_S"],[25,"Q5_K_M"],[26,"Q5_K_L"],[27,"Q6_K_S"]
]'
FLAGS="--token-embedding-type Q4_K --output-tensor-type Q6_K --layer-types-high"
Comparison:
| Quant | size | PPL | Comment |
|---|---|---|---|
| IQ4_XS | 1.9e9 | 9.9 | - |
| Q4_K_H | 2.2e9 | 9.9 | Q4_K embedding Q6_K output |
| Q6_K | 2.8e9 | 9.8 | - |
| Q6_K_H | 2.7e9 | 9.9 | Q6_K embedding Q6_K output |
| Q8_0 | 3.6e9 | 9.7 | Q8_0 with default embedding and output |
| Q8_0_H | 3e9 | 9.7 | Hybrid quant with Q8_0 embedding Q8_0 output |
Usage:
Qwen2.5-Omni-3B is a vision and audio capable model. It can be used together with its multimedia projector layers to process images, audio, and text inputs and generate text outputs. The mmproj file is made available in this repository. To test vision and/or audio mode follow the docs in the mtmd readme in the tools directory of the source tree https://github.com/ggml-org/llama.cpp/blob/master/tools/mtmd/README.md .
Llama.cpp minimum version to run Qwen2.5-Omni series should be 6915 with recommended 7003 and above.
Benchmarks:
A full set of audio and vision benchmarks with corrected inference for Qwen2.5 Omni are given here: https://huggingface.co/spaces/steampunque/benchlm
Download the file from below:
| Link | Type | Size/e9 B | Notes |
|---|---|---|---|
| Qwen2.5-Omni-3B.Q4_K_H.gguf | Q4_K_H | 2.2e9 B | - |
| Qwen2.5-Omni-3B.Q6_K_H.gguf | Q6_K_H | 2.7e9 B | - |
| Qwen2.5-Omni-3B.Q8_0_H.gguf | Q8_0_H | 3e9 B | 0.6B smaller than Q8_0 |
| Qwen2.5-Omni-3B.mmproj.gguf | F16 | 2.62e9 B | multimedia projector |
A discussion thread about the hybrid layer quant approach can be found here on the llama.cpp git repository:
- Downloads last month
- 69
6-bit
8-bit
Model tree for steampunque/Qwen2.5-Omni-3B-Hybrid-GGUF
Base model
Qwen/Qwen2.5-Omni-3B