NANI-Nithin commited on
Commit
593c362
·
verified ·
1 Parent(s): d38da3f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +68 -220
README.md CHANGED
@@ -1,234 +1,82 @@
1
  ---
2
- language:
3
- - en
4
- license: apache-2.0
5
- library_name: llama.cpp
6
- tags:
7
- - gguf
8
- - llama.cpp
9
- - minicpm
10
- - minicpm5
11
- - quantized
12
- - text-generation
13
- - chat
14
- - reasoning
15
- - tool-calling
16
- - instruct
17
- base_model:
18
- - openbmb/MiniCPM5-1B
19
  pipeline_tag: text-generation
 
 
 
 
 
20
  ---
21
 
22
- # MiniCPM5-1B-GGUF
23
-
24
- GGUF quantizations of **openbmb/MiniCPM5-1B** for use with **llama.cpp**, **Ollama**, **LM Studio**, **Jan**, **OpenWebUI**, **llama-cpp-python**, and other GGUF-compatible runtimes.
25
-
26
- ## Base Model
27
-
28
- **Base Model:** [`openbmb/MiniCPM5-1B`](https://huggingface.co/openbmb/MiniCPM5-1B)
29
-
30
- MiniCPM5-1B is a compact 1B-parameter language model from OpenBMB focused on:
31
-
32
- - General chat
33
- - Reasoning
34
- - Coding assistance
35
- - Tool calling
36
- - Long-context workloads
37
- - Edge and local deployment
38
-
39
- This repository contains community-generated GGUF conversions and quantizations derived from the original BF16 checkpoint.
40
-
41
- ---
42
-
43
- # Available Files
44
-
45
- ## Full Precision
46
-
47
- | File | Description |
48
- |--------|--------|
49
- | MiniCPM5-1B-BF16.gguf | BF16 GGUF conversion of the original checkpoint |
50
-
51
- ## Standard Quantizations
52
-
53
- | Quant | Recommended Usage |
54
- |---------|---------|
55
- | Q2_K | Smallest footprint |
56
- | Q3_K_S | Extreme memory savings |
57
- | Q3_K_M | Low memory systems |
58
- | Q3_K_L | Better quality than Q3_K_M |
59
- | Q4_0 | Legacy quant |
60
- | Q4_1 | Legacy quant |
61
- | Q4_K_S | Balanced |
62
- | Q4_K_M | Recommended general-purpose quant |
63
- | Q5_K_S | Higher quality |
64
- | Q5_K_M | Near-lossless experience |
65
- | Q6_K | Very high quality |
66
- | Q8_0 | Maximum quality quantized version |
67
-
68
- ## Importance Matrix (IQ) Quantizations
69
-
70
- Generated using llama.cpp importance matrix quantization.
71
-
72
- | Quant | Recommended Usage |
73
- |---------|---------|
74
- | IQ2_M | Smallest IQ variant |
75
- | IQ3_XXS | Ultra compact |
76
- | IQ3_XS | Compact |
77
- | IQ3_M | Strong quality-to-size ratio |
78
- | IQ4_XS | High quality compact quant |
79
- | IQ4_NL | Best IQ variant in this repository |
80
-
81
- ---
82
-
83
- # Recommended Quant
84
-
85
- If you are unsure which file to choose:
86
-
87
- ### Most Users
88
-
89
- ```text
90
- MiniCPM5-1B-Q4_K_M.gguf
91
- ```
92
-
93
- Best balance between:
94
-
95
- - Quality
96
- - Speed
97
- - Memory usage
98
- - Compatibility
99
-
100
- ### Higher Quality
101
-
102
- ```text
103
- MiniCPM5-1B-Q5_K_M.gguf
104
- ```
105
-
106
- or
107
-
108
- ```text
109
- MiniCPM5-1B-Q6_K.gguf
110
- ```
111
-
112
- ### Maximum Quality
113
-
114
- ```text
115
- MiniCPM5-1B-Q8_0.gguf
116
- ```
117
-
118
- ### Best IQ Quant
119
-
120
- ```text
121
- MiniCPM5-1B-IQ4_NL.gguf
122
- ```
123
-
124
- ---
125
-
126
- # Example Usage
127
-
128
- ## llama.cpp
129
 
130
  ```bash
131
- llama-cli \
132
- -m MiniCPM5-1B-Q4_K_M.gguf \
133
- -ngl 99 \
134
- -c 8192
135
  ```
136
 
137
- ## llama-server
138
 
139
  ```bash
140
- llama-server \
141
- -m MiniCPM5-1B-Q4_K_M.gguf \
142
- -c 8192 \
143
- -ngl 99
144
  ```
145
 
146
- ## Ollama
147
-
148
- Create a Modelfile:
149
-
150
- ```text
151
- FROM MiniCPM5-1B-Q4_K_M.gguf
152
- ```
153
-
154
- Then:
155
-
156
- ```bash
157
- ollama create minicpm5-1b -f Modelfile
158
- ollama run minicpm5-1b
159
- ```
160
-
161
- ## Python
162
-
163
- ```python
164
- from llama_cpp import Llama
165
-
166
- llm = Llama(
167
- model_path="MiniCPM5-1B-Q4_K_M.gguf",
168
- n_ctx=8192,
169
- n_gpu_layers=-1,
170
- )
171
-
172
- print(
173
- llm(
174
- "Explain quantum computing in simple terms.",
175
- max_tokens=256
176
- )
177
- )
178
- ```
179
-
180
- ---
181
-
182
- # Conversion Details
183
-
184
- Conversion pipeline:
185
-
186
- 1. Download original Hugging Face model.
187
- 2. Convert to BF16 GGUF using llama.cpp.
188
- 3. Generate importance matrix for IQ quantization.
189
- 4. Generate standard GGUF quantizations.
190
- 5. Generate IQ quantizations.
191
- 6. Upload all artifacts to Hugging Face.
192
-
193
- Tools used:
194
-
195
- - llama.cpp
196
- - convert_hf_to_gguf.py
197
- - llama-quantize
198
- - llama-imatrix
199
-
200
- ---
201
-
202
- # Hardware Guidance
203
-
204
- | Quant | Approximate Use Case |
205
- |---------|---------|
206
- | Q2_K | Very constrained devices |
207
- | Q3_* | Raspberry Pi / older CPUs |
208
- | Q4_K_M | Most laptops and desktops |
209
- | Q5_K_M | Modern systems |
210
- | Q6_K | High-end CPUs and GPUs |
211
- | Q8_0 | Largest RAM footprint |
212
-
213
  ---
214
 
215
- # Disclaimer
216
-
217
- This repository is a community conversion of the original model and is not an official OpenBMB release.
218
-
219
- All model weights, architecture, training methodology, and evaluation results belong to the original authors of MiniCPM5-1B.
220
-
221
- If you use this model in research or production environments, please cite and credit the original MiniCPM team.
222
-
223
- ---
224
-
225
- # Credits
226
-
227
- - OpenBMB for creating MiniCPM5-1B
228
- - ggml-org for llama.cpp
229
- - Hugging Face for model hosting
230
- - Community contributors supporting GGUF deployment
231
-
232
- Original model:
233
-
234
- https://huggingface.co/openbmb/MiniCPM5-1B
 
1
  ---
2
+ base_model: openbmb/MiniCPM5-1B
3
+ library_name: gguf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  pipeline_tag: text-generation
5
+ tags:
6
+ - gguf
7
+ - llama.cpp
8
+ - quantized
9
+ - imatrix
10
  ---
11
 
12
+ # MiniCPM5-1B GGUF
13
+
14
+ GGUF quantizations of [openbmb/MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B), covering 30 files (18.1 GB total).
15
+
16
+ ## Files
17
+
18
+ | File | Quant | Size | Notes |
19
+ |---|---|---:|---|
20
+ | [MiniCPM5-1B-BF16.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-BF16.gguf) | `BF16` | 2.02 GB | Full precision source. Every quant below is cut from this file. |
21
+ | [MiniCPM5-1B-Q8_0.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q8_0.gguf) | `Q8_0` | 1.07 GB | Effectively lossless. Use when disk and RAM are not the constraint. |
22
+ | [MiniCPM5-1B-Q6_K.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q6_K.gguf) | `Q6_K` | 0.83 GB | Near-lossless; the last stop before quality becomes measurable. |
23
+ | [MiniCPM5-1B-Q5_K_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q5_K_M.gguf) | `Q5_K_M` | 0.73 GB | Very good quality, noticeably smaller than Q6_K. |
24
+ | [MiniCPM5-1B-Q5_K_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q5_K_S.gguf) | `Q5_K_S` | 0.72 GB | Slightly smaller than Q5_K_M for a slight quality cost. |
25
+ | [MiniCPM5-1B-Q5_1.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q5_1.gguf) | `Q5_1` | 0.77 GB | Legacy. Prefer Q5_K_M. |
26
+ | [MiniCPM5-1B-Q5_0.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q5_0.gguf) | `Q5_0` | 0.72 GB | Legacy. Prefer Q5_K_M. |
27
+ | [MiniCPM5-1B-Q4_K_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q4_K_M.gguf) | `Q4_K_M` | 0.64 GB | The usual default. Best quality-per-byte for most people. |
28
+ | [MiniCPM5-1B-Q4_K_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q4_K_S.gguf) | `Q4_K_S` | 0.62 GB | A little smaller than Q4_K_M, a little worse. |
29
+ | [MiniCPM5-1B-IQ4_NL.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ4_NL.gguf) | `IQ4_NL` | 0.62 GB | Non-linear 4-bit; good on hardware without fast K-quant kernels. |
30
+ | [MiniCPM5-1B-IQ4_XS.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ4_XS.gguf) | `IQ4_XS` | 0.60 GB | Best sub-4.5bpw option; usually beats Q4_K_S at a smaller size. |
31
+ | [MiniCPM5-1B-Q4_1.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q4_1.gguf) | `Q4_1` | 0.67 GB | Legacy. Prefer Q4_K_M. |
32
+ | [MiniCPM5-1B-Q4_0.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q4_0.gguf) | `Q4_0` | 0.62 GB | Legacy round-to-nearest. Prefer Q4_K_M unless a runtime needs this. |
33
+ | [MiniCPM5-1B-Q3_K_L.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q3_K_L.gguf) | `Q3_K_L` | 0.57 GB | Small, with real quality loss. Usable when RAM is tight. |
34
+ | [MiniCPM5-1B-Q3_K_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q3_K_M.gguf) | `Q3_K_M` | 0.54 GB | Smaller again; noticeable degradation. |
35
+ | [MiniCPM5-1B-IQ3_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ3_M.gguf) | `IQ3_M` | 0.52 GB | Strong at ~3.7bpw, clearly better than Q3_K_M. |
36
+ | [MiniCPM5-1B-IQ3_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ3_S.gguf) | `IQ3_S` | 0.51 GB | Slightly smaller than IQ3_M. |
37
+ | [MiniCPM5-1B-Q3_K_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q3_K_S.gguf) | `Q3_K_S` | 0.51 GB | Aggressive. Prefer IQ3_M at a similar size. |
38
+ | [MiniCPM5-1B-IQ3_XS.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ3_XS.gguf) | `IQ3_XS` | 0.50 GB | Aggressive but coherent. |
39
+ | [MiniCPM5-1B-IQ3_XXS.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ3_XXS.gguf) | `IQ3_XXS` | 0.46 GB | Very aggressive; imatrix carries it. |
40
+ | [MiniCPM5-1B-Q2_K.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q2_K.gguf) | `Q2_K` | 0.45 GB | Very small, heavily degraded. For experimentation. |
41
+ | [MiniCPM5-1B-IQ2_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ2_M.gguf) | `IQ2_M` | 0.43 GB | The smallest size most people find usable. |
42
+ | [MiniCPM5-1B-Q2_K_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q2_K_S.gguf) | `Q2_K_S` | 0.43 GB | Smaller than Q2_K, requires the imatrix. |
43
+ | [MiniCPM5-1B-IQ2_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ2_S.gguf) | `IQ2_S` | 0.41 GB | Below the usual usability line. |
44
+ | [MiniCPM5-1B-IQ2_XS.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ2_XS.gguf) | `IQ2_XS` | 0.38 GB | Experimental. |
45
+ | [MiniCPM5-1B-IQ2_XXS.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ2_XXS.gguf) | `IQ2_XXS` | 0.36 GB | Experimental. |
46
+ | [MiniCPM5-1B-Q2_0.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q2_0.gguf) | `Q2_0` | 0.44 GB | Extreme, group-64. Included for completeness. |
47
+ | [MiniCPM5-1B-IQ1_M.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ1_M.gguf) | `IQ1_M` | 0.34 GB | Extreme. Expect substantial degradation. |
48
+ | [MiniCPM5-1B-IQ1_S.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-IQ1_S.gguf) | `IQ1_S` | 0.33 GB | Extreme. Expect substantial degradation. |
49
+ | [MiniCPM5-1B-Q1_0.gguf](https://huggingface.co/NANI-Nithin/MiniCPM5-1B-GGUF/blob/main/MiniCPM5-1B-Q1_0.gguf) | `Q1_0` | 0.27 GB | Extreme. Included for completeness. |
50
+
51
+ ## Which one should I download?
52
+
53
+ Pick the largest file that leaves a couple of gigabytes of headroom on the device you will run it on — the model has to fit in RAM (or VRAM, if you are offloading) alongside the KV cache and the OS.
54
+
55
+ - Plenty of memory: **Q6_K** or **Q8_0**.
56
+ - The usual choice: **Q4_K_M**.
57
+ - Tight on memory: **IQ4_XS**, then **IQ3_M**, then **IQ2_M**.
58
+ - The `IQ*` files are imatrix-guided and generally beat a `Q*` file of similar size, at the cost of slightly slower inference on some hardware.
59
+
60
+ ## Quantization details
61
+
62
+ - Importance matrix computed with `llama-imatrix` over 500 rows of [Salesforce/wikitext](https://huggingface.co/datasets/Salesforce/wikitext) (`wikitext-2-raw-v1`).
63
+ - The matrix was computed on the **BF16** weights.
64
+ - K-quants below 6 bit and the whole `IQ` set are imatrix-guided. `Q4_0`/`Q4_1`/`Q5_0`/`Q5_1` are legacy round-to-nearest and ignore it; `Q6_K`/`Q8_0` are near-lossless and do not need it.
65
+ - All files are cut from the same BF16 GGUF, so differences between them are quantization only.
66
+
67
+ ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  ```bash
70
+ llama-cli -hf NANI-Nithin/MiniCPM5-1B-GGUF:Q4_K_M -p "Hello"
 
 
 
71
  ```
72
 
73
+ Or download one file and point at it directly:
74
 
75
  ```bash
76
+ huggingface-cli download NANI-Nithin/MiniCPM5-1B-GGUF MiniCPM5-1B-Q4_K_M.gguf --local-dir .
77
+ llama-cli -m MiniCPM5-1B-Q4_K_M.gguf -p "Hello"
 
 
78
  ```
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ---
81
 
82
+ Quantized with [llama.cpp](https://github.com/ggml-org/llama.cpp) by AgentQuantix on 2026-09-04. Licensing follows the base model.