Anthropic/hh-rlhf
Viewer • Updated • 169k • 35.4k • 1.87k
How to use chargoddard/gpt2-small-hh-rlhf with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="chargoddard/gpt2-small-hh-rlhf") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("chargoddard/gpt2-small-hh-rlhf")
model = AutoModelForSequenceClassification.from_pretrained("chargoddard/gpt2-small-hh-rlhf", device_map="auto")A stubby li'l gpt2 classifier trained on Anthropic's hh-rlhf dataset.