Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: openrail
|
3 |
+
pipeline_tag: text-generation
|
4 |
+
library_name: transformers
|
5 |
+
language:
|
6 |
+
- zh
|
7 |
+
---
|
8 |
+
|
9 |
+
|
10 |
+
## Original model card
|
11 |
+
|
12 |
+
Buy me a coffee if you like this project ;)
|
13 |
+
<a href="https://www.buymeacoffee.com/s3nh"><img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" alt=""></a>
|
14 |
+
|
15 |
+
#### Description
|
16 |
+
|
17 |
+
GGML Format model files for [This project](https://huggingface.co/arogov/llama2_13b_chat_uncensored).
|
18 |
+
|
19 |
+
|
20 |
+
### inference
|
21 |
+
|
22 |
+
|
23 |
+
```python
|
24 |
+
|
25 |
+
import ctransformers
|
26 |
+
|
27 |
+
from ctransformers import AutoModelForCausalLM
|
28 |
+
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(output_dir, ggml_file,
|
30 |
+
gpu_layers=32, model_type="llama")
|
31 |
+
|
32 |
+
manual_input: str = "Tell me about your last dream, please."
|
33 |
+
|
34 |
+
|
35 |
+
llm(manual_input,
|
36 |
+
max_new_tokens=256,
|
37 |
+
temperature=0.9,
|
38 |
+
top_p= 0.7)
|
39 |
+
|
40 |
+
```
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
# Original model card
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
# Overview
|
49 |
+
Fine-tuned [Llama-2 13B](https://huggingface.co/TheBloke/Llama-2-13B-fp16) with an uncensored/unfiltered Wizard-Vicuna conversation dataset [ehartford/wizard_vicuna_70k_unfiltered](https://huggingface.co/datasets/ehartford/wizard_vicuna_70k_unfiltered).
|
50 |
+
Used QLoRA for fine-tuning. Trained for one epoch on a two 24GB GPU (NVIDIA RTX 3090) instance, took ~26.5 hours to train.
|
51 |
+
```
|
52 |
+
{'train_runtime': 95229.7197, 'train_samples_per_second': 0.363, 'train_steps_per_second': 0.091, 'train_loss': 0.5828390517308127, 'epoch': 1.0}
|
53 |
+
100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 8649/8649 [26:27:09<00:00, 11.01s/it]
|
54 |
+
Training complete, adapter model saved in models//llama2_13b_chat_uncensored_adapter
|
55 |
+
```
|
56 |
+
|
57 |
+
The version here is the fp16 HuggingFace model.
|
58 |
+
|
59 |
+
## GGML & GPTQ versions
|
60 |
+
Thanks to [TheBloke](https://huggingface.co/TheBloke), he has created the GGML and GPTQ versions:
|
61 |
+
* https://huggingface.co/TheBloke/Llama-2-13B-GGML
|
62 |
+
* https://huggingface.co/TheBloke/Llama-2-13B-GPTQ
|
63 |
+
|
64 |
+
# Prompt style
|
65 |
+
The model was trained with the following prompt style:
|
66 |
+
```
|
67 |
+
### HUMAN:
|
68 |
+
Hello
|
69 |
+
|
70 |
+
### RESPONSE:
|
71 |
+
Hi, how are you?
|
72 |
+
|
73 |
+
### HUMAN:
|
74 |
+
I'm fine.
|
75 |
+
|
76 |
+
### RESPONSE:
|
77 |
+
How can I help you?
|
78 |
+
...
|
79 |
+
```
|
80 |
+
|
81 |
+
# Training code
|
82 |
+
Code used to train the model is available [here](https://github.com/georgesung/llm_qlora).
|
83 |
+
|
84 |
+
To reproduce the results:
|
85 |
+
```
|
86 |
+
git clone https://github.com/georgesung/llm_qlora
|
87 |
+
cd llm_qlora
|
88 |
+
pip install -r requirements.txt
|
89 |
+
python train.py configs/llama2_13b_chat_uncensored.yaml
|
90 |
+
```
|
91 |
+
|
92 |
+
# Fine-tuning guide
|
93 |
+
https://georgesung.github.io/ai/qlora-ift/
|