Jellywibble
commited on
Commit
·
fd82b87
1
Parent(s):
193f184
Update README.md
Browse files
README.md
CHANGED
@@ -14,9 +14,27 @@ This is part of the Chai reward-model series, using the GPT2 architecture with a
|
|
14 |
|
15 |
Its training dataset consists of purely user-generated content [retry_and_continue_50m_reward_model](https://huggingface.co/datasets/ChaiML/retry_and_continue_50m_reward_model), where a user has the option to decline the generated response via the retry button or end the conversation.
|
16 |
|
17 |
-
## Model
|
18 |
- Developed by [Chai Research](https://www.chai-research.com/)
|
19 |
- Model type: Transformer-based Classification Model
|
20 |
- Language: English
|
21 |
- License: cc-by-nc-4.0
|
22 |
-
- Contact: to ask questions about this model, join the [Chai Discord](https://discord.com/invite/4KPHkeG6VX). For general correspondence: [[email protected]](mailto:[email protected]?subject=Huggingface%20Model%20Inquiry)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
Its training dataset consists of purely user-generated content [retry_and_continue_50m_reward_model](https://huggingface.co/datasets/ChaiML/retry_and_continue_50m_reward_model), where a user has the option to decline the generated response via the retry button or end the conversation.
|
16 |
|
17 |
+
## Model details
|
18 |
- Developed by [Chai Research](https://www.chai-research.com/)
|
19 |
- Model type: Transformer-based Classification Model
|
20 |
- Language: English
|
21 |
- License: cc-by-nc-4.0
|
22 |
+
- Contact: to ask questions about this model, join the [Chai Discord](https://discord.com/invite/4KPHkeG6VX). For general correspondence: [[email protected]](mailto:[email protected]?subject=Huggingface%20Model%20Inquiry)
|
23 |
+
|
24 |
+
## Uses and limitations
|
25 |
+
### Intended use
|
26 |
+
### Out-of-scope use
|
27 |
+
### How to use
|
28 |
+
|
29 |
+
This reward model can be loaded using the `AutoModelForSequenceClassification` functionality, with a GPT2 tokenizer
|
30 |
+
```python
|
31 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
34 |
+
model = AutoModelForSequenceClassification.from_pretrained("ChaiML/gpt2_base_retry_and_continue_5m_reward_model")
|
35 |
+
tokenizer.pad_token_id = 50256
|
36 |
+
tokenizer.truncation_side = ‘left’
|
37 |
+
tokenizer.padding_side = ‘right’
|
38 |
+
tokens = self.eval_tokenizer(candidates, return_tensors='pt', return_attention_mask=True, padding='longest', truncation=True, max_length=256)
|
39 |
+
reward = model(**tokens).logits
|
40 |
+
```
|