TheBloke commited on
Commit
58e5ff5
1 Parent(s): d38f467

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +400 -0
README.md ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Nexusflow/NexusRaven-13B
3
+ inference: false
4
+ license: llama2
5
+ model-index:
6
+ - name: NexusRaven-13B
7
+ results: []
8
+ model_creator: Nexusflow
9
+ model_name: Nexusraven 13B
10
+ model_type: llama
11
+ prompt_template: '{prompt}
12
+
13
+ '
14
+ quantized_by: TheBloke
15
+ ---
16
+
17
+ <!-- header start -->
18
+ <!-- 200823 -->
19
+ <div style="width: auto; margin-left: auto; margin-right: auto">
20
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
21
+ </div>
22
+ <div style="display: flex; justify-content: space-between; width: 100%;">
23
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
24
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
25
+ </div>
26
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
27
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
28
+ </div>
29
+ </div>
30
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
31
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
32
+ <!-- header end -->
33
+
34
+ # Nexusraven 13B - GGUF
35
+ - Model creator: [Nexusflow](https://huggingface.co/Nexusflow)
36
+ - Original model: [Nexusraven 13B](https://huggingface.co/Nexusflow/NexusRaven-13B)
37
+
38
+ <!-- description start -->
39
+ ## Description
40
+
41
+ This repo contains GGUF format model files for [Nexusflow's Nexusraven 13B](https://huggingface.co/Nexusflow/NexusRaven-13B).
42
+
43
+ <!-- description end -->
44
+ <!-- README_GGUF.md-about-gguf start -->
45
+ ### About GGUF
46
+
47
+ 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.
48
+
49
+ Here is an incomplate list of clients and libraries that are known to support GGUF:
50
+
51
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
52
+ * [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.
53
+ * [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.
54
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
55
+ * [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.
56
+ * [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.
57
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
58
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
59
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
60
+
61
+ <!-- README_GGUF.md-about-gguf end -->
62
+ <!-- repositories-available start -->
63
+ ## Repositories available
64
+
65
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/NexusRaven-13B-AWQ)
66
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/NexusRaven-13B-GPTQ)
67
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF)
68
+ * [Nexusflow's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Nexusflow/NexusRaven-13B)
69
+ <!-- repositories-available end -->
70
+
71
+ <!-- prompt-template start -->
72
+ ## Prompt template: Unknown
73
+
74
+ ```
75
+ {prompt}
76
+
77
+ ```
78
+
79
+ <!-- prompt-template end -->
80
+
81
+
82
+ <!-- compatibility_gguf start -->
83
+ ## Compatibility
84
+
85
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
86
+
87
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
88
+
89
+ ## Explanation of quantisation methods
90
+ <details>
91
+ <summary>Click to see details</summary>
92
+
93
+ The new methods available are:
94
+ * 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)
95
+ * 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.
96
+ * 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.
97
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
98
+ * 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
99
+
100
+ Refer to the Provided Files table below to see what files use which methods, and how.
101
+ </details>
102
+ <!-- compatibility_gguf end -->
103
+
104
+ <!-- README_GGUF.md-provided-files start -->
105
+ ## Provided files
106
+
107
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
108
+ | ---- | ---- | ---- | ---- | ---- | ----- |
109
+ | [nexusraven-13b.Q2_K.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes |
110
+ | [nexusraven-13b.Q3_K_S.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss |
111
+ | [nexusraven-13b.Q3_K_M.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss |
112
+ | [nexusraven-13b.Q3_K_L.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss |
113
+ | [nexusraven-13b.Q4_0.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
114
+ | [nexusraven-13b.Q4_K_S.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss |
115
+ | [nexusraven-13b.Q4_K_M.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended |
116
+ | [nexusraven-13b.Q5_0.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
117
+ | [nexusraven-13b.Q5_K_S.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended |
118
+ | [nexusraven-13b.Q5_K_M.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended |
119
+ | [nexusraven-13b.Q6_K.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss |
120
+ | [nexusraven-13b.Q8_0.gguf](https://huggingface.co/TheBloke/NexusRaven-13B-GGUF/blob/main/nexusraven-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
121
+
122
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
123
+
124
+
125
+
126
+ <!-- README_GGUF.md-provided-files end -->
127
+
128
+ <!-- README_GGUF.md-how-to-download start -->
129
+ ## How to download GGUF files
130
+
131
+ **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.
132
+
133
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
134
+ - LM Studio
135
+ - LoLLMS Web UI
136
+ - Faraday.dev
137
+
138
+ ### In `text-generation-webui`
139
+
140
+ Under Download Model, you can enter the model repo: TheBloke/NexusRaven-13B-GGUF and below it, a specific filename to download, such as: nexusraven-13b.Q4_K_M.gguf.
141
+
142
+ Then click Download.
143
+
144
+ ### On the command line, including multiple files at once
145
+
146
+ I recommend using the `huggingface-hub` Python library:
147
+
148
+ ```shell
149
+ pip3 install huggingface-hub
150
+ ```
151
+
152
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
153
+
154
+ ```shell
155
+ huggingface-cli download TheBloke/NexusRaven-13B-GGUF nexusraven-13b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
156
+ ```
157
+
158
+ <details>
159
+ <summary>More advanced huggingface-cli download usage</summary>
160
+
161
+ You can also download multiple files at once with a pattern:
162
+
163
+ ```shell
164
+ huggingface-cli download TheBloke/NexusRaven-13B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
165
+ ```
166
+
167
+ 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).
168
+
169
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
170
+
171
+ ```shell
172
+ pip3 install hf_transfer
173
+ ```
174
+
175
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
176
+
177
+ ```shell
178
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/NexusRaven-13B-GGUF nexusraven-13b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
179
+ ```
180
+
181
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
182
+ </details>
183
+ <!-- README_GGUF.md-how-to-download end -->
184
+
185
+ <!-- README_GGUF.md-how-to-run start -->
186
+ ## Example `llama.cpp` command
187
+
188
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
189
+
190
+ ```shell
191
+ ./main -ngl 32 -m nexusraven-13b.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
192
+ ```
193
+
194
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
195
+
196
+ Change `-c 4096` 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.
197
+
198
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
199
+
200
+ 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)
201
+
202
+ ## How to run in `text-generation-webui`
203
+
204
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
205
+
206
+ ## How to run from Python code
207
+
208
+ 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.
209
+
210
+ ### How to load this model in Python code, using ctransformers
211
+
212
+ #### First install the package
213
+
214
+ Run one of the following commands, according to your system:
215
+
216
+ ```shell
217
+ # Base ctransformers with no GPU acceleration
218
+ pip install ctransformers
219
+ # Or with CUDA GPU acceleration
220
+ pip install ctransformers[cuda]
221
+ # Or with AMD ROCm GPU acceleration (Linux only)
222
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
223
+ # Or with Metal GPU acceleration for macOS systems only
224
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
225
+ ```
226
+
227
+ #### Simple ctransformers example code
228
+
229
+ ```python
230
+ from ctransformers import AutoModelForCausalLM
231
+
232
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
233
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/NexusRaven-13B-GGUF", model_file="nexusraven-13b.Q4_K_M.gguf", model_type="llama", gpu_layers=50)
234
+
235
+ print(llm("AI is going to"))
236
+ ```
237
+
238
+ ## How to use with LangChain
239
+
240
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
241
+
242
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
243
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
244
+
245
+ <!-- README_GGUF.md-how-to-run end -->
246
+
247
+ <!-- footer start -->
248
+ <!-- 200823 -->
249
+ ## Discord
250
+
251
+ For further support, and discussions on these models and AI in general, join us at:
252
+
253
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
254
+
255
+ ## Thanks, and how to contribute
256
+
257
+ Thanks to the [chirper.ai](https://chirper.ai) team!
258
+
259
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
260
+
261
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
262
+
263
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
264
+
265
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
266
+
267
+ * Patreon: https://patreon.com/TheBlokeAI
268
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
269
+
270
+ **Special thanks to**: Aemon Algiz.
271
+
272
+ **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
273
+
274
+
275
+ Thank you to all my generous patrons and donaters!
276
+
277
+ And thank you again to a16z for their generous grant.
278
+
279
+ <!-- footer end -->
280
+
281
+ <!-- original-model-card start -->
282
+ # Original model card: Nexusflow's Nexusraven 13B
283
+
284
+ # NexusRaven-13B: Surpassing the state-of-the-art in open-source function calling LLMs.
285
+
286
+ <p align="center">
287
+ <a href="https://huggingface.co/Nexusflow" target="_blank">Nexusflow HF</a> - <a href="http://nexusflow.ai/blog" target="_blank">NexusRaven blog post</a> - <a href="https://huggingface.co/Nexusflow/NexusRaven-13B" target="_blank">NexusRaven-13B</a> - <a href="https://x.com/NexusflowX/status/1707470614012035561?s=20" target="_blank">NexusRaven-13B Twitter Thread</a> - <a href="https://github.com/nexusflowai/NexusRaven/" target="_blank">NexusRaven-13B Github</a> - <a href="https://huggingface.co/datasets/Nexusflow/NexusRaven_API_evaluation" target="_blank">NexusRaven API evaluation dataset</a>
288
+ </p>
289
+
290
+ <p align="center" width="100%">
291
+ <a><img src="NexusRaven.png" alt="NexusRaven" style="width: 40%; min-width: 300px; display: block; margin: auto;"></a>
292
+ </p>
293
+
294
+ Table of contents
295
+ - [NexusRaven-13B: Surpassing the state-of-the-art in open-source function calling LLMs.](#nexusraven-13b-surpassing-the-state-of-the-art-in-open-source-function-calling-llms)
296
+ - [Introducing NexusRaven-13B](#introducing-nexusraven-13b)
297
+ - [NexusRaven model usage](#nexusraven-model-usage)
298
+ - [Training procedure](#training-procedure)
299
+ - [Training hyperparameters](#training-hyperparameters)
300
+ - [Framework versions](#framework-versions)
301
+ - [Limitations](#limitations)
302
+ - [License](#license)
303
+ - [References](#references)
304
+ - [Citation](#citation)
305
+ - [Contact](#contact)
306
+
307
+
308
+ This model is a fine-tuned version of [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf).
309
+
310
+ ## Introducing NexusRaven-13B
311
+ NexusRaven is an open-source and commercially viable function calling LLM that surpasses the state-of-the-art in function calling capabilities.
312
+
313
+ 📊 Performance Highlights: With our demonstration retrieval system, NexusRaven-13B achieves a 95% success rate in using cybersecurity tools such as CVE/CPE Search and VirusTotal, while prompting GPT-4 achieves 64%. It has significantly lower cost and faster inference speed compared to GPT-4.
314
+
315
+ 🔧 Generalization to the Unseen: NexusRaven-13B generalizes to tools never seen during model training, achieving a success rate comparable with GPT-3.5 in zero-shot setting, significantly outperforming all other open-source LLMs of similar sizes.
316
+
317
+ 🔥 Commercially Permissive: The training of NexusRaven-13B does not involve any data generated by proprietary LLMs such as GPT-4. You have full control of the model when deployed in commercial applications.
318
+
319
+ <p align="center" width="100%">
320
+ <a><img src="Retrieval-augmented_Evaluation.png" alt="NexusRaven" style="width: 80%; min-width: 300px; display: block; margin: auto;"></a>
321
+ <a><img src="Zero-shot_Evaluation.png" alt="NexusRaven" style="width: 80%; min-width: 300px; display: block; margin: auto;"></a>
322
+ </p>
323
+
324
+
325
+ ## NexusRaven model usage
326
+ NexusRaven accepts a list of python functions. These python functions can do anything (including sending GET/POST requests to external APIs!). The two requirements include the python function signature and the appropriate docstring to generate the function call.
327
+
328
+ NexusRaven is highly compatible with langchain. See [langchain_example.py](https://huggingface.co/Nexusflow/NexusRaven-13B/blob/main/langchain_example.py). An example without langchain can be found in [non_langchain_example.py](https://huggingface.co/Nexusflow/NexusRaven-13B/blob/main/non_langchain_example.py)
329
+
330
+ Please note that the model will reflect on the answer sometimes, so we highly recommend stopping the model generation at a stopping criteria of `["\nReflection:"]`, to avoid spending unnecessary tokens during inference, but the reflection might help in some rare cases. This is reflected in our langchain example.
331
+
332
+ The "Initial Answer" can be executed to run the function.
333
+
334
+
335
+ ## Training procedure
336
+
337
+ ### Training hyperparameters
338
+
339
+ The following hyperparameters were used during training:
340
+ - learning_rate: 3e-05
341
+ - train_batch_size: 1
342
+ - eval_batch_size: 1
343
+ - seed: 42
344
+ - distributed_type: multi-GPU
345
+ - num_devices: 8
346
+ - gradient_accumulation_steps: 16
347
+ - total_train_batch_size: 128
348
+ - total_eval_batch_size: 8
349
+ - optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-08
350
+ - lr_scheduler_type: constant
351
+ - num_epochs: 2.0
352
+
353
+
354
+ ### Framework versions
355
+
356
+ - Transformers 4.33.2
357
+ - Pytorch 2.0.1+cu118
358
+ - Datasets 2.14.5
359
+ - Tokenizers 0.13.3
360
+
361
+
362
+ # Limitations
363
+ 1. We highly recommend using a stop criteria of `["\nReflection:"]`. The model was trained to first generate an answer and then reflect on its answer to either improve the answer or keep the answer the same. However, this "chain of thought" is often not helpful, and the final answer is seldom better than the initial call. Therefore, we strongly recommend using the Initial Call as the main call to execute.
364
+ 2. The model works best when it is connected with a retriever when there are a multitude of functions, as a large number of functions will saturate the context window of this model.
365
+ 3. The model can be prone to generate incorrect calls. Please ensure proper guardrails to capture errant behavior is in place.
366
+
367
+
368
+ ## License
369
+ This model was trained on commercially viable data and is licensed under the [Llama 2 community license](https://huggingface.co/codellama/CodeLlama-13b-hf/blob/main/LICENSE) following the original [CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf/) model.
370
+
371
+
372
+ ## References
373
+ We thank the CodeLlama team for their amazing models!
374
+
375
+ ```
376
+ @misc{rozière2023code,
377
+ title={Code Llama: Open Foundation Models for Code},
378
+ author={Baptiste Rozière and Jonas Gehring and Fabian Gloeckle and Sten Sootla and Itai Gat and Xiaoqing Ellen Tan and Yossi Adi and Jingyu Liu and Tal Remez and Jérémy Rapin and Artyom Kozhevnikov and Ivan Evtimov and Joanna Bitton and Manish Bhatt and Cristian Canton Ferrer and Aaron Grattafiori and Wenhan Xiong and Alexandre Défossez and Jade Copet and Faisal Azhar and Hugo Touvron and Louis Martin and Nicolas Usunier and Thomas Scialom and Gabriel Synnaeve},
379
+ year={2023},
380
+ eprint={2308.12950},
381
+ archivePrefix={arXiv},
382
+ primaryClass={cs.CL}
383
+ }
384
+ ```
385
+
386
+
387
+ ## Citation
388
+ ```
389
+ @misc{nexusraven,
390
+ title={NexusRaven: Surpassing the state-of-the-art in open-source function calling LLMs},
391
+ author={Nexusflow.ai team},
392
+ year={2023},
393
+ url={http://nexusflow.ai/blog}
394
+ }
395
+ ```
396
+
397
+ ## Contact
398
+ Please reach out to info@nexusflow.ai for any questions!
399
+
400
+ <!-- original-model-card end -->