phpaiola commited on
Commit
3eaafe6
1 Parent(s): b3acf1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -183
README.md CHANGED
@@ -150,201 +150,50 @@ model-index:
150
  name: Open Portuguese LLM Leaderboard
151
  ---
152
 
153
- # Model Card for Model ID
154
 
155
  <!-- Provide a quick summary of what the model is/does. -->
156
 
 
157
 
 
158
 
159
- ## Model Details
 
 
160
 
161
- ### Model Description
162
 
163
- <!-- Provide a longer summary of what this model is. -->
164
 
165
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
 
 
 
 
 
 
 
 
 
 
166
 
167
- - **Developed by:** [More Information Needed]
168
- - **Funded by [optional]:** [More Information Needed]
169
- - **Shared by [optional]:** [More Information Needed]
170
- - **Model type:** [More Information Needed]
171
- - **Language(s) (NLP):** [More Information Needed]
172
- - **License:** [More Information Needed]
173
- - **Finetuned from model [optional]:** [More Information Needed]
174
 
175
- ### Model Sources [optional]
 
 
176
 
177
- <!-- Provide the basic links for the model. -->
178
-
179
- - **Repository:** [More Information Needed]
180
- - **Paper [optional]:** [More Information Needed]
181
- - **Demo [optional]:** [More Information Needed]
182
-
183
- ## Uses
184
-
185
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
186
-
187
- ### Direct Use
188
-
189
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
190
-
191
- [More Information Needed]
192
-
193
- ### Downstream Use [optional]
194
-
195
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
196
-
197
- [More Information Needed]
198
-
199
- ### Out-of-Scope Use
200
-
201
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
202
-
203
- [More Information Needed]
204
-
205
- ## Bias, Risks, and Limitations
206
-
207
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
208
-
209
- [More Information Needed]
210
-
211
- ### Recommendations
212
-
213
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
214
-
215
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
216
-
217
- ## How to Get Started with the Model
218
-
219
- Use the code below to get started with the model.
220
-
221
- [More Information Needed]
222
-
223
- ## Training Details
224
-
225
- ### Training Data
226
-
227
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
228
-
229
- [More Information Needed]
230
-
231
- ### Training Procedure
232
-
233
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
234
-
235
- #### Preprocessing [optional]
236
-
237
- [More Information Needed]
238
-
239
-
240
- #### Training Hyperparameters
241
-
242
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
243
-
244
- #### Speeds, Sizes, Times [optional]
245
-
246
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
247
-
248
- [More Information Needed]
249
-
250
- ## Evaluation
251
-
252
- <!-- This section describes the evaluation protocols and provides the results. -->
253
-
254
- ### Testing Data, Factors & Metrics
255
-
256
- #### Testing Data
257
-
258
- <!-- This should link to a Dataset Card if possible. -->
259
-
260
- [More Information Needed]
261
-
262
- #### Factors
263
-
264
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
265
-
266
- [More Information Needed]
267
-
268
- #### Metrics
269
-
270
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
271
-
272
- [More Information Needed]
273
-
274
- ### Results
275
-
276
- [More Information Needed]
277
-
278
- #### Summary
279
-
280
-
281
-
282
- ## Model Examination [optional]
283
-
284
- <!-- Relevant interpretability work for the model goes here -->
285
-
286
- [More Information Needed]
287
-
288
- ## Environmental Impact
289
-
290
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
291
-
292
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
293
-
294
- - **Hardware Type:** [More Information Needed]
295
- - **Hours used:** [More Information Needed]
296
- - **Cloud Provider:** [More Information Needed]
297
- - **Compute Region:** [More Information Needed]
298
- - **Carbon Emitted:** [More Information Needed]
299
-
300
- ## Technical Specifications [optional]
301
-
302
- ### Model Architecture and Objective
303
-
304
- [More Information Needed]
305
-
306
- ### Compute Infrastructure
307
-
308
- [More Information Needed]
309
-
310
- #### Hardware
311
-
312
- [More Information Needed]
313
-
314
- #### Software
315
-
316
- [More Information Needed]
317
-
318
- ## Citation [optional]
319
-
320
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
321
-
322
- **BibTeX:**
323
-
324
- [More Information Needed]
325
-
326
- **APA:**
327
-
328
- [More Information Needed]
329
-
330
- ## Glossary [optional]
331
-
332
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
333
-
334
- [More Information Needed]
335
-
336
- ## More Information [optional]
337
-
338
- [More Information Needed]
339
-
340
- ## Model Card Authors [optional]
341
-
342
- [More Information Needed]
343
-
344
- ## Model Card Contact
345
-
346
- [More Information Needed]
347
 
 
 
 
 
 
 
348
 
349
  # Open Portuguese LLM Leaderboard Evaluation Results
350
 
 
150
  name: Open Portuguese LLM Leaderboard
151
  ---
152
 
153
+ # internlm-chatbode-7b
154
 
155
  <!-- Provide a quick summary of what the model is/does. -->
156
 
157
+ O InternLm-ChatBode é um modelo de linguagem ajustado para o idioma português, desenvolvido a partir do modelo [InternLM2](https://huggingface.co/internlm/internlm2-chat-7b). Este modelo foi refinado através do processo de fine-tuning utilizando o dataset UltraAlpaca.
158
 
159
+ ## Características Principais
160
 
161
+ - **Modelo Base:** [internlm/internlm2-chat-7b](internlm/internlm2-chat-7b)
162
+ - **Dataset para Fine-tuning:** UltraAlpaca
163
+ - **Treinamento:** O treinamento foi realizado a partir do fine-tuning, usando QLoRA, do internlm2-chat-7b.
164
 
165
+ ## Exemplo de uso
166
 
167
+ A seguir um exemplo de código de como carregar e utilizar o modelo:
168
 
169
+ ```python
170
+ import torch
171
+ from transformers import AutoTokenizer, AutoModelForCausalLM
172
+ tokenizer = AutoTokenizer.from_pretrained("recogna-nlp/internlm-chatbode-7b", trust_remote_code=True)
173
+ model = AutoModelForCausalLM.from_pretrained("recogna-nlp/internlm-chatbode-7b", torch_dtype=torch.float16, trust_remote_code=True).cuda()
174
+ model = model.eval()
175
+ response, history = model.chat(tokenizer, "Olá", history=[])
176
+ print(response)
177
+ response, history = model.chat(tokenizer, "O que é o Teorema de Pitágoras? Me dê um exemplo", history=history)
178
+ print(response)
179
+ ```
180
 
181
+ As respostas podem ser geradas via stream utilizando o método `stream_chat`:
 
 
 
 
 
 
182
 
183
+ ```python
184
+ import torch
185
+ from transformers import AutoModelForCausalLM, AutoTokenizer
186
 
187
+ model_path = "recogna-nlp/internlm-chatbode-7b"
188
+ model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.float16, trust_remote_code=True).cuda()
189
+ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
+ model = model.eval()
192
+ length = 0
193
+ for response, history in model.stream_chat(tokenizer, "Olá", history=[]):
194
+ print(response[length:], flush=True, end="")
195
+ length = len(response)
196
+ ```
197
 
198
  # Open Portuguese LLM Leaderboard Evaluation Results
199