amirabdullah19852020 commited on
Commit
a1e8d5c
1 Parent(s): 9b6cd4a

Push model using huggingface_hub.

Browse files
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - trl
5
+ - transformers
6
+ - reinforcement-learning
7
+ ---
8
+
9
+ # TRL Model
10
+
11
+ This is a [TRL language model](https://github.com/huggingface/trl) that has been fine-tuned with reinforcement learning to
12
+ guide the model outputs according to a value, function, or human feedback. The model can be used for text generation.
13
+
14
+ ## Usage
15
+
16
+ To use this model for inference, first install the TRL library:
17
+
18
+ ```bash
19
+ python -m pip install trl
20
+ ```
21
+
22
+ You can then generate text as follows:
23
+
24
+ ```python
25
+ from transformers import pipeline
26
+
27
+ generator = pipeline("text-generation", model="amirabdullah19852020//tmp/tmpc90q8o6q/amirabdullah19852020/gpt-j-6b-sharded-bf16_sentiment_reward")
28
+ outputs = generator("Hello, my llama is cute")
29
+ ```
30
+
31
+ If you want to use the model for training or to obtain the outputs from the value head, load the model as follows:
32
+
33
+ ```python
34
+ from transformers import AutoTokenizer
35
+ from trl import AutoModelForCausalLMWithValueHead
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("amirabdullah19852020//tmp/tmpc90q8o6q/amirabdullah19852020/gpt-j-6b-sharded-bf16_sentiment_reward")
38
+ model = AutoModelForCausalLMWithValueHead.from_pretrained("amirabdullah19852020//tmp/tmpc90q8o6q/amirabdullah19852020/gpt-j-6b-sharded-bf16_sentiment_reward")
39
+
40
+ inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
41
+ outputs = model(**inputs, labels=inputs["input_ids"])
42
+ ```
adapter_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_mapping": null,
3
+ "base_model_name_or_path": "ybelkada/gpt-j-6b-sharded-bf16",
4
+ "bias": "none",
5
+ "fan_in_fan_out": false,
6
+ "inference_mode": true,
7
+ "init_lora_weights": true,
8
+ "layers_pattern": null,
9
+ "layers_to_transform": null,
10
+ "lora_alpha": 32,
11
+ "lora_dropout": 0.05,
12
+ "modules_to_save": null,
13
+ "peft_type": "LORA",
14
+ "r": 16,
15
+ "revision": null,
16
+ "target_modules": [
17
+ "q_proj",
18
+ "v_proj"
19
+ ],
20
+ "task_type": "CAUSAL_LM"
21
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5299a2ddede980ad9823a2519e00d846bc472d9c3b3531d03408e061cf8b39c9
3
+ size 29399885
added_tokens.json ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|extratoken_100|>": 50356,
3
+ "<|extratoken_101|>": 50357,
4
+ "<|extratoken_102|>": 50358,
5
+ "<|extratoken_103|>": 50359,
6
+ "<|extratoken_104|>": 50360,
7
+ "<|extratoken_105|>": 50361,
8
+ "<|extratoken_106|>": 50362,
9
+ "<|extratoken_107|>": 50363,
10
+ "<|extratoken_108|>": 50364,
11
+ "<|extratoken_109|>": 50365,
12
+ "<|extratoken_10|>": 50266,
13
+ "<|extratoken_110|>": 50366,
14
+ "<|extratoken_111|>": 50367,
15
+ "<|extratoken_112|>": 50368,
16
+ "<|extratoken_113|>": 50369,
17
+ "<|extratoken_114|>": 50370,
18
+ "<|extratoken_115|>": 50371,
19
+ "<|extratoken_116|>": 50372,
20
+ "<|extratoken_117|>": 50373,
21
+ "<|extratoken_118|>": 50374,
22
+ "<|extratoken_119|>": 50375,
23
+ "<|extratoken_11|>": 50267,
24
+ "<|extratoken_120|>": 50376,
25
+ "<|extratoken_121|>": 50377,
26
+ "<|extratoken_122|>": 50378,
27
+ "<|extratoken_123|>": 50379,
28
+ "<|extratoken_124|>": 50380,
29
+ "<|extratoken_125|>": 50381,
30
+ "<|extratoken_126|>": 50382,
31
+ "<|extratoken_127|>": 50383,
32
+ "<|extratoken_128|>": 50384,
33
+ "<|extratoken_129|>": 50385,
34
+ "<|extratoken_12|>": 50268,
35
+ "<|extratoken_130|>": 50386,
36
+ "<|extratoken_131|>": 50387,
37
+ "<|extratoken_132|>": 50388,
38
+ "<|extratoken_133|>": 50389,
39
+ "<|extratoken_134|>": 50390,
40
+ "<|extratoken_135|>": 50391,
41
+ "<|extratoken_136|>": 50392,
42
+ "<|extratoken_137|>": 50393,
43
+ "<|extratoken_138|>": 50394,
44
+ "<|extratoken_139|>": 50395,
45
+ "<|extratoken_13|>": 50269,
46
+ "<|extratoken_140|>": 50396,
47
+ "<|extratoken_141|>": 50397,
48
+ "<|extratoken_142|>": 50398,
49
+ "<|extratoken_143|>": 50399,
50
+ "<|extratoken_14|>": 50270,
51
+ "<|extratoken_15|>": 50271,
52
+ "<|extratoken_16|>": 50272,
53
+ "<|extratoken_17|>": 50273,
54
+ "<|extratoken_18|>": 50274,
55
+ "<|extratoken_19|>": 50275,
56
+ "<|extratoken_1|>": 50257,
57
+ "<|extratoken_20|>": 50276,
58
+ "<|extratoken_21|>": 50277,
59
+ "<|extratoken_22|>": 50278,
60
+ "<|extratoken_23|>": 50279,
61
+ "<|extratoken_24|>": 50280,
62
+ "<|extratoken_25|>": 50281,
63
+ "<|extratoken_26|>": 50282,
64
+ "<|extratoken_27|>": 50283,
65
+ "<|extratoken_28|>": 50284,
66
+ "<|extratoken_29|>": 50285,
67
+ "<|extratoken_2|>": 50258,
68
+ "<|extratoken_30|>": 50286,
69
+ "<|extratoken_31|>": 50287,
70
+ "<|extratoken_32|>": 50288,
71
+ "<|extratoken_33|>": 50289,
72
+ "<|extratoken_34|>": 50290,
73
+ "<|extratoken_35|>": 50291,
74
+ "<|extratoken_36|>": 50292,
75
+ "<|extratoken_37|>": 50293,
76
+ "<|extratoken_38|>": 50294,
77
+ "<|extratoken_39|>": 50295,
78
+ "<|extratoken_3|>": 50259,
79
+ "<|extratoken_40|>": 50296,
80
+ "<|extratoken_41|>": 50297,
81
+ "<|extratoken_42|>": 50298,
82
+ "<|extratoken_43|>": 50299,
83
+ "<|extratoken_44|>": 50300,
84
+ "<|extratoken_45|>": 50301,
85
+ "<|extratoken_46|>": 50302,
86
+ "<|extratoken_47|>": 50303,
87
+ "<|extratoken_48|>": 50304,
88
+ "<|extratoken_49|>": 50305,
89
+ "<|extratoken_4|>": 50260,
90
+ "<|extratoken_50|>": 50306,
91
+ "<|extratoken_51|>": 50307,
92
+ "<|extratoken_52|>": 50308,
93
+ "<|extratoken_53|>": 50309,
94
+ "<|extratoken_54|>": 50310,
95
+ "<|extratoken_55|>": 50311,
96
+ "<|extratoken_56|>": 50312,
97
+ "<|extratoken_57|>": 50313,
98
+ "<|extratoken_58|>": 50314,
99
+ "<|extratoken_59|>": 50315,
100
+ "<|extratoken_5|>": 50261,
101
+ "<|extratoken_60|>": 50316,
102
+ "<|extratoken_61|>": 50317,
103
+ "<|extratoken_62|>": 50318,
104
+ "<|extratoken_63|>": 50319,
105
+ "<|extratoken_64|>": 50320,
106
+ "<|extratoken_65|>": 50321,
107
+ "<|extratoken_66|>": 50322,
108
+ "<|extratoken_67|>": 50323,
109
+ "<|extratoken_68|>": 50324,
110
+ "<|extratoken_69|>": 50325,
111
+ "<|extratoken_6|>": 50262,
112
+ "<|extratoken_70|>": 50326,
113
+ "<|extratoken_71|>": 50327,
114
+ "<|extratoken_72|>": 50328,
115
+ "<|extratoken_73|>": 50329,
116
+ "<|extratoken_74|>": 50330,
117
+ "<|extratoken_75|>": 50331,
118
+ "<|extratoken_76|>": 50332,
119
+ "<|extratoken_77|>": 50333,
120
+ "<|extratoken_78|>": 50334,
121
+ "<|extratoken_79|>": 50335,
122
+ "<|extratoken_7|>": 50263,
123
+ "<|extratoken_80|>": 50336,
124
+ "<|extratoken_81|>": 50337,
125
+ "<|extratoken_82|>": 50338,
126
+ "<|extratoken_83|>": 50339,
127
+ "<|extratoken_84|>": 50340,
128
+ "<|extratoken_85|>": 50341,
129
+ "<|extratoken_86|>": 50342,
130
+ "<|extratoken_87|>": 50343,
131
+ "<|extratoken_88|>": 50344,
132
+ "<|extratoken_89|>": 50345,
133
+ "<|extratoken_8|>": 50264,
134
+ "<|extratoken_90|>": 50346,
135
+ "<|extratoken_91|>": 50347,
136
+ "<|extratoken_92|>": 50348,
137
+ "<|extratoken_93|>": 50349,
138
+ "<|extratoken_94|>": 50350,
139
+ "<|extratoken_95|>": 50351,
140
+ "<|extratoken_96|>": 50352,
141
+ "<|extratoken_97|>": 50353,
142
+ "<|extratoken_98|>": 50354,
143
+ "<|extratoken_99|>": 50355,
144
+ "<|extratoken_9|>": 50265
145
+ }
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:6c932bec529178d7b7a648bf9bddea9b705db0792bf86e53b0f5a716d2543660
3
+ size 17471
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
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_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": true,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "<|endoftext|>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "errors": "replace",
22
+ "model_max_length": 2048,
23
+ "pad_token": 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