GGUF
GGUF
Inference Endpoints
andrijdavid commited on
Commit
5f3582b
·
verified ·
1 Parent(s): 6ac13f8

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,30 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Q2_K/Q2_K-00001-of-00001.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Q3_K_L/Q3_K_L-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Q3_K_L/Q3_K_L-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Q3_K_M/Q3_K_M-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Q3_K_M/Q3_K_M-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Q3_K_S/Q3_K_S-00001-of-00001.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Q4_0/Q4_0-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Q4_0/Q4_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Q4_1/Q4_1-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Q4_1/Q4_1-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
46
+ Q4_K_M/Q4_K_M-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
47
+ Q4_K_M/Q4_K_M-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
48
+ Q4_K_S/Q4_K_S-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
49
+ Q4_K_S/Q4_K_S-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
50
+ Q5_0/Q5_0-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
51
+ Q5_0/Q5_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
52
+ Q5_1/Q5_1-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
53
+ Q5_1/Q5_1-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
54
+ Q5_K_M/Q5_K_M-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
55
+ Q5_K_M/Q5_K_M-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
56
+ Q5_K_S/Q5_K_S-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
57
+ Q5_K_S/Q5_K_S-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
58
+ Q6_K/Q6_K-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
59
+ Q6_K/Q6_K-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
60
+ Q8_0/Q8_0-00001-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
61
+ Q8_0/Q8_0-00002-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
62
+ Q8_0/Q8_0-00003-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
Q2_K/Q2_K-00001-of-00001.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9b54ef8b999c6ef4e3e530482732308b663d0eb3389168eb572f465cffcb42f
3
+ size 27079568256
Q3_K_L/Q3_K_L-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1410ff6733e0836dfc4c7c6fa2b15d7cfd47edcdbfe7a3c850b2e111c3aaa37a
3
+ size 32164629120
Q3_K_L/Q3_K_L-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b62a64cd6015f8b6c2026305545f87f7e325d331e841c60b1f38081268cdea67
3
+ size 6324134272
Q3_K_M/Q3_K_M-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cba513e55ca0f4609258ea901fe95547737111dc024d26e7651f89fb1608f2af
3
+ size 32155917504
Q3_K_M/Q3_K_M-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a9b4b393aa4e10d5bad8a6cf5037f91456e369c1671f21e9373524a33fb4fd2
3
+ size 3120008992
Q3_K_S/Q3_K_S-00001-of-00001.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90ca5d145492b946e5d6a49098c57c9ac6bf771cda0b4f72abeb907b41d4abda
3
+ size 31568161664
Q4_0/Q4_0-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66f4933812147fc7cb11759ea2a3a5dcc24256fb5715e3f638626c2024313eb4
3
+ size 32126254304
Q4_0/Q4_0-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa93694742d699f5644670740762d5d155cc4333d5204848fef84c5895e792c2
3
+ size 8876764960
Q4_1/Q4_1-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc8e79cb2808cec2fe9b5020147c3621ab33e807bbf10b03d496ecf8f5e59b18
3
+ size 32169306752
Q4_1/Q4_1-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65c7c2b63a013ca63e5bce240ea5ce361a271cda82613a8601b2910c97257a46
3
+ size 13273645408
Q4_K_M/Q4_K_M-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a209f6325f730cbe0bbaca83791b8c1dc3a5f87ff5240b72bc61c5da89a960
3
+ size 32202601056
Q4_K_M/Q4_K_M-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f822c848ae1b2fcd8dfe21402d17d5f3fa66957887ab8b2dbcc635e0db28cb06
3
+ size 11568658848
Q4_K_S/Q4_K_S-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9c61b87998736ea039736fdc34b564dd4705638e9349c31dbda5a8f727d81b5
3
+ size 32147028608
Q4_K_S/Q4_K_S-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78f5b94d1943b421cbe12728a216bc2c84ad4fa01b79af9b1c3e3b17cb19e5e8
3
+ size 9141203328
Q5_0/Q5_0-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8bff7da2f2784a2858f6a9ae621d2be350d561d9e27970b4d432e0463e5e3a3
3
+ size 32199907904
Q5_0/Q5_0-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c290580d91748ce67564018331fff39ea7fe729c7b653e79d138c505710ee390
3
+ size 17682977184
Q5_1/Q5_1-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abd9878a9d7ecb905f4562d065214e23c85e8f9d4fd102b8264537e34b76e7d7
3
+ size 32205573408
Q5_1/Q5_1-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58cc22ac09b9be7bb1ba274e85ceee33e9cc852a5780fce98a6aff737d1f544a
3
+ size 22117244640
Q5_K_M/Q5_K_M-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e01fd79392b1e2eb95e7df95ef421fbb752d2088b2a17f8fb530cdb0f19aee58
3
+ size 32189158976
Q5_K_M/Q5_K_M-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c99b130d9327d7f715d45207082b99c41a1477339cf4f40aa8673126068c2f2
3
+ size 19119789504
Q5_K_S/Q5_K_S-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:495d65d3e1c808387c1d21a4fcce89eb4401beee6ae036aa91a6e8171b4e2a12
3
+ size 32199907904
Q5_K_S/Q5_K_S-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:995c51a0db27130d482a3d5d5806437e8372d4b0304d792fa08c35cff1d29096
3
+ size 17682977184
Q6_K/Q6_K-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a43721737a220687f3e600590209ea1e2f7c34ce1565afe67f98c4a1ee1a7c1
3
+ size 32194888160
Q6_K/Q6_K-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f014d2f75cc6dddf99bdfc0d478b851a4938c99b966e0e8e708a0c1ca04014b5
3
+ size 27122854400
Q8_0/Q8_0-00001-of-00003.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:156002d34a508fa96d194371d4db6c177f69dd8b6b8c002a350a1aec8e4881c3
3
+ size 32139010848
Q8_0/Q8_0-00002-of-00003.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42144dc3c12432c64994b6e94b4339199f90d748ac5fa10da291f3b39dd73dd3
3
+ size 32164603232
Q8_0/Q8_0-00003-of-00003.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98f4d6f80d90077f83acb5ac2276761101a40b829024a40eca195b89ac5986a1
3
+ size 12520563712
README.md CHANGED
@@ -204,6 +204,202 @@ Here are guides on using llama-cpp-python and ctransformers with LangChain:
204
  # Original model card: Smaug-72B-v0.1
