Experimental GGUF quantized versions of cognitivecomputations/Dolphin3.0-Mistral-24B

Using LLaMA C++ release b4837 for quantization.

Original model: cognitivecomputations/Dolphin3.0-Mistral-24B

From the original model creators:

Dolphin 3.0 is the next generation of the Dolphin series of instruct-tuned models. Designed to be the ultimate general purpose local model, enabling coding, math, agentic, function calling, and general use cases.

Dolphin aims to be a general purpose instruct model, similar to the models behind ChatGPT, Claude, Gemini. But these models present problems for businesses seeking to include AI in their products.

  1. They maintain control of the system prompt, deprecating and changing things as they wish, often causing software to break.
  2. They maintain control of the model versions, sometimes changing things silently, or deprecating older models that your business relies on.
  3. They maintain control of the alignment, and in particular the alignment is one-size-fits all, not tailored to the application.
  4. They can see all your queries and they can potentially use that data in ways you wouldn't want. Dolphin, in contrast, is steerable and gives control to the system owner. You set the system prompt. You decide the alignment. You have control of your data. Dolphin does not impose its ethics or guidelines on you. You are the one who decides the guidelines.

Dolphin belongs to YOU, it is your tool, an extension of your will. Just as you are personally responsible for what you do with a knife, gun, fire, car, or the internet, you are the creator and originator of any content you generate with Dolphin.

From Eric Hartford's, the creator of the Dolphin model series, Uncensored Models:

Most of these models (for example, Alpaca, Vicuna, WizardLM, MPT-7B-Chat, Wizard-Vicuna, GPT4-X-Vicuna) have some sort of embedded alignment. For general purposes, this is a good thing. This is what stops the model from doing bad things, like teaching you how to cook meth and make bombs. But what is the nature of this alignment? And, why is it so?

The reason these models are aligned is that they are trained with data that was generated by ChatGPT, which itself is aligned by an alignment team at OpenAI. As it is a black box, we don't know all the reasons for the decisions that were made, but we can observe it generally is aligned with American popular culture, and to obey American law, and with a liberal and progressive political bias.

PLEASE READ THIS BEFORE USING THESE EXPERIMENTAL VERSIONS!

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.

The process of 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!).

Another approach is to prune 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!

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 3% 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.

For testing and comparison I'd normally use models produced by Unsloth (Daniel and Michael Han do some really advanced level stuff!) and Bartowski (see credits below), but only the latter offers a version of these model so all tests and comparisons are done against a single reference.

All experimental versions were generated using an appropriate imatrix created from calibration datasets available at eaddario/imatrix-calibration. At its core, an Importance Matrix (imatrix) is a table or, more broadly, a structured representation that scores the relative importance of different features or parameters in a machine learning model. It essentially quantifies the "impact" each feature has on a specific outcome, prediction, or relationship being modeled, and it helps to counterbalance the negative effects of quantization and pruning.

The process to generate these models is roughly as follows:

  1. Convert the the original model's tensors to GGUF F16*
  2. Estimate the Perplexity score for the F16 model (baseline) using the wikitext-2-raw-v1 dataset, and save the logits
  3. Generate an imatrix from selected calibration datasets
  4. Quantize & prune versions of the base model
  5. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande scores for each quantized model
  6. Keep versions with the best scores
  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.

*BF16 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

Models

Sizes (in GB)

Model Bartowski Repo Shrinkage
Dolphin3.0-Mistral-24B-IQ3_M 10.65 10.25 3.8%
Dolphin3.0-Mistral-24B-IQ3_S N/A 10.03 N/A
Dolphin3.0-Mistral-24B-IQ4_NL 13.05 13.05 0%
Dolphin3.0-Mistral-24B-Q3_K_L 12.40 12.00 0%
Dolphin3.0-Mistral-24B-Q3_K_M 11.47 11.08 3.4%
Dolphin3.0-Mistral-24B-Q3_K_S 10.40 10.00 3.8%
Dolphin3.0-Mistral-24B-Q4_K_M 14.33 13.99 2.4%
Dolphin3.0-Mistral-24B-Q4_K_S 13.55 13.13 3.1%
Dolphin3.0-Mistral-24B-Q5_K_M 16.76 16.26 3%
Dolphin3.0-Mistral-24B-Q5_K_S 16.30 15.80 3.1%
Dolphin3.0-Mistral-24B-Q6_K 19.35 18.75 3.1%
Dolphin3.0-Mistral-24B-Q8_0 25.05 24.14 3.6%

