Instructions to use botbotrobotics/CabraLlama3-70b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use botbotrobotics/CabraLlama3-70b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="botbotrobotics/CabraLlama3-70b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("botbotrobotics/CabraLlama3-70b") model = AutoModelForCausalLM.from_pretrained("botbotrobotics/CabraLlama3-70b", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use botbotrobotics/CabraLlama3-70b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "botbotrobotics/CabraLlama3-70b" # 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/CabraLlama3-70b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/botbotrobotics/CabraLlama3-70b
- SGLang
How to use botbotrobotics/CabraLlama3-70b 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/CabraLlama3-70b" \ --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/CabraLlama3-70b", "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/CabraLlama3-70b" \ --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/CabraLlama3-70b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use botbotrobotics/CabraLlama3-70b with Docker Model Runner:
docker model run hf.co/botbotrobotics/CabraLlama3-70b
Download README.md from botbotrobotics/CabraLlama3-70b: direct link, hf CLI and curl.
- Browser
- Download file 6.38 kB
-
https://huggingface.co/botbotrobotics/CabraLlama3-70b/resolve/main/README.md
- Command line
-
hf download hf://botbotrobotics/CabraLlama3-70b/README.md
-
curl -L -o README.md https://huggingface.co/botbotrobotics/CabraLlama3-70b/resolve/main/README.md
language:
- pt
license: llama3
library_name: transformers
tags:
- portuguese
- llama
- cabra
- llama-3
datasets:
- botbot-ai/Cabra3k
model-index:
- name: CabraLlama3-70b
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: ENEM Challenge (No Images)
type: eduagarcia/enem_challenge
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 82.02
name: accuracy
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: BLUEX (No Images)
type: eduagarcia-temp/BLUEX_without_images
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 70.1
name: accuracy
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: OAB Exams
type: eduagarcia/oab_exams
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 68.52
name: accuracy
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: Assin2 RTE
type: assin2
split: test
args:
num_few_shot: 15
metrics:
- type: f1_macro
value: 93.21
name: f1-macro
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: Assin2 STS
type: eduagarcia/portuguese_benchmark
split: test
args:
num_few_shot: 15
metrics:
- type: pearson
value: 83.32
name: pearson
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: FaQuAD NLI
type: ruanchaves/faquad-nli
split: test
args:
num_few_shot: 15
metrics:
- type: f1_macro
value: 80.6
name: f1-macro
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: HateBR Binary
type: ruanchaves/hatebr
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 81.62
name: f1-macro
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: PT Hate Speech Binary
type: hate_speech_portuguese
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 72.72
name: f1-macro
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: tweetSentBR
type: eduagarcia/tweetsentbr_fewshot
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 73.85
name: f1-macro
source:
url: >-
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=botbot-ai/CabraLlama3-70b
name: Open Portuguese LLM Leaderboard
Cabra Llama-3 70B
O Cabra Llama-3 70B é uma versão aprimorada do Meta Llama 3 70B Instruct, refinado com o uso do dataset Cabra 30k. Este modelo foi especialmente otimizado para compreender e responder em português (pt-br).
Conheça os nossos outros modelos e datasets, e o Cabra Llama 3 8b.
Detalhes do modelo base
Modelo: Meta-Llama-3-70B-Instruct
A Meta desenvolveu e lançou a família de modelos Llama 3, uma coleção de modelos de texto generativos pré-treinados e ajustados por instruções nos tamanhos de 8B e 70B. Os modelos Llama 3 ajustados por instruções são otimizados para casos de uso em diálogos e superam muitos dos modelos de chat de código aberto disponíveis em benchmarks comuns da indústria. Além disso, ao desenvolver esses modelos, tomamos grande cuidado para otimizar a utilidade e a segurança.
Arquitetura do Modelo: Llama 3 é um modelo de linguagem auto-regressivo que usa uma arquitetura de transformador otimizada. As versões ajustadas utilizam o aprimoramento supervisionado (SFT) e aprendizado por reforço com feedback humano (RLHF) para se alinhar às preferências humanas quanto à utilidade e segurança.
Dataset: Cabra 30k
Dataset interno para fine-tuning. Vamos lançar em breve.
Quantização / GGUF
Colocamos diversas versões (GGUF) quantanizadas no branch "quantanization".
Open Portuguese LLM Leaderboard Evaluation Results
Detailed results can be found here and on the 🚀 Open Portuguese LLM Leaderboard
| Metric | Value |
|---|---|
| Average | 78.44 |
| ENEM Challenge (No Images) | 82.02 |
| BLUEX (No Images) | 70.10 |
| OAB Exams | 68.52 |
| Assin2 RTE | 93.21 |
| Assin2 STS | 83.32 |
| FaQuAD NLI | 80.60 |
| HateBR Binary | 81.62 |
| PT Hate Speech Binary | 72.72 |
| tweetSentBR | 73.85 |