yuansui commited on
Commit
9977b75
·
verified ·
1 Parent(s): 8fa4b37

Push model using huggingface_hub.

Browse files
README.md CHANGED
@@ -1,5 +1,6 @@
1
  ---
2
  license: apache-2.0
 
3
  tags:
4
  - trl
5
  - ppo
@@ -25,7 +26,7 @@ You can then generate text as follows:
25
  ```python
26
  from transformers import pipeline
27
 
28
- generator = pipeline("text-generation", model="yuansui//tmp/tmpp9w_oz9m/yuansui/llama-160m-PPO-tuned")
29
  outputs = generator("Hello, my llama is cute")
30
  ```
31
 
@@ -35,8 +36,8 @@ If you want to use the model for training or to obtain the outputs from the valu
35
  from transformers import AutoTokenizer
36
  from trl import AutoModelForCausalLMWithValueHead
37
 
38
- tokenizer = AutoTokenizer.from_pretrained("yuansui//tmp/tmpp9w_oz9m/yuansui/llama-160m-PPO-tuned")
39
- model = AutoModelForCausalLMWithValueHead.from_pretrained("yuansui//tmp/tmpp9w_oz9m/yuansui/llama-160m-PPO-tuned")
40
 
41
  inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
42
  outputs = model(**inputs, labels=inputs["input_ids"])
 
1
  ---
2
  license: apache-2.0
3
+ library_name: transformers
4
  tags:
5
  - trl
6
  - ppo
 
26
  ```python
27
  from transformers import pipeline
28
 
29
+ generator = pipeline("text-generation", model="yuansui//tmp/tmpo9dzyeo0/yuansui/llama-160m-PPO-tuned")
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("yuansui//tmp/tmpo9dzyeo0/yuansui/llama-160m-PPO-tuned")
40
+ model = AutoModelForCausalLMWithValueHead.from_pretrained("yuansui//tmp/tmpo9dzyeo0/yuansui/llama-160m-PPO-tuned")
41
 
42
  inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
43
  outputs = model(**inputs, labels=inputs["input_ids"])
adapter_config.json CHANGED
@@ -20,13 +20,13 @@
20
  "rank_pattern": {},
21
  "revision": null,
22
  "target_modules": [
 
23
  "q_proj",
24
- "up_proj",
25
- "o_proj",
26
  "gate_proj",
 
27
  "k_proj",
28
- "v_proj",
29
- "down_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",
32
  "use_dora": false,
 
20
  "rank_pattern": {},
21
  "revision": null,
22
  "target_modules": [
23
+ "v_proj",
24
  "q_proj",
 
 
25
  "gate_proj",
26
+ "up_proj",
27
  "k_proj",
28
+ "down_proj",
29
+ "o_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",
32
  "use_dora": false,
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6a87fb41313ba9e61ae1aa134ff1e62eb31a1e5b56f0dcfa5e2e26025e764be4
3
  size 6804944
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05f68b7f9aa6b17927f005e0eb2cba73a8586ae6a68cffe9fa194eeff35d3645
3
  size 6804944
config.json CHANGED
@@ -1,20 +1,21 @@
1
  {
2
  "accelerator_kwargs": {},
3
  "adap_kl_ctrl": true,
4
- "backward_batch_size": 64,
5
- "batch_size": 64,
6
  "cliprange": 0.2,
7
  "cliprange_value": 0.2,
8
  "compare_steps": 1,
 
9
  "early_stopping": true,
10
- "exp_name": "ppo_v2",
11
  "forward_batch_size": null,
12
- "gamma": 1,
13
- "global_backward_batch_size": 256,
14
- "global_batch_size": 256,
15
- "gradient_accumulation_steps": 4,
16
  "gradient_checkpointing": false,
17
- "horizon": 10000,
18
  "init_kl_coef": 0.2,
19
  "is_encoder_decoder": false,
20
  "is_peft_model": true,
@@ -23,21 +24,21 @@
23
  "learning_rate": 1.41e-05,
24
  "log_with": null,
25
  "max_grad_norm": null,
26
- "mini_batch_size": 16,
27
  "model_name": "JackFram/llama-160m",
28
  "optimize_cuda_cache": true,
29
  "optimize_device_cache": false,
30
  "ppo_epochs": 4,
31
  "project_kwargs": {},
32
  "push_to_hub_if_best_kwargs": {},
33
- "query_dataset": "imdb",
34
  "ratio_threshold": 10.0,
35
  "remove_unused_columns": true,
36
  "reward_model": "sentiment-analysis:lvwerra/distilbert-imdb",
37
  "score_clip": null,
38
  "seed": 0,
39
  "steps": 20000,
40
- "target": 6,
41
  "target_kl": 0.1,
42
  "task_name": null,
43
  "tracker_kwargs": {},
 
1
  {
2
  "accelerator_kwargs": {},
3
  "adap_kl_ctrl": true,
4
+ "backward_batch_size": 4,
5
+ "batch_size": 4,
6
  "cliprange": 0.2,
7
  "cliprange_value": 0.2,
8
  "compare_steps": 1,
9
+ "dataset_num_proc": null,
10
  "early_stopping": true,
11
+ "exp_name": "ppo",
12
  "forward_batch_size": null,
13
+ "gamma": 1.0,
14
+ "global_backward_batch_size": 16,
15
+ "global_batch_size": 16,
16
+ "gradient_accumulation_steps": 1,
17
  "gradient_checkpointing": false,
18
+ "horizon": 10000.0,
19
  "init_kl_coef": 0.2,
20
  "is_encoder_decoder": false,
21
  "is_peft_model": true,
 
24
  "learning_rate": 1.41e-05,
25
  "log_with": null,
26
  "max_grad_norm": null,
27
+ "mini_batch_size": 4,
28
  "model_name": "JackFram/llama-160m",
29
  "optimize_cuda_cache": true,
30
  "optimize_device_cache": false,
31
  "ppo_epochs": 4,
32
  "project_kwargs": {},
33
  "push_to_hub_if_best_kwargs": {},
34
+ "query_dataset": "stanfordnlp/imdb",
35
  "ratio_threshold": 10.0,
36
  "remove_unused_columns": true,
37
  "reward_model": "sentiment-analysis:lvwerra/distilbert-imdb",
38
  "score_clip": null,
39
  "seed": 0,
40
  "steps": 20000,
41
+ "target": 6.0,
42
  "target_kl": 0.1,
43
  "task_name": null,
44
  "tracker_kwargs": {},
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:933b0bc7a6b26769d3eb5b8470bcc78f4a0ab989508da9aa2ff3609f6ce56db6
3
  size 6785850
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03ad8d1f3504263cebf551f92ba1b59b8d358cdbecb9b424ab9ce66e211d612b
3
  size 6785850