Text Generation
Transformers
PyTorch
JAX
Safetensors
Portuguese
llama
text-generation-inference
Eval Results (legacy)
Instructions to use TucanoBR/Tucano-2b4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TucanoBR/Tucano-2b4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TucanoBR/Tucano-2b4")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TucanoBR/Tucano-2b4") model = AutoModelForMultimodalLM.from_pretrained("TucanoBR/Tucano-2b4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TucanoBR/Tucano-2b4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TucanoBR/Tucano-2b4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TucanoBR/Tucano-2b4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TucanoBR/Tucano-2b4
- SGLang
How to use TucanoBR/Tucano-2b4 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 "TucanoBR/Tucano-2b4" \ --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": "TucanoBR/Tucano-2b4", "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 "TucanoBR/Tucano-2b4" \ --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": "TucanoBR/Tucano-2b4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TucanoBR/Tucano-2b4 with Docker Model Runner:
docker model run hf.co/TucanoBR/Tucano-2b4
Update README.md
Browse files
README.md
CHANGED
|
@@ -406,6 +406,17 @@ The table below compares our models against several Portuguese and multilingual
|
|
| 406 |
primaryClass={cs.CL},
|
| 407 |
url={https://arxiv.org/abs/2411.07854},
|
| 408 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
```
|
| 410 |
|
| 411 |
## Aknowlegments
|
|
|
|
| 406 |
primaryClass={cs.CL},
|
| 407 |
url={https://arxiv.org/abs/2411.07854},
|
| 408 |
}
|
| 409 |
+
|
| 410 |
+
@article{correa2025tucanoadvancingneuraltext,
|
| 411 |
+
title={{Tucano: Advancing Neural Text Generation for Portuguese}},
|
| 412 |
+
author={Corr{\^e}a, Nicholas Kluge and Sen, Aniket and Falk, Sophia and Fatimah, Shiza},
|
| 413 |
+
journal={Patterns},
|
| 414 |
+
publisher={Elsevier},
|
| 415 |
+
year={2025},
|
| 416 |
+
doi={10.1016/j.patter.2025.101325},
|
| 417 |
+
url={https://doi.org/10.1016/j.patter.2025.101325},
|
| 418 |
+
issn={2666-3899}
|
| 419 |
+
}
|
| 420 |
```
|
| 421 |
|
| 422 |
## Aknowlegments
|