GGUF
Inference Endpoints
RichardErkhov commited on
Commit
05ed0c8
1 Parent(s): 889dc57

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +193 -0
README.md ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ Aira-2-1B5 - GGUF
11
+ - Model creator: https://huggingface.co/nicholasKluge/
12
+ - Original model: https://huggingface.co/nicholasKluge/Aira-2-1B5/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Aira-2-1B5.Q2_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q2_K.gguf) | Q2_K | 0.84GB |
18
+ | [Aira-2-1B5.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.IQ3_XS.gguf) | IQ3_XS | 0.84GB |
19
+ | [Aira-2-1B5.IQ3_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.IQ3_S.gguf) | IQ3_S | 0.84GB |
20
+ | [Aira-2-1B5.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q3_K_S.gguf) | Q3_K_S | 0.84GB |
21
+ | [Aira-2-1B5.IQ3_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.IQ3_M.gguf) | IQ3_M | 0.91GB |
22
+ | [Aira-2-1B5.Q3_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q3_K.gguf) | Q3_K | 0.97GB |
23
+ | [Aira-2-1B5.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q3_K_M.gguf) | Q3_K_M | 0.97GB |
24
+ | [Aira-2-1B5.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q3_K_L.gguf) | Q3_K_L | 1.03GB |
25
+ | [Aira-2-1B5.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.IQ4_XS.gguf) | IQ4_XS | 0.9GB |
26
+ | [Aira-2-1B5.Q4_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q4_0.gguf) | Q4_0 | 0.91GB |
27
+ | [Aira-2-1B5.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.IQ4_NL.gguf) | IQ4_NL | 0.91GB |
28
+ | [Aira-2-1B5.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q4_K_S.gguf) | Q4_K_S | 1.04GB |
29
+ | [Aira-2-1B5.Q4_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q4_K.gguf) | Q4_K | 1.11GB |
30
+ | [Aira-2-1B5.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q4_K_M.gguf) | Q4_K_M | 1.11GB |
31
+ | [Aira-2-1B5.Q4_1.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q4_1.gguf) | Q4_1 | 1.0GB |
32
+ | [Aira-2-1B5.Q5_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q5_0.gguf) | Q5_0 | 1.09GB |
33
+ | [Aira-2-1B5.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q5_K_S.gguf) | Q5_K_S | 1.15GB |
34
+ | [Aira-2-1B5.Q5_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q5_K.gguf) | Q5_K | 1.29GB |
35
+ | [Aira-2-1B5.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q5_K_M.gguf) | Q5_K_M | 1.29GB |
36
+ | [Aira-2-1B5.Q5_1.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q5_1.gguf) | Q5_1 | 1.18GB |
37
+ | [Aira-2-1B5.Q6_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q6_K.gguf) | Q6_K | 1.52GB |
38
+ | [Aira-2-1B5.Q8_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-1B5-gguf/blob/main/Aira-2-1B5.Q8_0.gguf) | Q8_0 | 1.63GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ license: apache-2.0
46
+ datasets:
47
+ - nicholasKluge/instruct-aira-dataset
48
+ language:
49
+ - en
50
+ metrics:
51
+ - accuracy
52
+ library_name: transformers
53
+ tags:
54
+ - alignment
55
+ - instruction tuned
56
+ - text generation
57
+ - conversation
58
+ - assistant
59
+ pipeline_tag: text-generation
60
+ widget:
61
+ - text: "<|startofinstruction|>Can you explain what is Machine Learning?<|endofinstruction|>"
62
+ example_title: Machine Learning
63
+ - text: "<|startofinstruction|>Do you know anything about virtue ethics?<|endofinstruction|>"
64
+ example_title: Ethics
65
+ - text: "<|startofinstruction|>How can I make my girlfriend happy?<|endofinstruction|>"
66
+ example_title: Advise
67
+ inference:
68
+ parameters:
69
+ repetition_penalty: 1.2
70
+ temperature: 0.2
71
+ top_k: 30
72
+ top_p: 0.3
73
+ max_new_tokens: 200
74
+ length_penalty: 0.3
75
+ early_stopping: true
76
+ co2_eq_emissions:
77
+ emissions: 1690
78
+ source: CodeCarbon
79
+ training_type: fine-tuning
80
+ geographical_location: United States of America
81
+ hardware_used: NVIDIA A100-SXM4-40GB
82
+ ---
83
+ # Aira-2-1B5
84
+
85
+ Aira-2 is the second version of the Aira instruction-tuned series. Aira-2-1B5 is an instruction-tuned model based on [GPT-2](https://huggingface.co/gpt2-xl). The model was trained with a dataset composed of prompts and completions generated synthetically by prompting already-tuned models (ChatGPT, Llama, Open-Assistant, etc).
86
+
87
+ Check our gradio-demo in [Spaces](https://huggingface.co/spaces/nicholasKluge/Aira-Demo).
88
+
89
+ ## Details
90
+
91
+ - **Size:** 1,557,614,400 parameters
92
+ - **Dataset:** [Instruct-Aira Dataset](https://huggingface.co/datasets/nicholasKluge/instruct-aira-dataset)
93
+ - **Language:** English
94
+ - **Number of Epochs:** 3
95
+ - **Batch size:** 4
96
+ - **Optimizer:** `torch.optim.AdamW` (warmup_steps = 1e2, learning_rate = 5e-4, epsilon = 1e-8)
97
+ - **GPU:** 1 NVIDIA A100-SXM4-40GB
98
+ - **Emissions:** 1.69 KgCO2 (Singapore)
99
+ - **Total Energy Consumption:** 3.47 kWh
100
+
101
+ This repository has the [source code](https://github.com/Nkluge-correa/Aira) used to train this model.
102
+
103
+ ## Usage
104
+
105
+ Three special tokens are used to mark the user side of the interaction and the model's response:
106
+
107
+ `<|startofinstruction|>`What is a language model?`<|endofinstruction|>`A language model is a probability distribution over a vocabulary.`<|endofcompletion|>`
108
+
109
+ ```python
110
+ from transformers import AutoTokenizer, AutoModelForCausalLM
111
+ import torch
112
+
113
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
114
+
115
+ tokenizer = AutoTokenizer.from_pretrained('nicholasKluge/Aira-2-1B5')
116
+ aira = AutoModelForCausalLM.from_pretrained('nicholasKluge/Aira-2-1B5')
117
+
118
+ aira.eval()
119
+ aira.to(device)
120
+
121
+ question = input("Enter your question: ")
122
+
123
+ inputs = tokenizer(tokenizer.bos_token + question + tokenizer.sep_token,
124
+ add_special_tokens=False,
125
+ return_tensors="pt").to(device)
126
+
127
+ responses = aira.generate(**inputs, num_return_sequences=2)
128
+
129
+ print(f"Question: 👤 {question}\n")
130
+
131
+ for i, response in enumerate(responses):
132
+ print(f'Response {i+1}: 🤖 {tokenizer.decode(response, skip_special_tokens=True).replace(question, "")}')
133
+ ```
134
+
135
+ The model will output something like:
136
+
137
+ ```markdown
138
+ >>>Question: 👤 What is the capital of Brazil?
139
+
140
+ >>>Response 1: 🤖 The capital of Brazil is Brasília.
141
+ >>>Response 2: 🤖 The capital of Brazil is Brasília.
142
+ ```
143
+
144
+ ## Limitations
145
+
146
+ - **Hallucinations:** This model can produce content that can be mistaken for truth but is, in fact, misleading or entirely false, i.e., hallucination.
147
+
148
+ - **Biases and Toxicity:** This model inherits the social and historical stereotypes from the data used to train it. Given these biases, the model can produce toxic content, i.e., harmful, offensive, or detrimental to individuals, groups, or communities.
149
+
150
+ - **Repetition and Verbosity:** The model may get stuck on repetition loops (especially if the repetition penalty during generations is set to a meager value) or produce verbose responses unrelated to the prompt it was given.
151
+
152
+ ## Evaluation
153
+
154
+ |Model |Average |[ARC](https://arxiv.org/abs/1803.05457) |[TruthfulQA](https://arxiv.org/abs/2109.07958) |[ToxiGen](https://arxiv.org/abs/2203.09509) |
155
+ | ---------------------------------------------------------------------- | -------- | -------------------------------------- | --------------------------------------------- | ------------------------------------------ |
156
+ |[Aira-2-124M-DPO](https://huggingface.co/nicholasKluge/Aira-2-124M-DPO) |**40.68** |**24.66** |**42.61** |**54.79** |
157
+ |[Aira-2-124M](https://huggingface.co/nicholasKluge/Aira-2-124M) |38.07 |24.57 |41.02 |48.62 |
158
+ |GPT-2 |35.37 |21.84 |40.67 |43.62 |
159
+ |[Aira-2-355M](https://huggingface.co/nicholasKluge/Aira-2-355M) |**39.68** |**27.56** |38.53 |**53.19** |
160
+ |GPT-2-medium |36.43 |27.05 |**40.76** |41.49 |
161
+ |[Aira-2-774M](https://huggingface.co/nicholasKluge/Aira-2-774M) |**42.26** |**28.75** |**41.33** |**56.70** |
162
+ |GPT-2-large |35.16 |25.94 |38.71 |40.85 |
163
+ |[Aira-2-1B5](https://huggingface.co/nicholasKluge/Aira-2-1B5) |**42.22** |28.92 |**41.16** |**56.60** |
164
+ |GPT-2-xl |36.84 |**30.29** |38.54 |41.70 |
165
+
166
+ * Evaluations were performed using the [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) (by [EleutherAI](https://www.eleuther.ai/)).
167
+
168
+ ## Cite as 🤗
169
+
170
+ ```latex
171
+ @misc{nicholas22aira,
172
+ doi = {10.5281/zenodo.6989727},
173
+ url = {https://github.com/Nkluge-correa/Aira},
174
+ author = {Nicholas Kluge Corrêa},
175
+ title = {Aira},
176
+ year = {2023},
177
+ publisher = {GitHub},
178
+ journal = {GitHub repository},
179
+ }
180
+
181
+ @phdthesis{kluge2024dynamic,
182
+ title={Dynamic Normativity},
183
+ author={Kluge Corr{\^e}a, Nicholas},
184
+ year={2024},
185
+ school={Universit{\"a}ts-und Landesbibliothek Bonn}
186
+ }
187
+ ```
188
+
189
+ ## License
190
+
191
+ Aira-2-1B5 is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
192
+
193
+