Instructions to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
- Ollama
How to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with Ollama:
ollama run hf.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with Docker Model Runner:
docker model run hf.co/eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
- Lemonade
How to use eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull eaddario/DeepSeek-R1-Distill-Llama-8B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-R1-Distill-Llama-8B-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
- experimental
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# Experimental
|
| 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
|
| 33 |
|
| 34 |
-
There’re two pull requests ([
|
| 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.
|
| 48 |
-
5.
|
| 49 |
-
6.
|
| 50 |
-
7.
|
|
|
|
| 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 |
|
| 58 |
-
|---------------------------------------------------------------------------------
|
| 59 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) | 3.78 |
|
| 60 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | N/A |
|
| 61 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 4.68 |
|
| 62 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 4.32 |
|
| 63 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) | 4.02 |
|
| 64 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) | 3.66 |
|
| 65 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.92 |
|
| 66 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 4.69 |
|
| 67 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) | 5.73 |
|
| 68 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) | 5.60 |
|
| 69 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) | 6.60 |
|
| 70 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) | 8.54 |
|
| 71 |
|
| 72 |
### Perplexity and KL Divergence scores
|
| 73 |
-
| Model | μPPL |
|
| 74 |
-
|---------------------------------------------------------------------------------
|
| 75 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ3_M](./DeepSeek-R1-Distill-Llama-8B-IQ3_M.gguf) |
|
| 76 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) |
|
| 77 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) |
|
| 78 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) |
|
| 79 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) |
|
| 80 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) |
|
| 81 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) |
|
| 82 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_S](./DeepSeek-R1-Distill-Llama-8B-Q4_K_S.gguf) | 14.
|
| 83 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) |
|
| 84 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) |
|
| 85 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) |
|
| 86 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) |
|
| 87 |
-
| [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) |
|
| 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) |
|
| 97 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ3_S](./DeepSeek-R1-Distill-Llama-8B-IQ3_S.gguf) | 48.
|
| 98 |
-
| [DeepSeek-R1-Distill-Llama-8B-IQ4_NL](./DeepSeek-R1-Distill-Llama-8B-IQ4_NL.gguf) | 51.
|
| 99 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_L](./DeepSeek-R1-Distill-Llama-8B-Q3_K_L.gguf) | 51.
|
| 100 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_M](./DeepSeek-R1-Distill-Llama-8B-Q3_K_M.gguf) |
|
| 101 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q3_K_S](./DeepSeek-R1-Distill-Llama-8B-Q3_K_S.gguf) |
|
| 102 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) |
|
| 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.
|
| 106 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_M](./DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf) |
|
| 107 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q5_K_S](./DeepSeek-R1-Distill-Llama-8B-Q5_K_S.gguf) |
|
| 108 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q6_K](./DeepSeek-R1-Distill-Llama-8B-Q6_K.gguf) |
|
| 109 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q8_0](./DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf) |
|
| 110 |
-
| [DeepSeek-R1-Distill-Llama-8B-F16](./DeepSeek-R1-Distill-Llama-8B-F16.gguf) |
|
| 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.
|
| 118 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.
|
| 119 |
-
| [DeepSeek-R1-Distill-Llama-8B-Q4_K_M](./DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf) | 4.
|
| 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 |
|