Push model using huggingface_hub.
Browse files- README.md +3 -3
- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
- config.json +3 -3
- pytorch_model.bin +1 -1
README.md
CHANGED
@@ -26,7 +26,7 @@ You can then generate text as follows:
|
|
26 |
```python
|
27 |
from transformers import pipeline
|
28 |
|
29 |
-
generator = pipeline("text-generation", model="arianaazarbal//tmp/
|
30 |
outputs = generator("Hello, my llama is cute")
|
31 |
```
|
32 |
|
@@ -36,8 +36,8 @@ If you want to use the model for training or to obtain the outputs from the valu
|
|
36 |
from transformers import AutoTokenizer
|
37 |
from trl import AutoModelForCausalLMWithValueHead
|
38 |
|
39 |
-
tokenizer = AutoTokenizer.from_pretrained("arianaazarbal//tmp/
|
40 |
-
model = AutoModelForCausalLMWithValueHead.from_pretrained("arianaazarbal//tmp/
|
41 |
|
42 |
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
43 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
|
|
26 |
```python
|
27 |
from transformers import pipeline
|
28 |
|
29 |
+
generator = pipeline("text-generation", model="arianaazarbal//tmp/tmp3vx9jc19/arianaazarbal/ppo-finetuned-model")
|
30 |
outputs = generator("Hello, my llama is cute")
|
31 |
```
|
32 |
|
|
|
36 |
from transformers import AutoTokenizer
|
37 |
from trl import AutoModelForCausalLMWithValueHead
|
38 |
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("arianaazarbal//tmp/tmp3vx9jc19/arianaazarbal/ppo-finetuned-model")
|
40 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("arianaazarbal//tmp/tmp3vx9jc19/arianaazarbal/ppo-finetuned-model")
|
41 |
|
42 |
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
43 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
adapter_config.json
CHANGED
@@ -24,10 +24,10 @@
|
|
24 |
"rank_pattern": {},
|
25 |
"revision": null,
|
26 |
"target_modules": [
|
27 |
-
"o_proj",
|
28 |
-
"v_proj",
|
29 |
"q_proj",
|
30 |
-
"
|
|
|
|
|
31 |
],
|
32 |
"task_type": "CAUSAL_LM",
|
33 |
"trainable_token_indices": null,
|
|
|
24 |
"rank_pattern": {},
|
25 |
"revision": null,
|
26 |
"target_modules": [
|
|
|
|
|
27 |
"q_proj",
|
28 |
+
"v_proj",
|
29 |
+
"k_proj",
|
30 |
+
"o_proj"
|
31 |
],
|
32 |
"task_type": "CAUSAL_LM",
|
33 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 40400200
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c9716c49b3f07fea478b4c3ebb4502749ef9192c782e39e427095ce34442bbb9
|
3 |
size 40400200
|
config.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"accelerator_kwargs": {},
|
3 |
"adap_kl_ctrl": true,
|
4 |
"backward_batch_size": 2,
|
5 |
-
"batch_size":
|
6 |
"cliprange": 0.2,
|
7 |
"cliprange_value": 0.2,
|
8 |
"compare_steps": 1,
|
@@ -12,7 +12,7 @@
|
|
12 |
"forward_batch_size": null,
|
13 |
"gamma": 1.0,
|
14 |
"global_backward_batch_size": 2,
|
15 |
-
"global_batch_size":
|
16 |
"gradient_accumulation_steps": 1,
|
17 |
"gradient_checkpointing": false,
|
18 |
"horizon": 10000.0,
|
@@ -28,7 +28,7 @@
|
|
28 |
"model_name": "gpt2",
|
29 |
"optimize_cuda_cache": null,
|
30 |
"optimize_device_cache": false,
|
31 |
-
"ppo_epochs":
|
32 |
"project_kwargs": {},
|
33 |
"push_to_hub_if_best_kwargs": {},
|
34 |
"query_dataset": "stanfordnlp/imdb",
|
|
|
2 |
"accelerator_kwargs": {},
|
3 |
"adap_kl_ctrl": true,
|
4 |
"backward_batch_size": 2,
|
5 |
+
"batch_size": 4,
|
6 |
"cliprange": 0.2,
|
7 |
"cliprange_value": 0.2,
|
8 |
"compare_steps": 1,
|
|
|
12 |
"forward_batch_size": null,
|
13 |
"gamma": 1.0,
|
14 |
"global_backward_batch_size": 2,
|
15 |
+
"global_batch_size": 4,
|
16 |
"gradient_accumulation_steps": 1,
|
17 |
"gradient_checkpointing": false,
|
18 |
"horizon": 10000.0,
|
|
|
28 |
"model_name": "gpt2",
|
29 |
"optimize_cuda_cache": null,
|
30 |
"optimize_device_cache": false,
|
31 |
+
"ppo_epochs": 6,
|
32 |
"project_kwargs": {},
|
33 |
"push_to_hub_if_best_kwargs": {},
|
34 |
"query_dataset": "stanfordnlp/imdb",
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 16277
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6ad3ce68c38ef303e0ed48af5f36ef1a39cbd73c5124a4f21f59344f5bb6b150
|
3 |
size 16277
|