MaziyarPanahi commited on
Commit
6bc2340
1 Parent(s): f1f72ee

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
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
38
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
40
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
41
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
42
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
43
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
44
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
45
+ bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - quantized
5
+ - 2-bit
6
+ - 3-bit
7
+ - 4-bit
8
+ - 5-bit
9
+ - 6-bit
10
+ - 8-bit
11
+ - GGUF
12
+ - transformers
13
+ - safetensors
14
+ - mistral
15
+ - text-generation
16
+ - Safetensors
17
+ - text-generation-inference
18
+ - merge
19
+ - 7b
20
+ - mistralai/Mistral-7B-Instruct-v0.1
21
+ - jondurbin/bagel-dpo-7b-v0.1
22
+ - dataset:ai2_arc
23
+ - dataset:unalignment/spicy-3.1
24
+ - dataset:codeparrot/apps
25
+ - dataset:facebook/belebele
26
+ - dataset:boolq
27
+ - dataset:jondurbin/cinematika-v0.1
28
+ - dataset:drop
29
+ - dataset:lmsys/lmsys-chat-1m
30
+ - dataset:TIGER-Lab/MathInstruct
31
+ - dataset:cais/mmlu
32
+ - dataset:Muennighoff/natural-instructions
33
+ - dataset:openbookqa
34
+ - dataset:piqa
35
+ - dataset:Vezora/Tested-22k-Python-Alpaca
36
+ - dataset:cakiki/rosetta-code
37
+ - dataset:Open-Orca/SlimOrca
38
+ - dataset:spider
39
+ - dataset:squad_v2
40
+ - dataset:migtissera/Synthia-v1.3
41
+ - dataset:datasets/winogrande
42
+ - dataset:nvidia/HelpSteer
43
+ - dataset:Intel/orca_dpo_pairs
44
+ - dataset:unalignment/toxic-dpo-v0.1
45
+ - dataset:jondurbin/truthy-dpo-v0.1
46
+ - dataset:allenai/ultrafeedback_binarized_cleaned
47
+ - license:apache-2.0
48
+ - autotrain_compatible
49
+ - endpoints_compatible
50
+ - region:us
51
+ model_name: bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF
52
+ base_model: MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1
53
+ inference: false
54
+ model_creator: MaziyarPanahi
55
+ pipeline_tag: text-generation
56
+ quantized_by: MaziyarPanahi
57
+ ---
58
+ # [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF)
59
+ - Model creator: [MaziyarPanahi](https://huggingface.co/MaziyarPanahi)
60
+ - Original model: [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1)
61
+
62
+ ## Description
63
+ [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF) contains GGUF format model files for [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1).
64
+
65
+ ## How to use
66
+ Thanks to [TheBloke](https://huggingface.co/TheBloke) for preparing an amazing README on how to use GGUF models:
67
+
68
+ ### About GGUF
69
+
70
+ 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.
71
+
72
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
73
+
74
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
75
+ * [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.
76
+ * [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.
77
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
78
+ * [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.
79
+ * [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.
80
+ * [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.
81
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
82
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
83
+ * [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.
84
+
85
+ ### Explanation of quantisation methods
86
+
87
+ <details>
88
+ <summary>Click to see details</summary>
89
+
90
+ The new methods available are:
91
+
92
+ * 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)
93
+ * 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.
94
+ * 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.
95
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
96
+ * 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
97
+
98
+ ## How to download GGUF files
99
+
100
+ **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.
101
+
102
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
103
+
104
+ * LM Studio
105
+ * LoLLMS Web UI
106
+ * Faraday.dev
107
+
108
+ ### In `text-generation-webui`
109
+
110
+ Under Download Model, you can enter the model repo: [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF) and below it, a specific filename to download, such as: bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf.
111
+
112
+ Then click Download.
113
+
114
+ ### On the command line, including multiple files at once
115
+
116
+ I recommend using the `huggingface-hub` Python library:
117
+
118
+ ```shell
119
+ pip3 install huggingface-hub
120
+ ```
121
+
122
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
123
+
124
+ ```shell
125
+ huggingface-cli download MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
126
+ ```
127
+ </details>
128
+ <details>
129
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
130
+
131
+ You can also download multiple files at once with a pattern:
132
+
133
+ ```shell
134
+ huggingface-cli download [MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF) --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
135
+ ```
136
+
137
+ 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).
138
+
139
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
140
+
141
+ ```shell
142
+ pip3 install hf_transfer
143
+ ```
144
+
145
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
146
+
147
+ ```shell
148
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download MaziyarPanahi/bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
149
+ ```
150
+
151
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
152
+ </details>
153
+
154
+ ## Example `llama.cpp` command
155
+
156
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
157
+
158
+ ```shell
159
+ ./main -ngl 35 -m bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system
160
+ {system_message}<|im_end|>
161
+ <|im_start|>user
162
+ {prompt}<|im_end|>
163
+ <|im_start|>assistant"
164
+ ```
165
+
166
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
167
+
168
+ 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.
169
+
170
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
171
+
172
+ 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)
173
+
174
+ ## How to run in `text-generation-webui`
175
+
176
+ 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).
177
+
178
+ ## How to run from Python code
179
+
180
+ 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.
181
+
182
+ ### How to load this model in Python code, using llama-cpp-python
183
+
184
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
185
+
186
+ #### First install the package
187
+
188
+ Run one of the following commands, according to your system:
189
+
190
+ ```shell
191
+ # Base ctransformers with no GPU acceleration
192
+ pip install llama-cpp-python
193
+ # With NVidia CUDA acceleration
194
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
195
+ # Or with OpenBLAS acceleration
196
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
197
+ # Or with CLBLast acceleration
198
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
199
+ # Or with AMD ROCm GPU acceleration (Linux only)
200
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
201
+ # Or with Metal GPU acceleration for macOS systems only
202
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
203
+
204
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
205
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
206
+ pip install llama-cpp-python
207
+ ```
208
+
209
+ #### Simple llama-cpp-python example code
210
+
211
+ ```python
212
+ from llama_cpp import Llama
213
+
214
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
215
+ llm = Llama(
216
+ model_path="./bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", # Download the model file first
217
+ n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
218
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
219
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
220
+ )
221
+
222
+ # Simple inference example
223
+ output = llm(
224
+ "<|im_start|>system
225
+ {system_message}<|im_end|>
226
+ <|im_start|>user
227
+ {prompt}<|im_end|>
228
+ <|im_start|>assistant", # Prompt
229
+ max_tokens=512, # Generate up to 512 tokens
230
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
231
+ echo=True # Whether to echo the prompt
232
+ )
233
+
234
+ # Chat Completion API
235
+
236
+ llm = Llama(model_path="./bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1-GGUF.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
237
+ llm.create_chat_completion(
238
+ messages = [
239
+ {"role": "system", "content": "You are a story writing assistant."},
240
+ {
241
+ "role": "user",
242
+ "content": "Write a story about llamas."
243
+ }
244
+ ]
245
+ )
246
+ ```
247
+
248
+ ## How to use with LangChain
249
+
250
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
251
+
252
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
253
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9f87a634ecc85b0eadcc9a6cb0340d243f5cc10ae38868b0b9dec2ad8412c10
3
+ size 2719242432
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3146e32cf5d3988f1e7ea850bb6edc5be8778f2bafce914648d94732af3a3d26
3
+ size 3822024896
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34ec276dc0fde10f66b6e9f45f14bea2ee6449109496d0793ded9228c783959b
3
+ size 3518986432
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c628c93c6989f1d5d312492787887d1f00d643165fabe2b6b35987416830b83
3
+ size 3164567744
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cce6f50573f184747b93cfb7e2c22fd2f68409e893616486ebd49b437e42607f
3
+ size 4368439488
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d07180da143a16f757b225d9f8f43a8c9b90037a48a9ee3995f71ed07daba589
3
+ size 4140374208
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ec18b23092f9547d25ee66cf33debc79b09b1cd261e2b1a5ea5fdc6269498b9
3
+ size 5131409600
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bbb8ed36129cba19ef692768fec8285b9581136a5405d763c4504a1c8553d68
3
+ size 4997716160
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c878ad7c9c6cd77fa7f1e3e2df3150f11c18c22edaa6b2607304b0569e37e46e
3
+ size 5942065344
bagel-dpo-7b-v0.1-Mistral-7B-Instruct-v0.1.Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15498498546115a7503d681b6cb42aba0ab69e47a754cb421be543731d5cce20
3
+ size 7695857856