Instructions to use Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT") 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("Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT") model = AutoModelForCausalLM.from_pretrained("Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT
- SGLang
How to use Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT 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 "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT" \ --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": "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT", "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 "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT" \ --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": "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT with Docker Model Runner:
docker model run hf.co/Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT
Tucano2-qwen-0.5B-TaskAdd-E-FinBERT (Task-Addition Checkpoint)
Step 5 (Equal Weights) of the iterative Task-Addition pipeline: uniform TIES merge of the 4 preceding checkpoints followed by SFT on FinBERT-PT-BR.
Lineage / Parent Models:
Assaoka/Tucano2-qwen-0.5B-GoEmotionsAssaoka/Tucano2-qwen-0.5B-TaskAdd-BrighterAssaoka/Tucano2-qwen-0.5B-TaskAdd-E-ReLiSAAssaoka/Tucano2-qwen-0.5B-TaskAdd-E-Phrasebank
This model is part of the ENIAC 2026 paper "United Experts: Efficient Multi-Task Sentiment Analysis in Portuguese via Model Merging" (ENIAC 2026 Paper (SBC OpenLib) | DOI: 10.5753/eniac.2026.31064 | Hugging Face Collection).
📌 Model Details
- Experimental Group: Iterative Task-Addition (Equal Weights)
- Base / Parent Model(s):
Assaoka/Tucano2-qwen-0.5B-GoEmotions,Assaoka/Tucano2-qwen-0.5B-TaskAdd-Brighter,Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-ReLiSA,Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-Phrasebank - Relation (
base_model_relation):merge - Datasets Used: ReLi-SA (book reviews), BRIGHTER (ptbr) (6 multi-label emotions), Sentiments-FinBERT-PT-BR (financial news), Financial Phrasebank PT-BR (Kaggle), GoEmotions PT-BR (50% random training split, 28 emotions)
- Method: Step 5 Equal Weights (TIES + SFT)
- Parameters: Uniform TIES merge (
0.25each) of the 4 preceding checkpoints followed by SFT on FinBERT-PT-BR. - Language: Portuguese (PT-BR)
- License: Apache 2.0
- Retention Policy: Publicly hosted for at least 1 year following thesis completion (December 2026).
📊 Full Evaluation (In-Domain & Out-of-Domain)
Metrics across all 5 Portuguese sentiment and emotion benchmarks (evaluated with Guided Decoding via vLLM + Pydantic), compared against the zero-shot baseline (Polygl0t/Tucano2-qwen-0.5B-Instruct) and the Joint multi-task SFT baseline. Summary rows report the unweighted mean and min-max normalized mean across all 5 tasks.
| Dataset / Task | Metric | Model | Baseline | Joint |
|---|---|---|---|---|
| RELI-SA | Macro F1 Micro F1 Accuracy Hamming Loss |
43.52% 62.56% 62.56% 0.3744 |
30.66% 37.07% 37.07% 0.6293 |
59.51% 74.51% 74.51% 0.2549 |
| BRIGHTER | Macro F1 Micro F1 Accuracy Hamming Loss |
42.47% 58.03% 42.00% 0.1322 |
33.47% 38.07% 24.66% 0.2731 |
40.83% 59.14% 49.60% 0.1174 |
| FINBERT-PT-BR | Macro F1 Micro F1 Accuracy Hamming Loss |
83.38% 84.16% 84.16% 0.1584 |
54.77% 66.34% 66.34% 0.3366 |
85.91% 86.14% 86.14% 0.1386 |
| FINANCIAL-PHRASEBANK | Macro F1 Micro F1 Accuracy Hamming Loss |
73.73% 73.58% 73.58% 0.2642 |
38.14% 39.32% 39.32% 0.6068 |
82.18% 83.69% 83.69% 0.1631 |
| GO-EMOTIONS | Macro F1 Micro F1 Accuracy Hamming Loss |
25.66% 37.06% 31.76% 0.0495 |
7.59% 10.31% 6.08% 0.0720 |
29.99% 41.84% 36.55% 0.0464 |
| Mean | Macro F1 Micro F1 Accuracy Hamming Loss |
53.75% 63.08% 58.81% 0.1957 |
32.92% 38.22% 34.70% 0.3835 |
59.68% 69.07% 66.10% 0.1441 |
| Normalized Mean | Macro F1 Micro F1 Accuracy Hamming Loss |
77.38% 78.81% 74.75% 0.1898 |
21.92% 13.58% 14.15% 0.7757 |
88.23% 93.07% 93.47% 0.0548 |
🚀 How to Use (vLLM or Transformers)
You can run inference with transformers or vLLM (Guided Decoding recommended to enforce strict JSON output). All prompts are in Portuguese to match the training distribution:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
messages = [
{"role": "system", "content": 'Você é um analista financeiro. Classifique o sentimento da frase sobre finanças em português fornecida em uma das seguintes opções: \'positivo\', \'negativo\', \'neutro\'. Sua tarefa é retornar um JSON válido no seguinte formato: {"sentimento": "positivo/negativo/neutro"}. Responda APENAS com o JSON válido.'},
{"role": "user", "content": 'Frase: O lucro operacional líquido da empresa cresceu consideravelmente no último trimestre.'},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
# Expected output: {"sentimento": "positivo"}
📚 Citation (BibTeX)
If you use this model or the evaluation benchmarks in your research, please cite our ENIAC 2026 paper:
@inproceedings{unitedexperts2026assaoka,
author = {Jo{\~a}o Assaoka and Evangelos Milios and Vlado Keselj and Jos{\'e} Vitor Sousa Cardoso Requena and Diego de Almeida Miranda and Lilian Berton},
title = {United Experts: Efficient Multi-Task Sentiment Analysis in {P}ortuguese via Model Merging},
booktitle = {Anais do XXIII Encontro Nacional de Intelig{\^e}ncia Artificial e Computacional},
location = {Cuiab{\'a}/MT},
year = {2026},
issn = {2763-9061},
pages = {3035--3046},
publisher = {SBC},
address = {Porto Alegre, RS, Brasil},
doi = {10.5753/eniac.2026.31064},
url = {https://sol.sbc.org.br/index.php/eniac/article/view/47030}
}
- Downloads last month
- 123
Model tree for Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT
Datasets used to train Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT
antoniomenezes/go_emotions_ptbr
lucas-leme/Sentiments-FinBERT-PT-BR
Collection including Assaoka/Tucano2-qwen-0.5B-TaskAdd-E-FinBERT
Evaluation results
- Macro F1 on ReLi-SAENIAC 2026 — United Experts43.520
- Macro F1 on BRIGHTER (ptbr)ENIAC 2026 — United Experts42.470
- Macro F1 on Sentiments-FinBERT-PT-BRENIAC 2026 — United Experts83.380
- Macro F1 on Financial Phrasebank PT-BRENIAC 2026 — United Experts73.730
- Macro F1 on GoEmotions PT-BRENIAC 2026 — United Experts25.660