wandgibaut commited on
Commit
58ca939
1 Parent(s): 6f5f2b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +200 -1
README.md CHANGED
@@ -7,4 +7,203 @@ language:
7
  metrics:
8
  - accuracy
9
  library_name: transformers
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  metrics:
8
  - accuracy
9
  library_name: transformers
10
+ ---
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+ ## Model Details
16
+
17
+ ### Model Description
18
+
19
+ Periquito-3B is a large language model (LLM) trained by Wandgibaut. It is built upon the OpenLlama-3B architecture and specifically fine-tuned using Portuguese Wikipedia (pt-br) data. This specialization makes it particularly adept at understanding and generating text in Brazilian Portuguese.
20
+
21
+ - **Developed by:** Wandemberg Gibaut
22
+ - **Model type:** Llama
23
+ - **Language(s) (NLP):** Portuguese
24
+ - **License:** Apache License 2.0
25
+ - **Finetuned from model [optional]:** openlm-research/open_llama_3b
26
+
27
+
28
+ ### Loading the Weights with Hugging Face Transformers
29
+
30
+ ```python
31
+ import torch
32
+ from transformers import LlamaTokenizer, LlamaForCausalLM
33
+ model_path = 'wandgibaut/periquito-3B'
34
+ tokenizer = LlamaTokenizer.from_pretrained(model_path)
35
+ model = LlamaForCausalLM.from_pretrained(
36
+ model_path, torch_dtype=torch.float16, device_map='auto',
37
+ )
38
+ prompt = 'Q: Qual o maior animal terrestre?\nA:'
39
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids
40
+ generation_output = model.generate(
41
+ input_ids=input_ids, max_new_tokens=32
42
+ )
43
+ print(tokenizer.decode(generation_output[0]))
44
+ ```
45
+
46
+ For more advanced usage, please follow the [transformers LLaMA documentation](https://huggingface.co/docs/transformers/main/model_doc/llama).
47
+
48
+ ### Evaluating with LM-Eval-Harness
49
+ The model can be evaluated with [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness). However, we used a custom version, that has some translated tasks and the ENEM suit. This can be found in [wandgibaut/lm-evaluation-harness-PTBR](https://github.com/wandgibaut/lm-evaluation-harness-PTBR).
50
+
51
+
52
+
53
+ ## Dataset and Training
54
+
55
+ We finetunned the model on Wikipedia-pt dataset with LoRA, in Google's TPU-v3 in the [Google's TPU Research program](https://sites.research.google/trc/about/).
56
+
57
+
58
+ ## Evaluation
59
+ We evaluated OpenLLaMA on a wide range of tasks using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The LLaMA results are generated by running the original LLaMA model on the same evaluation metrics. We note that our results for the LLaMA model differ slightly from the original LLaMA paper, which we believe is a result of different evaluation protocols. Similar differences have been reported in [this issue of lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/issues/443). Additionally, we present the results of GPT-J, a 6B parameter model trained on the [Pile](https://pile.eleuther.ai/) dataset by [EleutherAI](https://www.eleuther.ai/).
60
+
61
+ hf-causal (pretrained=wandgibaut/periquito-3B), limit: None, provide_description: False, num_fewshot: 0, batch_size: None
62
+
63
+ | Task |Version| Metric | Value | |Stderr|
64
+ |---------|------:|------------|------:|---|-----:|
65
+ |agnews_pt| 0|acc | 0.6184|± |0.0056|
66
+ |boolq_pt | 1|acc | 0.6333|± |0.0084|
67
+ |faquad | 1|exact | 7.9365| | |
68
+ | | |f1 |45.6971| | |
69
+ | | |HasAns_exact| 7.9365| | |
70
+ | | |HasAns_f1 |45.6971| | |
71
+ | | |NoAns_exact | 0.0000| | |
72
+ | | |NoAns_f1 | 0.0000| | |
73
+ | | |best_exact | 7.9365| | |
74
+ | | |best_f1 |45.6971| | |
75
+ |imdb_pt | 0|acc | 0.6338|± |0.0068|
76
+ |sst2_pt | 1|acc | 0.6823|± |0.0158|
77
+ |toldbr | 0|acc | 0.4629|± |0.0109|
78
+ | | |f1_macro | 0.3164| | |
79
+
80
+
81
+ hf-causal (pretrained=wandgibaut/periquito-3B,dtype=float), limit: None, provide_description: False, num_fewshot: 3, batch_size: None
82
+
83
+ | Task |Version| Metric | Value | |Stderr|
84
+ |---------|------:|------------|------:|---|-----:|
85
+ |agnews_pt| 0|acc | 0.6242|± |0.0056|
86
+ |boolq_pt | 1|acc | 0.6477|± |0.0084|
87
+ |faquad | 1|exact |34.9206| | |
88
+ | | |f1 |70.3968| | |
89
+ | | |HasAns_exact|34.9206| | |
90
+ | | |HasAns_f1 |70.3968| | |
91
+ | | |NoAns_exact | 0.0000| | |
92
+ | | |NoAns_f1 | 0.0000| | |
93
+ | | |best_exact |34.9206| | |
94
+ | | |best_f1 |70.3968| | |
95
+ |imdb_pt | 0|acc | 0.8408|± |0.0052|
96
+ |sst2_pt | 1|acc | 0.7775|± |0.0141|
97
+ |toldbr | 0|acc | 0.5143|± |0.0109|
98
+ | | |f1_macro | 0.5127| | |
99
+
100
+
101
+ hf-causal (pretrained=wandgibaut/periquito-3B), limit: None, provide_description: False, num_fewshot: 0, batch_size: None
102
+
103
+ | Task |Version| Metric |Value | |Stderr|
104
+ |-------------|------:|----------------|-----:|---|-----:|
105
+ |enem | 0|acc |0.1976|± |0.0132|
106
+ | | |2009 |0.2022|± |0.0428|
107
+ | | |2016 |0.1809|± |0.0399|
108
+ | | |2015 |0.1348|± |0.0364|
109
+ | | |2016_2_ |0.2366|± |0.0443|
110
+ | | |2017 |0.2022|± |0.0428|
111
+ | | |2013 |0.1647|± |0.0405|
112
+ | | |2012 |0.2174|± |0.0432|
113
+ | | |2011 |0.2292|± |0.0431|
114
+ | | |2010 |0.2157|± |0.0409|
115
+ | | |2014 |0.1839|± |0.0418|
116
+ |enem_2022 | 0|acc |0.2373|± |0.0393|
117
+ | | |2022 |0.2373|± |0.0393|
118
+ | | |human-sciences |0.2703|± |0.0740|
119
+ | | |mathematics |0.1818|± |0.0842|
120
+ | | |natural-sciences|0.1538|± |0.0722|
121
+ | | |languages |0.3030|± |0.0812|
122
+ |enem_CoT | 0|acc |0.1812|± |0.0127|
123
+ | | |2009 |0.1348|± |0.0364|
124
+ | | |2016 |0.1596|± |0.0380|
125
+ | | |2015 |0.1124|± |0.0337|
126
+ | | |2016_2_ |0.1290|± |0.0350|
127
+ | | |2017 |0.2247|± |0.0445|
128
+ | | |2013 |0.1765|± |0.0416|
129
+ | | |2012 |0.2391|± |0.0447|
130
+ | | |2011 |0.1979|± |0.0409|
131
+ | | |2010 |0.2451|± |0.0428|
132
+ | | |2014 |0.1839|± |0.0418|
133
+ |enem_CoT_2022| 0|acc |0.2119|± |0.0378|
134
+ | | |2022 |0.2119|± |0.0378|
135
+ | | |human-sciences |0.2703|± |0.0740|
136
+ | | |mathematics |0.1818|± |0.0842|
137
+ | | |natural-sciences|0.2308|± |0.0843|
138
+ | | |languages |0.1515|± |0.0634|
139
+
140
+ hf-causal (pretrained=wandgibaut/periquito-3B,dtype=float), limit: None, provide_description: False, num_fewshot: 1, batch_size: None
141
+
142
+ | Task |Version| Metric |Value | |Stderr|
143
+ |-------------|------:|----------------|-----:|---|-----:|
144
+ |enem | 0|acc |0.1790|± |0.0127|
145
+ | | |2009 |0.1573|± |0.0388|
146
+ | | |2016 |0.2021|± |0.0416|
147
+ | | |2015 |0.1573|± |0.0388|
148
+ | | |2016_2_ |0.1935|± |0.0412|
149
+ | | |2017 |0.2247|± |0.0445|
150
+ | | |2013 |0.1412|± |0.0380|
151
+ | | |2012 |0.1739|± |0.0397|
152
+ | | |2011 |0.1979|± |0.0409|
153
+ | | |2010 |0.1961|± |0.0395|
154
+ | | |2014 |0.1379|± |0.0372|
155
+ |enem_2022 | 0|acc |0.1864|± |0.0360|
156
+ | | |2022 |0.1864|± |0.0360|
157
+ | | |human-sciences |0.2432|± |0.0715|
158
+ | | |mathematics |0.1364|± |0.0749|
159
+ | | |natural-sciences|0.1154|± |0.0639|
160
+ | | |languages |0.2121|± |0.0723|
161
+ |enem_CoT | 0|acc |0.2009|± |0.0132|
162
+ | | |2009 |0.2135|± |0.0437|
163
+ | | |2016 |0.2340|± |0.0439|
164
+ | | |2015 |0.1348|± |0.0364|
165
+ | | |2016_2_ |0.2258|± |0.0436|
166
+ | | |2017 |0.2360|± |0.0453|
167
+ | | |2013 |0.1529|± |0.0393|
168
+ | | |2012 |0.1957|± |0.0416|
169
+ | | |2011 |0.2500|± |0.0444|
170
+ | | |2010 |0.1667|± |0.0371|
171
+ | | |2014 |0.1954|± |0.0428|
172
+ |enem_CoT_2022| 0|acc |0.2542|± |0.0403|
173
+ | | |2022 |0.2542|± |0.0403|
174
+ | | |human-sciences |0.2703|± |0.0740|
175
+ | | |mathematics |0.2273|± |0.0914|
176
+ | | |natural-sciences|0.3846|± |0.0973|
177
+ | | |languages |0.1515|± |0.0634|
178
+
179
+
180
+ ## Use Cases:
181
+ The model is suitable for text generation, language understanding, and various natural language processing tasks in Brazilian Portuguese.
182
+
183
+ ## Limitations:
184
+ Like many language models, Periquito-3B might exhibit biases present in its training data. Additionally, its performance is primarily optimized for Portuguese, potentially limiting its effectiveness with other languages.
185
+
186
+ ## Ethical Considerations:
187
+ Users are encouraged to use the model ethically, particularly by avoiding the generation of harmful or biased content.
188
+
189
+
190
+ ## Acknowledgment
191
+ We thank the [Google TPU Research Cloud](https://sites.research.google/trc/about/) program for providing part of the computation resources.
192
+
193
+
194
+
195
+ ## Citation [optional]
196
+
197
+ If you found periquito-3B useful in your research or applications, please cite using the following BibTeX:
198
+
199
+ **BibTeX:**
200
+
201
+ ```
202
+ @software{wandgibautperiquito3B,
203
+ author = {Gibaut, Wandemberg},
204
+ title = {Periquito-3B},
205
+ month = Sep,
206
+ year = 2023,
207
+ url = {https://huggingface.co/wandgibaut/periquito-3B}
208
+ }
209
+ ```