205
 
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c14f6b02e1f8f67c73bd05/pf4d6FA7DriRtVq5HCkxd.png)
208
 
209
 
@@ -251,12 +447,6 @@ Smaug-72B has the following results:
251
 
252
  | ARC | TruthfulQA | GSM8K |
253
  | - | - | -- |
254
- | 0.20 | 0.39 | 1.00 |
255
-
256
- Note that GSM8K often scores very highly on this contamination suite - we verified this by also running Llama-2-70B:
257
-
258
- | ARC | TruthfulQA | GSM8K |
259
- | - | ----- |
260
  | 0.22 | 0.51 | 0.89 |
261
 
262
 
@@ -390,3 +580,5 @@ Please cite the paper if you use data, model, or method in this repo.
390
  ```
391
 
392
  <!-- original-model-card end -->
 
 
 
204
  # Original model card: Smaug-72B-v0.1
205
 
206
 
207
+
208
+ # Smaug-72B-v0.1-GGUF
209
+ - Original model: [Smaug-72B-v0.1](https://huggingface.co/abacusai/Smaug-72B-v0.1)
210
+
211
+ <!-- description start -->
212
+ ## Description
213
+
214
+ This repo contains GGUF format model files for [Smaug-72B-v0.1](https://huggingface.co/abacusai/Smaug-72B-v0.1).
215
+
216
+ <!-- description end -->
217
+ <!-- README_GGUF.md-about-gguf start -->
218
+ ### About GGUF
219
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
220
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
221
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). This is the source project for GGUF, providing both a Command Line Interface (CLI) and a server option.
222
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), Known as the most widely used web UI, this project boasts numerous features and powerful extensions, and supports GPU acceleration.
223
+ * [Ollama](https://github.com/jmorganca/ollama) Ollama is a lightweight and extensible framework designed for building and running language models locally. It features a simple API for creating, managing, and executing models, along with a library of pre-built models for use in various applications​
224
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), A comprehensive web UI offering GPU acceleration across all platforms and architectures, particularly renowned for storytelling.
225
+ * [GPT4All](https://gpt4all.io), This is a free and open source GUI that runs locally, supporting Windows, Linux, and macOS with full GPU acceleration.
226
+ * [LM Studio](https://lmstudio.ai/) An intuitive and powerful local GUI for Windows and macOS (Silicon), featuring GPU acceleration.
227
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui). A notable web UI with a variety of unique features, including a comprehensive model library for easy model selection.
228
+ * [Faraday.dev](https://faraday.dev/), An attractive, user-friendly character-based chat GUI for Windows and macOS (both Silicon and Intel), also offering GPU acceleration.
229
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), A Python library equipped with GPU acceleration, LangChain support, and an OpenAI-compatible API server.
230
+ * [candle](https://github.com/huggingface/candle), A Rust-based ML framework focusing on performance, including GPU support, and designed for ease of use.
231
+ * [ctransformers](https://github.com/marella/ctransformers), A Python library featuring GPU acceleration, LangChain support, and an OpenAI-compatible AI server.
232
+ * [localGPT](https://github.com/PromtEngineer/localGPT) An open-source initiative enabling private conversations with documents.
233
+ <!-- README_GGUF.md-about-gguf end -->
234
+
235
+ <!-- compatibility_gguf start -->
236
+ ## Explanation of quantisation methods
237
+ <details>
238
+ <summary>Click to see details</summary>
239
+ The new methods available are:
240
+
241
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
242
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
243
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
244
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
245
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw.
246
+ </details>
247
+ <!-- compatibility_gguf end -->
248
+
249
+ <!-- README_GGUF.md-how-to-download start -->
250
+ ## How to download GGUF files
251
+
252
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single folder.
253
+
254
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
255
+
256
+ * LM Studio
257
+ * LoLLMS Web UI
258
+ * Faraday.dev
259
+
260
+ ### In `text-generation-webui`
261
+
262
+ Under Download Model, you can enter the model repo: LiteLLMs/Smaug-72B-v0.1-GGUF and below it, a specific filename to download, such as: Q4_0/Q4_0-00001-of-00009.gguf.
263
+
264
+ Then click Download.
265
+
266
+ ### On the command line, including multiple files at once
267
+
268
+ I recommend using the `huggingface-hub` Python library:
269
+
270
+ ```shell
271
+ pip3 install huggingface-hub
272
+ ```
273
+
274
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
275
+
276
+ ```shell
277
+ huggingface-cli download LiteLLMs/Smaug-72B-v0.1-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False
278
+ ```
279
+
280
+ <details>
281
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
282
+
283
+ You can also download multiple files at once with a pattern:
284
+
285
+ ```shell
286
+ huggingface-cli download LiteLLMs/Smaug-72B-v0.1-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
287
+ ```
288
+
289
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
290
+
291
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
292
+
293
+ ```shell
294
+ pip3 install huggingface_hub[hf_transfer]
295
+ ```
296
+
297
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
298
+
299
+ ```shell
300
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download LiteLLMs/Smaug-72B-v0.1-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False
301
+ ```
302
+
303
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
304
+ </details>
305
+ <!-- README_GGUF.md-how-to-download end -->
306
+ <!-- README_GGUF.md-how-to-run start -->
307
+ ## Example `llama.cpp` command
308
+
309
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
310
+
311
+ ```shell
312
+ ./main -ngl 35 -m Q4_0/Q4_0-00001-of-00009.gguf --color -c 8192 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<PROMPT>"
313
+ ```
314
+
315
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
316
+
317
+ Change `-c 8192` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
318
+
319
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
320
+
321
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
322
+
323
+ ## How to run in `text-generation-webui`
324
+
325
+ Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
326
+
327
+ ## How to run from Python code
328
+
329
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python.
330
+
331
+ ### How to load this model in Python code, using llama-cpp-python
332
+
333
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
334
+
335
+ #### First install the package
336
+
337
+ Run one of the following commands, according to your system:
338
+
339
+ ```shell
340
+ # Base ctransformers with no GPU acceleration
341
+ pip install llama-cpp-python
342
+ # With NVidia CUDA acceleration
343
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
344
+ # Or with OpenBLAS acceleration
345
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
346
+ # Or with CLBLast acceleration
347
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
348
+ # Or with AMD ROCm GPU acceleration (Linux only)
349
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
350
+ # Or with Metal GPU acceleration for macOS systems only
351
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
352
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
353
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
354
+ pip install llama-cpp-python
355
+ ```
356
+
357
+ #### Simple llama-cpp-python example code
358
+
359
+ ```python
360
+ from llama_cpp import Llama
361
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
362
+ llm = Llama(
363
+ model_path="./Q4_0/Q4_0-00001-of-00009.gguf", # Download the model file first
364
+ n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
365
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
366
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
367
+ )
368
+ # Simple inference example
369
+ output = llm(
370
+ "<PROMPT>", # Prompt
371
+ max_tokens=512, # Generate up to 512 tokens
372
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
373
+ echo=True # Whether to echo the prompt
374
+ )
375
+ # Chat Completion API
376
+ llm = Llama(model_path="./Q4_0/Q4_0-00001-of-00009.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
377
+ llm.create_chat_completion(
378
+ messages = [
379
+ {"role": "system", "content": "You are a story writing assistant."},
380
+ {
381
+ "role": "user",
382
+ "content": "Write a story about llamas."
383
+ }
384
+ ]
385
+ )
386
+ ```
387
+
388
+ ## How to use with LangChain
389
+
390
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
391
+
392
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
393
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
394
+
395
+ <!-- README_GGUF.md-how-to-run end -->
396
+
397
+ <!-- footer end -->
398
+
399
+ <!-- original-model-card start -->
400
+ # Original model card: Smaug-72B-v0.1
401
+
402
+
403
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c14f6b02e1f8f67c73bd05/pf4d6FA7DriRtVq5HCkxd.png)
404
 
405
 
 
447
 
448
  | ARC | TruthfulQA | GSM8K |
449
  | - | - | -- |
 
 
 
 
 
 
450
  | 0.22 | 0.51 | 0.89 |
451
 
452
 
 
580
  ```
581
 
582
  <!-- original-model-card end -->
583
+
584
+ <!-- original-model-card end -->