SimaFarazi
commited on
Commit
•
ce94700
1
Parent(s):
4b950c7
Push model using huggingface_hub.
Browse files- README.md +3 -3
- model.safetensors +1 -1
README.md
CHANGED
@@ -25,7 +25,7 @@ You can then generate text as follows:
|
|
25 |
```python
|
26 |
from transformers import pipeline
|
27 |
|
28 |
-
generator = pipeline("text-generation", model="SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/
|
29 |
outputs = generator("Hello, my llama is cute")
|
30 |
```
|
31 |
|
@@ -35,8 +35,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("SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/
|
39 |
-
model = AutoModelForCausalLMWithValueHead.from_pretrained("SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/
|
40 |
|
41 |
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
42 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
|
|
25 |
```python
|
26 |
from transformers import pipeline
|
27 |
|
28 |
+
generator = pipeline("text-generation", model="SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/tmpoglpu1m8/SimaFarazi/gpt2-ppo")
|
29 |
outputs = generator("Hello, my llama is cute")
|
30 |
```
|
31 |
|
|
|
35 |
from transformers import AutoTokenizer
|
36 |
from trl import AutoModelForCausalLMWithValueHead
|
37 |
|
38 |
+
tokenizer = AutoTokenizer.from_pretrained("SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/tmpoglpu1m8/SimaFarazi/gpt2-ppo")
|
39 |
+
model = AutoModelForCausalLMWithValueHead.from_pretrained("SimaFarazi//private/var/folders/2s/hf9zchm57dg1bs1mbrfj0dbh0000gn/T/tmpoglpu1m8/SimaFarazi/gpt2-ppo")
|
40 |
|
41 |
inputs = tokenizer("Hello, my llama is cute", return_tensors="pt")
|
42 |
outputs = model(**inputs, labels=inputs["input_ids"])
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 497777468
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:89c26c7bc444304d8181fe4580c9e6d4304a6519e6f128fa8505997a88aeb012
|
3 |
size 497777468
|