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