PrasannSinghal
commited on
Commit
•
6293ed3
1
Parent(s):
deed324
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- step_100/README.md +42 -0
- step_100/adapter_config.json +20 -0
- step_100/adapter_model.bin +3 -0
- step_100/added_tokens.json +3 -0
- step_100/pytorch_model.bin +3 -0
- step_100/special_tokens_map.json +24 -0
- step_100/tokenizer.json +0 -0
- step_100/tokenizer.model +3 -0
- step_100/tokenizer_config.json +32 -0
- step_125/README.md +42 -0
- step_125/adapter_config.json +20 -0
- step_125/adapter_model.bin +3 -0
- step_125/added_tokens.json +3 -0
- step_125/pytorch_model.bin +3 -0
- step_125/special_tokens_map.json +24 -0
- step_125/tokenizer.json +0 -0
- step_125/tokenizer.model +3 -0
- step_125/tokenizer_config.json +32 -0
- step_150/README.md +42 -0
- step_150/adapter_config.json +20 -0
- step_150/adapter_model.bin +3 -0
- step_150/added_tokens.json +3 -0
- step_150/pytorch_model.bin +3 -0
- step_150/special_tokens_map.json +24 -0
- step_150/tokenizer.json +0 -0
- step_150/tokenizer.model +3 -0
- step_150/tokenizer_config.json +32 -0
- step_25/README.md +42 -0
- step_25/adapter_config.json +20 -0
- step_25/adapter_model.bin +3 -0
- step_25/added_tokens.json +3 -0
- step_25/pytorch_model.bin +3 -0
- step_25/special_tokens_map.json +24 -0
- step_25/tokenizer.json +0 -0
- step_25/tokenizer.model +3 -0
- step_25/tokenizer_config.json +32 -0
- step_50/README.md +42 -0
- step_50/adapter_config.json +20 -0
- step_50/adapter_model.bin +3 -0
- step_50/added_tokens.json +3 -0
- step_50/pytorch_model.bin +3 -0
- step_50/special_tokens_map.json +24 -0
- step_50/tokenizer.json +0 -0
- step_50/tokenizer.model +3 -0
- step_50/tokenizer_config.json +32 -0
- step_75/README.md +42 -0
- step_75/adapter_config.json +20 -0
- step_75/adapter_model.bin +3 -0
- step_75/added_tokens.json +3 -0
- step_75/pytorch_model.bin +3 -0
step_100/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_100")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_100")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_100")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_100/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_100/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:488f3a044499e9f6617123fbd1190650067d3da1b0a93037c58ec3fcd4939f27
|
3 |
+
size 33600461
|
step_100/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_100/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa3ed707b9c86f2a6b946d007a615d62ea606948f658ebcd97ae0a46c96f46f5
|
3 |
+
size 17471
|
step_100/special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "[PAD]",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
step_100/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
step_100/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
step_100/tokenizer_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"__type": "AddedToken",
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
"clean_up_tokenization_spaces": false,
|
11 |
+
"eos_token": {
|
12 |
+
"__type": "AddedToken",
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false
|
18 |
+
},
|
19 |
+
"model_max_length": 512,
|
20 |
+
"pad_token": null,
|
21 |
+
"padding_side": "right",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"tokenizer_class": "LlamaTokenizer",
|
24 |
+
"unk_token": {
|
25 |
+
"__type": "AddedToken",
|
26 |
+
"content": "<unk>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": true,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
step_125/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_125")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_125")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_125")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_125/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_125/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3cf2d8f6e72ce5362a0708190ce7ec94b48323837a4cdf08ccd4fab1ca1e70ed
|
3 |
+
size 33600461
|
step_125/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_125/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:46dbe338fd863c09e2b1884fad40e1e22fea72606c7effa8256ef463b57a6dae
|
3 |
+
size 17471
|
step_125/special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "[PAD]",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
step_125/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
step_125/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
step_125/tokenizer_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"__type": "AddedToken",
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
"clean_up_tokenization_spaces": false,
|
11 |
+
"eos_token": {
|
12 |
+
"__type": "AddedToken",
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false
|
18 |
+
},
|
19 |
+
"model_max_length": 512,
|
20 |
+
"pad_token": null,
|
21 |
+
"padding_side": "right",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"tokenizer_class": "LlamaTokenizer",
|
24 |
+
"unk_token": {
|
25 |
+
"__type": "AddedToken",
|
26 |
+
"content": "<unk>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": true,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
step_150/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_150")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_150")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_150")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_150/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_150/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:697f7f23cb74b2cae637ab7f9b5f3f8ddf40bdb36689969ba876492aed45e607
|
3 |
+
size 33600461
|
step_150/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_150/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8124c555fdd63bd4126f2f6a18d7197d0d46ad878d5d5e55e426921a49a85b0e
|
3 |
+
size 17471
|
step_150/special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "[PAD]",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
step_150/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
step_150/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
step_150/tokenizer_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"__type": "AddedToken",
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
"clean_up_tokenization_spaces": false,
|
11 |
+
"eos_token": {
|
12 |
+
"__type": "AddedToken",
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false
|
18 |
+
},
|
19 |
+
"model_max_length": 512,
|
20 |
+
"pad_token": null,
|
21 |
+
"padding_side": "right",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"tokenizer_class": "LlamaTokenizer",
|
24 |
+
"unk_token": {
|
25 |
+
"__type": "AddedToken",
|
26 |
+
"content": "<unk>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": true,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
step_25/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_25")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_25")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_25")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_25/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_25/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:385d3fd31bee7c4883f33ffd445e029eb238d425a45f0692110167ba5333302e
|
3 |
+
size 33600461
|
step_25/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_25/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ca73c48660d7b5c160bb55ef364e2444a1b4484494fc2354d9aeb966667beca6
|
3 |
+
size 17471
|
step_25/special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "[PAD]",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
step_25/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
step_25/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
step_25/tokenizer_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"__type": "AddedToken",
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
"clean_up_tokenization_spaces": false,
|
11 |
+
"eos_token": {
|
12 |
+
"__type": "AddedToken",
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false
|
18 |
+
},
|
19 |
+
"model_max_length": 512,
|
20 |
+
"pad_token": null,
|
21 |
+
"padding_side": "right",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"tokenizer_class": "LlamaTokenizer",
|
24 |
+
"unk_token": {
|
25 |
+
"__type": "AddedToken",
|
26 |
+
"content": "<unk>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": true,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
step_50/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_50")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_50")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_50")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_50/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_50/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfb926aa939d2c1f52fb443f645dfba085dbec97fd55207722821182f77e7c69
|
3 |
+
size 33600461
|
step_50/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_50/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:063e98fda7df2e2a2363ce90ca5b450e3de78a51bf7f554ec0b7a3d54bf02139
|
3 |
+
size 17471
|
step_50/special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "[PAD]",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": true,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
step_50/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
step_50/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
step_50/tokenizer_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"__type": "AddedToken",
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": true,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false
|
9 |
+
},
|
10 |
+
"clean_up_tokenization_spaces": false,
|
11 |
+
"eos_token": {
|
12 |
+
"__type": "AddedToken",
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false
|
18 |
+
},
|
19 |
+
"model_max_length": 512,
|
20 |
+
"pad_token": null,
|
21 |
+
"padding_side": "right",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"tokenizer_class": "LlamaTokenizer",
|
24 |
+
"unk_token": {
|
25 |
+
"__type": "AddedToken",
|
26 |
+
"content": "<unk>",
|
27 |
+
"lstrip": false,
|
28 |
+
"normalized": true,
|
29 |
+
"rstrip": false,
|
30 |
+
"single_word": false
|
31 |
+
}
|
32 |
+
}
|
step_75/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/lvwerra/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="PrasannSinghal/checkpoints/wgptapsft/step_75")
|
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("PrasannSinghal/checkpoints/wgptapsft/step_75")
|
38 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("PrasannSinghal/checkpoints/wgptapsft/step_75")
|
39 |
+
|
40 |
+
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
41 |
+
outputs = model(**inputs, labels=inputs["input_ids"])
|
42 |
+
```
|
step_75/adapter_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model_name_or_path": "/home/prasann/Projects/tfr-decoding/apfarm_models/sft10k/",
|
3 |
+
"bias": "none",
|
4 |
+
"fan_in_fan_out": false,
|
5 |
+
"inference_mode": true,
|
6 |
+
"init_lora_weights": true,
|
7 |
+
"layers_pattern": null,
|
8 |
+
"layers_to_transform": null,
|
9 |
+
"lora_alpha": 32,
|
10 |
+
"lora_dropout": 0.05,
|
11 |
+
"modules_to_save": null,
|
12 |
+
"peft_type": "LORA",
|
13 |
+
"r": 16,
|
14 |
+
"revision": null,
|
15 |
+
"target_modules": [
|
16 |
+
"q_proj",
|
17 |
+
"v_proj"
|
18 |
+
],
|
19 |
+
"task_type": "CAUSAL_LM"
|
20 |
+
}
|
step_75/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6079337c680545591dd960522e4d2daa52a702eaabc4111ea54c03318cc489c9
|
3 |
+
size 33600461
|
step_75/added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[PAD]": 32000
|
3 |
+
}
|
step_75/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:874ad170e94bbb931333b2bdeda4956aabfcb5f9bedb2f88aaf71c8a228835af
|
3 |
+
size 17471
|