File size: 409 Bytes
1a18e7e 1244628 8a005b5 1c80254 b6b5354 1c80254 6f9026c b6b5354 5c9837f |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
---
license: mit
datasets:
- Anthropic/hh-rlhf
---
```python
from transformers import AutoTokenizer, GPT2ForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialogRPT-updown")
model = GPT2ForSequenceClassification.from_pretrained("sugam11/gpt2-rlhf-reward")
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
``` |