RichardErkhov commited on
Commit
4a14540
1 Parent(s): c3edd53

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +184 -0
README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-danube3-4b-base - GGUF
11
+ - Model creator: https://huggingface.co/h2oai/
12
+ - Original model: https://huggingface.co/h2oai/h2o-danube3-4b-base/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [h2o-danube3-4b-base.Q2_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q2_K.gguf) | Q2_K | 1.41GB |
18
+ | [h2o-danube3-4b-base.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.IQ3_XS.gguf) | IQ3_XS | 1.56GB |
19
+ | [h2o-danube3-4b-base.IQ3_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.IQ3_S.gguf) | IQ3_S | 1.64GB |
20
+ | [h2o-danube3-4b-base.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q3_K_S.gguf) | Q3_K_S | 1.63GB |
21
+ | [h2o-danube3-4b-base.IQ3_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.IQ3_M.gguf) | IQ3_M | 1.7GB |
22
+ | [h2o-danube3-4b-base.Q3_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q3_K.gguf) | Q3_K | 1.81GB |
23
+ | [h2o-danube3-4b-base.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q3_K_M.gguf) | Q3_K_M | 1.81GB |
24
+ | [h2o-danube3-4b-base.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q3_K_L.gguf) | Q3_K_L | 1.96GB |
25
+ | [h2o-danube3-4b-base.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.IQ4_XS.gguf) | IQ4_XS | 2.02GB |
26
+ | [h2o-danube3-4b-base.Q4_0.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q4_0.gguf) | Q4_0 | 2.11GB |
27
+ | [h2o-danube3-4b-base.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.IQ4_NL.gguf) | IQ4_NL | 2.13GB |
28
+ | [h2o-danube3-4b-base.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q4_K_S.gguf) | Q4_K_S | 2.12GB |
29
+ | [h2o-danube3-4b-base.Q4_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q4_K.gguf) | Q4_K | 2.23GB |
30
+ | [h2o-danube3-4b-base.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q4_K_M.gguf) | Q4_K_M | 2.23GB |
31
+ | [h2o-danube3-4b-base.Q4_1.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q4_1.gguf) | Q4_1 | 2.33GB |
32
+ | [h2o-danube3-4b-base.Q5_0.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q5_0.gguf) | Q5_0 | 2.55GB |
33
+ | [h2o-danube3-4b-base.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q5_K_S.gguf) | Q5_K_S | 2.55GB |
34
+ | [h2o-danube3-4b-base.Q5_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q5_K.gguf) | Q5_K | 2.62GB |
35
+ | [h2o-danube3-4b-base.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q5_K_M.gguf) | Q5_K_M | 2.62GB |
36
+ | [h2o-danube3-4b-base.Q5_1.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q5_1.gguf) | Q5_1 | 2.78GB |
37
+ | [h2o-danube3-4b-base.Q6_K.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q6_K.gguf) | Q6_K | 3.03GB |
38
+ | [h2o-danube3-4b-base.Q8_0.gguf](https://huggingface.co/RichardErkhov/h2oai_-_h2o-danube3-4b-base-gguf/blob/main/h2o-danube3-4b-base.Q8_0.gguf) | Q8_0 | 3.92GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ language:
46
+ - en
47
+ library_name: transformers
48
+ license: apache-2.0
49
+ tags:
50
+ - gpt
51
+ - llm
52
+ - large language model
53
+ - h2o-llmstudio
54
+ thumbnail: >-
55
+ https://h2o.ai/etc.clientlibs/h2o/clientlibs/clientlib-site/resources/images/favicon.ico
56
+ pipeline_tag: text-generation
57
+ ---
58
+
59
+
60
+
61
+ <div style="width: 90%; max-width: 600px; margin: 0 auto; overflow: hidden; background-color: white">
62
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/636d18755aaed143cd6698ef/LAzQu_f5WOX7vqKl4yDsY.png"
63
+ alt="Slightly cropped image"
64
+ style="width: 102%; height: 102%; object-fit: cover; object-position: center; margin: -5% -5% -5% -5%;">
65
+ </div>
66
+
67
+ ## Summary
68
+
69
+
70
+ h2o-danube3-4b-base is a foundation model trained model by H2O.ai with 4 billion parameters. We release two versions of this model:
71
+
72
+ | Model Name | Description |
73
+ |:-----------------------------------------------------------------------------------|:----------------|
74
+ | [h2oai/h2o-danube3-4b-base](https://huggingface.co/h2oai/h2o-danube3-4b-base) | Base model |
75
+ | [h2oai/h2o-danube3-4b-chat](https://huggingface.co/h2oai/h2o-danube3-4b-chat) | Chat model |
76
+
77
+ Can be run natively and fully offline on phones - try it yourself with [H2O AI Personal GPT](https://h2o.ai/platform/danube/personal-gpt/).
78
+
79
+ ## Model Architecture
80
+
81
+ We adjust the Llama 2 architecture for a total of around 4b parameters. For details, please refer to our [Technical Report](https://arxiv.org/abs/2407.09276). We use the Mistral tokenizer with a vocabulary size of 32,000 and train our model up to a context length of 8,192.
82
+
83
+ The details of the model architecture are:
84
+
85
+ | Hyperparameter | Value |
86
+ |:----------------|:-------|
87
+ | n_layers | 24 |
88
+ | n_heads | 32 |
89
+ | n_query_groups | 8 |
90
+ | n_embd | 3840 |
91
+ | vocab size | 32000 |
92
+ | sequence length | 8192 |
93
+
94
+ ## Usage
95
+
96
+ To use the model with the `transformers` library on a machine with GPUs, first make sure you have the `transformers` library installed.
97
+
98
+ ```bash
99
+ pip install transformers>=4.42.3
100
+ ```
101
+
102
+ ```python
103
+ import torch
104
+ from transformers import AutoModelForCausalLM, AutoTokenizer
105
+
106
+ tokenizer = AutoTokenizer.from_pretrained("h2oai/h2o-danube3-4b-base")
107
+
108
+ model = AutoModelForCausalLM.from_pretrained(
109
+ "h2oai/h2o-danube3-4b-base",
110
+ torch_dtype=torch.bfloat16,
111
+ )
112
+ model.cuda()
113
+
114
+ inputs = tokenizer("The Danube is the second longest river in Europe", return_tensors="pt").to(model.device)
115
+ res = model.generate(
116
+ **inputs,
117
+ max_new_tokens=32,
118
+ do_sample=False,
119
+ )
120
+ print(tokenizer.decode(res[0], skip_special_tokens=True))
121
+ ```
122
+
123
+ ## Quantization and sharding
124
+
125
+ 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```.
126
+
127
+ ## Model Architecture
128
+
129
+ ```
130
+ LlamaForCausalLM(
131
+ (model): LlamaModel(
132
+ (embed_tokens): Embedding(32000, 3840, padding_idx=0)
133
+ (layers): ModuleList(
134
+ (0-23): 24 x LlamaDecoderLayer(
135
+ (self_attn): LlamaSdpaAttention(
136
+ (q_proj): Linear(in_features=3840, out_features=3840, bias=False)
137
+ (k_proj): Linear(in_features=3840, out_features=960, bias=False)
138
+ (v_proj): Linear(in_features=3840, out_features=960, bias=False)
139
+ (o_proj): Linear(in_features=3840, out_features=3840, bias=False)
140
+ (rotary_emb): LlamaRotaryEmbedding()
141
+ )
142
+ (mlp): LlamaMLP(
143
+ (gate_proj): Linear(in_features=3840, out_features=10240, bias=False)
144
+ (up_proj): Linear(in_features=3840, out_features=10240, bias=False)
145
+ (down_proj): Linear(in_features=10240, out_features=3840, bias=False)
146
+ (act_fn): SiLU()
147
+ )
148
+ (input_layernorm): LlamaRMSNorm()
149
+ (post_attention_layernorm): LlamaRMSNorm()
150
+ )
151
+ )
152
+ (norm): LlamaRMSNorm()
153
+ )
154
+ (lm_head): Linear(in_features=3840, out_features=32000, bias=False)
155
+ )
156
+ ```
157
+
158
+ ## Benchmarks
159
+
160
+ ### 🤗 Open LLM Leaderboard v1
161
+
162
+ | Benchmark | acc_n |
163
+ |:--------------|:--------:|
164
+ | Average | 58.85 |
165
+ | ARC-challenge | 59.04 |
166
+ | Hellaswag | 79.84 |
167
+ | MMLU | 55.18 |
168
+ | TruthfulQA | 44.77 |
169
+ | Winogrande | 75.14 |
170
+ | GSM8K | 39.12 |
171
+
172
+ ## Disclaimer
173
+
174
+ 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.
175
+
176
+ - 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.
177
+ - 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.
178
+ - 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.
179
+ - 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.
180
+ - 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.
181
+ - 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.
182
+
183
+ 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.
184
+