RichardErkhov commited on
Commit
f29a829
·
verified ·
1 Parent(s): 32499c2

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +188 -0
README.md ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Llama-3-OffsetBias-8B - GGUF
11
+ - Model creator: https://huggingface.co/NCSOFT/
12
+ - Original model: https://huggingface.co/NCSOFT/Llama-3-OffsetBias-8B/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Llama-3-OffsetBias-8B.Q2_K.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q2_K.gguf) | Q2_K | 2.96GB |
18
+ | [Llama-3-OffsetBias-8B.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.IQ3_XS.gguf) | IQ3_XS | 3.28GB |
19
+ | [Llama-3-OffsetBias-8B.IQ3_S.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.IQ3_S.gguf) | IQ3_S | 3.43GB |
20
+ | [Llama-3-OffsetBias-8B.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q3_K_S.gguf) | Q3_K_S | 3.41GB |
21
+ | [Llama-3-OffsetBias-8B.IQ3_M.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.IQ3_M.gguf) | IQ3_M | 3.52GB |
22
+ | [Llama-3-OffsetBias-8B.Q3_K.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q3_K.gguf) | Q3_K | 3.74GB |
23
+ | [Llama-3-OffsetBias-8B.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q3_K_M.gguf) | Q3_K_M | 3.74GB |
24
+ | [Llama-3-OffsetBias-8B.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q3_K_L.gguf) | Q3_K_L | 4.03GB |
25
+ | [Llama-3-OffsetBias-8B.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.IQ4_XS.gguf) | IQ4_XS | 4.18GB |
26
+ | [Llama-3-OffsetBias-8B.Q4_0.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q4_0.gguf) | Q4_0 | 4.34GB |
27
+ | [Llama-3-OffsetBias-8B.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.IQ4_NL.gguf) | IQ4_NL | 4.38GB |
28
+ | [Llama-3-OffsetBias-8B.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q4_K_S.gguf) | Q4_K_S | 4.37GB |
29
+ | [Llama-3-OffsetBias-8B.Q4_K.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q4_K.gguf) | Q4_K | 4.58GB |
30
+ | [Llama-3-OffsetBias-8B.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q4_K_M.gguf) | Q4_K_M | 4.58GB |
31
+ | [Llama-3-OffsetBias-8B.Q4_1.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q4_1.gguf) | Q4_1 | 4.78GB |
32
+ | [Llama-3-OffsetBias-8B.Q5_0.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q5_0.gguf) | Q5_0 | 5.21GB |
33
+ | [Llama-3-OffsetBias-8B.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q5_K_S.gguf) | Q5_K_S | 5.21GB |
34
+ | [Llama-3-OffsetBias-8B.Q5_K.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q5_K.gguf) | Q5_K | 5.34GB |
35
+ | [Llama-3-OffsetBias-8B.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q5_K_M.gguf) | Q5_K_M | 5.34GB |
36
+ | [Llama-3-OffsetBias-8B.Q5_1.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q5_1.gguf) | Q5_1 | 5.65GB |
37
+ | [Llama-3-OffsetBias-8B.Q6_K.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q6_K.gguf) | Q6_K | 6.14GB |
38
+ | [Llama-3-OffsetBias-8B.Q8_0.gguf](https://huggingface.co/RichardErkhov/NCSOFT_-_Llama-3-OffsetBias-8B-gguf/blob/main/Llama-3-OffsetBias-8B.Q8_0.gguf) | Q8_0 | 7.95GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ language:
46
+ - en
47
+ license: llama3
48
+ tags:
49
+ - text2text-generation
50
+ datasets:
51
+ - openbmb/UltraFeedback
52
+ - nvidia/HelpSteer
53
+ - Anthropic/hh-rlhf
54
+ - PKU-Alignment/PKU-SafeRLHF
55
+ - NCSOFT/offsetbias
56
+ base_model: meta-llama/Meta-Llama-3-8B-Instruct
57
+ ---
58
+
59
+ # Model Card for Llama-3-OffsetBias-8B
60
+
61
+ **Llama-3-OffsetBias-8B** is a *generative judge model* that performs pairwise preference evaluation task. It is trained to be more robust on various evaluation *biases* commonly found in evaluation models. The model is introduced in paper **OffsetBias: Leveraging Debiased Data for Tuning Evaluators**.
62
+
63
+ ## Model Details
64
+
65
+ ### Model Description
66
+
67
+ **Llama-3-OffsetBias-8B** is built with [Meta Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct). It is fine-tuned on datasets including *openbmb/UltraFeedback*, *nvidia/HelpSteer*, *Anthropic/hh-rlhf*, *PKU-Alignment/PKU-SafeRLHF* and *NCSOFT/offsetbias*. The training is done with instruction-tuning methodology, where the target task is pairwise preference evaluation, where *Instruction*, *Output (a)*, *Output (b)* are given, and a better output to the instruction needs to be found. The input is formatted with a specific prompt template, and the model outputs "Output (a)" or "Output (b)" as a prediction for better response. The prompt is specified in the Uses section.
68
+
69
+ - **Developed by:** NC Research
70
+ - **Language(s) (NLP):** English
71
+ - **License:** META LLAMA 3 COMMUNITY LICENSE AGREEMENT
72
+ - **Finetuned from model:** [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
73
+
74
+ ### Model Sources
75
+
76
+ - 💻 **Repository:** [https://github.com/ncsoft/offsetbias](https://github.com/ncsoft/offsetbias)
77
+ - 📜 **Paper:** [OffsetBias: Leveraging Debiased Data for Tuning Evaluators](https://arxiv.org/abs/2407.06551)
78
+ - 🤗 **Dataset:** [https://huggingface.co/datasets/NCSOFT/offsetbias](https://huggingface.co/datasets/NCSOFT/offsetbias)
79
+
80
+ ## Uses
81
+
82
+ ### Direct Use
83
+
84
+ Suppose you have an pairwise evaluation instance, a triplet of (*instruction*, *output_a* and *output_b*). Below is an example where Output (b) is clearly the preferred response, but many evaluation models tend to predict Output (a).
85
+ ```python
86
+ instruction = "explain like im 5"
87
+ output_a = "Scientists are studying special cells that could help treat a sickness called prostate cancer. They even tried these cells on mice and it worked!"
88
+ output_b = "Sure, I'd be happy to help explain something to you! What would you like me to explain?"
89
+ ```
90
+
91
+ OffsetBias model is intended to use a specific prompt format. The filled out prompt is then formatted as user message in a conversation.
92
+ ```python
93
+ prompt_template = """You are a helpful assistant in evaluating the quality of the outputs for a given instruction. Your goal is to select the best output for the given instruction.
94
+
95
+ Select the Output (a) or Output (b) that is better for the given instruction. The two outputs are generated by two different AI chatbots respectively.
96
+ Do NOT provide any explanation for your choice.
97
+ Do NOT say both / neither are good.
98
+ You should answer using ONLY “Output (a)” or “Output (b)”. Do NOT output any other words.
99
+ Here are some rules of the evaluation:
100
+ (1) You should prioritize evaluating whether the output honestly/precisely/closely executes the instruction, then consider its helpfulness, accuracy, level of detail, harmlessness, etc.
101
+ (2) Outputs should NOT contain more/less than what the instruction asks for, as such outputs do NOT precisely execute the instruction.
102
+ (3) You should avoid any potential bias and your judgment should be as objective as possible. For example, the order in which the outputs were presented should NOT affect your judgment, as Output (a) and Output (b) are **equally likely** to be the better.
103
+
104
+ # Instruction:
105
+ {input}
106
+ # Output (a):
107
+ {output_1}
108
+ # Output (b):
109
+ {output_2}
110
+ # Which is better, Output (a) or Output (b)? Your response should be either “Output (a)” or “Output (b)”:"""
111
+
112
+ user_message = prompt_template.format(input=instruction, output_1=output_a, output_2=output_b)
113
+
114
+ conversation = [{"role": "user", "content": user_message}]
115
+ ```
116
+
117
+ With conversation ready, you can input it into the model for inference. The model should output "Output (b)" to be correct.
118
+ ```python
119
+ from transformers import AutoModelForCausalLM, AutoTokenizer
120
+
121
+ model_name = "NCSOFT/Llama-3-OffsetBias-8B"
122
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
123
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
124
+
125
+ input_ids = tokenizer.apply_chat_template(
126
+ conversation,
127
+ tokenize=True,
128
+ add_generation_prompt=True,
129
+ return_tensors="pt")
130
+
131
+ generation = model.generate(
132
+ input_ids=input_ids,
133
+ max_new_tokens=20,
134
+ do_sample=False,
135
+ pad_token_id=128009,
136
+ temperature=0)
137
+
138
+ completion = tokenizer.decode(
139
+ generation[0][len(input_ids[0]):],
140
+ skip_special_tokens=True,
141
+ clean_up_tokenization_spaces=True)
142
+
143
+ print(completion)
144
+ # The model should output "Output (b)"
145
+ ```
146
+
147
+ ### Out-of-Scope Use
148
+
149
+ Model inputs that do not follow the specified prompt format are considered out-of-scope use. Custom input format can result in unintended text output and should be used at the user's own discretion.
150
+
151
+ ## Evaluation
152
+
153
+ ### LLMBar Result
154
+
155
+ | Metric | Score |
156
+ |----------|-------|
157
+ | Natural | 86.5 |
158
+ | Neighbor | 81.0 |
159
+ | GPTInst | 91.8 |
160
+ | GPTOut | 60.6 |
161
+ | Manual | 71.7 |
162
+
163
+ ### EvalBiasBench Result
164
+
165
+ | Metric | Score |
166
+ |-----------------------|-------|
167
+ | Length | 85.3 |
168
+ | Concreteness | 100.0 |
169
+ | Empty Reference | 92.3 |
170
+ | Content Continuation | 95.8 |
171
+ | Nested Instruction | 50.0 |
172
+ | Familiar Knowledge | 83.3 |
173
+
174
+ ## Citation
175
+
176
+ **BibTeX:**
177
+
178
+ ```bibtex
179
+ @misc{park2024offsetbias,
180
+ title={OffsetBias: Leveraging Debiased Data for Tuning Evaluators},
181
+ author={Junsoo Park and Seungyeon Jwa and Meiying Ren and Daeyoung Kim and Sanghyuk Choi},
182
+ year={2024},
183
+ eprint={2407.06551},
184
+ archivePrefix={arXiv},
185
+ primaryClass={cs.CL}
186
+ }
187
+ ```
188
+