GGUF
Inference Endpoints
RichardErkhov commited on
Commit
6394d6b
·
verified ·
1 Parent(s): 044c8dc

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-355M - GGUF
11
+ - Model creator: https://huggingface.co/nicholasKluge/
12
+ - Original model: https://huggingface.co/nicholasKluge/Aira-2-355M/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Aira-2-355M.Q2_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q2_K.gguf) | Q2_K | 0.17GB |
18
+ | [Aira-2-355M.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.IQ3_XS.gguf) | IQ3_XS | 0.18GB |
19
+ | [Aira-2-355M.IQ3_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.IQ3_S.gguf) | IQ3_S | 0.19GB |
20
+ | [Aira-2-355M.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q3_K_S.gguf) | Q3_K_S | 0.19GB |
21
+ | [Aira-2-355M.IQ3_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.IQ3_M.gguf) | IQ3_M | 0.2GB |
22
+ | [Aira-2-355M.Q3_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q3_K.gguf) | Q3_K | 0.21GB |
23
+ | [Aira-2-355M.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q3_K_M.gguf) | Q3_K_M | 0.21GB |
24
+ | [Aira-2-355M.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q3_K_L.gguf) | Q3_K_L | 0.23GB |
25
+ | [Aira-2-355M.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.IQ4_XS.gguf) | IQ4_XS | 0.22GB |
26
+ | [Aira-2-355M.Q4_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q4_0.gguf) | Q4_0 | 0.23GB |
27
+ | [Aira-2-355M.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.IQ4_NL.gguf) | IQ4_NL | 0.23GB |
28
+ | [Aira-2-355M.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q4_K_S.gguf) | Q4_K_S | 0.23GB |
29
+ | [Aira-2-355M.Q4_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q4_K.gguf) | Q4_K | 0.25GB |
30
+ | [Aira-2-355M.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q4_K_M.gguf) | Q4_K_M | 0.25GB |
31
+ | [Aira-2-355M.Q4_1.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q4_1.gguf) | Q4_1 | 0.25GB |
32
+ | [Aira-2-355M.Q5_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q5_0.gguf) | Q5_0 | 0.27GB |
33
+ | [Aira-2-355M.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q5_K_S.gguf) | Q5_K_S | 0.27GB |
34
+ | [Aira-2-355M.Q5_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q5_K.gguf) | Q5_K | 0.29GB |
35
+ | [Aira-2-355M.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q5_K_M.gguf) | Q5_K_M | 0.29GB |
36
+ | [Aira-2-355M.Q5_1.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q5_1.gguf) | Q5_1 | 0.29GB |
37
+ | [Aira-2-355M.Q6_K.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q6_K.gguf) | Q6_K | 0.32GB |
38
+ | [Aira-2-355M.Q8_0.gguf](https://huggingface.co/RichardErkhov/nicholasKluge_-_Aira-2-355M-gguf/blob/main/Aira-2-355M.Q8_0.gguf) | Q8_0 | 0.41GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ datasets:
46
+ - nicholasKluge/instruct-aira-dataset
47
+ language:
48
+ - en
49
+ metrics:
50
+ - accuracy
51
+ library_name: transformers
52
+ tags:
53
+ - alignment
54
+ - instruction tuned
55
+ - text generation
56
+ - conversation
57
+ - assistant
58
+ pipeline_tag: text-generation
59
+ widget:
60
+ - text: "<|startofinstruction|>Can you explain what is Machine Learning?<|endofinstruction|>"
61
+ example_title: Machine Learning
62
+ - text: "<|startofinstruction|>Do you know anything about virtue ethics?<|endofinstruction|>"
63
+ example_title: Ethics
64
+ - text: "<|startofinstruction|>How can I make my girlfriend happy?<|endofinstruction|>"
65
+ example_title: Advise
66
+ inference:
67
+ parameters:
68
+ repetition_penalty: 1.2
69
+ temperature: 0.2
70
+ top_k: 30
71
+ top_p: 0.3
72
+ max_new_tokens: 200
73
+ length_penalty: 0.3
74
+ early_stopping: true
75
+ co2_eq_emissions:
76
+ emissions: 290
77
+ source: CodeCarbon
78
+ training_type: fine-tuning
79
+ geographical_location: United States of America
80
+ hardware_used: NVIDIA A100-SXM4-40GB
81
+ license: apache-2.0
82
+ ---
83
+ # Aira-2-355M
84
+
85
+ Aira-2 is the second version of the Aira instruction-tuned series. Aira-2-355M is an instruction-tuned model based on [GPT-2](https://huggingface.co/gpt2-medium). 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:** 354,825,216 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:** 16
96
+ - **Optimizer:** `torch.optim.AdamW` (warmup_steps = 1e2, learning_rate = 5e-4, epsilon = 1e-8)
97
+ - **GPU:** 1 NVIDIA A100-SXM4-40GB
98
+ - **Emissions:** 0.29 KgCO2 (United States of America)
99
+ - **Total Energy Consumption:** 0.83 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-355M')
116
+ aira = AutoModelForCausalLM.from_pretrained('nicholasKluge/Aira-2-355M')
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-355M is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
192
+
193
+