Text Generation
GGUF
English
quant
experimental
conversational
eaddario commited on
Commit
91102f2
·
verified ·
1 Parent(s): 66279ab

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +55 -56
README.md CHANGED
@@ -14,7 +14,7 @@ tags:
14
  - experimental
15
  ---
16
 
17
- # Experimental GGUF quantized versions of deepseek-ai/DeepSeek-R1-Distill-Llama-8B
18
 
19
  Using [LLaMA C++](<https://github.com/ggerganov/llama.cpp>) release [b4930](<https://github.com/ggerganov/llama.cpp/releases/tag/b4930>) for quantization.
20
 
@@ -29,11 +29,9 @@ From the original model creators:
29
 
30
  An area of personal interest is finding ways to optimize the inference performance of LLMs when deployed in resource-constrained environments like commodity hardware, desktops, laptops, mobiles, edge devices, etc. There are many approaches to accomplish this, including architecture simplification and knowledge distillation, but my focus has been primarily on quantization and pruning.
31
 
32
- The method that I'm using to produce these experimental versions is explained in [Squeezing Tensor Bits: the quest for smaller LLMs](https://medium.com/@eaddario/squeezing-tensor-bits-the-quest-for-smaller-llms-86b23bd052ca), but at a high level it involves using a custom version of the `llama-quantize` tool to selectively quantize different tensors at different levels.
33
 
34
- There’re two pull requests ([#12511](https://github.com/ggml-org/llama.cpp/pull/12511) & [#12512](https://github.com/ggml-org/llama.cpp/pull/12512)) to merge these changes back into the core llama.cpp project. This may or may not ever happen but until then, the modified version will be available on my [GitHub](https://github.com/EAddario/llama.cpp).
35
-
36
- In addition to [llama-quantize](https://github.com/EAddario/llama.cpp/tree/quantize), there’s a version of [llama-perplexity](https://github.com/EAddario/llama.cpp/tree/perplexity) that allows you to continue generating test scores even if there’s a context window overflow (original behaviour is to stop).
37
 
38
  For testing and comparison I use models produced by [Unsloth](<https://huggingface.co/unsloth>) ([Daniel and Michael Han](<https://unsloth.ai/>) do some really advanced level stuff!) and [Bartowski](<https://huggingface.co/bartowski>) (see credits below).
39
 
@@ -44,47 +42,48 @@ The process to generate these models is roughly as follows:
44
  1. Convert the the original model's tensors to [GGUF](<https://huggingface.co/docs/hub/en/gguf>) F16*
45
  2. Estimate the Perplexity score for the F16 model (baseline) using the [wikitext-2-raw-v1](<https://huggingface.co/datasets/Salesforce/wikitext/tree/main/wikitext-2-raw-v1>) dataset, and save the [logits](<https://huggingface.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF/tree/main/logits>)
46
  3. Generate an [imatrix](<https://huggingface.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF/tree/main/imatrix>) from selected calibration datasets
47
- 4. Select an appropiate quant level for each tensor using a modified version of `llama-quantize`
48
- 5. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande scores for each quantized model
49
- 6. Keep versions with the best scores
50
- 7. Repeat until all desired quants are created. I find that quantizations below Q3/IQ3 are not fit for my purposes and therefore do not usually generate them, but happy to provide other quants on request.
 
51
 
52
  *[BF16](<https://en.wikipedia.org/wiki/Bfloat16_floating-point_format>) would be preferred, but Apple's GPUs don't support it yet, and therefore any operations are executed in the CPU, making it unacceptably slow. This is expected to change in the near term but until then, if you are using Apple kit avoid using any models tagged BF16
53
 
54
  # Models
55
 
56
  ### Sizes (in GB)
57
- | Model | Bartowski | Unsloth | Repo | Shrinkage |
58
- |-----------------------------------------------------------------------------------|----------:|---------|------:|----------:|
59
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 3.78 | N/A | 3.48 | 7.9% |
60
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | N/A | N/A | 3.24 | N/A |
61
- | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 4.68 | N/A | 4.30 | 8.1% |
62
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 4.32 | N/A | 3.45 | 20.1% |
63
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 4.02 | 4.02 | 3.37 | 16.2% |
64
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 3.66 | N/A | 3.28 | 10.4% |
65
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.92 | 4.92 | 4.44 | 9.8% |
66
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 4.69 | N/A | 4.31 | 8.1% |
67
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 5.73 | 5.73 | 5.35 | 6.6% |
68
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 5.60 | N/A | 5.19 | 7.3% |
69
- | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 6.60 | 6.60 | 6.17 | 6.5% |
70
- | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 8.54 | 8.54 | 7.84 | 8.2% |
71
 
72
  ### Perplexity and KL Divergence scores
73
- | Model | μPPL | 𝜌PPL | μKLD | RMS Δp |
74
- |-----------------------------------------------------------------------------------|--------------------:|-------:|-------------------:|--------------:|
75
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 18.513609 ±0.156607 | 91.75% | 0.532214 ±0.001850 | 19.740 ±0.070 |
76
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | 19.112490 ±0.165621 | 91.50% | 0.547460 ±0.001918 | 19.434 ±0.071 |
77
- | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 16.368324 ±0.146856 | 96.44% | 0.243864 ±0.001293 | 12.434 ±0.063 |
78
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 17.319338 ±0.145208 | 92.60% | 0.477681 ±0.001783 | 18.029 ±0.069 |
79
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 17.594278 ±0.144215 | 91.45% | 0.553217 ±0.001919 | 19.812 ±0.070 |
80
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 18.458827 ±0.153192 | 90.73% | 0.602604 ±0.002075 | 20.369 ±0.072 |
81
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 14.675582 ±0.124114 | 98.02% | 0.126483 ±0.000727 | 9.254 ��0.052 |
82
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 14.635869 ±0.123593 | 97.97% | 0.130017 ±0.000732 | 9.361 ±0.053 |
83
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 14.310641 ±0.120564 | 98.83% | 0.076779 ±0.000579 | 7.195 ±0.050 |
84
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 14.305297 ±0.120363 | 98.82% | 0.077645 ±0.000576 | 7.256 ±0.049 |
85
- | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 14.223713 ±0.119989 | 98.91% | 0.071936 ±0.000599 | 6.892 ±0.051 |
86
- | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 14.249305 ±0.120101 | 98.99% | 0.066705 ±0.000592 | 6.662 ±0.052 |
87
- | [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) | 14.009216 ±0.118474 | 100% | N/A | N/A |
88
 
89
  ### ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores
90
  Scores generated using [llama-perplexity](<https://github.com/ggml-org/llama.cpp/tree/master/examples/perplexity>) with 750 tasks per test, and a context size of 768 tokens.
@@ -92,31 +91,31 @@ Scores generated using [llama-perplexity](<https://github.com/ggml-org/llama.cpp
92
  For the test data used in the generation of these scores, follow the appropiate links: [HellaSwag](<https://github.com/klosax/hellaswag_text_data>), [ARC, MMLU, Truthful QA](<https://huggingface.co/datasets/ikawrakow/validation-datasets-for-llama.cpp/tree/main>) and [WinoGrande](<https://huggingface.co/datasets/ikawrakow/winogrande-eval-for-llama.cpp/tree/main>)
93
 
94
  | Model | ARC | HellaSwag | MMLU | Truthful QA | WinoGrande | Avg Score |
95
- |---------------------------------------------------------------------------------------------------------------------|----------------:|----------:|----------------:|----------------:|----------------:|----------:|
96
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 51.3369 ±1.8288 | 69.33 | 32.9333 ±1.7172 | 32.2981 ±2.6100 | 64.2667 ±1.7510 | 50.03 |
97
- | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | 48.1928 ±1.8294 | 66.67 | 34.5333 ±1.7374 | 31.1321 ±2.6007 | 65.2000 ±1.7405 | 49.15 |
98
- | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 51.8072 ±1.8294 | 72.00 | 36.6667 ±1.7608 | 32.1212 ±2.5743 | 65.3333 ±1.7389 | 51.59 |
99
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 51.4056 ±1.8299 | 65.20 | 34.5333 ±1.7374 | 33.8509 ±2.6412 | 68.0000 ±1.7045 | 50.60 |
100
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 51.5395 ±1.8298 | 70.13 | 34.4000 ±1.7358 | 31.3665 ±2.5897 | 66.1333 ±1.7292 | 50.71 |
101
- | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 50.8021 ±1.8292 | 71.20 | 31.3333 ±1.6949 | 34.5679 ±2.6462 | 67.4667 ±1.7119 | 51.07 |
102
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 52.8782 ±1.8276 | 74.40 | 35.7333 ±1.7510 | 34.0625 ±2.6534 | 67.4667 ±1.7119 | 52.91 |
103
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 50.3347 ±1.8306 | 74.40 | 34.8000 ±1.7405 | 37.1069 ±2.7133 | 69.4667 ±1.6828 | 53.22 |
104
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-unsloth](https://huggingface.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF) | 52.4766 ±1.8284 | 73.20 | 33.2000 ±1.7207 | 36.0000 ±2.6667 | 68.4000 ±1.6988 | 52.66 |
105
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 50.2008 ±1.8306 | 74.93 | 34.1333 ±1.7325 | 34.6875 ±2.6650 | 66.9333 ±1.7190 | 52.18 |
106
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 53.6096 ±1.8246 | 72.66 | 34.6667 ±1.7389 | 35.7798 ±2.6549 | 66.0000 ±1.7309 | 52.54 |
107
- | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 53.2798 ±1.8267 | 75.33 | 35.2000 ±1.7451 | 36.3354 ±2.6845 | 68.8000 ±1.6929 | 53.79 |
108
- | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 51.8717 ±1.8281 | 76.00 | 33.3333 ±1.7225 | 35.1852 ±2.6571 | 68.6667 ±1.6949 | 53.01 |
109
- | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 51.9359 ±1.8268 | 72.00 | 33.4667 ±1.7242 | 35.0000 ±2.6705 | 68.6667 ±1.6949 | 52.21 |
110
- | [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) | 51.4706 ±1.8286 | 72.93 | 36.1333 ±1.7553 | 36.1111 ±2.6726 | 68.8000 ±1.6929 | 53.09 |
111
 
112
  ### Tokens per Second - Benchmarks
113
  Scores generated using [llama-bench](https://github.com/ggml-org/llama.cpp/tree/master/examples/llama-bench). Q4_K_M quantizations from [Bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF/tree/main) and [Unsloth](https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-7B-GGUF/tree/main) included for comparison.
114
 
115
  | model | size | params | backend | threads | test | t/s |
116
- |---------------------------------------------------------------------------------------------------------------------|---------:|-------:|------------|--------:|--------------:|--------------:|
117
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 330.94 ± 1.42 |
118
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 26.28 ± 0.11 |
119
- | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 42.90 ± 0.05 |
120
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 329.03 ± 0.11 |
121
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 25.79 ± 0.92 |
122
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 42.35 ± 0.93 |
 
14
  - experimental
15
  ---
16
 
17
+ # Experimental layer-wise quantization of deepseek-ai/DeepSeek-R1-Distill-Llama-8B
18
 
19
  Using [LLaMA C++](<https://github.com/ggerganov/llama.cpp>) release [b4930](<https://github.com/ggerganov/llama.cpp/releases/tag/b4930>) for quantization.
20
 
 
29
 
30
  An area of personal interest is finding ways to optimize the inference performance of LLMs when deployed in resource-constrained environments like commodity hardware, desktops, laptops, mobiles, edge devices, etc. There are many approaches to accomplish this, including architecture simplification and knowledge distillation, but my focus has been primarily on quantization and pruning.
31
 
32
+ The method used to produce these experimental versions is covered in [Squeezing Tensor Bits: the quest for smaller LLMs](https://medium.com/@eaddario/squeezing-tensor-bits-the-quest-for-smaller-llms-86b23bd052ca), but at a high level it involves using custom versions of `llama-imatrix` and `llama-quantize` to identify the influential tensors, and quantize the most important layers to higher bit precision and the less important to lower bits. This process was partly inspired by Dumitru's et al [Layer-Wise Quantization: A Pragmatic and Effective Method for Quantizing LLMs Beyond Integer Bit-Levels](https://arxiv.org/abs/2406.17415).
33
 
34
+ There’re two pull requests ([imatrix](https://github.com/ggml-org/llama.cpp/pull/12718) & [quantize](https://github.com/ggml-org/llama.cpp/pull/12511)) to merge these changes back into the core llama.cpp project. This may or may not ever happen so, until then, the modified versions will be available on [GitHub](https://github.com/EAddario/llama.cpp).
 
 
35
 
36
  For testing and comparison I use models produced by [Unsloth](<https://huggingface.co/unsloth>) ([Daniel and Michael Han](<https://unsloth.ai/>) do some really advanced level stuff!) and [Bartowski](<https://huggingface.co/bartowski>) (see credits below).
37
 
 
42
  1. Convert the the original model's tensors to [GGUF](<https://huggingface.co/docs/hub/en/gguf>) F16*
43
  2. Estimate the Perplexity score for the F16 model (baseline) using the [wikitext-2-raw-v1](<https://huggingface.co/datasets/Salesforce/wikitext/tree/main/wikitext-2-raw-v1>) dataset, and save the [logits](<https://huggingface.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF/tree/main/logits>)
44
  3. Generate an [imatrix](<https://huggingface.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF/tree/main/imatrix>) from selected calibration datasets
45
+ 4. Determine tensor and layer Importance Score contribution using a modified version of `llama-imatrix`
46
+ 5. Select an appropiate quant level for each tensor using a modified version of `llama-quantize`
47
+ 6. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande scores for each quantized model
48
+ 7. Keep versions with the best scores
49
+ 8. Repeat until all desired quants are created. I find that quantizations below Q3/IQ3 are not fit for my purposes and therefore do not usually generate them, but happy to provide other quants on request.
50
 
51
  *[BF16](<https://en.wikipedia.org/wiki/Bfloat16_floating-point_format>) would be preferred, but Apple's GPUs don't support it yet, and therefore any operations are executed in the CPU, making it unacceptably slow. This is expected to change in the near term but until then, if you are using Apple kit avoid using any models tagged BF16
52
 
53
  # Models
54
 
55
  ### Sizes (in GB)
56
+ | Model | Bartowski | Unsloth | Repo | Shrinkage |
57
+ | --------------------------------------------------------------------------------- | --------: | ------- | ---: | --------: |
58
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 3.78 | N/A | 3.69 | 2.5% |
59
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | N/A | N/A | 3.43 | N/A |
60
+ | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 4.68 | N/A | 4.39 | 6.1% |
61
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 4.32 | N/A | 3.76 | 13.0% |
62
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 4.02 | 4.02 | 3.56 | 11.3% |
63
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 3.66 | N/A | 3.31 | 9.7% |
64
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.92 | 4.92 | 4.41 | 10.5% |
65
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 4.69 | N/A | 4.28 | 8.8% |
66
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 5.73 | 5.73 | 5.38 | 6.2% |
67
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 5.60 | N/A | 5.24 | 6.4% |
68
+ | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 6.60 | 6.60 | 6.57 | 0.5% |
69
+ | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 8.54 | 8.54 | 7.73 | 9.4% |
70
 
71
  ### Perplexity and KL Divergence scores
72
+ | Model | μPPL | 𝜌PPL | μKLD | RMS Δp |
73
+ | --------------------------------------------------------------------------------- | ------------------: | -----: | -----------------: | ------------: |
74
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 16.574922 ±0.145677 | 94.24% | 0.367217 ±0.001523 | 15.613 ±0.067 |
75
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | 17.505471 ±0.156184 | 92.97% | 0.465573 ±0.001748 | 17.507 ±0.069 |
76
+ | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 14.243482 ±0.113690 | 96.12% | 0.240811 ±0.001175 | 13.331 ±0.064 |
77
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 15.685298 ±0.134793 | 94.79% | 0.321187 ±0.001430 | 14.828 ±0.069 |
78
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 15.756085 ±0.134240 | 94.45% | 0.341147 ±0.001464 | 15.306 ±0.069 |
79
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 16.481412 ±0.138861 | 92.23% | 0.469890 ±0.001833 | 17.842 ±0.072 |
80
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 13.991103 ±0.118848 | 98.03% | 0.121711 ±0.000730 | 9.041 ±0.056 |
81
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 14.070792 ±0.119167 | 97.72% | 0.139625 ±0.000813 | 9.709 ±0.058 |
82
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 13.259667 ±0.110576 | 98.94% | 0.062326 ±0.000539 | 6.358 ±0.053 |
83
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 13.254089 ±0.110505 | 98.85% | 0.068798 ±0.000581 | 6.644 ±0.053 |
84
+ | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 13.223880 ±0.110295 | 99.19% | 0.047895 ±0.000556 | 5.514 ±0.059 |
85
+ | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 13.204903 ±0.110236 | 99.26% | 0.043927 ±0.000549 | 5.242 ±0.061 |
86
+ | [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) | 13.052024 ±0.108483 | 100% | N/A | N/A |
87
 
88
  ### ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores
89
  Scores generated using [llama-perplexity](<https://github.com/ggml-org/llama.cpp/tree/master/examples/perplexity>) with 750 tasks per test, and a context size of 768 tokens.
 
91
  For the test data used in the generation of these scores, follow the appropiate links: [HellaSwag](<https://github.com/klosax/hellaswag_text_data>), [ARC, MMLU, Truthful QA](<https://huggingface.co/datasets/ikawrakow/validation-datasets-for-llama.cpp/tree/main>) and [WinoGrande](<https://huggingface.co/datasets/ikawrakow/winogrande-eval-for-llama.cpp/tree/main>)
92
 
93
  | Model | ARC | HellaSwag | MMLU | Truthful QA | WinoGrande | Avg Score |
94
+ | ------------------------------------------------------------------------------------------------------------------- | --------------: | --------: | --------------: | --------------: | --------------: | --------: |
95
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 49.0667 ±1.8266 | 70.80 | 34.6667 ±1.7389 | 30.4000 ±1.6807 | 66.1333 ±1.7292 | 50.21 |
96
+ | [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | 48.0000 ±1.8255 | 70.67 | 32.1333 ±1.7063 | 28.5333 ±1.6500 | 65.0667 ±1.7420 | 48.88 |
97
+ | [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 51.6000 ±1.8260 | 74.53 | 33.7333 ±1.7276 | 34.8000 ±1.7405 | 67.8667 ±1.7063 | 52.51 |
98
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 51.8667 ±1.8257 | 70.80 | 34.8000 ±1.7405 | 31.2000 ±1.6929 | 67.7333 ±1.7082 | 51.28 |
99
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 52.6667 ±1.8244 | 70.80 | 35.0667 ±1.7436 | 30.5333 ±1.6828 | 67.7333 ±1.7082 | 51.36 |
100
+ | [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 51.4667 ±1.8262 | 71.87 | 32.8000 ±1.7155 | 31.4667 ±1.6968 | 67.7333 ±1.7082 | 51.07 |
101
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 49.8667 ±1.8270 | 72.40 | 37.6000 ±1.7699 | 31.4667 ±1.6968 | 68.5333 ±1.6968 | 51.97 |
102
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 50.3347 ±1.8306 | 74.40 | 34.8000 ±1.7405 | 37.1069 ±2.7133 | 69.4667 ±1.6828 | 53.22 |
103
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-unsloth](https://huggingface.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF) | 52.4766 ±1.8284 | 73.20 | 33.2000 ±1.7207 | 36.0000 ±2.6667 | 68.4000 ±1.6988 | 52.66 |
104
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 50.2667 ±1.8269 | 72.00 | 36.0000 ±1.7539 | 31.4667 ±1.6968 | 67.2000 ±1.7155 | 51.39 |
105
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 51.4667 ±1.8262 | 73.73 | 36.2667 ±1.7567 | 32.2667 ±1.7082 | 68.4000 ±1.6988 | 52.43 |
106
+ | [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 51.4667 ±1.8262 | 73.73 | 35.4667 ±1.7481 | 32.4000 ±1.7100 | 67.6000 ±1.7100 | 52.13 |
107
+ | [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 50.4000 ±1.8269 | 74.13 | 36.1333 ±1.7553 | 31.3333 ±1.6949 | 67.6000 ±1.7100 | 51.92 |
108
+ | [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 50.1333 ±1.8270 | 74.13 | 37.0667 ±1.7648 | 32.1333 ±1.7063 | 67.7333 ±1.7082 | 52.24 |
109
+ | [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) | 50.0000 ±1.8270 | 74.40 | 36.6667 ±1.7608 | 32.0000 ±1.7045 | 67.7333 ±1.7082 | 52.16 |
110
 
111
  ### Tokens per Second - Benchmarks
112
  Scores generated using [llama-bench](https://github.com/ggml-org/llama.cpp/tree/master/examples/llama-bench). Q4_K_M quantizations from [Bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF/tree/main) and [Unsloth](https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-7B-GGUF/tree/main) included for comparison.
113
 
114
  | model | size | params | backend | threads | test | t/s |
115
+ | ------------------------------------------------------------------------------------------------------------------- | -------: | -----: | ---------- | ------: | ------------: | ------------: |
116
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.10 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 310.89 ± 2.20 |
117
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.10 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 27.69 ± 0.26 |
118
+ | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.10 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 44.43 ± 0.24 |
119
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 329.03 ± 0.11 |
120
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 25.79 ± 0.92 |
121
  | [DeepSeek-R1-Distill-Llama-8B-Q4_K_M-bartowski](https://huggingface.co/bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 42.35 ± 0.93 |