AndrewZeng
commited on
Commit
·
055cd7a
1
Parent(s):
23d1422
Update README.md
Browse files
README.md
CHANGED
@@ -2,18 +2,33 @@
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
|
5 |
-
# Deita
|
6 |
|
7 |
-
Deita
|
8 |
|
|
|
9 |
|
10 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
```python
|
13 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
14 |
import numpy as np
|
15 |
from scipy.special import softmax
|
16 |
-
model_name = "hkust-nlp/
|
17 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
18 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
19 |
|
@@ -44,8 +59,8 @@ def infer_Quality(model, tokenizer, input_text, resp_text):
|
|
44 |
score_npy = np.sum(score_npy, axis=0)
|
45 |
return score_npy
|
46 |
|
47 |
-
input_text = "word to describe UI with helpful tooltips"
|
48 |
-
output_text = "User-friendly or intuitive UI"
|
49 |
quality_score = infer_quality(model, tokenizer, input_text)
|
50 |
|
51 |
print(quality_score)
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
|
5 |
+
# Model Card for Deita Quality Scorer
|
6 |
|
7 |
+
Deita is an open-sourced project designed to facilitate Automatic Data Selection for instruction tuning in Large Language Models (LLMs).
|
8 |
|
9 |
+
Deita Quality Scorer is a tool for automatically annotating the Instruction Quality of SFT data.
|
10 |
|
11 |
+
## Model description
|
12 |
+
|
13 |
+
- **Model type:** Model fine tuned to automatically annotate the Instruction-Response Pair Quality
|
14 |
+
- **Language(s) (NLP):** Primarily English
|
15 |
+
- **Finetuned from model:** Llama-1-13b-hf
|
16 |
+
|
17 |
+
### Model Sources
|
18 |
+
|
19 |
+
- **Repository:** https://github.com/hkust-nlp/deita
|
20 |
+
- **Model Family:** Other models and the dataset are found in the [Deita collection](https://huggingface.co/collections/hkust-nlp/deita-6569c198c174808d94cf5bd4).
|
21 |
+
|
22 |
+
|
23 |
+
## Usage
|
24 |
+
|
25 |
+
Please use the following format
|
26 |
|
27 |
```python
|
28 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
29 |
import numpy as np
|
30 |
from scipy.special import softmax
|
31 |
+
model_name = "hkust-nlp/deita-quality-scorer"
|
32 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
33 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
34 |
|
|
|
59 |
score_npy = np.sum(score_npy, axis=0)
|
60 |
return score_npy
|
61 |
|
62 |
+
input_text = "word to describe UI with helpful tooltips" # Example Input
|
63 |
+
output_text = "User-friendly or intuitive UI" # Example Output
|
64 |
quality_score = infer_quality(model, tokenizer, input_text)
|
65 |
|
66 |
print(quality_score)
|