Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,422 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: dreamgen/opus-v0-7b
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
model_creator: DreamGen
|
7 |
+
model_name: Opus V0 7B
|
8 |
+
model_type: mistral
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
prompt_template: '<setting>
|
11 |
+
|
12 |
+
{system_message}
|
13 |
+
|
14 |
+
</setting>
|
15 |
+
|
16 |
+
|
17 |
+
<instruction>
|
18 |
+
|
19 |
+
{prompt}
|
20 |
+
|
21 |
+
</instruction>
|
22 |
+
|
23 |
+
'
|
24 |
+
quantized_by: TheBloke
|
25 |
+
---
|
26 |
+
<!-- markdownlint-disable MD041 -->
|
27 |
+
|
28 |
+
<!-- header start -->
|
29 |
+
<!-- 200823 -->
|
30 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
31 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
32 |
+
</div>
|
33 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
34 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
35 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
36 |
+
</div>
|
37 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
38 |
+
<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>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<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>
|
42 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
43 |
+
<!-- header end -->
|
44 |
+
|
45 |
+
# Opus V0 7B - AWQ
|
46 |
+
- Model creator: [DreamGen](https://huggingface.co/dreamgen)
|
47 |
+
- Original model: [Opus V0 7B](https://huggingface.co/dreamgen/opus-v0-7b)
|
48 |
+
|
49 |
+
<!-- description start -->
|
50 |
+
## Description
|
51 |
+
|
52 |
+
This repo contains AWQ model files for [DreamGen's Opus V0 7B](https://huggingface.co/dreamgen/opus-v0-7b).
|
53 |
+
|
54 |
+
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
55 |
+
|
56 |
+
|
57 |
+
### About AWQ
|
58 |
+
|
59 |
+
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
|
60 |
+
|
61 |
+
It is supported by:
|
62 |
+
|
63 |
+
- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
|
64 |
+
- [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
|
65 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
66 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
67 |
+
|
68 |
+
<!-- description end -->
|
69 |
+
<!-- repositories-available start -->
|
70 |
+
## Repositories available
|
71 |
+
|
72 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/opus-v0-7B-AWQ)
|
73 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/opus-v0-7B-GPTQ)
|
74 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/opus-v0-7B-GGUF)
|
75 |
+
* [DreamGen's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/dreamgen/opus-v0-7b)
|
76 |
+
<!-- repositories-available end -->
|
77 |
+
|
78 |
+
<!-- prompt-template start -->
|
79 |
+
## Prompt template: DreamGen
|
80 |
+
|
81 |
+
```
|
82 |
+
<setting>
|
83 |
+
{system_message}
|
84 |
+
</setting>
|
85 |
+
|
86 |
+
<instruction>
|
87 |
+
{prompt}
|
88 |
+
</instruction>
|
89 |
+
|
90 |
+
```
|
91 |
+
|
92 |
+
<!-- prompt-template end -->
|
93 |
+
|
94 |
+
|
95 |
+
<!-- README_AWQ.md-provided-files start -->
|
96 |
+
## Provided files, and AWQ parameters
|
97 |
+
|
98 |
+
For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
|
99 |
+
|
100 |
+
Models are released as sharded safetensors files.
|
101 |
+
|
102 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
103 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
104 |
+
| [main](https://huggingface.co/TheBloke/opus-v0-7B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.15 GB
|
105 |
+
|
106 |
+
<!-- README_AWQ.md-provided-files end -->
|
107 |
+
|
108 |
+
<!-- README_AWQ.md-text-generation-webui start -->
|
109 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
110 |
+
|
111 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
112 |
+
|
113 |
+
It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
|
114 |
+
|
115 |
+
1. Click the **Model tab**.
|
116 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/opus-v0-7B-AWQ`.
|
117 |
+
3. Click **Download**.
|
118 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
119 |
+
5. In the top left, click the refresh icon next to **Model**.
|
120 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `opus-v0-7B-AWQ`
|
121 |
+
7. Select **Loader: AutoAWQ**.
|
122 |
+
8. Click Load, and the model will load and is now ready for use.
|
123 |
+
9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
|
124 |
+
10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
125 |
+
<!-- README_AWQ.md-text-generation-webui end -->
|
126 |
+
|
127 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
128 |
+
## Multi-user inference server: vLLM
|
129 |
+
|
130 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
131 |
+
|
132 |
+
- Please ensure you are using vLLM version 0.2 or later.
|
133 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter.
|
134 |
+
|
135 |
+
For example:
|
136 |
+
|
137 |
+
```shell
|
138 |
+
python3 -m vllm.entrypoints.api_server --model TheBloke/opus-v0-7B-AWQ --quantization awq
|
139 |
+
```
|
140 |
+
|
141 |
+
- When using vLLM from Python code, again set `quantization=awq`.
|
142 |
+
|
143 |
+
For example:
|
144 |
+
|
145 |
+
```python
|
146 |
+
from vllm import LLM, SamplingParams
|
147 |
+
|
148 |
+
prompts = [
|
149 |
+
"Tell me about AI",
|
150 |
+
"Write a story about llamas",
|
151 |
+
"What is 291 - 150?",
|
152 |
+
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
|
153 |
+
]
|
154 |
+
prompt_template=f'''<setting>
|
155 |
+
{system_message}
|
156 |
+
</setting>
|
157 |
+
|
158 |
+
<instruction>
|
159 |
+
{prompt}
|
160 |
+
</instruction>
|
161 |
+
'''
|
162 |
+
|
163 |
+
prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
|
164 |
+
|
165 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
166 |
+
|
167 |
+
llm = LLM(model="TheBloke/opus-v0-7B-AWQ", quantization="awq", dtype="auto")
|
168 |
+
|
169 |
+
outputs = llm.generate(prompts, sampling_params)
|
170 |
+
|
171 |
+
# Print the outputs.
|
172 |
+
for output in outputs:
|
173 |
+
prompt = output.prompt
|
174 |
+
generated_text = output.outputs[0].text
|
175 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
176 |
+
```
|
177 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
178 |
+
|
179 |
+
<!-- README_AWQ.md-use-from-tgi start -->
|
180 |
+
## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
|
181 |
+
|
182 |
+
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
183 |
+
|
184 |
+
Example Docker parameters:
|
185 |
+
|
186 |
+
```shell
|
187 |
+
--model-id TheBloke/opus-v0-7B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
188 |
+
```
|
189 |
+
|
190 |
+
Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
|
191 |
+
|
192 |
+
```shell
|
193 |
+
pip3 install huggingface-hub
|
194 |
+
```
|
195 |
+
|
196 |
+
```python
|
197 |
+
from huggingface_hub import InferenceClient
|
198 |
+
|
199 |
+
endpoint_url = "https://your-endpoint-url-here"
|
200 |
+
|
201 |
+
prompt = "Tell me about AI"
|
202 |
+
prompt_template=f'''<setting>
|
203 |
+
{system_message}
|
204 |
+
</setting>
|
205 |
+
|
206 |
+
<instruction>
|
207 |
+
{prompt}
|
208 |
+
</instruction>
|
209 |
+
'''
|
210 |
+
|
211 |
+
client = InferenceClient(endpoint_url)
|
212 |
+
response = client.text_generation(prompt,
|
213 |
+
max_new_tokens=128,
|
214 |
+
do_sample=True,
|
215 |
+
temperature=0.7,
|
216 |
+
top_p=0.95,
|
217 |
+
top_k=40,
|
218 |
+
repetition_penalty=1.1)
|
219 |
+
|
220 |
+
print(f"Model output: ", response)
|
221 |
+
```
|
222 |
+
<!-- README_AWQ.md-use-from-tgi end -->
|
223 |
+
|
224 |
+
<!-- README_AWQ.md-use-from-python start -->
|
225 |
+
## Inference from Python code using AutoAWQ
|
226 |
+
|
227 |
+
### Install the AutoAWQ package
|
228 |
+
|
229 |
+
Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later.
|
230 |
+
|
231 |
+
```shell
|
232 |
+
pip3 install autoawq
|
233 |
+
```
|
234 |
+
|
235 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
236 |
+
|
237 |
+
```shell
|
238 |
+
pip3 uninstall -y autoawq
|
239 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
240 |
+
cd AutoAWQ
|
241 |
+
pip3 install .
|
242 |
+
```
|
243 |
+
|
244 |
+
### AutoAWQ example code
|
245 |
+
|
246 |
+
```python
|
247 |
+
from awq import AutoAWQForCausalLM
|
248 |
+
from transformers import AutoTokenizer
|
249 |
+
|
250 |
+
model_name_or_path = "TheBloke/opus-v0-7B-AWQ"
|
251 |
+
|
252 |
+
# Load tokenizer
|
253 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
|
254 |
+
# Load model
|
255 |
+
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
|
256 |
+
trust_remote_code=False, safetensors=True)
|
257 |
+
|
258 |
+
prompt = "Tell me about AI"
|
259 |
+
prompt_template=f'''<setting>
|
260 |
+
{system_message}
|
261 |
+
</setting>
|
262 |
+
|
263 |
+
<instruction>
|
264 |
+
{prompt}
|
265 |
+
</instruction>
|
266 |
+
'''
|
267 |
+
|
268 |
+
print("*** Running model.generate:")
|
269 |
+
|
270 |
+
token_input = tokenizer(
|
271 |
+
prompt_template,
|
272 |
+
return_tensors='pt'
|
273 |
+
).input_ids.cuda()
|
274 |
+
|
275 |
+
# Generate output
|
276 |
+
generation_output = model.generate(
|
277 |
+
token_input,
|
278 |
+
do_sample=True,
|
279 |
+
temperature=0.7,
|
280 |
+
top_p=0.95,
|
281 |
+
top_k=40,
|
282 |
+
max_new_tokens=512
|
283 |
+
)
|
284 |
+
|
285 |
+
# Get the tokens from the output, decode them, print them
|
286 |
+
token_output = generation_output[0]
|
287 |
+
text_output = tokenizer.decode(token_output)
|
288 |
+
print("LLM output: ", text_output)
|
289 |
+
|
290 |
+
"""
|
291 |
+
# Inference should be possible with transformers pipeline as well in future
|
292 |
+
# But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
|
293 |
+
from transformers import pipeline
|
294 |
+
|
295 |
+
print("*** Pipeline:")
|
296 |
+
pipe = pipeline(
|
297 |
+
"text-generation",
|
298 |
+
model=model,
|
299 |
+
tokenizer=tokenizer,
|
300 |
+
max_new_tokens=512,
|
301 |
+
do_sample=True,
|
302 |
+
temperature=0.7,
|
303 |
+
top_p=0.95,
|
304 |
+
top_k=40,
|
305 |
+
repetition_penalty=1.1
|
306 |
+
)
|
307 |
+
|
308 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
309 |
+
"""
|
310 |
+
```
|
311 |
+
<!-- README_AWQ.md-use-from-python end -->
|
312 |
+
|
313 |
+
<!-- README_AWQ.md-compatibility start -->
|
314 |
+
## Compatibility
|
315 |
+
|
316 |
+
The files provided are tested to work with:
|
317 |
+
|
318 |
+
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
|
319 |
+
- [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
|
320 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
|
321 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
|
322 |
+
|
323 |
+
<!-- README_AWQ.md-compatibility end -->
|
324 |
+
|
325 |
+
<!-- footer start -->
|
326 |
+
<!-- 200823 -->
|
327 |
+
## Discord
|
328 |
+
|
329 |
+
For further support, and discussions on these models and AI in general, join us at:
|
330 |
+
|
331 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
332 |
+
|
333 |
+
## Thanks, and how to contribute
|
334 |
+
|
335 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
336 |
+
|
337 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
338 |
+
|
339 |
+
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.
|
340 |
+
|
341 |
+
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.
|
342 |
+
|
343 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
344 |
+
|
345 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
346 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
347 |
+
|
348 |
+
**Special thanks to**: Aemon Algiz.
|
349 |
+
|
350 |
+
**Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
|
351 |
+
|
352 |
+
|
353 |
+
Thank you to all my generous patrons and donaters!
|
354 |
+
|
355 |
+
And thank you again to a16z for their generous grant.
|
356 |
+
|
357 |
+
<!-- footer end -->
|
358 |
+
|
359 |
+
# Original model card: DreamGen's Opus V0 7B
|
360 |
+
|
361 |
+
|
362 |
+
# DreamGen Opus V0 7B
|
363 |
+
|
364 |
+
**DreamGen Opus** is a family of **uncensored** models fine-tuned for **(collaborative) story writing** but the model also works well for **chat / RP**.
|
365 |
+
The DreamGen Opus V0 7B model is derived from [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1).
|
366 |
+
|
367 |
+
## Prompting
|
368 |
+
|
369 |
+
Please see the [official documentation](https://dreamgen.com/docs/stories) for more detailed guide, including how to prompt the model for chat / RP.
|
370 |
+
|
371 |
+
The (collaborative) story writing task teaches the model to respect `<setting>` and `<instruction>` inserted into the prompt.
|
372 |
+
|
373 |
+
Example prompt:
|
374 |
+
|
375 |
+
```
|
376 |
+
<setting>
|
377 |
+
This story is a twist on the traditional Little Red Riding Hood story.
|
378 |
+
In this variation, the Little Red Riding Hood and her grandma are secretely werevoles.
|
379 |
+
</setting>
|
380 |
+
|
381 |
+
(... previous part of the story that may also include more instructions ...)
|
382 |
+
|
383 |
+
<instruction>
|
384 |
+
The Little Red Riding hood confronts The Big Bad Wolf, transforming into her wolf form.
|
385 |
+
</instruction>
|
386 |
+
```
|
387 |
+
|
388 |
+
## Dataset
|
389 |
+
|
390 |
+
The fine-tuning dataset consisted of >1M tokens of collaborative writing task examples, each example being up to 4096 tokens. On top of that, >20M tokens of more general, but less instructed examples were included to help preserve generalization.
|
391 |
+
|
392 |
+
## Community
|
393 |
+
|
394 |
+
Join the DreamGen community on [**Discord**](https://dreamgen.com/discord), or follow our [**X/Twitter account**](https://dreamgen.com/twitter) for new model releases and other news. We will soon be releasing larger models with longer context window, as well as models specifically fine-tuned for character chat & roleplay.
|
395 |
+
Help us shape the future of DreamGen.
|
396 |
+
|
397 |
+
## Running the model
|
398 |
+
|
399 |
+
The model is should be compatible with any software that supports [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1).
|
400 |
+
|
401 |
+
### Running on DreamGen.com (free)
|
402 |
+
|
403 |
+
You can try the model for free at [dreamgen.com](https://dreamgen.com) — note that an account is required.
|
404 |
+
|
405 |
+
### Running with vLLM
|
406 |
+
|
407 |
+
1. Install [vLLM](https://github.com/vllm-project/vllm) (version at least 0.2.1.post1)
|
408 |
+
2. Run `python -u -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --model dreamgen/opus-v0-7b`
|
409 |
+
3. Use any library that's compatible with the OpenAI API to talk to the model
|
410 |
+
|
411 |
+
### Running with oobabooga/text-generation-webui
|
412 |
+
|
413 |
+
1. Install [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
414 |
+
2. Go to the **Model** tab
|
415 |
+
3. Under **Download custom model or LoRA**, enter `dreamgen/opus-v0-7b`
|
416 |
+
4. Go to the **Text Generation** tab
|
417 |
+
5. Enter your prompt
|
418 |
+
|
419 |
+
## License
|
420 |
+
|
421 |
+
- For personal and academic use: Same license as the base model, in this case Apache 2.0.
|
422 |
+
- For commercial use: Please reach out to hello@dreamgen.com.
|