Update README.md
Browse files
README.md
CHANGED
@@ -4,13 +4,10 @@ datasets:
|
|
4 |
- Anthropic/hh-rlhf
|
5 |
---
|
6 |
```python
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
>>> with torch.no_grad():
|
15 |
-
.... logits = model(**inputs).logits
|
16 |
|
|
|
4 |
- Anthropic/hh-rlhf
|
5 |
---
|
6 |
```python
|
7 |
+
from transformers import AutoTokenizer, GPT2ForSequenceClassificat
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialogRPT-updown")
|
9 |
+
model = GPT2ForSequenceClassification.from_pretrained("sugam11/gpt2-rlhf-rewar
|
10 |
+
inputs = tokenizer("Hello, my dog is cute", return_tensors="p
|
11 |
+
with torch.no_grad():
|
12 |
+
logits = model(**inputs).logits
|
|
|
|
|
|
|
13 |
|