Text Generation
Transformers
Safetensors
Portuguese
llama
portuguese
mcq
enem
oab
education
brazil
text-generation-inference
Instructions to use limajr/NBR-1B-Portuguese-MCQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use limajr/NBR-1B-Portuguese-MCQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="limajr/NBR-1B-Portuguese-MCQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("limajr/NBR-1B-Portuguese-MCQ") model = AutoModelForCausalLM.from_pretrained("limajr/NBR-1B-Portuguese-MCQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use limajr/NBR-1B-Portuguese-MCQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "limajr/NBR-1B-Portuguese-MCQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limajr/NBR-1B-Portuguese-MCQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/limajr/NBR-1B-Portuguese-MCQ
- SGLang
How to use limajr/NBR-1B-Portuguese-MCQ 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 "limajr/NBR-1B-Portuguese-MCQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limajr/NBR-1B-Portuguese-MCQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "limajr/NBR-1B-Portuguese-MCQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limajr/NBR-1B-Portuguese-MCQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use limajr/NBR-1B-Portuguese-MCQ with Docker Model Runner:
docker model run hf.co/limajr/NBR-1B-Portuguese-MCQ
NBR-1B-Portuguese-MCQ
O melhor modelo ~1B parametros para questoes de multipla escolha em Portugues.
Highlights
- #1 em ENEM (30.53%) - Vestibular brasileiro
- #1 em OAB (49.70%) - Exame da Ordem dos Advogados
- #1 em BLUEX (36.54%) - Vestibulares universitarios
- #1 em tweetSentBR (39.70%) - Analise de sentimento
Benchmarks
| Benchmark | Score | Ranking |
|---|---|---|
| ENEM | 30.53% | #1 |
| OAB Exams | 49.70% | #1 |
| BLUEX | 36.54% | #1 |
| TweetSentBR | 39.70% | #1 |
| FAQUAD NLI | 45.55% | Top 3 |
| HateBR | 43.18% | Top 5 |
| PT Hate Speech | 41.99% | Top 5 |
| ASSIN2 RTE | 34.27% | - |
| ASSIN2 STS | 0.99% | - |
| Average | 35.83% | - |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("limajr/NBR-1B-Portuguese-MCQ")
tokenizer = AutoTokenizer.from_pretrained("limajr/NBR-1B-Portuguese-MCQ")
Model Details
- Architecture: LlamaForCausalLM
- Parameters: ~1.5B
- Hidden Size: 2048
- Layers: 24
- Attention Heads: 16
- Language: Portuguese (pt-BR)
- Training: Supervised Fine-Tuning on Brazilian educational content
- License: Apache 2.0
Training Data
Fine-tuned on curated Portuguese datasets including:
- Brazilian educational materials
- Legal texts (OAB preparation)
- General knowledge QA
Evaluation
Evaluated on the Open PT LLM Leaderboard using the standard evaluation protocol.
Limitations
- Optimized for multiple choice questions
- ASSIN2 STS (semantic similarity) performance is limited
- Best used for Portuguese educational contexts
- Downloads last month
- 1