eaddario commited on
Commit
590426d
·
verified ·
1 Parent(s): a5d4592

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -62
README.md CHANGED
@@ -16,7 +16,7 @@ tags:
16
 
17
  # Experimental GGUF quantized versions of watt-ai/watt-tool-8B
18
 
19
- Using [LLaMA C++](<https://github.com/ggerganov/llama.cpp>) release [b4801](<https://github.com/ggerganov/llama.cpp/releases/tag/b4801>) for quantization.
20
 
21
  Original model: [watt-ai/watt-tool-8B](https://huggingface.co/watt-ai/watt-tool-8B)
22
 
@@ -28,13 +28,13 @@ From the original model creators:
28
 
29
  # PLEASE READ THIS BEFORE USING THESE EXPERIMENTAL VERSIONS!
30
 
31
- 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, edge devices, etc. There are many approaches to accomplish this, including architecture simplification and knowledge distillation, but for now I'm focusing primarily on quantization and pruning.
32
 
33
- The process of [quantization](<https://huggingface.co/docs/optimum/en/concept_guides/quantization>) reduces the precision of the model's weights, leading to significant reductions in model size, memory needs and computational requirements (a good thing), but this however comes at the expense of a loss in the model's capabilities and accuracy (a bad thing!).
34
 
35
- Another approach is to [prune](<https://en.wikipedia.org/wiki/Pruning_(artificial_neural_network>) the model, that is, to selectively zero-out groups of parameters. Although significant reductions can be achieved this way, the risk of severely degrading the model's performance is markedly higher than when quantizing, as the process requires a deep understanding of the model's architecture in order to identify which tensors can be safely zero'ed. For all means and purposes, pruning is the equivalent of lobotomizing the LLM!
36
 
37
- A successful outcome is when the overall size is reduced with no, or negligible, loss of capabilities (i.e. language understanding, math and logic problem-solving, conversation, coding, domain-specific knowledge, etc.) compared to the original version. On that regard, the method I'm using seems to yield some modest but encouraging results, and the versions available in this repo are on average **7% smaller** than other, high-quality, sources with negligible loss of capability. As I continue to improve the process and develop tools to automate it, I aim to achieve further reductions in the **10-15%** range, maybe more.
38
 
39
  For testing and comparison I'd normally 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), but they don't provide GGUF versions of this model, so all tests and comparisons are done against naive quantizations obtained by simply running `llama-quantize` with no further optimization.
40
 
@@ -45,8 +45,8 @@ The process to generate these models is roughly as follows:
45
  1. Convert the the original model's tensors to [GGUF](<https://huggingface.co/docs/hub/en/gguf>) F16*
46
  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/Watt-Tool-8B-GGUF/tree/main/logits>)
47
  3. Generate an [imatrix](<https://huggingface.co/eaddario/Watt-Tool-8B-GGUF/tree/main/imatrix>) from selected calibration datasets
48
- 4. Quantize & prune versions of the base model
49
- 5. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande [scores](<https://huggingface.co/eaddario/Watt-Tool-8B-GGUF/tree/main/scores>) for each quantized model
50
  6. Keep versions with the best scores
51
  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.
52
 
@@ -56,75 +56,76 @@ The process to generate these models is roughly as follows:
56
 
57
  ### Sizes (in GB)
58
  | Model | Naive | Repo | Shrinkage |
59
- |---------------------------------------------------|------:|-----:|----------:|
60
- | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 3.78 | 3.47 | 8.2% |
61
- | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 3.68 | 3.34 | 9.2% |
62
- | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 4.68 | 4.35 | 7.7% |
63
- | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 4.32 | 4.01 | 7.0% |
64
- | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 4.02 | 3.70 | 8.0% |
65
- | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 3.66 | 3.35 | 8.5% |
66
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.92 | 4.59 | 6.7% |
67
- | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 4.69 | 4.36 | 7.0% |
68
- | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 5.73 | 5.34 | 6.8% |
69
- | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 5.60 | 5.21 | 7.0% |
70
- | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 6.60 | 6.13 | 7.1% |
71
- | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 8.54 | 7.82 | 8.4% |
72
 
73
  ### Perplexity and KL Divergence scores
74
- | Model | μPPL | 𝜌PPL | μKLD | RMS Δp |
75
- |---------------------------------------------------|--------------------:|-------:|-------------------:|--------------:|
76
- | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 9.087639 ±0.058224 | 96.96% | 0.173555 ±0.000494 | 12.642 ±0.047 |
77
- | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 9.156208 ±0.059074 | 96.88% | 0.176807 ±0.000516 | 12.577 ±0.047 |
78
- | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 7.990955 ±0.051527 | 99.03% | 0.051341 ±0.000211 | 6.512 ±0.032 |
79
- | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 8.895382 ±0.058817 | 97.35% | 0.146296 ±0.000446 | 11.179 ±0.043 |
80
- | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 9.016990 ±0.059441 | 97.13% | 0.157666 ±0.000482 | 11.741 ±0.045 |
81
- | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 10.242604 ±0.066586 | 94.81% | 0.276176 ±0.000860 | 17.133 ±0.061 |
82
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 7.976327 ±0.051353 | 99.11% | 0.047280 ±0.000179 | 6.272 ±0.032 |
83
- | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 7.991770 ±0.051300 | 99.04% | 0.050966 ±0.000194 | 6.565 ±0.033 |
84
- | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 7.850938 ±0.050528 | 99.33% | 0.036018 ±0.000138 | 5.419 ±0.026 |
85
- | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 7.848321 ±0.050459 | 99.32% | 0.036602 ±0.000141 | 5.468 ±0.026 |
86
- | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 7.814872 ±0.050237 | 99.38% | 0.033097 ±0.000123 | 5.238 ±0.025 |
87
- | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 7.794238 ±0.050005 | 99.41% | 0.031806 ±0.000121 | 5.135 ±0.024 |
88
- | [Watt-Tool-8B-F16](./Watt-Tool-8B-F16.gguf) | 7.534124 ±0.048206 | 100% | N/A | N/A |
 
89
 
90
  ### ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores
91
- 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. Naive (`llama-quantize` with no optimization) Q4_K_M quantization included for comparison.
92
 
93
  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>)
94
 
95
- | Model | ARC | HellaSwag | MMLU | Truthful QA | WinoGrande |
96
- |---------------------------------------------------|----------------:|----------:|----------------:|----------------:|----------------:|
97
- | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 60.6667 ±1.7849 | 77.46 | 38.9333 ±1.7816 | 33.3333 ±1.7225 | 75.3333 ±1.5751 |
98
- | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 61.6000 ±1.7771 | 77.33 | 39.6000 ±1.7870 | 32.4000 ±1.7100 | 74.6667 ±1.5892 |
99
- | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 64.9333 ±1.7436 | 78.80 | 40.0000 ±1.7900 | 33.7333 ±1.7276 | 74.9333 ±1.5836 |
100
- | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 62.8000 ±1.7661 | 77.07 | 39.0667 ±1.7827 | 33.3333 ±1.7225 | 75.6000 ±1.5693 |
101
- | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 63.0667 ±1.7635 | 76.53 | 39.0667 ±1.7827 | 33.8667 ±1.7292 | 75.4667 ±1.5722 |
102
- | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 63.2000 ±1.7621 | 76.13 | 38.1333 ±1.7748 | 32.9333 ±1.7172 | 73.6000 ±1.6106 |
103
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 64.5333 ±1.7481 | 78.40 | 39.3333 ±1.7849 | 34.4000 ±1.7358 | 74.5333 ±1.5919 |
104
- | Watt-Tool-8B-Q4_K_M (Naive) | 65.3333 ±1.7389 | 78.67 | 40.5333 ±1.7939 | 31.4667 ±1.6968 | 74.6667 ±1.5892 |
105
- | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 64.9333 ±1.7436 | 78.26 | 40.2667 ±1.7920 | 33.8667 ±1.7292 | 75.7333 ±1.5664 |
106
- | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 64.5333 ±1.7481 | 78.40 | 40.5333 ±1.7939 | 33.3333 ±1.7225 | 74.6667 ±1.5892 |
107
- | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 64.8000 ±1.7451 | 78.67 | 40.5333 ±1.7939 | 33.3333 ±1.7225 | 75.0667 ±1.5808 |
108
- | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 64.2667 ±1.7510 | 79.07 | 40.9333 ±1.7967 | 34.1333 ±1.7325 | 74.8000 ±1.5864 |
109
- | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 63.8667 ±1.7553 | 78.67 | 41.2000 ±1.7984 | 34.2667 ±1.7342 | 74.2667 ±1.5974 |
110
- | [Watt-Tool-8B-F16](./Watt-Tool-8B-F16.gguf) | 65.8667 ±1.7325 | 78.67 | 40.9333 ±1.7967 | 32.9333 ±1.7172 | 74.8000 ±1.5864 |
111
 
112
  ### Tokens per Second - Benchmarks
113
- Scores generated using [llama-bench](<https://github.com/ggml-org/llama.cpp/tree/master/examples/llama-bench>). Naive (`llama-quantize` with no optimization) Q4_K_M quantization included for comparison.
114
 
115
  | model | size | params | backend | threads | test | t/s |
116
- |---------------------------------------------------|---------:|-------:|------------|--------:|--------------:|--------------:|
117
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.27 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 329.41 ± 0.08 |
118
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.27 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 26.75 ± 0.04 |
119
- | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.27 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 43.55 ± 0.08 |
120
- | Watt-Tool-8B-Q4_K_M (Naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 329.36 ± 0.16 |
121
- | Watt-Tool-8B-Q4_K_M (Naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 26.52 ± 0.01 |
122
- | Watt-Tool-8B-Q4_K_M (Naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 42.76 ± 0.91 |
123
 
124
  # Metrics used
125
  **[Perplexity](<https://huggingface.co/docs/transformers/en/perplexity>):** one of the key metrics used in NLP evaluation. It measures the quality of a language model by evaluating how well it predicts the next token given a particular sequence of words. A PPL of **1** indicates an exact match between predicted and actual, whereas values greater than one indicate a degree of "surprise" the generated token differs from the expected.
126
 
127
- **[Kullback–Leibler (KL) Divergence](<https://en.wikipedia.org/wiki/Kullback–Leibler_divergence>):** a statistical measure of how much a probability distribution differs from another. When quantizing models (or altering the original tensors in any way for that matter), the closest we can preserve the weights' probability distribution to the orignal model the better, thus the closest to **0** the better.
128
 
129
  **[AI2 Reasoning Challenge (ARC)](<https://leaderboard.allenai.org/arc/submissions/get-started>):** a benchmark to evaluate the ability of AI models to answer complex science questions that require logical reasoning beyond pattern matching.
130
 
@@ -137,4 +138,4 @@ Scores generated using [llama-bench](<https://github.com/ggml-org/llama.cpp/tree
137
  **[Winogrande](<https://winogrande.allenai.org/>):** based on the [Winograd Schema Challenge](<https://cdn.aaai.org/ocs/4492/4492-21843-1-PB.pdf>), is a natural language understanding task requiring models to resolve ambiguities in sentences involving pronoun references.
138
 
139
  ## Credits
140
- A big **Thank You!** to [Colin Kealty](<https://huggingface.co/bartowski>) for the many contributions and for being one of the best sources of high quality quantized models available in Hugginface, and a really big ***Thank You!*** to [Georgi Gerganov](<https://github.com/ggerganov>) for his amazing work with **llama.cpp** and the **gguf** file format.
 
16
 
17
  # Experimental GGUF quantized versions of watt-ai/watt-tool-8B
18
 
19
+ Using [LLaMA C++](<https://github.com/ggerganov/llama.cpp>) release [b4945](<https://github.com/ggerganov/llama.cpp/releases/tag/b4945>) for quantization.
20
 
21
  Original model: [watt-ai/watt-tool-8B](https://huggingface.co/watt-ai/watt-tool-8B)
22
 
 
28
 
29
  # PLEASE READ THIS BEFORE USING THESE EXPERIMENTAL VERSIONS!
30
 
31
+ 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.
32
 
33
+ 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.
34
 
35
+ 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).
36
 
37
+ 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).
38
 
39
  For testing and comparison I'd normally 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), but they don't provide GGUF versions of this model, so all tests and comparisons are done against naive quantizations obtained by simply running `llama-quantize` with no further optimization.
40
 
 
45
  1. Convert the the original model's tensors to [GGUF](<https://huggingface.co/docs/hub/en/gguf>) F16*
46
  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/Watt-Tool-8B-GGUF/tree/main/logits>)
47
  3. Generate an [imatrix](<https://huggingface.co/eaddario/Watt-Tool-8B-GGUF/tree/main/imatrix>) from selected calibration datasets
48
+ 4. Select an appropiate quant level for each tensor using a modified version of `llama-quantize`
49
+ 5. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande scores for each quantized model
50
  6. Keep versions with the best scores
51
  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.
52
 
 
56
 
57
  ### Sizes (in GB)
58
  | Model | Naive | Repo | Shrinkage |
59
+ | ------------------------------------------------- | ----: | ---: | --------: |
60
+ | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 3.78 | 3.40 | 10.1% |
61
+ | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 3.68 | 3.24 | 12.0% |
62
+ | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 4.68 | 4.30 | 8.1% |
63
+ | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 4.32 | 3.31 | 23.4% |
64
+ | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 4.02 | 3.30 | 17.9% |
65
+ | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 3.66 | 3.28 | 10.4% |
66
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.92 | 4.44 | 9.8% |
67
+ | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 4.69 | 4.31 | 8.1% |
68
+ | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 5.73 | 5.35 | 6.6% |
69
+ | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 5.60 | 5.19 | 7.3% |
70
+ | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 6.60 | 6.17 | 6.5% |
71
+ | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 8.54 | 7.84 | 8.2% |
72
 
73
  ### Perplexity and KL Divergence scores
74
+ | Model | μPPL | 𝜌PPL | μKLD | RMS Δp |
75
+ | ------------------------------------------------- | -----------------: | -----: | -----------------: | ------------: |
76
+ | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 8.963688 ±0.058386 | 95.93% | 0.209768 ±0.000734 | 13.969 ±0.056 |
77
+ | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 9.032577 ±0.058532 | 95.96% | 0.204862 ±0.000758 | 13.678 ±0.058 |
78
+ | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 7.935917 ±0.053744 | 98.36% | 0.096510 ±0.000325 | 8.908 ±0.037 |
79
+ | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 9.923766 ±0.061734 | 94.33% | 0.292497 ±0.000978 | 18.605 ±0.069 |
80
+ | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 9.855009 ±0.061412 | 94.48% | 0.292188 ±0.000927 | 18.125 ±0.066 |
81
+ | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 9.798719 ±0.061509 | 94.51% | 0.285340 ±0.000933 | 17.751 ±0.067 |
82
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 7.640118 ±0.048002 | 99.15% | 0.045262 ±0.000151 | 6.321 ±0.029 |
83
+ | Watt-Tool-8B-Q4_K_M (naive) | 7.409510 ±0.046740 | 99.65% | 0.017663 ±0.000107 | 3.658 ±0.032 |
84
+ | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 7.652829 ±0.048076 | 99.13% | 0.046275 ±0.000155 | 6.434 ±0.029 |
85
+ | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 7.493174 ±0.046979 | 99.50% | 0.028633 ±0.000078 | 4.999 ±0.019 |
86
+ | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 7.493799 ±0.047018 | 99.49% | 0.028988 ±0.000079 | 5.045 ±0.019 |
87
+ | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 7.454623 ±0.046795 | 99.56% | 0.025169 ±0.000065 | 4.718 ±0.017 |
88
+ | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 7.438372 ±0.046597 | 99.58% | 0.024091 ±0.000061 | 4.650 ±0.016 |
89
+ | [Watt-Tool-8B-F16](./Watt-Tool-8B-F16.gguf) | 7.237090 ±0.045539 | 100% | N/A | N/A |
90
 
91
  ### ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores
92
+ 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.
93
 
94
  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>)
95
 
96
+ | Model | ARC | HellaSwag | MMLU | Truthful QA | WinoGrande | Avg Score |
97
+ | ------------------------------------------------- | --------------: | --------: | --------------: | --------------: | --------------: | --------: |
98
+ | [Watt-Tool-8B-IQ3_M](./Watt-Tool-8B-IQ3_M.gguf) | 57.6203 ±1.8080 | 78.80 | 36.2667 ±1.7567 | 33.2308 ±2.6169 | 70.9333 ±1.6591 | 55.37 |
99
+ | [Watt-Tool-8B-IQ3_S](./Watt-Tool-8B-IQ3_S.gguf) | 57.3529 ±1.8095 | 77.20 | 36.1333 ±1.7553 | 35.5346 ±2.6882 | 70.2667 ±1.6702 | 55.30 |
100
+ | [Watt-Tool-8B-IQ4_NL](./Watt-Tool-8B-IQ4_NL.gguf) | 64.7925 ±1.7487 | 77.87 | 39.7333 ±1.7880 | 33.9564 ±2.6473 | 71.8667 ±1.6430 | 57.64 |
101
+ | [Watt-Tool-8B-Q3_K_L](./Watt-Tool-8B-Q3_K_L.gguf) | 62.6506 ±1.7711 | 74.67 | 36.0000 ±1.7539 | 35.4037 ±2.6692 | 72.8000 ±1.6260 | 56.30 |
102
+ | [Watt-Tool-8B-Q3_K_M](./Watt-Tool-8B-Q3_K_M.gguf) | 63.1016 ±1.7655 | 75.33 | 38.8000 ±1.7805 | 35.3846 ±2.6565 | 72.6667 ±1.6284 | 57.06 |
103
+ | [Watt-Tool-8B-Q3_K_S](./Watt-Tool-8B-Q3_K_S.gguf) | 61.7135 ±1.7797 | 74.00 | 37.2000 ±1.7661 | 35.6707 ±2.6490 | 71.8667 ±1.6430 | 56.09 |
104
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 64.6586 ±1.7502 | 75.33 | 40.2667 ±1.7920 | 34.2679 ±2.6531 | 74.0000 ±1.6027 | 57.70 |
105
+ | Watt-Tool-8B-Q4_K_M (naive) | 62.5668 ±1.7707 | 77.73 | 42.0000 ±1.8034 | 36.8098 ±2.6753 | 73.6000 ±1.6106 | 58.54 |
106
+ | [Watt-Tool-8B-Q4_K_S](./Watt-Tool-8B-Q4_K_S.gguf) | 63.4538 ±1.7631 | 79.47 | 40.2667 ±1.7920 | 33.6420 ±2.6290 | 75.2000 ±1.5780 | 58.41 |
107
+ | [Watt-Tool-8B-Q5_K_M](./Watt-Tool-8B-Q5_K_M.gguf) | 64.1711 ±1.7544 | 80.53 | 41.7333 ±1.8018 | 34.6875 ±2.6650 | 74.2667 ±1.5974 | 59.08 |
108
+ | [Watt-Tool-8B-Q5_K_S](./Watt-Tool-8B-Q5_K_S.gguf) | 65.6417 ±1.7376 | 77.20 | 41.0667 ±1.7976 | 36.1371 ±2.6855 | 73.6000 ±1.6106 | 58.73 |
109
+ | [Watt-Tool-8B-Q6_K](./Watt-Tool-8B-Q6_K.gguf) | 64.9733 ±1.7454 | 77.20 | 38.1333 ±1.7748 | 33.8509 ±2.6412 | 73.8667 ±1.6054 | 57.60 |
110
+ | [Watt-Tool-8B-Q8_0](./Watt-Tool-8B-Q8_0.gguf) | 64.5248 ±1.7517 | 76.80 | 40.4000 ±1.7930 | 35.6467 ±2.6943 | 72.6667 ±1.6284 | 58.01 |
111
+ | [Watt-Tool-8B-F16](./Watt-Tool-8B-F16.gguf) | 65.2870 ±1.7406 | 80.93 | 42.1333 ±1.8042 | 36.1963 ±2.6657 | 74.0000 ±1.6027 | 59.71 |
112
 
113
  ### Tokens per Second - Benchmarks
114
+ Scores generated using [llama-bench](https://github.com/ggml-org/llama.cpp/tree/master/examples/llama-bench). Naive Q4_K_M quantization included for comparison.
115
 
116
  | model | size | params | backend | threads | test | t/s |
117
+ | ------------------------------------------------- | -------: | -----: | ---------- | ------: | ------------: | ------------: |
118
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 332.49 ± 0.84 |
119
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 27.68 ± 0.12 |
120
+ | [Watt-Tool-8B-Q4_K_M](./Watt-Tool-8B-Q4_K_M.gguf) | 4.13 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 44.66 ± 0.04 |
121
+ | Watt-Tool-8B-Q4_K_M (naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp512 | 327.42 ± 0.47 |
122
+ | Watt-Tool-8B-Q4_K_M (naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | tg128 | 26.18 ± 0.08 |
123
+ | Watt-Tool-8B-Q4_K_M (naive) | 4.58 GiB | 8.03 B | Metal,BLAS | 6 | pp1024+tg1024 | 42.69 ± 0.09 |
124
 
125
  # Metrics used
126
  **[Perplexity](<https://huggingface.co/docs/transformers/en/perplexity>):** one of the key metrics used in NLP evaluation. It measures the quality of a language model by evaluating how well it predicts the next token given a particular sequence of words. A PPL of **1** indicates an exact match between predicted and actual, whereas values greater than one indicate a degree of "surprise" the generated token differs from the expected.
127
 
128
+ **[Kullback–Leibler (KL) Divergence](<https://en.wikipedia.org/wiki/Kullback–Leibler_divergence>):** a statistical measure of how much a probability distribution differs from another. When quantizing models (or altering the original tensors in any way for that matter), the closest we can preserve the weights' probability distribution to the original model the better, thus the closest to **0** the better.
129
 
130
  **[AI2 Reasoning Challenge (ARC)](<https://leaderboard.allenai.org/arc/submissions/get-started>):** a benchmark to evaluate the ability of AI models to answer complex science questions that require logical reasoning beyond pattern matching.
131
 
 
138
  **[Winogrande](<https://winogrande.allenai.org/>):** based on the [Winograd Schema Challenge](<https://cdn.aaai.org/ocs/4492/4492-21843-1-PB.pdf>), is a natural language understanding task requiring models to resolve ambiguities in sentences involving pronoun references.
139
 
140
  ## Credits
141
+ A big **Thank You!** to [Colin Kealty](<https://huggingface.co/bartowski>) for the many contributions and for being one of the best sources of high quality quantized models available in Hugginface, and a really big ***Thank You!*** to [Georgi Gerganov](<https://github.com/ggerganov>) for his amazing work with **llama.cpp** and the **ggml/gguf** libraries.