Instructions to use recogna-nlp/phi-bode-2-ultraalpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use recogna-nlp/phi-bode-2-ultraalpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="recogna-nlp/phi-bode-2-ultraalpaca", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("recogna-nlp/phi-bode-2-ultraalpaca", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("recogna-nlp/phi-bode-2-ultraalpaca", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use recogna-nlp/phi-bode-2-ultraalpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "recogna-nlp/phi-bode-2-ultraalpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "recogna-nlp/phi-bode-2-ultraalpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/recogna-nlp/phi-bode-2-ultraalpaca
- SGLang
How to use recogna-nlp/phi-bode-2-ultraalpaca 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 "recogna-nlp/phi-bode-2-ultraalpaca" \ --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": "recogna-nlp/phi-bode-2-ultraalpaca", "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 "recogna-nlp/phi-bode-2-ultraalpaca" \ --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": "recogna-nlp/phi-bode-2-ultraalpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use recogna-nlp/phi-bode-2-ultraalpaca with Docker Model Runner:
docker model run hf.co/recogna-nlp/phi-bode-2-ultraalpaca
Phi-Bode
Phi-Bode é um modelo de linguagem ajustado para o idioma português, desenvolvido a partir do modelo base Phi-2B fornecido pela Microsoft. Este modelo foi refinado através do processo de fine-tuning utilizando o dataset UltraAlpaca. O principal objetivo deste modelo é ser viável para pessoas que não possuem recursos computacionais disponíveis para o uso de LLMs (Large Language Models). Ressalta-se que este é um trabalho em andamento e o modelo ainda apresenta problemas na geração de texto em português.
Características Principais
- Modelo Base: Phi-2B, criado pela Microsoft, com 2.7 bilhões de parâmetros.
- Dataset para Fine-tuning: UltraAlpaca
- Treinamento: O treinamento foi realizado a partir do fine-tuning completo do phi-2.
Open Portuguese LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Average | 39.89 |
| ENEM Challenge (No Images) | 38.35 |
| BLUEX (No Images) | 25.17 |
| OAB Exams | 29.61 |
| Assin2 RTE | 45.39 |
| Assin2 STS | 24.43 |
| FaQuAD NLI | 43.97 |
| HateBR Binary | 54.15 |
| PT Hate Speech Binary | 54.59 |
| tweetSentBR | 43.34 |
- Downloads last month
- 20
Space using recogna-nlp/phi-bode-2-ultraalpaca 1
Collection including recogna-nlp/phi-bode-2-ultraalpaca
Evaluation results
- accuracy on ENEM Challenge (No Images)Open Portuguese LLM Leaderboard38.350
- accuracy on BLUEX (No Images)Open Portuguese LLM Leaderboard25.170
- accuracy on OAB ExamsOpen Portuguese LLM Leaderboard29.610
- f1-macro on Assin2 RTEtest set Open Portuguese LLM Leaderboard45.390
- pearson on Assin2 STStest set Open Portuguese LLM Leaderboard24.430
- f1-macro on FaQuAD NLItest set Open Portuguese LLM Leaderboard43.970
- f1-macro on HateBR Binarytest set Open Portuguese LLM Leaderboard54.150
- f1-macro on PT Hate Speech Binarytest set Open Portuguese LLM Leaderboard54.590
- f1-macro on tweetSentBRtest set Open Portuguese LLM Leaderboard43.340