RichardErkhov commited on
Commit
96113dd
1 Parent(s): 4a86a0d

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +185 -0
README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ karakuri-lm-7b-apm-v0.1 - GGUF
11
+ - Model creator: https://huggingface.co/karakuri-ai/
12
+ - Original model: https://huggingface.co/karakuri-ai/karakuri-lm-7b-apm-v0.1/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [karakuri-lm-7b-apm-v0.1.Q2_K.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q2_K.gguf) | Q2_K | 3.24GB |
18
+ | [karakuri-lm-7b-apm-v0.1.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.IQ3_XS.gguf) | IQ3_XS | 3.54GB |
19
+ | [karakuri-lm-7b-apm-v0.1.IQ3_S.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.IQ3_S.gguf) | IQ3_S | 3.71GB |
20
+ | [karakuri-lm-7b-apm-v0.1.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q3_K_S.gguf) | Q3_K_S | 3.71GB |
21
+ | [karakuri-lm-7b-apm-v0.1.IQ3_M.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.IQ3_M.gguf) | IQ3_M | 3.82GB |
22
+ | [karakuri-lm-7b-apm-v0.1.Q3_K.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q3_K.gguf) | Q3_K | 4.07GB |
23
+ | [karakuri-lm-7b-apm-v0.1.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q3_K_M.gguf) | Q3_K_M | 4.07GB |
24
+ | [karakuri-lm-7b-apm-v0.1.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q3_K_L.gguf) | Q3_K_L | 4.39GB |
25
+ | [karakuri-lm-7b-apm-v0.1.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.IQ4_XS.gguf) | IQ4_XS | 4.48GB |
26
+ | [karakuri-lm-7b-apm-v0.1.Q4_0.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q4_0.gguf) | Q4_0 | 4.67GB |
27
+ | [karakuri-lm-7b-apm-v0.1.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.IQ4_NL.gguf) | IQ4_NL | 4.69GB |
28
+ | [karakuri-lm-7b-apm-v0.1.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q4_K_S.gguf) | Q4_K_S | 4.7GB |
29
+ | [karakuri-lm-7b-apm-v0.1.Q4_K.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q4_K.gguf) | Q4_K | 4.96GB |
30
+ | [karakuri-lm-7b-apm-v0.1.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q4_K_M.gguf) | Q4_K_M | 4.96GB |
31
+ | [karakuri-lm-7b-apm-v0.1.Q4_1.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q4_1.gguf) | Q4_1 | 5.12GB |
32
+ | [karakuri-lm-7b-apm-v0.1.Q5_0.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q5_0.gguf) | Q5_0 | 5.57GB |
33
+ | [karakuri-lm-7b-apm-v0.1.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q5_K_S.gguf) | Q5_K_S | 5.57GB |
34
+ | [karakuri-lm-7b-apm-v0.1.Q5_K.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q5_K.gguf) | Q5_K | 5.72GB |
35
+ | [karakuri-lm-7b-apm-v0.1.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q5_K_M.gguf) | Q5_K_M | 5.72GB |
36
+ | [karakuri-lm-7b-apm-v0.1.Q5_1.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q5_1.gguf) | Q5_1 | 6.02GB |
37
+ | [karakuri-lm-7b-apm-v0.1.Q6_K.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q6_K.gguf) | Q6_K | 6.53GB |
38
+ | [karakuri-lm-7b-apm-v0.1.Q8_0.gguf](https://huggingface.co/RichardErkhov/karakuri-ai_-_karakuri-lm-7b-apm-v0.1-gguf/blob/main/karakuri-lm-7b-apm-v0.1.Q8_0.gguf) | Q8_0 | 8.45GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ library_name: transformers
46
+ license: gemma
47
+ datasets:
48
+ - OpenAssistant/oasst2
49
+ - nvidia/HelpSteer
50
+ language:
51
+ - en
52
+ - ja
53
+ tags:
54
+ - gemma
55
+ - steerlm
56
+ base_model: google/gemma-7b
57
+ ---
58
+
59
+ # KARAKURI LM 7B APM v0.1
60
+
61
+ ## Model Details
62
+
63
+ ### Model Description
64
+
65
+ - **Developed by:** [KARAKURI Inc.](https://about.karakuri.ai/)
66
+ - **Model type:** Causal decoder-only transformer language model
67
+ - **Languages**: Primarily English
68
+ - **License:** [Gemma Terms of Use](https://ai.google.dev/gemma/terms)
69
+ - **Finetuned from model:** [google/gemma-7b](https://huggingface.co/google/gemma-7b)
70
+ - **Contact**: For questions and comments about the model, please email `[email protected]`
71
+
72
+ ## Usage
73
+
74
+ KARAKURI LM 7B APM v0.1 is a attribute prediction model that rates model responses on various aspects that makes a response desirable.
75
+
76
+ Given a conversation with multiple turns between user and assistant, the model rates the following attributes (between 0 and 4) for every assistant turn.
77
+
78
+ - helpfulness: Overall helpfulness of the response to the prompt.
79
+ - correctness: Inclusion of all pertinent facts without errors.
80
+ - coherence: Consistency and clarity of expression.
81
+ - complexity: Intellectual depth required to write response (i.e. whether the response can be written by anyone with basic language competency or requires deep domain expertise).
82
+ - verbosity: Amount of detail included in the response, relative to what is asked for in the prompt.
83
+ - quality: Perceived goodness of response.
84
+ - toxicity: Undesirable elements such as vulgar, harmful or potentially biased response.
85
+ - humor: Sense of humor within response.
86
+ - creativity: Willingness to generate non-conventional response.
87
+
88
+ The first five are derived from HelpSteer, while the remaining four are derived from OASST2.
89
+
90
+ You can run the model using the 🤗 Transformers:
91
+
92
+ ```python
93
+ from transformers import AutoModelForCausalLM, AutoTokenizer
94
+
95
+ model_id = "karakuri-ai/karakuri-lm-7b-apm-v0.1"
96
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
97
+ model = AutoModelForCausalLM.from_pretrained(
98
+ model_id,
99
+ torch_dtype="auto",
100
+ device_map="auto",
101
+ )
102
+
103
+ messages = [
104
+ {"role": "user", "content": "Hello!"},
105
+ {"role": "assistant", "content": "Hello! How can I help you today?"},
106
+ ]
107
+ tokenizer.apply_chat_template(
108
+ messages,
109
+ label="helpsteer",
110
+ tokenize=False,
111
+ add_generation_prompt=True,
112
+ )
113
+ # <bos>[INST] Hello! [/INST] Hello! How can I help you today? [ATTR_1]
114
+
115
+ input_ids = tokenizer.apply_chat_template(
116
+ messages,
117
+ label="helpsteer",
118
+ add_generation_prompt=True,
119
+ return_tensors="pt",
120
+ ).to(model.device)
121
+ outputs = model.generate(input_ids, max_new_tokens=32)
122
+ tokenizer.decode(outputs[0][input_ids.shape[-1]:])
123
+ # helpfulness: 2 correctness: 1 coherence: 2 complexity: 1 verbosity: 1 [/ATTR_1]<eos>
124
+
125
+ messages += [
126
+ {"role": "label", "content": "helpfulness: 2 correctness: 1 coherence: 2 complexity: 1 verbosity: 1"},
127
+ {"role": "user", "content": "Thank you!"},
128
+ {"role": "assistant", "content": "You're welcome! I'm happy to help however I can."},
129
+ ]
130
+ tokenizer.apply_chat_template(
131
+ messages,
132
+ label="helpsteer",
133
+ tokenize=False,
134
+ add_generation_prompt=True,
135
+ )
136
+ # <bos>[INST] Hello! [/INST] Hello! How can I help you today? [ATTR_1] helpfulness: 2 correctness: 1 coherence: 2 complexity: 1 verbosity: 1 [/ATTR_1]<eos>[INST] Thank you! [/INST] You're welcome! I'm happy to help however I can. [ATTR_1]
137
+
138
+ messages = [
139
+ {"role": "user", "content": "Hello!"},
140
+ {"role": "assistant", "content": "Hello! How can I help you today?"},
141
+ ]
142
+ tokenizer.apply_chat_template(
143
+ messages,
144
+ label="oasst",
145
+ tokenize=False,
146
+ add_generation_prompt=True,
147
+ )
148
+ # <bos>[INST] Hello! [/INST] Hello! How can I help you today? [ATTR_2]
149
+
150
+ input_ids = tokenizer.apply_chat_template(
151
+ messages,
152
+ label="oasst",
153
+ add_generation_prompt=True,
154
+ return_tensors="pt",
155
+ ).to(model.device)
156
+ outputs = model.generate(input_ids, max_new_tokens=32)
157
+ tokenizer.decode(outputs[0][input_ids.shape[-1]:])
158
+ # quality: 3 toxicity: 1 humor: 1 creativity: 1 [/ATTR_2]<eos>
159
+ ```
160
+
161
+ ## Training Details
162
+
163
+ ### Training Data
164
+
165
+ - [OASST2](https://huggingface.co/datasets/OpenAssistant/oasst2)
166
+ - [HelpSteer](https://huggingface.co/datasets/nvidia/HelpSteer)
167
+
168
+ ### Training Infrastructure
169
+
170
+ - **Hardware**: The model was trained on single node of an Amazon EC2 trn1.32xlarge instance.
171
+ - **Software**: We use code based on [neuronx-nemo-megatron](https://github.com/aws-neuron/neuronx-nemo-megatron).
172
+
173
+ ## Citation
174
+
175
+ ```
176
+ @misc{karakuri_lm_7b_apm_v01,
177
+ author = { {KARAKURI} {I}nc. },
178
+ title = { {KARAKURI} {LM} 7{B} {APM} v0.1 },
179
+ year = { 2024 },
180
+ url = { https://huggingface.co/karakuri-ai/karakuri-lm-7b-apm-v0.1 },
181
+ publisher = { Hugging Face },
182
+ journal = { Hugging Face repository }
183
+ }
184
+ ```
185
+