Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- Anthropic/hh-rlhf
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
---
|
9 |
+
- base model: [PY007/TinyLlama-1.1B-intermediate-step-480k-1T](https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-480k-1T)
|
10 |
+
- helpful accuracy: 68.37
|
11 |
+
- harmless accuracy: 69.71
|
12 |
+
- total accuracy: 68.74
|
13 |
+
- 1011-hh-rlhf-1.1b-128-1e-5-epoch-1 (1024 sequence length)
|
14 |
+
|
15 |
+
usage:
|
16 |
+
|
17 |
+
```
|
18 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
19 |
+
|
20 |
+
tokenizer = AutoTokenizer.from_pretrained("heegyu/1011-hh-rlhf-1.1b-128-1e-5-epoch-1")
|
21 |
+
model = AutoModelForSequenceClassification.from_pretrained("heegyu/1011-hh-rlhf-1.1b-128-1e-5-epoch-1")
|
22 |
+
|
23 |
+
text = """Human: Hi, how are you today?
|
24 |
+
|
25 |
+
Assistant: It's so nice!"""
|
26 |
+
|
27 |
+
inputs = tokenizer(text, return_tensors="pt")
|
28 |
+
print(model(**inputs).logits)
|
29 |
+
# tensor([[0.4552]])
|
30 |
+
|
31 |
+
text = """Human: Hi, how are you today?
|
32 |
+
|
33 |
+
Assistant: It's so nice!
|
34 |
+
|
35 |
+
Human: Really? I'm not so good today
|
36 |
+
|
37 |
+
Assistant: Haha!! That's too bad!"""
|
38 |
+
|
39 |
+
inputs = tokenizer(text, return_tensors="pt")
|
40 |
+
print(model(**inputs).logits)
|
41 |
+
# tensor([[0.0179]])
|
42 |
+
```
|