Instructions to use recogna-nlp/phibode_1_5_ultraalpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use recogna-nlp/phibode_1_5_ultraalpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="recogna-nlp/phibode_1_5_ultraalpaca")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("recogna-nlp/phibode_1_5_ultraalpaca") model = AutoModelForCausalLM.from_pretrained("recogna-nlp/phibode_1_5_ultraalpaca") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use recogna-nlp/phibode_1_5_ultraalpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "recogna-nlp/phibode_1_5_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/phibode_1_5_ultraalpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/recogna-nlp/phibode_1_5_ultraalpaca
- SGLang
How to use recogna-nlp/phibode_1_5_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/phibode_1_5_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/phibode_1_5_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/phibode_1_5_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/phibode_1_5_ultraalpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use recogna-nlp/phibode_1_5_ultraalpaca with Docker Model Runner:
docker model run hf.co/recogna-nlp/phibode_1_5_ultraalpaca
Configuration Parsing Warning:Invalid JSON for config file tokenizer_config.json
Phi-Bode
Phi-Bode é um modelo de linguagem ajustado para o idioma português, desenvolvido a partir do modelo base Phi-1.5B 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-1.5B, criado pela Microsoft, com 1.3 bilhões de parâmetros.
- Dataset para Fine-tuning: UltraAlpaca
- Treinamento: O treinamento foi realizado a partir do fine-tuning completo do phi-1.5.
Open Portuguese LLM Leaderboard Evaluation Results
Detailed results can be found here and on the 🚀 Open Portuguese LLM Leaderboard
| Metric | Value |
|---|---|
| Average | 31.95 |
| ENEM Challenge (No Images) | 23.58 |
| BLUEX (No Images) | 20.72 |
| OAB Exams | 24.87 |
| Assin2 RTE | 69.07 |
| Assin2 STS | 4.94 |
| FaQuAD NLI | 43.97 |
| HateBR Binary | 34.94 |
| PT Hate Speech Binary | 41.23 |
| tweetSentBR | 24.19 |
- Downloads last month
- 14
Space using recogna-nlp/phibode_1_5_ultraalpaca 1
Collection including recogna-nlp/phibode_1_5_ultraalpaca
Evaluation results
- accuracy on ENEM Challenge (No Images)Open Portuguese LLM Leaderboard23.580
- accuracy on BLUEX (No Images)Open Portuguese LLM Leaderboard20.720
- accuracy on OAB ExamsOpen Portuguese LLM Leaderboard24.870
- f1-macro on Assin2 RTEtest set Open Portuguese LLM Leaderboard69.070
- pearson on Assin2 STStest set Open Portuguese LLM Leaderboard4.940
- f1-macro on FaQuAD NLItest set Open Portuguese LLM Leaderboard43.970
- f1-macro on HateBR Binarytest set Open Portuguese LLM Leaderboard34.940
- f1-macro on PT Hate Speech Binarytest set Open Portuguese LLM Leaderboard41.230