Text Generation
Transformers
Safetensors
GGUF
Portuguese
English
mistral
text-generation-inference
brazil
brasil
portuguese
conversational
Eval Results (legacy)
Instructions to use botbotrobotics/CabraMistral7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use botbotrobotics/CabraMistral7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="botbotrobotics/CabraMistral7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("botbotrobotics/CabraMistral7b") model = AutoModelForCausalLM.from_pretrained("botbotrobotics/CabraMistral7b") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use botbotrobotics/CabraMistral7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "botbotrobotics/CabraMistral7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "botbotrobotics/CabraMistral7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/botbotrobotics/CabraMistral7b
- SGLang
How to use botbotrobotics/CabraMistral7b 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 "botbotrobotics/CabraMistral7b" \ --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": "botbotrobotics/CabraMistral7b", "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 "botbotrobotics/CabraMistral7b" \ --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": "botbotrobotics/CabraMistral7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use botbotrobotics/CabraMistral7b with Docker Model Runner:
docker model run hf.co/botbotrobotics/CabraMistral7b
Fixing some errors of the leaderboard evaluation results in the ModelCard yaml
#3
by leaderboard-pt-pr-bot - opened
README.md
CHANGED
|
@@ -11,7 +11,6 @@ tags:
|
|
| 11 |
- brazil
|
| 12 |
- brasil
|
| 13 |
- portuguese
|
| 14 |
-
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 15 |
metrics:
|
| 16 |
- name: assin2_rte f1_macro
|
| 17 |
type: assin2_rte
|
|
@@ -52,6 +51,7 @@ metrics:
|
|
| 52 |
- name: portuguese_hate_speech_binary acc
|
| 53 |
type: portuguese_hate_speech_binary
|
| 54 |
value: 63.22
|
|
|
|
| 55 |
pipeline_tag: text-generation
|
| 56 |
model-index:
|
| 57 |
- name: CabraMistral7b
|
|
@@ -117,6 +117,19 @@ model-index:
|
|
| 117 |
- type: f1_macro
|
| 118 |
value: 90.27
|
| 119 |
name: f1-macro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
- type: pearson
|
| 121 |
value: 72.25
|
| 122 |
name: pearson
|
|
@@ -144,7 +157,7 @@ model-index:
|
|
| 144 |
name: Text Generation
|
| 145 |
dataset:
|
| 146 |
name: HateBR Binary
|
| 147 |
-
type:
|
| 148 |
split: test
|
| 149 |
args:
|
| 150 |
num_few_shot: 25
|
|
@@ -152,6 +165,19 @@ model-index:
|
|
| 152 |
- type: f1_macro
|
| 153 |
value: 83.15
|
| 154 |
name: f1-macro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
- type: f1_macro
|
| 156 |
value: 64.82
|
| 157 |
name: f1-macro
|
|
|
|
| 11 |
- brazil
|
| 12 |
- brasil
|
| 13 |
- portuguese
|
|
|
|
| 14 |
metrics:
|
| 15 |
- name: assin2_rte f1_macro
|
| 16 |
type: assin2_rte
|
|
|
|
| 51 |
- name: portuguese_hate_speech_binary acc
|
| 52 |
type: portuguese_hate_speech_binary
|
| 53 |
value: 63.22
|
| 54 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 55 |
pipeline_tag: text-generation
|
| 56 |
model-index:
|
| 57 |
- name: CabraMistral7b
|
|
|
|
| 117 |
- type: f1_macro
|
| 118 |
value: 90.27
|
| 119 |
name: f1-macro
|
| 120 |
+
source:
|
| 121 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=nicolasdec/CabraMistral7b
|
| 122 |
+
name: Open Portuguese LLM Leaderboard
|
| 123 |
+
- task:
|
| 124 |
+
type: text-generation
|
| 125 |
+
name: Text Generation
|
| 126 |
+
dataset:
|
| 127 |
+
name: Assin2 STS
|
| 128 |
+
type: eduagarcia/portuguese_benchmark
|
| 129 |
+
split: test
|
| 130 |
+
args:
|
| 131 |
+
num_few_shot: 15
|
| 132 |
+
metrics:
|
| 133 |
- type: pearson
|
| 134 |
value: 72.25
|
| 135 |
name: pearson
|
|
|
|
| 157 |
name: Text Generation
|
| 158 |
dataset:
|
| 159 |
name: HateBR Binary
|
| 160 |
+
type: ruanchaves/hatebr
|
| 161 |
split: test
|
| 162 |
args:
|
| 163 |
num_few_shot: 25
|
|
|
|
| 165 |
- type: f1_macro
|
| 166 |
value: 83.15
|
| 167 |
name: f1-macro
|
| 168 |
+
source:
|
| 169 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=nicolasdec/CabraMistral7b
|
| 170 |
+
name: Open Portuguese LLM Leaderboard
|
| 171 |
+
- task:
|
| 172 |
+
type: text-generation
|
| 173 |
+
name: Text Generation
|
| 174 |
+
dataset:
|
| 175 |
+
name: PT Hate Speech Binary
|
| 176 |
+
type: hate_speech_portuguese
|
| 177 |
+
split: test
|
| 178 |
+
args:
|
| 179 |
+
num_few_shot: 25
|
| 180 |
+
metrics:
|
| 181 |
- type: f1_macro
|
| 182 |
value: 64.82
|
| 183 |
name: f1-macro
|