MaziyarPanahi commited on
Commit
9cb6780
1 Parent(s): ccbb7f1

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,13 @@ 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
+ Sensei-7B-V1.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Sensei-7B-V1.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Sensei-7B-V1.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Sensei-7B-V1.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Sensei-7B-V1.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Sensei-7B-V1.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Sensei-7B-V1.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Sensei-7B-V1.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Sensei-7B-V1.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Sensei-7B-V1.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - quantized
4
+ - 2-bit
5
+ - 3-bit
6
+ - 4-bit
7
+ - 5-bit
8
+ - 6-bit
9
+ - 8-bit
10
+ - GGUF
11
+ - transformers
12
+ - safetensors
13
+ - mistral
14
+ - text-generation
15
+ - autotrain_compatible
16
+ - endpoints_compatible
17
+ - text-generation-inference
18
+ - region:us
19
+ model_name: Sensei-7B-V1-GGUF
20
+ base_model: SciPhi/Sensei-7B-V1
21
+ inference: false
22
+ model_creator: SciPhi
23
+ pipeline_tag: text-generation
24
+ quantized_by: MaziyarPanahi
25
+ ---
26
+ # [MaziyarPanahi/Sensei-7B-V1-GGUF](https://huggingface.co/MaziyarPanahi/Sensei-7B-V1-GGUF)
27
+ - Model creator: [SciPhi](https://huggingface.co/SciPhi)
28
+ - Original model: [SciPhi/Sensei-7B-V1](https://huggingface.co/SciPhi/Sensei-7B-V1)
29
+
30
+ ## Description
31
+ [MaziyarPanahi/Sensei-7B-V1-GGUF](https://huggingface.co/MaziyarPanahi/Sensei-7B-V1-GGUF) contains GGUF format model files for [SciPhi/Sensei-7B-V1](https://huggingface.co/SciPhi/Sensei-7B-V1).
32
+
33
+ ## How to use
34
+ Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models:
35
+
36
+ ### About GGUF
37
+
38
+ 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.
39
+
40
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
41
+
42
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
43
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
44
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
45
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
46
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
47
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
48
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
49
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
50
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
51
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
52
+
53
+ ### Explanation of quantisation methods
54
+
55
+ <details>
56
+ <summary>Click to see details</summary>
57
+
58
+ The new methods available are:
59
+
60
+ * 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)
61
+ * 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.
62
+ * 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.
63
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
64
+ * 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
65
+
66
+ ## How to download GGUF files
67
+
68
+ **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 file.
69
+
70
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
71
+
72
+ * LM Studio
73
+ * LoLLMS Web UI
74
+ * Faraday.dev
75
+
76
+ ### In `text-generation-webui`
77
+
78
+ Under Download Model, you can enter the model repo: [MaziyarPanahi/Sensei-7B-V1-GGUF](https://huggingface.co/MaziyarPanahi/Sensei-7B-V1-GGUF) and below it, a specific filename to download, such as: Sensei-7B-V1-GGUF.Q4_K_M.gguf.
79
+
80
+ Then click Download.
81
+
82
+ ### On the command line, including multiple files at once
83
+
84
+ I recommend using the `huggingface-hub` Python library:
85
+
86
+ ```shell
87
+ pip3 install huggingface-hub
88
+ ```
89
+
90
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
91
+
92
+ ```shell
93
+ huggingface-cli download MaziyarPanahi/Sensei-7B-V1-GGUF Sensei-7B-V1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
94
+ ```
95
+ </details>
96
+ <details>
97
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
98
+
99
+ You can also download multiple files at once with a pattern:
100
+
101
+ ```shell
102
+ huggingface-cli download [MaziyarPanahi/Sensei-7B-V1-GGUF](https://huggingface.co/MaziyarPanahi/Sensei-7B-V1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
103
+ ```
104
+
105
+ 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).
106
+
107
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
108
+
109
+ ```shell
110
+ pip3 install hf_transfer
111
+ ```
112
+
113
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
114
+
115
+ ```shell
116
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/Sensei-7B-V1-GGUF Sensei-7B-V1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
117
+ ```
118
+
119
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
120
+ </details>
121
+
122
+ ## Example `llama.cpp` command
123
+
124
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
125
+
126
+ ```shell
127
+ ./main -ngl 35 -m Sensei-7B-V1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system
128
+ {system_message}<|im_end|>
129
+ <|im_start|>user
130
+ {prompt}<|im_end|>
131
+ <|im_start|>assistant"
132
+ ```
133
+
134
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
135
+
136
+ Change `-c 32768` 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.
137
+
138
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
139
+
140
+ 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)
141
+
142
+ ## How to run in `text-generation-webui`
143
+
144
+ 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).
145
+
146
+ ## How to run from Python code
147
+
148
+ 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.
149
+
150
+ ### How to load this model in Python code, using llama-cpp-python
151
+
152
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
153
+
154
+ #### First install the package
155
+
156
+ Run one of the following commands, according to your system:
157
+
158
+ ```shell
159
+ # Base ctransformers with no GPU acceleration
160
+ pip install llama-cpp-python
161
+ # With NVidia CUDA acceleration
162
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
163
+ # Or with OpenBLAS acceleration
164
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
165
+ # Or with CLBLast acceleration
166
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
167
+ # Or with AMD ROCm GPU acceleration (Linux only)
168
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
169
+ # Or with Metal GPU acceleration for macOS systems only
170
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
171
+
172
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
173
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
174
+ pip install llama-cpp-python
175
+ ```
176
+
177
+ #### Simple llama-cpp-python example code
178
+
179
+ ```python
180
+ from llama_cpp import Llama
181
+
182
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
183
+ llm = Llama(
184
+ model_path="./Sensei-7B-V1-GGUF.Q4_K_M.gguf", # Download the model file first
185
+ n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
186
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
187
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
188
+ )
189
+
190
+ # Simple inference example
191
+ output = llm(
192
+ "<|im_start|>system
193
+ {system_message}<|im_end|>
194
+ <|im_start|>user
195
+ {prompt}<|im_end|>
196
+ <|im_start|>assistant", # Prompt
197
+ max_tokens=512, # Generate up to 512 tokens
198
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
199
+ echo=True # Whether to echo the prompt
200
+ )
201
+
202
+ # Chat Completion API
203
+
204
+ llm = Llama(model_path="./Sensei-7B-V1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
205
+ llm.create_chat_completion(
206
+ messages = [
207
+ {"role": "system", "content": "You are a story writing assistant."},
208
+ {
209
+ "role": "user",
210
+ "content": "Write a story about llamas."
211
+ }
212
+ ]
213
+ )
214
+ ```
215
+
216
+ ## How to use with LangChain
217
+
218
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
219
+
220
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
221
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
Sensei-7B-V1.Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c84e6d208d9034ee9b499df5e8885e33fc71c3122cfc3ea467cecf632acba837
3
+ size 2719241984
Sensei-7B-V1.Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:866be27465164e38d039ce83a8252a11830a975d84c90bfc21f110358bd79c79
3
+ size 3822024448
Sensei-7B-V1.Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e02c7cdb24e6cf12961ecb224b3d4e7c2ea54043f9f9375ed0bc1f362a153e2d
3
+ size 3518985984
Sensei-7B-V1.Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30482bec07c5917bef38954272dab542ac7cf4355dae057cf252d271daae1fa5
3
+ size 3164567296
Sensei-7B-V1.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62e84e4330ff1891b2d096535c054c38a6fad9235e9e34e922824713f8820aac
3
+ size 4368439040
Sensei-7B-V1.Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4d38de88c4b3e44f2689bb5a05d8ed1673e173447e0ff745d3257de408565af
3
+ size 4140373760
Sensei-7B-V1.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dfe79430f117e02f7327bb0a1edd05047554ffd55fc820800992a064142182ef
3
+ size 5131409152
Sensei-7B-V1.Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f0af00893fc768438d2a6b45f40a33a757c5c9f59ce2fb1a921b886be0b7067
3
+ size 4997715712
Sensei-7B-V1.Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:397192cde567c64adc4abff36aa35693844e80c8f8b641bddc7d8fd174b38793
3
+ size 5942064896
Sensei-7B-V1.Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9073f547ac19fc7c1f2cec6ab328c05dbbda423318725716520452f61376ebfd
3
+ size 7695857408