11b commited on
Commit
98a4107
0 Parent(s):

initial commit

Browse files
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ language:
4
+ - en
5
+ thumbnail:
6
+ tags:
7
+ - text generation
8
+ - conversational
9
+ inference: false
10
+ ---
11
+
12
+ # Pygmalion 2.7B
13
+
14
+ ## Model description
15
+
16
+ Pymalion 2.7B is a proof-of-concept dialogue model based on EleutherAI's [gpt-neo-2.7B](https://huggingface.co/EleutherAI/gpt-neo-2.7B).
17
+
18
+ **Warning:** This model is **NOT** suitable for use by minors. It **will** output X-rated content under certain circumstances.
19
+
20
+ ## Training data
21
+
22
+ The fine-tuning dataset consisted of 56MB of dialogue data gathered from multiple sources, which includes both real _and_ partially machine-generated conversations.
23
+
24
+ ## Training procedure
25
+
26
+ Model weights were initialized from the `uft-2.7b` ConvoGPT model made available in [this commit](https://huggingface.co/hakurei/convogpt/tree/07707377dee0aa7d1ee5363ef660b13eb5b73f9d/2.7b-uft).
27
+
28
+ The model was then further fine-tuned on ~48.5 million tokens for ~5k steps on 4 NVIDIA A40s using DeepSpeed.
29
+
30
+ ## Intended use
31
+
32
+ ### The easy way
33
+
34
+ We plan to provide a notebook with a Gradio UI for playing around with the model shortly. Until then, please refer to the section below for manual usage.
35
+
36
+ ### The manual way
37
+
38
+ The model can be used as a regular text generation model, but it'll perform best if the input prompt adheres to the following format:
39
+
40
+ ```
41
+ [CHARACTER]'s Persona: [A few sentences about the character you want the model to play]
42
+ <START>
43
+ [DIALOGUE HISTORY]
44
+ You: [Your input message here]
45
+ [CHARACTER]:
46
+ ```
47
+
48
+ Where `[CHARACTER]` is, as you can probably guess, the name of the character you want the model to portray, `<START>` should be used verbatim as a delimiter token to separate persona and scenario data from the dialogue, and `[DIALOGUE HISTORY]` is chat history so the model can have some conversational context to draw from. Ideally it'll be pairs of messages like:
49
+
50
+ ```
51
+ [CHARACTER]: [some dialogue here]
52
+ You: [your response to the dialogue above]
53
+ ```
54
+
55
+ Apart from chat history, you can also just add example conversations in `[DIALOGUE HISTORY]` to show how the character should speak - ideally at the beginning, so it doesn't get confused as to what's conversation history vs. character definition.
56
+
57
+ ## Known issues
58
+
59
+ We haven't played around with the model enough to enumerate them. Feel free to give us some feedback!
config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "pygmalion-2.7b",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPTNeoForCausalLM"
6
+ ],
7
+ "attention_dropout": 0,
8
+ "attention_layers": [
9
+ "global",
10
+ "local",
11
+ "global",
12
+ "local",
13
+ "global",
14
+ "local",
15
+ "global",
16
+ "local",
17
+ "global",
18
+ "local",
19
+ "global",
20
+ "local",
21
+ "global",
22
+ "local",
23
+ "global",
24
+ "local",
25
+ "global",
26
+ "local",
27
+ "global",
28
+ "local",
29
+ "global",
30
+ "local",
31
+ "global",
32
+ "local",
33
+ "global",
34
+ "local",
35
+ "global",
36
+ "local",
37
+ "global",
38
+ "local",
39
+ "global",
40
+ "local"
41
+ ],
42
+ "attention_types": [
43
+ [
44
+ [
45
+ "global",
46
+ "local"
47
+ ],
48
+ 16
49
+ ]
50
+ ],
51
+ "bos_token_id": 50256,
52
+ "embed_dropout": 0,
53
+ "eos_token_id": 50256,
54
+ "hidden_size": 2560,
55
+ "initializer_range": 0.02,
56
+ "intermediate_size": null,
57
+ "layer_norm_epsilon": 1e-05,
58
+ "max_position_embeddings": 2048,
59
+ "model_type": "gpt_neo",
60
+ "num_heads": 20,
61
+ "num_layers": 32,
62
+ "resid_dropout": 0,
63
+ "summary_activation": null,
64
+ "summary_first_dropout": 0.1,
65
+ "summary_proj_to_labels": true,
66
+ "summary_type": "cls_index",
67
+ "summary_use_proj": true,
68
+ "task_specific_params": {
69
+ "text-generation": {
70
+ "do_sample": true,
71
+ "max_length": 50,
72
+ "temperature": 0.9
73
+ }
74
+ },
75
+ "tokenizer_class": "GPT2Tokenizer",
76
+ "torch_dtype": "float16",
77
+ "transformers_version": "4.26.0.dev0",
78
+ "use_cache": false,
79
+ "vocab_size": 50257,
80
+ "window_size": 256
81
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81840c515baa22ee87d9bcd53d62f06d51a058947739e88011dcaec858ebb383
3
+ size 5436910620
runs/events.out.tfevents.1672861513.uft-2.228070.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3906e7e1f06c2261c23aa58c7ebb45f16ec335ee40384b842fc0e9960fedc23
3
+ size 541725
runs/events.out.tfevents.1672879694.uft-2.389061.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1696c3cd881a970f8a9cd3471f0277a932e5ac9c10682adfb79fdde658cdb18e
3
+ size 40288
runs/events.out.tfevents.1672880794.uft-2.399187.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e889ef19714d61c40ea8370848a185e9cc053328e77b89dede6ac0e33468106
3
+ size 116527
runs/events.out.tfevents.1672889057.uft-2.472434.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eaa947d6345a66c66cf852b2c1994b75e63f008c93607dc3a9b31ace80bedf7b
3
+ size 1500826
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|endoftext|>",
3
+ "eos_token": "<|endoftext|>",
4
+ "pad_token": "<|endoftext|>",
5
+ "unk_token": "<|endoftext|>"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "eos_token": {
12
+ "__type": "AddedToken",
13
+ "content": "",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "errors": "replace",
20
+ "model_max_length": 2048,
21
+ "name_or_path": "pygmalion-2.7b",
22
+ "pad_token": "",
23
+ "special_tokens_map_file": null,
24
+ "tokenizer_class": "GPT2Tokenizer",
25
+ "unk_token": {
26
+ "__type": "AddedToken",
27
+ "content": "<|endoftext|>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff