Views
No views yet
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2reward_name = "OpenAssistant/reward-model-deberta-v3-large"
3rank_model, tokenizer = AutoModelForSequenceClassification.from_pretrained(reward_name), AutoTokenizer.from_pretrained(reward_name)
4question, answer = "Explain nuclear fusion like I am five", "Nuclear fusion is the process by which two or more protons and neutrons combine to form a single nucleus. It is a very important process in the universe, as it is the source of energy for stars and galaxies. Nuclear fusion is also a key process in the production of energy for nuclear power plants."
5inputs = tokenizer(question, answer, return_tensors='pt')
6score = rank_model(**inputs).logits[0].cpu().detach()
7print(score)| Model | WebGPT | Summary | SytheticGPT |
|---|---|---|---|
| electra-large-discriminator | 59.30 | 68.66 | 99.85 |
| deberta-v3-large | 61.13 | 72.23 | 99.94 |
| deberta-v3-base | 59.07 | 66.84 | 99.85 |