RichardErkhov commited on
Commit
d8e374b
1 Parent(s): bcfd722

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +201 -0
README.md ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ h2o-danube-1.8b-chat - GGUF
11
+ - Model creator: https://huggingface.co/h2oai/
12
+ - Original model: https://huggingface.co/h2oai/h2o-danube-1.8b-chat/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [h2o-danube-1.8b-chat.Q2_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q2_K.gguf) | Q2_K | 0.66GB |
18
+ | [h2o-danube-1.8b-chat.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.IQ3_XS.gguf) | IQ3_XS | 0.73GB |
19
+ | [h2o-danube-1.8b-chat.IQ3_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.IQ3_S.gguf) | IQ3_S | 0.77GB |
20
+ | [h2o-danube-1.8b-chat.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q3_K_S.gguf) | Q3_K_S | 0.76GB |
21
+ | [h2o-danube-1.8b-chat.IQ3_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.IQ3_M.gguf) | IQ3_M | 0.79GB |
22
+ | [h2o-danube-1.8b-chat.Q3_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q3_K.gguf) | Q3_K | 0.84GB |
23
+ | [h2o-danube-1.8b-chat.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q3_K_M.gguf) | Q3_K_M | 0.84GB |
24
+ | [h2o-danube-1.8b-chat.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q3_K_L.gguf) | Q3_K_L | 0.91GB |
25
+ | [h2o-danube-1.8b-chat.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.IQ4_XS.gguf) | IQ4_XS | 0.94GB |
26
+ | [h2o-danube-1.8b-chat.Q4_0.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q4_0.gguf) | Q4_0 | 0.98GB |
27
+ | [h2o-danube-1.8b-chat.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.IQ4_NL.gguf) | IQ4_NL | 0.99GB |
28
+ | [h2o-danube-1.8b-chat.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q4_K_S.gguf) | Q4_K_S | 0.99GB |
29
+ | [h2o-danube-1.8b-chat.Q4_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q4_K.gguf) | Q4_K | 1.04GB |
30
+ | [h2o-danube-1.8b-chat.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q4_K_M.gguf) | Q4_K_M | 1.04GB |
31
+ | [h2o-danube-1.8b-chat.Q4_1.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q4_1.gguf) | Q4_1 | 1.08GB |
32
+ | [h2o-danube-1.8b-chat.Q5_0.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q5_0.gguf) | Q5_0 | 1.18GB |
33
+ | [h2o-danube-1.8b-chat.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q5_K_S.gguf) | Q5_K_S | 1.18GB |
34
+ | [h2o-danube-1.8b-chat.Q5_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q5_K.gguf) | Q5_K | 1.21GB |
35
+ | [h2o-danube-1.8b-chat.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q5_K_M.gguf) | Q5_K_M | 1.21GB |
36
+ | [h2o-danube-1.8b-chat.Q5_1.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q5_1.gguf) | Q5_1 | 1.29GB |
37
+ | [h2o-danube-1.8b-chat.Q6_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube-1.8b-chat-gguf/blob/main/h2o-danube-1.8b-chat.Q6_K.gguf) | Q6_K | 1.4GB |
38
+
39
+
40
+
41
+
42
+ Original model description:
43
+ ---
44
+ language:
45
+ - en
46
+ library_name: transformers
47
+ license: apache-2.0
48
+ tags:
49
+ - gpt
50
+ - llm
51
+ - large language model
52
+ - h2o-llmstudio
53
+ thumbnail: >-
54
+ https://h2o.ai/etc.clientlibs/h2o/clientlibs/clientlib-site/resources/images/favicon.ico
55
+ datasets:
56
+ - HuggingFaceH4/ultrafeedback_binarized
57
+ - Intel/orca_dpo_pairs
58
+ - argilla/distilabel-math-preference-dpo
59
+ - Open-Orca/OpenOrca
60
+ - OpenAssistant/oasst2
61
+ - HuggingFaceH4/ultrachat_200k
62
+ - meta-math/MetaMathQA
63
+ widget:
64
+ - messages:
65
+ - role: user
66
+ content: Why is drinking water so healthy?
67
+ pipeline_tag: text-generation
68
+ ---
69
+ # Model Card
70
+ ## Summary
71
+
72
+ h2o-danube-1.8b-chat is an chat fine-tuned model by H2O.ai with 1.8 billion parameters. For details, please refer to our [Technical Report](https://arxiv.org/abs/2401.16818). We release three versions of this model:
73
+
74
+ | Model Name | Description |
75
+ |:-----------------------------------------------------------------------------------|:----------------|
76
+ | [h2oai/h2o-danube-1.8b-base](https://huggingface.co/h2oai/h2o-danube-1.8b-base) | Base model |
77
+ | [h2oai/h2o-danube-1.8b-sft](https://huggingface.co/h2oai/h2o-danube-1.8b-sft) | SFT tuned |
78
+ | [h2oai/h2o-danube-1.8b-chat](https://huggingface.co/h2oai/h2o-danube-1.8b-chat) | SFT + DPO tuned |
79
+
80
+ This model was trained using [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio).
81
+
82
+ ## Model Architecture
83
+
84
+ We adjust the Llama 2 architecture for a total of around 1.8b parameters. We use the original Llama 2 tokenizer with a vocabulary size of 32,000 and train our model up to a context length of 16,384. We incorporate the sliding window attention from mistral with a size of 4,096.
85
+
86
+ The details of the model architecture are:
87
+
88
+ | Hyperparameter | Value |
89
+ |:----------------|:-------|
90
+ | n_layers | 24 |
91
+ | n_heads | 32 |
92
+ | n_query_groups | 8 |
93
+ | n_embd | 2560 |
94
+ | vocab size | 32000 |
95
+ | sequence length | 16384 |
96
+
97
+ ## Usage
98
+
99
+ To use the model with the `transformers` library on a machine with GPUs, first make sure you have the `transformers` library installed.
100
+
101
+ ```bash
102
+ pip install transformers==4.36.1
103
+ ```
104
+
105
+ ```python
106
+ import torch
107
+ from transformers import pipeline
108
+
109
+ pipe = pipeline(
110
+ "text-generation",
111
+ model="h2oai/h2o-danube-1.8b-chat",
112
+ torch_dtype=torch.bfloat16,
113
+ device_map="auto",
114
+ )
115
+
116
+ # We use the HF Tokenizer chat template to format each message
117
+ # https://huggingface.co/docs/transformers/main/en/chat_templating
118
+ messages = [
119
+ {"role": "user", "content": "Why is drinking water so healthy?"},
120
+ ]
121
+ prompt = pipe.tokenizer.apply_chat_template(
122
+ messages,
123
+ tokenize=False,
124
+ add_generation_prompt=True,
125
+ )
126
+ res = pipe(
127
+ prompt,
128
+ max_new_tokens=256,
129
+ )
130
+ print(res[0]["generated_text"])
131
+ # <|prompt|>Why is drinking water so healthy?</s><|answer|> Drinking water is healthy for several reasons: [...]
132
+ ```
133
+
134
+ ## Benchmarks
135
+
136
+ Commonsense, world-knowledge and reading comprehension tested in 0-shot:
137
+
138
+ | Benchmark | acc_n |
139
+ |:--------------|:--------:|
140
+ | ARC-easy | 67.51 |
141
+ | ARC-challenge | 39.25 |
142
+ | BoolQ | 77.89 |
143
+ | Hellaswag | 67.60 |
144
+ | OpenBookQA | 39.20 |
145
+ | PiQA | 76.71 |
146
+ | TriviaQA | 36.29 |
147
+ | Winogrande | 65.35 |
148
+
149
+ ## Quantization and sharding
150
+
151
+ You can load the models using quantization by specifying ```load_in_8bit=True``` or ```load_in_4bit=True```. Also, sharding on multiple GPUs is possible by setting ```device_map=auto```.
152
+
153
+ ## Model Architecture
154
+
155
+ ```
156
+ MistralForCausalLM(
157
+ (model): MistralModel(
158
+ (embed_tokens): Embedding(32000, 2560, padding_idx=0)
159
+ (layers): ModuleList(
160
+ (0-23): 24 x MistralDecoderLayer(
161
+ (self_attn): MistralAttention(
162
+ (q_proj): Linear(in_features=2560, out_features=2560, bias=False)
163
+ (k_proj): Linear(in_features=2560, out_features=640, bias=False)
164
+ (v_proj): Linear(in_features=2560, out_features=640, bias=False)
165
+ (o_proj): Linear(in_features=2560, out_features=2560, bias=False)
166
+ (rotary_emb): MistralRotaryEmbedding()
167
+ )
168
+ (mlp): MistralMLP(
169
+ (gate_proj): Linear(in_features=2560, out_features=6912, bias=False)
170
+ (up_proj): Linear(in_features=2560, out_features=6912, bias=False)
171
+ (down_proj): Linear(in_features=6912, out_features=2560, bias=False)
172
+ (act_fn): SiLU()
173
+ )
174
+ (input_layernorm): MistralRMSNorm()
175
+ (post_attention_layernorm): MistralRMSNorm()
176
+ )
177
+ )
178
+ (norm): MistralRMSNorm()
179
+ )
180
+ (lm_head): Linear(in_features=2560, out_features=32000, bias=False)
181
+ )
182
+ ```
183
+
184
+ ## Model Configuration
185
+
186
+ This model was trained using H2O LLM Studio and with the configuration in [cfg.yaml](cfg.yaml). Visit [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio) to learn how to train your own large language models.
187
+
188
+
189
+ ## Disclaimer
190
+
191
+ Please read this disclaimer carefully before using the large language model provided in this repository. Your use of the model signifies your agreement to the following terms and conditions.
192
+
193
+ - Biases and Offensiveness: The large language model is trained on a diverse range of internet text data, which may contain biased, racist, offensive, or otherwise inappropriate content. By using this model, you acknowledge and accept that the generated content may sometimes exhibit biases or produce content that is offensive or inappropriate. The developers of this repository do not endorse, support, or promote any such content or viewpoints.
194
+ - Limitations: The large language model is an AI-based tool and not a human. It may produce incorrect, nonsensical, or irrelevant responses. It is the user's responsibility to critically evaluate the generated content and use it at their discretion.
195
+ - Use at Your Own Risk: Users of this large language model must assume full responsibility for any consequences that may arise from their use of the tool. The developers and contributors of this repository shall not be held liable for any damages, losses, or harm resulting from the use or misuse of the provided model.
196
+ - Ethical Considerations: Users are encouraged to use the large language model responsibly and ethically. By using this model, you agree not to use it for purposes that promote hate speech, discrimination, harassment, or any form of illegal or harmful activities.
197
+ - Reporting Issues: If you encounter any biased, offensive, or otherwise inappropriate content generated by the large language model, please report it to the repository maintainers through the provided channels. Your feedback will help improve the model and mitigate potential issues.
198
+ - Changes to this Disclaimer: The developers of this repository reserve the right to modify or update this disclaimer at any time without prior notice. It is the user's responsibility to periodically review the disclaimer to stay informed about any changes.
199
+
200
+ By using the large language model provided in this repository, you agree to accept and comply with the terms and conditions outlined in this disclaimer. If you do not agree with any part of this disclaimer, you should refrain from using the model and any content generated by it.
201
+