Perplexity and KL Divergence scores

Model μPPL 𝜌PPL μKLD RMS Δp
Dolphin3.0-Mistral-24B-IQ3_M 8.536738 ±0.059988 98.03% 0.103999 ±0.000378 9.251 ±0.039
Dolphin3.0-Mistral-24B-IQ3_S 8.602292 ±0.060945 97.95% 0.108536 ±0.000393 9.309 ±0.040
Dolphin3.0-Mistral-24B-IQ4_NL 7.895583 ±0.054759 99.38% 0.031400 ±0.000136 5.278 ±0.027
Dolphin3.0-Mistral-24B-Q3_K_L 8.320959 ±0.058079 98.43% 0.083143 ±0.000296 8.464 ±0.035
Dolphin3.0-Mistral-24B-Q3_K_M 8.389337 ±0.058940 98.30% 0.089559 ±0.000330 8.734 ±0.037
Dolphin3.0-Mistral-24B-Q3_K_S 8.681563 ±0.061366 97.26% 0.138030 ±0.000557 10.731 ±0.047
Dolphin3.0-Mistral-24B-Q4_K_M 7.868503 ±0.054510 99.45% 0.027967 ±0.000110 4.959 ±0.024
Dolphin3.0-Mistral-24B-Q4_K_S 7.922314 ±0.055044 99.40% 0.030745 ±0.000128 5.176 ±0.026
Dolphin3.0-Mistral-24B-Q5_K_M 7.785290 ±0.053616 99.63% 0.018900 ±0.000070 4.199 ±0.019
Dolphin3.0-Mistral-24B-Q5_K_S 7.819818 ±0.053887 99.62% 0.019857 ±0.000076 4.338 ±0.020
Dolphin3.0-Mistral-24B-Q6_K 7.757601 ±0.053375 99.70% 0.015707 ±0.000047 3.852 ±0.014
Dolphin3.0-Mistral-24B-Q8_0 7.737414 ±0.053007 99.72% 0.014644 ±0.000046 3.754 ±0.015
Dolphin3.0-Mistral-24B-F16 9.366577 ±0.066397 100% N/A N/A

ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores

Scores generated using llama-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.

For the test data used in the generation of these scores, follow the appropiate links: HellaSwag, ARC, MMLU, Truthful QA and WinoGrande

