Text Generation
Transformers
GGUF
Safetensors
Safetensors
mistral
text-generation-inference
Merge
7b
mistralai/Mistral-7B-Instruct-v0.1
athirdpath/NSFW_DPO_Noromaid-7b
en
dataset:athirdpath/DPO_Pairs-Roleplay-Alpaca-NSFW-v2
dataset:athirdpath/DPO_Pairs-Roleplay-Alpaca-NSFW
Inference Endpoints
has_space
conversational
aashish1904
commited on
Commit
•
b89a069
1
Parent(s):
7380a13
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
|
4 |
+
license: apache-2.0
|
5 |
+
tags:
|
6 |
+
- Safetensors
|
7 |
+
- mistral
|
8 |
+
- text-generation-inference
|
9 |
+
- merge
|
10 |
+
- mistral
|
11 |
+
- 7b
|
12 |
+
- mistralai/Mistral-7B-Instruct-v0.1
|
13 |
+
- athirdpath/NSFW_DPO_Noromaid-7b
|
14 |
+
- transformers
|
15 |
+
- safetensors
|
16 |
+
- mistral
|
17 |
+
- text-generation
|
18 |
+
- en
|
19 |
+
- dataset:athirdpath/DPO_Pairs-Roleplay-Alpaca-NSFW-v2
|
20 |
+
- dataset:athirdpath/DPO_Pairs-Roleplay-Alpaca-NSFW
|
21 |
+
- license:cc-by-nc-4.0
|
22 |
+
- autotrain_compatible
|
23 |
+
- endpoints_compatible
|
24 |
+
- has_space
|
25 |
+
- text-generation-inference
|
26 |
+
- region:us
|
27 |
+
|
28 |
+
---
|
29 |
+
|
30 |
+
[![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
|
31 |
+
|
32 |
+
|
33 |
+
# QuantFactory/NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1-GGUF
|
34 |
+
This is quantized version of [MaziyarPanahi/NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1](https://huggingface.co/MaziyarPanahi/NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1) created using llama.cpp
|
35 |
+
|
36 |
+
# Original Model Card
|
37 |
+
|
38 |
+
|
39 |
+
# NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1
|
40 |
+
|
41 |
+
NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1 is a merge of the following models:
|
42 |
+
* [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
|
43 |
+
* [athirdpath/NSFW_DPO_Noromaid-7b](https://huggingface.co/athirdpath/NSFW_DPO_Noromaid-7b)
|
44 |
+
|
45 |
+
## 🧩 Configuration
|
46 |
+
|
47 |
+
```yaml
|
48 |
+
slices:
|
49 |
+
- sources:
|
50 |
+
- model: mistralai/Mistral-7B-Instruct-v0.1
|
51 |
+
layer_range: [0, 32]
|
52 |
+
- model: athirdpath/NSFW_DPO_Noromaid-7b
|
53 |
+
layer_range: [0, 32]
|
54 |
+
merge_method: slerp
|
55 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.1
|
56 |
+
parameters:
|
57 |
+
t:
|
58 |
+
- filter: self_attn
|
59 |
+
value: [0, 0.5, 0.3, 0.7, 1]
|
60 |
+
- filter: mlp
|
61 |
+
value: [1, 0.5, 0.7, 0.3, 0]
|
62 |
+
- value: 0.5
|
63 |
+
dtype: bfloat16
|
64 |
+
```
|
65 |
+
|
66 |
+
|
67 |
+
## 💻 Usage
|
68 |
+
|
69 |
+
|
70 |
+
```python
|
71 |
+
!pip install -qU transformers accelerate
|
72 |
+
|
73 |
+
from transformers import AutoTokenizer
|
74 |
+
import transformers
|
75 |
+
import torch
|
76 |
+
|
77 |
+
model = "MaziyarPanahi/NSFW_DPO_Noromaid-7b-Mistral-7B-Instruct-v0.1"
|
78 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
79 |
+
|
80 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
81 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
82 |
+
pipeline = transformers.pipeline(
|
83 |
+
"text-generation",
|
84 |
+
model=model,
|
85 |
+
torch_dtype=torch.float16,
|
86 |
+
device_map="auto",
|
87 |
+
)
|
88 |
+
|
89 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
90 |
+
print(outputs[0]["generated_text"])
|
91 |
+
```
|