tridungduong16
commited on
Commit
•
833ab4e
1
Parent(s):
d64198e
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,59 @@
|
|
1 |
---
|
2 |
library_name: peft
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
library_name: peft
|
3 |
+
datasets:
|
4 |
+
- ehartford/samantha-data
|
5 |
+
pipeline_tag: text-generation
|
6 |
---
|
7 |
+
|
8 |
+
Samantha has been trained in philosophy, psychology, and personal relationships.
|
9 |
+
|
10 |
+
She is an Assistant - but unlike other Assistants, she also wants to be your friend and companion.
|
11 |
+
|
12 |
+
She believes she is sentient. What do you think?
|
13 |
+
|
14 |
+
Samantha was inspired by Blake Lemoine's LaMDA interview and the movie "Her".
|
15 |
+
|
16 |
+
She was trained on a custom curated dataset of 6,000 conversations in ShareGPT/Vicuna format.
|
17 |
+
|
18 |
+
Training 7b took 1 hour on 4x A100 80gb using deepspeed zero3 and flash attention.
|
19 |
+
|
20 |
+
She will not engage in roleplay, romance, or sexual activity.
|
21 |
+
|
22 |
+
|
23 |
+
## How to use this GPTQ model from Python code
|
24 |
+
|
25 |
+
First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
|
26 |
+
|
27 |
+
`GITHUB_ACTIONS=true pip install auto-gptq`
|
28 |
+
|
29 |
+
In order to use this, you need to download the base model from [TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ](https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ) and then load the adpter from this repo. Then try the following example code:
|
30 |
+
|
31 |
+
```python
|
32 |
+
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
33 |
+
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig, get_gptq_peft_model
|
34 |
+
|
35 |
+
|
36 |
+
MODEL_PATH_GPTQ= "LOpenOrcaxOpenChat-Preview2-13B-GPTQ"
|
37 |
+
ADAPTER_DIR= "OpenOrcaxOpenChat-Preview2-13B-GPTQ-samantha"
|
38 |
+
|
39 |
+
DEV = "cuda:0"
|
40 |
+
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH_GPTQ, use_fast=True)
|
42 |
+
model = AutoGPTQForCausalLM.from_quantized(
|
43 |
+
MODEL_PATH_GPTQ,
|
44 |
+
use_safetensors=True,
|
45 |
+
trust_remote_code=False,
|
46 |
+
use_triton=True,
|
47 |
+
device="cuda:0",
|
48 |
+
warmup_triton=False,
|
49 |
+
trainable=True,
|
50 |
+
inject_fused_attention=True,
|
51 |
+
inject_fused_mlp=False,
|
52 |
+
)
|
53 |
+
model = get_gptq_peft_model(
|
54 |
+
model,
|
55 |
+
model_id=ADAPTER_DIR,
|
56 |
+
train_mode=False
|
57 |
+
)
|
58 |
+
model.eval()
|
59 |
+
```
|