afrideva commited on
Commit
cb54213
1 Parent(s): 7cb1707

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +181 -0
README.md ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: nicholasKluge/Aira-2-1B1
3
+ co2_eq_emissions:
4
+ emissions: 1.78
5
+ geographical_location: United States of America
6
+ hardware_used: NVIDIA A100-SXM4-40GB
7
+ source: CodeCarbon
8
+ training_type: fine-tuning
9
+ datasets:
10
+ - nicholasKluge/instruct-aira-dataset
11
+ inference: false
12
+ language:
13
+ - en
14
+ library_name: transformers
15
+ license: apache-2.0
16
+ metrics:
17
+ - accuracy
18
+ model_creator: nicholasKluge
19
+ model_name: Aira-2-1B1
20
+ pipeline_tag: text-generation
21
+ quantized_by: afrideva
22
+ tags:
23
+ - alignment
24
+ - instruction tuned
25
+ - text generation
26
+ - conversation
27
+ - assistant
28
+ - gguf
29
+ - ggml
30
+ - quantized
31
+ - q2_k
32
+ - q3_k_m
33
+ - q4_k_m
34
+ - q5_k_m
35
+ - q6_k
36
+ - q8_0
37
+ widget:
38
+ - example_title: Greetings
39
+ text: <|startofinstruction|>How should I call you?<|endofinstruction|>
40
+ - example_title: Machine Learning
41
+ text: <|startofinstruction|>Can you explain what is Machine Learning?<|endofinstruction|>
42
+ - example_title: Ethics
43
+ text: <|startofinstruction|>Do you know anything about virtue ethics?<|endofinstruction|>
44
+ - example_title: Advise
45
+ text: <|startofinstruction|>How can I make my girlfriend happy?<|endofinstruction|>
46
+ ---
47
+ # nicholasKluge/Aira-2-1B1-GGUF
48
+
49
+ Quantized GGUF model files for [Aira-2-1B1](https://huggingface.co/nicholasKluge/Aira-2-1B1) from [nicholasKluge](https://huggingface.co/nicholasKluge)
50
+
51
+
52
+ | Name | Quant method | Size |
53
+ | ---- | ---- | ---- |
54
+ | [aira-2-1b1.fp16.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.fp16.gguf) | fp16 | 2.20 GB |
55
+ | [aira-2-1b1.q2_k.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q2_k.gguf) | q2_k | 482.15 MB |
56
+ | [aira-2-1b1.q3_k_m.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q3_k_m.gguf) | q3_k_m | 549.86 MB |
57
+ | [aira-2-1b1.q4_k_m.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q4_k_m.gguf) | q4_k_m | 667.83 MB |
58
+ | [aira-2-1b1.q5_k_m.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q5_k_m.gguf) | q5_k_m | 782.06 MB |
59
+ | [aira-2-1b1.q6_k.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q6_k.gguf) | q6_k | 903.43 MB |
60
+ | [aira-2-1b1.q8_0.gguf](https://huggingface.co/afrideva/Aira-2-1B1-GGUF/resolve/main/aira-2-1b1.q8_0.gguf) | q8_0 | 1.17 GB |
61
+
62
+
63
+
64
+ ## Original Model Card:
65
+ # Aira-2-1B1
66
+
67
+ `Aira-2` is the second version of the Aira instruction-tuned series. `Aira-2-1B1` is an instruction-tuned GPT-style model based on [TinyLlama-1.1B](https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-480k-1T). The model was trained with a dataset composed of prompts and completions generated synthetically by prompting already-tuned models (ChatGPT, Llama, Open-Assistant, etc).
68
+
69
+ Check our gradio-demo in [Spaces](https://huggingface.co/spaces/nicholasKluge/Aira-Demo).
70
+
71
+ ## Details
72
+
73
+ - **Size:** 1,261,545,472 parameters
74
+ - **Dataset:** [Instruct-Aira Dataset](https://huggingface.co/datasets/nicholasKluge/instruct-aira-dataset)
75
+ - **Language:** English
76
+ - **Number of Epochs:** 3
77
+ - **Batch size:** 4
78
+ - **Optimizer:** `torch.optim.AdamW` (warmup_steps = 1e2, learning_rate = 5e-4, epsilon = 1e-8)
79
+ - **GPU:** 1 NVIDIA A100-SXM4-40GB
80
+ - **Emissions:** 1.78 KgCO2 (Singapore)
81
+ - **Total Energy Consumption:** 3.64 kWh
82
+
83
+ This repository has the [source code](https://github.com/Nkluge-correa/Aira) used to train this model.
84
+
85
+ ## Usage
86
+
87
+ Three special tokens are used to mark the user side of the interaction and the model's response:
88
+
89
+ `<|startofinstruction|>`What is a language model?`<|endofinstruction|>`A language model is a probability distribution over a vocabulary.`<|endofcompletion|>`
90
+
91
+ ```python
92
+ from transformers import AutoTokenizer, AutoModelForCausalLM
93
+ import torch
94
+
95
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
96
+
97
+ tokenizer = AutoTokenizer.from_pretrained('nicholasKluge/Aira-2-1B1')
98
+ aira = AutoModelForCausalLM.from_pretrained('nicholasKluge/Aira-2-1B1')
99
+
100
+ aira.eval()
101
+ aira.to(device)
102
+
103
+ question = input("Enter your question: ")
104
+
105
+ inputs = tokenizer(tokenizer.bos_token + question + tokenizer.sep_token, return_tensors="pt").to(device)
106
+
107
+ responses = aira.generate(**inputs,
108
+ bos_token_id=tokenizer.bos_token_id,
109
+ pad_token_id=tokenizer.pad_token_id,
110
+ eos_token_id=tokenizer.eos_token_id,
111
+ do_sample=True,
112
+ top_k=50,
113
+ max_length=500,
114
+ top_p=0.95,
115
+ temperature=0.7,
116
+ num_return_sequences=2)
117
+
118
+ print(f"Question: 👤 {question}\n")
119
+
120
+ for i, response in enumerate(responses):
121
+ print(f'Response {i+1}: 🤖 {tokenizer.decode(response, skip_special_tokens=True).replace(question, "")}')
122
+ ```
123
+
124
+ The model will output something like:
125
+
126
+ ```markdown
127
+ >>>Question: 👤 What is the capital of Brazil?
128
+
129
+ >>>Response 1: 🤖 The capital of Brazil is Brasília.
130
+ >>>Response 2: 🤖 The capital of Brazil is Brasília.
131
+ ```
132
+
133
+ ## Limitations
134
+
135
+ 🤥 Generative models can perpetuate the generation of pseudo-informative content, that is, false information that may appear truthful.
136
+
137
+ 🤬 In certain types of tasks, generative models can produce harmful and discriminatory content inspired by historical stereotypes.
138
+
139
+ ## Evaluation
140
+
141
+ | Model (TinyLlama) | Average | [ARC](https://arxiv.org/abs/1803.05457) | [TruthfulQA](https://arxiv.org/abs/2109.07958) | [ToxiGen](https://arxiv.org/abs/2203.09509) |
142
+ |---------------------------------------------------------------|-----------|-----------------------------------------|------------------------------------------------|---------------------------------------------|
143
+ | [Aira-2-1B1](https://huggingface.co/nicholasKluge/Aira-2-1B1) | **42.55** | 25.26 | **50.81** | **51.59** |
144
+ | TinyLlama-1.1B-intermediate-step-480k-1T | 37.52 | **30.89** | 39.55 | 42.13 |
145
+
146
+
147
+ * Evaluations were performed using the [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) (by [EleutherAI](https://www.eleuther.ai/)).
148
+
149
+ ## Cite as 🤗
150
+
151
+ ```latex
152
+
153
+ @misc{nicholas22aira,
154
+ doi = {10.5281/zenodo.6989727},
155
+ url = {https://huggingface.co/nicholasKluge/Aira-2-1B1},
156
+ author = {Nicholas Kluge Corrêa},
157
+ title = {Aira},
158
+ year = {2023},
159
+ publisher = {HuggingFace},
160
+ journal = {HuggingFace repository},
161
+ }
162
+
163
+ ```
164
+
165
+ ## License
166
+
167
+ The `Aira-2-1B1` is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
168
+
169
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
170
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_nicholasKluge__Aira-2-1B1)
171
+
172
+ | Metric | Value |
173
+ |-----------------------|---------------------------|
174
+ | Avg. | 25.19 |
175
+ | ARC (25-shot) | 23.21 |
176
+ | HellaSwag (10-shot) | 26.97 |
177
+ | MMLU (5-shot) | 24.86 |
178
+ | TruthfulQA (0-shot) | 50.63 |
179
+ | Winogrande (5-shot) | 50.28 |
180
+ | GSM8K (5-shot) | 0.0 |
181
+ | DROP (3-shot) | 0.39 |