legraphista
commited on
Commit
β’
fbbb429
1
Parent(s):
c16105d
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: microsoft/Phi-3-medium-128k-instruct
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- multilingual
|
6 |
+
library_name: gguf
|
7 |
+
license: mit
|
8 |
+
license_link: https://huggingface.co/microsoft/Phi-3-medium-128k-instruct/resolve/main/LICENSE
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
quantized_by: legraphista
|
11 |
+
tags:
|
12 |
+
- quantized
|
13 |
+
- GGUF
|
14 |
+
- imatrix
|
15 |
+
- quantization
|
16 |
+
- imat
|
17 |
+
- imatrix
|
18 |
+
- static
|
19 |
+
---
|
20 |
+
|
21 |
+
# Phi-3-medium-128k-instruct-IMat-GGUF
|
22 |
+
_Llama.cpp imatrix quantization of microsoft/Phi-3-medium-128k-instruct_
|
23 |
+
|
24 |
+
Original Model: [microsoft/Phi-3-medium-128k-instruct](https://huggingface.co/microsoft/Phi-3-medium-128k-instruct)
|
25 |
+
Original dtype: `BF16` (`bfloat16`)
|
26 |
+
Quantized by: llama.cpp [b3003](https://github.com/ggerganov/llama.cpp/releases/tag/b3003)
|
27 |
+
IMatrix dataset: [here](https://gist.githubusercontent.com/legraphista/d6d93f1a254bcfc58e0af3777eaec41e/raw/d380e7002cea4a51c33fffd47db851942754e7cc/imatrix.calibration.medium.raw)
|
28 |
+
|
29 |
+
- [Phi-3-medium-128k-instruct-IMat-GGUF](#phi-3-medium-128k-instruct-imat-gguf)
|
30 |
+
- [Files](#files)
|
31 |
+
- [IMatrix](#imatrix)
|
32 |
+
- [Common Quants](#common-quants)
|
33 |
+
- [All Quants](#all-quants)
|
34 |
+
- [Downloading using huggingface-cli](#downloading-using-huggingface-cli)
|
35 |
+
- [Inference](#inference)
|
36 |
+
- [Simple chat template](#simple-chat-template)
|
37 |
+
- [Llama.cpp](#llama-cpp)
|
38 |
+
- [FAQ](#faq)
|
39 |
+
- [Why is the IMatrix not applied everywhere?](#why-is-the-imatrix-not-applied-everywhere)
|
40 |
+
- [How do I merge a split GGUF?](#how-do-i-merge-a-split-gguf)
|
41 |
+
|
42 |
+
---
|
43 |
+
|
44 |
+
## Files
|
45 |
+
|
46 |
+
### IMatrix
|
47 |
+
Status: β³ Processing
|
48 |
+
Link: [here](https://huggingface.co/legraphista/Phi-3-medium-128k-instruct-IMat-GGUF/blob/main/imatrix.dat)
|
49 |
+
|
50 |
+
### Common Quants
|
51 |
+
| Filename | Quant type | File Size | Status | Uses IMatrix | Is Split |
|
52 |
+
| -------- | ---------- | --------- | ------ | ------------ | -------- |
|
53 |
+
| Phi-3-medium-128k-instruct.Q8_0 | Q8_0 | - | β³ Processing | βͺ No | -
|
54 |
+
| Phi-3-medium-128k-instruct.Q6_K | Q6_K | - | β³ Processing | βͺ No | -
|
55 |
+
| Phi-3-medium-128k-instruct.Q4_K | Q4_K | - | β³ Processing | π’ Yes | -
|
56 |
+
| Phi-3-medium-128k-instruct.Q3_K | Q3_K | - | β³ Processing | π’ Yes | -
|
57 |
+
| Phi-3-medium-128k-instruct.Q2_K | Q2_K | - | β³ Processing | π’ Yes | -
|
58 |
+
|
59 |
+
|
60 |
+
### All Quants
|
61 |
+
| Filename | Quant type | File Size | Status | Uses IMatrix | Is Split |
|
62 |
+
| -------- | ---------- | --------- | ------ | ------------ | -------- |
|
63 |
+
| Phi-3-medium-128k-instruct.FP16 | F16 | - | β³ Processing | βͺ No | -
|
64 |
+
| Phi-3-medium-128k-instruct.BF16 | BF16 | - | β³ Processing | βͺ No | -
|
65 |
+
| Phi-3-medium-128k-instruct.Q5_K | Q5_K | - | β³ Processing | βͺ No | -
|
66 |
+
| Phi-3-medium-128k-instruct.Q5_K_S | Q5_K_S | - | β³ Processing | βͺ No | -
|
67 |
+
| Phi-3-medium-128k-instruct.Q4_K_S | Q4_K_S | - | β³ Processing | π’ Yes | -
|
68 |
+
| Phi-3-medium-128k-instruct.Q3_K_L | Q3_K_L | - | β³ Processing | π’ Yes | -
|
69 |
+
| Phi-3-medium-128k-instruct.Q3_K_S | Q3_K_S | - | β³ Processing | π’ Yes | -
|
70 |
+
| Phi-3-medium-128k-instruct.Q2_K_S | Q2_K_S | - | β³ Processing | π’ Yes | -
|
71 |
+
| Phi-3-medium-128k-instruct.IQ4_NL | IQ4_NL | - | β³ Processing | π’ Yes | -
|
72 |
+
| Phi-3-medium-128k-instruct.IQ4_XS | IQ4_XS | - | β³ Processing | π’ Yes | -
|
73 |
+
| Phi-3-medium-128k-instruct.IQ3_M | IQ3_M | - | β³ Processing | π’ Yes | -
|
74 |
+
| Phi-3-medium-128k-instruct.IQ3_S | IQ3_S | - | β³ Processing | π’ Yes | -
|
75 |
+
| Phi-3-medium-128k-instruct.IQ3_XS | IQ3_XS | - | β³ Processing | π’ Yes | -
|
76 |
+
| Phi-3-medium-128k-instruct.IQ3_XXS | IQ3_XXS | - | β³ Processing | π’ Yes | -
|
77 |
+
| Phi-3-medium-128k-instruct.IQ2_M | IQ2_M | - | β³ Processing | π’ Yes | -
|
78 |
+
| Phi-3-medium-128k-instruct.IQ2_S | IQ2_S | - | β³ Processing | π’ Yes | -
|
79 |
+
| Phi-3-medium-128k-instruct.IQ2_XS | IQ2_XS | - | β³ Processing | π’ Yes | -
|
80 |
+
| Phi-3-medium-128k-instruct.IQ2_XXS | IQ2_XXS | - | β³ Processing | π’ Yes | -
|
81 |
+
| Phi-3-medium-128k-instruct.IQ1_M | IQ1_M | - | β³ Processing | π’ Yes | -
|
82 |
+
| Phi-3-medium-128k-instruct.IQ1_S | IQ1_S | - | β³ Processing | π’ Yes | -
|
83 |
+
|
84 |
+
|
85 |
+
## Downloading using huggingface-cli
|
86 |
+
If you do not have hugginface-cli installed:
|
87 |
+
```
|
88 |
+
pip install -U "huggingface_hub[cli]"
|
89 |
+
```
|
90 |
+
Download the specific file you want:
|
91 |
+
```
|
92 |
+
huggingface-cli download legraphista/Phi-3-medium-128k-instruct-IMat-GGUF --include "Phi-3-medium-128k-instruct.Q8_0.gguf" --local-dir ./
|
93 |
+
```
|
94 |
+
If the model file is big, it has been split into multiple files. In order to download them all to a local folder, run:
|
95 |
+
```
|
96 |
+
huggingface-cli download legraphista/Phi-3-medium-128k-instruct-IMat-GGUF --include "Phi-3-medium-128k-instruct.Q8_0/*" --local-dir Phi-3-medium-128k-instruct.Q8_0
|
97 |
+
# see FAQ for merging GGUF's
|
98 |
+
```
|
99 |
+
|
100 |
+
---
|
101 |
+
|
102 |
+
## Inference
|
103 |
+
|
104 |
+
### Simple chat template
|
105 |
+
```
|
106 |
+
<|user|>
|
107 |
+
Can you provide ways to eat combinations of bananas and dragonfruits?<|end|>
|
108 |
+
<|assistant|>
|
109 |
+
Sure! Here are some ways to eat bananas and dragonfruits together:
|
110 |
+
1. Banana and dragonfruit smoothie: Blend bananas and dragonfruits together with some milk and honey.
|
111 |
+
2. Banana and dragonfruit salad: Mix sliced bananas and dragonfruits together with some lemon juice and honey.<|end|>
|
112 |
+
<|user|>
|
113 |
+
What about solving an 2x + 3 = 7 equation?<|end|>
|
114 |
+
<|assistant|>
|
115 |
+
|
116 |
+
```
|
117 |
+
|
118 |
+
### Llama.cpp
|
119 |
+
```
|
120 |
+
llama.cpp/main -m Phi-3-medium-128k-instruct.Q8_0.gguf --color -i -p "prompt here (according to the chat template)"
|
121 |
+
```
|
122 |
+
|
123 |
+
---
|
124 |
+
|
125 |
+
## FAQ
|
126 |
+
|
127 |
+
### Why is the IMatrix not applied everywhere?
|
128 |
+
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).
|
129 |
+
|
130 |
+
### How do I merge a split GGUF?
|
131 |
+
1. Make sure you have `gguf-split` available
|
132 |
+
- To get hold of `gguf-split`, navigate to https://github.com/ggerganov/llama.cpp/releases
|
133 |
+
- Download the appropriate zip for your system from the latest release
|
134 |
+
- Unzip the archive and you should be able to find `gguf-split`
|
135 |
+
2. Locate your GGUF chunks folder (ex: `Phi-3-medium-128k-instruct.Q8_0`)
|
136 |
+
3. Run `gguf-split --merge Phi-3-medium-128k-instruct.Q8_0/Phi-3-medium-128k-instruct.Q8_0-00001-of-XXXXX.gguf Phi-3-medium-128k-instruct.Q8_0.gguf`
|
137 |
+
- Make sure to point `gguf-split` to the first chunk of the split.
|
138 |
+
|
139 |
+
---
|
140 |
+
|
141 |
+
Got a suggestion? Ping me [@legraphista](https://x.com/legraphista)!
|