yuansui commited on
Commit
d11c2b6
·
verified ·
1 Parent(s): ad64a2f

Push model using huggingface_hub.

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. adapter_config.json +3 -3
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="yuansui//tmp/tmp2wrg17ux/yuansui/Meta-Llama-3.1-8B-Instruct-PPO-tuned")
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("yuansui//tmp/tmp2wrg17ux/yuansui/Meta-Llama-3.1-8B-Instruct-PPO-tuned")
40
- model = AutoModelForCausalLMWithValueHead.from_pretrained("yuansui//tmp/tmp2wrg17ux/yuansui/Meta-Llama-3.1-8B-Instruct-PPO-tuned")
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="yuansui//tmp/tmp_w2uh6fd/yuansui/Meta-Llama-3.1-8B-Instruct-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/tmp_w2uh6fd/yuansui/Meta-Llama-3.1-8B-Instruct-PPO-tuned")
40
+ model = AutoModelForCausalLMWithValueHead.from_pretrained("yuansui//tmp/tmp_w2uh6fd/yuansui/Meta-Llama-3.1-8B-Instruct-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
@@ -21,11 +21,11 @@
21
  "revision": null,
22
  "target_modules": [
23
  "up_proj",
24
- "k_proj",
25
- "v_proj",
26
- "o_proj",
27
  "gate_proj",
 
28
  "q_proj",
 
 
29
  "down_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",
 
21
  "revision": null,
22
  "target_modules": [
23
  "up_proj",
 
 
 
24
  "gate_proj",
25
+ "v_proj",
26
  "q_proj",
27
+ "o_proj",
28
+ "k_proj",
29
  "down_proj"
30
  ],
31
  "task_type": "CAUSAL_LM",