legraphista
commited on
Commit
β’
cae17aa
1
Parent(s):
71011fd
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: unsloth/Phi-3.5-mini-instruct
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- multilingual
|
6 |
+
library_name: gguf
|
7 |
+
license: mit
|
8 |
+
license_link: https://huggingface.co/microsoft/Phi-3.5-mini-instruct/resolve/main/LICENSE
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
quantized_by: legraphista
|
11 |
+
tags:
|
12 |
+
- unsloth
|
13 |
+
- transformers
|
14 |
+
- phi3
|
15 |
+
- phi
|
16 |
+
- quantized
|
17 |
+
- GGUF
|
18 |
+
- quantization
|
19 |
+
- imat
|
20 |
+
- imatrix
|
21 |
+
- static
|
22 |
+
- 16bit
|
23 |
+
- 8bit
|
24 |
+
- 6bit
|
25 |
+
- 5bit
|
26 |
+
- 4bit
|
27 |
+
- 3bit
|
28 |
+
- 2bit
|
29 |
+
- 1bit
|
30 |
+
---
|
31 |
+
|
32 |
+
# unsloth-Phi-3.5-mini-instruct-IMat-GGUF
|
33 |
+
_Llama.cpp imatrix quantization of unsloth/Phi-3.5-mini-instruct_
|
34 |
+
|
35 |
+
Original Model: [unsloth/Phi-3.5-mini-instruct](https://huggingface.co/unsloth/Phi-3.5-mini-instruct)
|
36 |
+
Original dtype: `BF16` (`bfloat16`)
|
37 |
+
Quantized by: llama.cpp [b3620](https://github.com/ggerganov/llama.cpp/releases/tag/b3620)
|
38 |
+
IMatrix dataset: [here](https://gist.githubusercontent.com/bartowski1182/eb213dccb3571f863da82e99418f81e8/raw/b2869d80f5c16fd7082594248e80144677736635/calibration_datav3.txt)
|
39 |
+
|
40 |
+
- [Files](#files)
|
41 |
+
- [IMatrix](#imatrix)
|
42 |
+
- [Common Quants](#common-quants)
|
43 |
+
- [All Quants](#all-quants)
|
44 |
+
- [Downloading using huggingface-cli](#downloading-using-huggingface-cli)
|
45 |
+
- [Inference](#inference)
|
46 |
+
- [Simple chat template](#simple-chat-template)
|
47 |
+
- [Chat template with system prompt](#chat-template-with-system-prompt)
|
48 |
+
- [Llama.cpp](#llama-cpp)
|
49 |
+
- [FAQ](#faq)
|
50 |
+
- [Why is the IMatrix not applied everywhere?](#why-is-the-imatrix-not-applied-everywhere)
|
51 |
+
- [How do I merge a split GGUF?](#how-do-i-merge-a-split-gguf)
|
52 |
+
|
53 |
+
---
|
54 |
+
|
55 |
+
## Files
|
56 |
+
|
57 |
+
### IMatrix
|
58 |
+
Status: β³ Processing
|
59 |
+
Link: [here](https://huggingface.co/legraphista/unsloth-Phi-3.5-mini-instruct-IMat-GGUF/blob/main/imatrix.dat)
|
60 |
+
|
61 |
+
### Common Quants
|
62 |
+
| Filename | Quant type | File Size | Status | Uses IMatrix | Is Split |
|
63 |
+
| -------- | ---------- | --------- | ------ | ------------ | -------- |
|
64 |
+
| unsloth-Phi-3.5-mini-instruct.Q8_0 | Q8_0 | - | β³ Processing | βͺ Static | -
|
65 |
+
| unsloth-Phi-3.5-mini-instruct.Q6_K | Q6_K | - | β³ Processing | βͺ Static | -
|
66 |
+
| unsloth-Phi-3.5-mini-instruct.Q4_K | Q4_K | - | β³ Processing | π’ IMatrix | -
|
67 |
+
| unsloth-Phi-3.5-mini-instruct.Q3_K | Q3_K | - | β³ Processing | π’ IMatrix | -
|
68 |
+
| unsloth-Phi-3.5-mini-instruct.Q2_K | Q2_K | - | β³ Processing | π’ IMatrix | -
|
69 |
+
|
70 |
+
|
71 |
+
### All Quants
|
72 |
+
| Filename | Quant type | File Size | Status | Uses IMatrix | Is Split |
|
73 |
+
| -------- | ---------- | --------- | ------ | ------------ | -------- |
|
74 |
+
| unsloth-Phi-3.5-mini-instruct.BF16 | BF16 | - | β³ Processing | βͺ Static | -
|
75 |
+
| unsloth-Phi-3.5-mini-instruct.FP16 | F16 | - | β³ Processing | βͺ Static | -
|
76 |
+
| unsloth-Phi-3.5-mini-instruct.Q8_0 | Q8_0 | - | β³ Processing | βͺ Static | -
|
77 |
+
| unsloth-Phi-3.5-mini-instruct.Q6_K | Q6_K | - | β³ Processing | βͺ Static | -
|
78 |
+
| unsloth-Phi-3.5-mini-instruct.Q5_K | Q5_K | - | β³ Processing | βͺ Static | -
|
79 |
+
| unsloth-Phi-3.5-mini-instruct.Q5_K_S | Q5_K_S | - | β³ Processing | βͺ Static | -
|
80 |
+
| unsloth-Phi-3.5-mini-instruct.Q4_K | Q4_K | - | β³ Processing | π’ IMatrix | -
|
81 |
+
| unsloth-Phi-3.5-mini-instruct.Q4_K_S | Q4_K_S | - | β³ Processing | π’ IMatrix | -
|
82 |
+
| unsloth-Phi-3.5-mini-instruct.IQ4_NL | IQ4_NL | - | β³ Processing | π’ IMatrix | -
|
83 |
+
| unsloth-Phi-3.5-mini-instruct.IQ4_XS | IQ4_XS | - | β³ Processing | π’ IMatrix | -
|
84 |
+
| unsloth-Phi-3.5-mini-instruct.Q3_K | Q3_K | - | β³ Processing | π’ IMatrix | -
|
85 |
+
| unsloth-Phi-3.5-mini-instruct.Q3_K_L | Q3_K_L | - | β³ Processing | π’ IMatrix | -
|
86 |
+
| unsloth-Phi-3.5-mini-instruct.Q3_K_S | Q3_K_S | - | β³ Processing | π’ IMatrix | -
|
87 |
+
| unsloth-Phi-3.5-mini-instruct.IQ3_M | IQ3_M | - | β³ Processing | π’ IMatrix | -
|
88 |
+
| unsloth-Phi-3.5-mini-instruct.IQ3_S | IQ3_S | - | β³ Processing | π’ IMatrix | -
|
89 |
+
| unsloth-Phi-3.5-mini-instruct.IQ3_XS | IQ3_XS | - | β³ Processing | π’ IMatrix | -
|
90 |
+
| unsloth-Phi-3.5-mini-instruct.IQ3_XXS | IQ3_XXS | - | β³ Processing | π’ IMatrix | -
|
91 |
+
| unsloth-Phi-3.5-mini-instruct.Q2_K | Q2_K | - | β³ Processing | π’ IMatrix | -
|
92 |
+
| unsloth-Phi-3.5-mini-instruct.Q2_K_S | Q2_K_S | - | β³ Processing | π’ IMatrix | -
|
93 |
+
| unsloth-Phi-3.5-mini-instruct.IQ2_M | IQ2_M | - | β³ Processing | π’ IMatrix | -
|
94 |
+
| unsloth-Phi-3.5-mini-instruct.IQ2_S | IQ2_S | - | β³ Processing | π’ IMatrix | -
|
95 |
+
| unsloth-Phi-3.5-mini-instruct.IQ2_XS | IQ2_XS | - | β³ Processing | π’ IMatrix | -
|
96 |
+
| unsloth-Phi-3.5-mini-instruct.IQ2_XXS | IQ2_XXS | - | β³ Processing | π’ IMatrix | -
|
97 |
+
| unsloth-Phi-3.5-mini-instruct.IQ1_M | IQ1_M | - | β³ Processing | π’ IMatrix | -
|
98 |
+
| unsloth-Phi-3.5-mini-instruct.IQ1_S | IQ1_S | - | β³ Processing | π’ IMatrix | -
|
99 |
+
|
100 |
+
|
101 |
+
## Downloading using huggingface-cli
|
102 |
+
If you do not have hugginface-cli installed:
|
103 |
+
```
|
104 |
+
pip install -U "huggingface_hub[cli]"
|
105 |
+
```
|
106 |
+
Download the specific file you want:
|
107 |
+
```
|
108 |
+
huggingface-cli download legraphista/unsloth-Phi-3.5-mini-instruct-IMat-GGUF --include "unsloth-Phi-3.5-mini-instruct.Q8_0.gguf" --local-dir ./
|
109 |
+
```
|
110 |
+
If the model file is big, it has been split into multiple files. In order to download them all to a local folder, run:
|
111 |
+
```
|
112 |
+
huggingface-cli download legraphista/unsloth-Phi-3.5-mini-instruct-IMat-GGUF --include "unsloth-Phi-3.5-mini-instruct.Q8_0/*" --local-dir ./
|
113 |
+
# see FAQ for merging GGUF's
|
114 |
+
```
|
115 |
+
|
116 |
+
---
|
117 |
+
|
118 |
+
## Inference
|
119 |
+
|
120 |
+
### Simple chat template
|
121 |
+
```
|
122 |
+
<|user|>
|
123 |
+
{user_prompt}<|end|>
|
124 |
+
<|assistant|>
|
125 |
+
{assistant_response}<|end|>
|
126 |
+
<|user|>
|
127 |
+
{next_user_prompt}<|end|>
|
128 |
+
<|endoftext|>
|
129 |
+
```
|
130 |
+
|
131 |
+
### Chat template with system prompt
|
132 |
+
```
|
133 |
+
<|system|>
|
134 |
+
{system_prompt}<|end|>
|
135 |
+
<|user|>
|
136 |
+
{user_prompt}<|end|>
|
137 |
+
<|assistant|>
|
138 |
+
{assistant_response}<|end|>
|
139 |
+
<|user|>
|
140 |
+
{next_user_prompt}<|end|>
|
141 |
+
<|endoftext|>
|
142 |
+
```
|
143 |
+
|
144 |
+
### Llama.cpp
|
145 |
+
```
|
146 |
+
llama.cpp/main -m unsloth-Phi-3.5-mini-instruct.Q8_0.gguf --color -i -p "prompt here (according to the chat template)"
|
147 |
+
```
|
148 |
+
|
149 |
+
---
|
150 |
+
|
151 |
+
## FAQ
|
152 |
+
|
153 |
+
### Why is the IMatrix not applied everywhere?
|
154 |
+
According to [this investigation](https://www.reddit.com/r/LocalLLaMA/comments/1993iro/ggufs_quants_can_punch_above_their_weights_now/), it appears that lower quantizations are the only ones that benefit from the imatrix input (as per hellaswag results).
|
155 |
+
|
156 |
+
### How do I merge a split GGUF?
|
157 |
+
1. Make sure you have `gguf-split` available
|
158 |
+
- To get hold of `gguf-split`, navigate to https://github.com/ggerganov/llama.cpp/releases
|
159 |
+
- Download the appropriate zip for your system from the latest release
|
160 |
+
- Unzip the archive and you should be able to find `gguf-split`
|
161 |
+
2. Locate your GGUF chunks folder (ex: `unsloth-Phi-3.5-mini-instruct.Q8_0`)
|
162 |
+
3. Run `gguf-split --merge unsloth-Phi-3.5-mini-instruct.Q8_0/unsloth-Phi-3.5-mini-instruct.Q8_0-00001-of-XXXXX.gguf unsloth-Phi-3.5-mini-instruct.Q8_0.gguf`
|
163 |
+
- Make sure to point `gguf-split` to the first chunk of the split.
|
164 |
+
|
165 |
+
---
|
166 |
+
|
167 |
+
Got a suggestion? Ping me [@legraphista](https://x.com/legraphista)!
|