Model ARC HellaSwag MMLU Truthful QA WinoGrande
Dolphin3.0-Mistral-24B-IQ3_M 70.5333 ±1.6658 80.80 43.7333 ±1.8126 35.4667 ±1.7481 74.9333 ±1.5836
Dolphin3.0-Mistral-24B-IQ3_S 70.1333 ±1.6723 80.93 43.7333 ±1.8126 36.5333 ±1.7594 74.4000 ±1.5947
Dolphin3.0-Mistral-24B-IQ4_NL 72.1333 ±1.6382 80.27 42.6667 ±1.8072 35.7333 ±1.7510 76.5333 ±1.5485
Dolphin3.0-Mistral-24B-Q3_K_L 72.5333 ±1.6309 80.93 41.6000 ±1.8010 34.2667 ±1.7342 75.7333 ±1.5664
Dolphin3.0-Mistral-24B-Q3_K_M 73.4667 ±1.6132 80.93 42.1333 ±1.8042 34.9300 ±1.6774 76.1333 ±1.5576
Dolphin3.0-Mistral-24B-Q3_K_S 70.5333 ±1.6658 80.67 41.2000 ±1.7984 35.2000 ±1.7451 74.6667 ±1.5892
Dolphin3.0-Mistral-24B-Q4_K_M 72.6667 ±1.6284 81.73 42.5333 ±1.8065 35.0667 ±1.7436 77.6000 ±1.5234
Dolphin3.0-Mistral-24B-Q4_K_M-bartowski 72.2667 ±1.6358 81.73 42.8000 ±1.8079 35.0667 ±1.7436 76.8000 ±1.5424
Dolphin3.0-Mistral-24B-Q4_K_S 72.4000 ±1.6334 81.47 43.0667 ±1.8093 35.3333 ±1.7466 77.2000 ±1.5330
Dolphin3.0-Mistral-24B-Q5_K_M 72.0000 ±1.6406 81.20 42.9333 ±1.8086 35.7333 ±1.7510 78.1333 ±1.5103
Dolphin3.0-Mistral-24B-Q5_K_S 72.6667 ±1.6284 81.47 41.6000 ±1.8010 35.7333 ±1.7510 76.5333 ±1.5485
Dolphin3.0-Mistral-24B-Q6_K 72.4000 ±1.6334 81.47 43.0667 ±1.8093 36.6667 ±1.7608 77.8667 ±1.5169
Dolphin3.0-Mistral-24B-Q8_0 72.8000 ±1.6260 81.33 43.0667 ±1.8093 35.7333 ±1.7510 77.4667 ±1.5266
Dolphin3.0-Mistral-24B-F16 71.6000 ±1.6477 81.47 43.4667 ±1.8113 35.4667 ±1.7481 77.6000 ±1.5234

Tokens per Second - Benchmarks

Scores generated using llama-bench. Naive (llama-quantize with no optimization) Q4_K_M quantization included for comparison.

model size params backend ngl test t/s
Dolphin3.0-Mistral-24B-Q4_K_M 12.95 GiB 23.57 B CUDA 12 pp512 164.39 ± 0.20
Dolphin3.0-Mistral-24B-Q4_K_M 12.95 GiB 23.57 B CUDA 12 tg128 4.71 ± 0.06
Dolphin3.0-Mistral-24B-Q4_K_M 12.95 GiB 23.57 B CUDA 12 pp1024+tg1024 8.87 ± 0.04
Dolphin3.0-Mistral-24B-Q4_K_M-bartowski 13.34 GiB 23.57 B CUDA 12 pp512 162.55 ± 0.47
Dolphin3.0-Mistral-24B-Q4_K_M-bartowski 13.34 GiB 23.57 B CUDA 12 tg128 4.57 ± 0.03
Dolphin3.0-Mistral-24B-Q4_K_M-bartowski 13.34 GiB 23.57 B CUDA 12 pp1024+tg1024 8.62 ± 0.03

Metrics used

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.

Kullback–Leibler (KL) 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.

AI2 Reasoning Challenge (ARC): a benchmark to evaluate the ability of AI models to answer complex science questions that require logical reasoning beyond pattern matching.

HellaSwag: the Harder Endings, Longer contexts, and Low-shot Activities for Situations With Adversarial Generations (bit of a mouthful!) is a benchmark designed to test commonsense natural language inference. It requires the model to predict the most likely ending of a sentence.

MMLU: the Massive Multitask Language Understanding evaluates LLMs’ general knowledge and problem-solving abilities across 57 subjects, including elementary mathematics, US history, computer science, and law.

Truthful QA: evaluates how well LLMs generate truthful responses to questions. It identifies whether AI models can avoid generating false or misleading information, particularly in areas where human knowledge is prone to misconceptions.

Winogrande: based on the Winograd Schema Challenge, is a natural language understanding task requiring models to resolve ambiguities in sentences involving pronoun references.

Credits

A big Thank You! to Colin Kealty 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 for his amazing work with llama.cpp and the gguf file format.

Downloads last month
1,615
GGUF
Model size
23.6B params
Architecture
llama

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 Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for eaddario/Dolphin3.0-Mistral-24B-GGUF

Dataset used to train eaddario/Dolphin3.0-Mistral-24B-GGUF