Text Generation
Transformers
Safetensors
PEFT
Portuguese
llama
portuguese
instruct
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use lrds-code/boana-7b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lrds-code/boana-7b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lrds-code/boana-7b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lrds-code/boana-7b-instruct") model = AutoModelForCausalLM.from_pretrained("lrds-code/boana-7b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use lrds-code/boana-7b-instruct with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lrds-code/boana-7b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lrds-code/boana-7b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lrds-code/boana-7b-instruct
- SGLang
How to use lrds-code/boana-7b-instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lrds-code/boana-7b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lrds-code/boana-7b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lrds-code/boana-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lrds-code/boana-7b-instruct with Docker Model Runner:
docker model run hf.co/lrds-code/boana-7b-instruct
Adding the Open Portuguese LLM Leaderboard Evaluation Results
Browse filesThis is an automated PR created with https://huggingface.co/spaces/eduagarcia-temp/portuguese-leaderboard-results-to-modelcard
The purpose of this PR is to add evaluation results from the Open Portuguese LLM Leaderboard to your model card.
If you encounter any issues, please report them to https://huggingface.co/spaces/eduagarcia-temp/portuguese-leaderboard-results-to-modelcard/discussions
README.md
CHANGED
|
@@ -1,28 +1,145 @@
|
|
| 1 |
---
|
| 2 |
-
license: llama2
|
| 3 |
language:
|
| 4 |
- pt
|
| 5 |
-
|
| 6 |
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- llama
|
| 9 |
- peft
|
| 10 |
- portuguese
|
| 11 |
- instruct
|
| 12 |
-
|
| 13 |
model-index:
|
| 14 |
- name: boana-7b-instruct
|
| 15 |
results:
|
| 16 |
- task:
|
| 17 |
type: text-generation
|
| 18 |
dataset:
|
| 19 |
-
type: Muennighoff/xwinograd
|
| 20 |
name: XWinograd (pt)
|
|
|
|
| 21 |
config: pt
|
| 22 |
split: test
|
| 23 |
metrics:
|
| 24 |
- type: Accuracy
|
| 25 |
value: 50.57
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
---
|
| 27 |
|
| 28 |
<hr>
|
|
@@ -91,4 +208,20 @@ print(outputs[0]['generated_text'])
|
|
| 91 |
|
| 92 |
- **repetition_penalty:** é utilizado para evitar a repetição de palavras ou frases. Quando esse valor é ajustado para ser maior que 1, o modelo tenta diminuir a probabilidade de gerar palavras que já apareceram anteriormente. Basicamente, quanto maior o valor, mais o modelo tenta evitar repetições.
|
| 93 |
- **do_sample:** determina se o modelo deve ou não amostrar aleatoriamente a próxima palavra com base nas probabilidades calculadas. Portanto, **do_sample=True** introduz variação e imprevisibilidade no texto gerado, enquanto que se **do_sample=False** o modelo escolherá sempre a palavra mais provável como próxima palavra, o que pode levar a saídas mais determinísticas e, possivelmente, mais repetitivas.
|
| 94 |
-
- **temperature:** afeta a aleatoriedade na escolha da próxima palavra. Um valor baixo (próximo de 0) faz com que o modelo seja mais "confiante" nas suas escolhas, favorecendo palavras com alta probabilidade e levando a saídas mais previsíveis. Por outro lado, um valor alto aumenta a aleatoriedade, permitindo que o modelo escolha palavras menos prováveis, o que pode tornar o texto gerado mais variado e criativo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- pt
|
| 4 |
+
license: llama2
|
| 5 |
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- llama
|
| 8 |
- peft
|
| 9 |
- portuguese
|
| 10 |
- instruct
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
model-index:
|
| 13 |
- name: boana-7b-instruct
|
| 14 |
results:
|
| 15 |
- task:
|
| 16 |
type: text-generation
|
| 17 |
dataset:
|
|
|
|
| 18 |
name: XWinograd (pt)
|
| 19 |
+
type: Muennighoff/xwinograd
|
| 20 |
config: pt
|
| 21 |
split: test
|
| 22 |
metrics:
|
| 23 |
- type: Accuracy
|
| 24 |
value: 50.57
|
| 25 |
+
- task:
|
| 26 |
+
type: text-generation
|
| 27 |
+
name: Text Generation
|
| 28 |
+
dataset:
|
| 29 |
+
name: ENEM Challenge (No Images)
|
| 30 |
+
type: eduagarcia/enem_challenge
|
| 31 |
+
split: train
|
| 32 |
+
args:
|
| 33 |
+
num_few_shot: 3
|
| 34 |
+
metrics:
|
| 35 |
+
- type: acc
|
| 36 |
+
value: 21.62
|
| 37 |
+
name: accuracy
|
| 38 |
+
source:
|
| 39 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 40 |
+
name: Open Portuguese LLM Leaderboard
|
| 41 |
+
- task:
|
| 42 |
+
type: text-generation
|
| 43 |
+
name: Text Generation
|
| 44 |
+
dataset:
|
| 45 |
+
name: BLUEX (No Images)
|
| 46 |
+
type: eduagarcia-temp/BLUEX_without_images
|
| 47 |
+
split: train
|
| 48 |
+
args:
|
| 49 |
+
num_few_shot: 3
|
| 50 |
+
metrics:
|
| 51 |
+
- type: acc
|
| 52 |
+
value: 29.21
|
| 53 |
+
name: accuracy
|
| 54 |
+
source:
|
| 55 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 56 |
+
name: Open Portuguese LLM Leaderboard
|
| 57 |
+
- task:
|
| 58 |
+
type: text-generation
|
| 59 |
+
name: Text Generation
|
| 60 |
+
dataset:
|
| 61 |
+
name: OAB Exams
|
| 62 |
+
type: eduagarcia/oab_exams
|
| 63 |
+
split: train
|
| 64 |
+
args:
|
| 65 |
+
num_few_shot: 3
|
| 66 |
+
metrics:
|
| 67 |
+
- type: acc
|
| 68 |
+
value: 27.15
|
| 69 |
+
name: accuracy
|
| 70 |
+
source:
|
| 71 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 72 |
+
name: Open Portuguese LLM Leaderboard
|
| 73 |
+
- task:
|
| 74 |
+
type: text-generation
|
| 75 |
+
name: Text Generation
|
| 76 |
+
dataset:
|
| 77 |
+
name: Assin2 RTE
|
| 78 |
+
type: assin2
|
| 79 |
+
split: test
|
| 80 |
+
args:
|
| 81 |
+
num_few_shot: 15
|
| 82 |
+
metrics:
|
| 83 |
+
- type: f1_macro
|
| 84 |
+
value: 48.84
|
| 85 |
+
name: f1-macro
|
| 86 |
+
- type: pearson
|
| 87 |
+
value: 37.56
|
| 88 |
+
name: pearson
|
| 89 |
+
source:
|
| 90 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 91 |
+
name: Open Portuguese LLM Leaderboard
|
| 92 |
+
- task:
|
| 93 |
+
type: text-generation
|
| 94 |
+
name: Text Generation
|
| 95 |
+
dataset:
|
| 96 |
+
name: FaQuAD NLI
|
| 97 |
+
type: ruanchaves/faquad-nli
|
| 98 |
+
split: test
|
| 99 |
+
args:
|
| 100 |
+
num_few_shot: 15
|
| 101 |
+
metrics:
|
| 102 |
+
- type: f1_macro
|
| 103 |
+
value: 43.97
|
| 104 |
+
name: f1-macro
|
| 105 |
+
source:
|
| 106 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 107 |
+
name: Open Portuguese LLM Leaderboard
|
| 108 |
+
- task:
|
| 109 |
+
type: text-generation
|
| 110 |
+
name: Text Generation
|
| 111 |
+
dataset:
|
| 112 |
+
name: HateBR Binary
|
| 113 |
+
type: eduagarcia/portuguese_benchmark
|
| 114 |
+
split: test
|
| 115 |
+
args:
|
| 116 |
+
num_few_shot: 25
|
| 117 |
+
metrics:
|
| 118 |
+
- type: f1_macro
|
| 119 |
+
value: 85.0
|
| 120 |
+
name: f1-macro
|
| 121 |
+
- type: f1_macro
|
| 122 |
+
value: 67.43
|
| 123 |
+
name: f1-macro
|
| 124 |
+
source:
|
| 125 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 126 |
+
name: Open Portuguese LLM Leaderboard
|
| 127 |
+
- task:
|
| 128 |
+
type: text-generation
|
| 129 |
+
name: Text Generation
|
| 130 |
+
dataset:
|
| 131 |
+
name: tweetSentBR
|
| 132 |
+
type: eduagarcia-temp/tweetsentbr
|
| 133 |
+
split: test
|
| 134 |
+
args:
|
| 135 |
+
num_few_shot: 25
|
| 136 |
+
metrics:
|
| 137 |
+
- type: f1_macro
|
| 138 |
+
value: 40.38
|
| 139 |
+
name: f1-macro
|
| 140 |
+
source:
|
| 141 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lrds-code/boana-7b-instruct
|
| 142 |
+
name: Open Portuguese LLM Leaderboard
|
| 143 |
---
|
| 144 |
|
| 145 |
<hr>
|
|
|
|
| 208 |
|
| 209 |
- **repetition_penalty:** é utilizado para evitar a repetição de palavras ou frases. Quando esse valor é ajustado para ser maior que 1, o modelo tenta diminuir a probabilidade de gerar palavras que já apareceram anteriormente. Basicamente, quanto maior o valor, mais o modelo tenta evitar repetições.
|
| 210 |
- **do_sample:** determina se o modelo deve ou não amostrar aleatoriamente a próxima palavra com base nas probabilidades calculadas. Portanto, **do_sample=True** introduz variação e imprevisibilidade no texto gerado, enquanto que se **do_sample=False** o modelo escolherá sempre a palavra mais provável como próxima palavra, o que pode levar a saídas mais determinísticas e, possivelmente, mais repetitivas.
|
| 211 |
+
- **temperature:** afeta a aleatoriedade na escolha da próxima palavra. Um valor baixo (próximo de 0) faz com que o modelo seja mais "confiante" nas suas escolhas, favorecendo palavras com alta probabilidade e levando a saídas mais previsíveis. Por outro lado, um valor alto aumenta a aleatoriedade, permitindo que o modelo escolha palavras menos prováveis, o que pode tornar o texto gerado mais variado e criativo.
|
| 212 |
+
# [Open Portuguese LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)
|
| 213 |
+
Detailed results can be found [here](https://huggingface.co/datasets/eduagarcia-temp/llm_pt_leaderboard_raw_results/tree/main/lrds-code/boana-7b-instruct)
|
| 214 |
+
|
| 215 |
+
| Metric | Value |
|
| 216 |
+
|--------------------------|---------|
|
| 217 |
+
|Average |**44.57**|
|
| 218 |
+
|ENEM Challenge (No Images)| 21.62|
|
| 219 |
+
|BLUEX (No Images) | 29.21|
|
| 220 |
+
|OAB Exams | 27.15|
|
| 221 |
+
|Assin2 RTE | 48.84|
|
| 222 |
+
|Assin2 STS | 37.56|
|
| 223 |
+
|FaQuAD NLI | 43.97|
|
| 224 |
+
|HateBR Binary | 85|
|
| 225 |
+
|PT Hate Speech Binary | 67.43|
|
| 226 |
+
|tweetSentBR | 40.38|
|
| 227 |
+
|