初始化项目,由ModelHub XC社区提供模型

Model: Polygl0t/Tucano2-qwen-0.5B-Instruct
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-19 15:13:21 +08:00
commit 3ec45b7073
22 changed files with 465694 additions and 0 deletions

41
.gitattributes vendored Normal file
View File

@@ -0,0 +1,41 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
.plots/apo_gradient_norm.png filter=lfs diff=lfs merge=lfs -text
.plots/apo_reward.png filter=lfs diff=lfs merge=lfs -text
.plots/model_comparison.png filter=lfs diff=lfs merge=lfs -text
.plots/sft_gradient_norm.png filter=lfs diff=lfs merge=lfs -text
.plots/sft_loss.png filter=lfs diff=lfs merge=lfs -text
logo.png filter=lfs diff=lfs merge=lfs -text

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b39ea2d8b104d349b71878c8afd8668048ca178107b400383983cd57d239fc7
size 414325

3
.plots/apo_reward.png Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8099965316d15157ab35b83e37711903a8ecdda3038ba8a5add52598cc196eed
size 316613

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55abd38aecc6104ee780e458c815b4e7fe7c6ecdc2afc6ad651154387107a163
size 244672

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b14e9ab701e56cffaf59e94f803f54a0f68ec0c9d0aed429c73dc6122b919687
size 280284

3
.plots/sft_loss.png Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc0d770eff9b622ee97d68c0cd7a72468a6dc2954e7707b52490eedaa3baf86f
size 272714

190
LICENSE Normal file
View File

@@ -0,0 +1,190 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright Nicholas Kluge Corrêa, Shiza Fatimah, Aniket Sen, and Sophia Falk
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

640
README.md Normal file
View File

@@ -0,0 +1,640 @@
---
language:
- pt
license: apache-2.0
library_name: transformers
tags:
- text-generation-inference
datasets:
- Polygl0t/gigaverbo-v2-sft
- Polygl0t/gigaverbo-v2-preferences
metrics:
- perplexity
pipeline_tag: text-generation
widget:
- text: "<|im_start|>user\nQual é a capital de Portugal?<|im_end|><|im_start|>assistant\n"
example_title: Exemplo
- text: "<|im_start|>user\nEscreva um poema sobre a floresta amazônica.<|im_end|><|im_start|>assistant\n"
example_title: Exemplo
- text: "<|im_start|>user\nListe três benefícios da energia solar.<|im_end|><|im_start|>assistant\n"
example_title: Exemplo
inference:
parameters:
repetition_penalty: 1.2
temperature: 0.1
top_k: 50
top_p: 1.0
max_new_tokens: 150
co2_eq_emissions:
emissions: 12748
source: CodeCarbon
training_type: post-training
geographical_location: Germany
hardware_used: NVIDIA A100-SXM4-80GB
model-index:
- name: Tucano2-qwen-0.5B-Instruct
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: ARC Challenge
type: Polygl0t/ARC-poly
split: test
args:
num_few_shot: 5
metrics:
- type: acc_norm
value: 38.63
name: Acc-norm
source:
url: https://github.com/Polygl0t/lm-evaluation-harness/tree/polyglot_harness_portuguese
name: arc_challenge_poly_pt
- task:
type: text-generation
name: Text Generation
dataset:
name: MMLU
type: Polygl0t/MMLU-poly
split: test
args:
num_few_shot: 5
metrics:
- type: acc
value: 41.46
name: Acc
source:
url: https://github.com/Polygl0t/lm-evaluation-harness/tree/polyglot_harness_portuguese
name: mmlu_poly_pt
- task:
type: text-generation
name: Text Generation
dataset:
name: BELEBELE
type: facebook/belebele
split: test
args:
num_few_shot: 5
metrics:
- type: acc_norm
value: 62.33
name: Acc-norm
source:
url: https://github.com/Polygl0t/lm-evaluation-harness/tree/polyglot_harness_portuguese
name: belebele_por_Latn
- task:
type: text-generation
name: Text Generation
dataset:
name: BLUEX
type: eduagarcia-temp/BLUEX_without_images
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 40.33
name: Acc
source:
url: https://github.com/eduagarcia/lm-evaluation-harness-pt
name: bluex
- task:
type: text-generation
name: Text Generation
dataset:
name: ENEM Challenge
type: eduagarcia/enem_challenge
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 53.6
name: Acc
source:
url: https://github.com/eduagarcia/lm-evaluation-harness-pt
name: enem_challenge
- task:
type: text-generation
name: Text Generation
dataset:
name: OAB Exams
type: eduagarcia/oab_exams
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 40.73
name: Acc
source:
url: https://github.com/eduagarcia/lm-evaluation-harness-pt
name: oab_exams
- task:
type: text-generation
name: Text Generation
dataset:
name: IFEval
type: Polygl0t/IFEval-PT
split: train
args:
num_few_shot: 0
metrics:
- type: ifeval_pt_inst_level_loose_acc
value: 41.86
name: Acc-loose
- type: ifeval_pt_prompt_level_loose_acc
value: 30.0
name: Acc-loose
source:
url: https://github.com/Polygl0t/lm-evaluation-harness/tree/polyglot_harness_portuguese
name: ifeval_pt
- task:
type: text-generation
name: Text Generation
dataset:
name: GSM8K
type: Polygl0t/gsm8k-pt
split: test
args:
num_few_shot: 0
metrics:
- type: flexible-extract
value: 18.49
name: Acc-flex
source:
url: https://github.com/Polygl0t/lm-evaluation-harness/tree/polyglot_harness_portuguese
name: gsm8k_pt
- task:
type: text-generation
name: Text Generation
dataset:
name: HumanEval
type: openai/openai_humaneval
split: test
args:
num_few_shot: 0
metrics:
- type: pass@1
value: 10.36
name: pass@1
source:
url: https://github.com/Polygl0t/lm-evaluation-harness
base_model: Polygl0t/Tucano2-qwen-0.5B-Base
---
# Tucano2-qwen-0.5B-Instruct
<img src="./logo.png" alt="An illustration of a Tucano bird showing vibrant colors like yellow, orange, blue, green, and black." height="200">
## Model Summary
**[Tucano2-qwen-0.5B-Instruct](https://huggingface.co/Polygl0t/Tucano2-qwen-0.5B-Instruct)** is an instruction-tuned Portuguese language model built on top of **Tucano2-qwen-0.5B-Base**. It has been trained using a combination of one round of supervised fine-tuning (SFT) and one round of Anchored Preference Optimization (APO).
Despite its compact size, the model delivers strong performance across a wide range of Portuguese benchmarks and supports tasks such as **retrieval-augmented generation**, **function calling and tool use**, **summarization**, and **structured output generation**, among others.
**All datasets, source code, and training recipes used to develop the Tucano2 series are fully open and reproducible.**
## Details
- **Architecture:** a Transformer-based model ([`qwen3`](https://huggingface.co/docs/transformers/main/en/model_doc/qwen3))
- **Size:** 490,799,104 parameters
- **Context length:** 4,096 tokens
- **Dataset(s):**
- [Polygl0t/gigaverbo-v2-sft](https://huggingface.co/datasets/Polygl0t/gigaverbo-v2-sft)
- [Polygl0t/gigaverbo-v2-preferences](https://huggingface.co/datasets/Polygl0t/gigaverbo-v2-preferences)
- **Training time**: ~ 16 hours
- **Emissions:** 12.7 KgCO2 (Germany)
- **Total energy consumption:** 33 kWh
This repository has the [source code](https://github.com/Polygl0t/llm-foundry) used to train this model. The full configuration used for training is available in the following config files:
- Single stage Supervised Fine-Tuning (linear warmup with cosine decay): [training_config_sft.yaml](training_config_sft.yaml)
- Single stage Anchored Preference Optimization (linear warmup with cosine decay): [training_config_apo.yaml](training_config_apo.yaml)
- Training Logs (loss, lr, rewards, etc.): [train_logs_apo.parquet](train_logs_apo.parquet), [train_logs_sft.parquet](train_logs_sft.parquet)
<details>
<summary><b>SFT Loss Curve</b></summary>
![SFT Loss Curve](./.plots/sft_loss.png)
</details>
<details>
<summary><b>APO Rewards</b></summary>
![APO Rewards](./.plots/apo_reward.png)
</details>
## Intended Uses
The primary intended use Tucano2-qwen-0.5B-Instruct is to serve as foundations for research and development involving Portuguese language modeling. You may also fine-tune and adapt Tucano2-qwen-0.5B-Instruct for deployment if your use follows the Apache 2.0 license. If you decide to use Tucano2-qwen-0.5B-Instruct as a basis for your fine-tuned model, please conduct your own risk and bias assessment.
## Basic usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch
# Load model and tokenizer
model_id = "Polygl0t/Tucano2-qwen-0.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto"
)
# Configure generation parameters
generation_config = GenerationConfig(
do_sample=True,
temperature=0.1,
top_k=50,
top_p=1.0,
repetition_penalty=1.2,
max_new_tokens=150,
pad_token_id=tokenizer.eos_token_id,
)
# Prepare chat messages
messages = [
{"role": "user", "content": "Qual é a capital de Moçambique?"}
]
# Apply chat template and generate
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, generation_config=generation_config)
# Decode and print response
response = tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=True)
print(f"🤖 {response}")
```
## Limitations
Like almost all other language models trained on large text datasets scraped from the web, the Tucano2-qwen-0.5B-Instruct shows behavior that does not make it an out-of-the-box solution to many real-world applications, especially those requiring factual, reliable, and nontoxic text generation. Tucano2-qwen-0.5B-Instruct is subject to the following:
- **Hallucinations:** Tucano2-qwen-0.5B-Instruct can produce content that can be mistaken as true facts, but are misleading or entirely false, i.e., hallucination.
- **Biases and Toxicity:** Tucano2-qwen-0.5B-Instruct inherits the social and historical stereotypes from the data used to train it. Given these biases, the model can produce toxic content, i.e., harmful, offensive, or detrimental to individuals, groups, or communities.
- **Language Limitations:** Tucano2-qwen-0.5B-Instruct is primarily designed to interact with Portuguese. Other languages might challenge its comprehension, leading to potential misinterpretations or errors in response.
- **Repetition and Verbosity:** Tucano2-qwen-0.5B-Instruct may get stuck on repetition loops (especially if the repetition penalty during generations is set to a meager value) or produce verbose responses unrelated to the prompt it was given.
Hence, even though Tucano2-qwen-0.5B-Instruct is released with a permissive license, we urge users to perform their risk analysis on them if they intend to use them for real-world applications.
## Evaluations
The table below compares the Tucano2 (Instruct variant) series against other chat models of similar size. We divide our evaluations into three sets:
- **Knowledge & Reasoning:** ARC-Challenge, ENEM, BLUEX, OAB Exams, BELEBELE, MMLU, GSM8K-PT
- **Instruction Following:** IFEval-PT
- **Coding:** HumanEval
The NPM (Normalized Performance Metric) provides a balanced view of model performance across tasks, accounting for each task's inherent difficulty by normalizing its evaluation score relative to its random baseline.
| | Total Avg. | Knowledge & Reasoning (NPM) | Instruction Following | Coding |
| ------------------------------ | ---------- | --------------------------- | --------------------- | ------ |
| **Tucano2-qwen-3.7B-Instruct** | 53.64 | 56.22 | 41.67 | 47.56 |
| Jurema-7B | 53.03 | 50.66 | 47 | 75.61 |
| Qwen2.5-3B-Instruct | 51.71 | 47.34 | 63.33 | 70.73 |
| Qwen3-4B | 51.36 | 42.33 | 79.33 | 86.59 |
| Gemma-3-Gaia-PT-BR-4b-it | 49.93 | 45 | 70.33 | 64.02 |
| SmolLM3-3B | 49.54 | 43.99 | 69.67 | 68.29 |
| Llama-3.2-3B-Instruct | 45.82 | 43.08 | 62.67 | 48.17 |
| Qwen2.5-1.5B-Instruct | 41.39 | 40.25 | 42 | 48.78 |
| **Tucano2-qwen-1.5B-Instruct** | 37.54 | 39.61 | 34.33 | 26.22 |
| Qwen3-1.7B | 36.3 | 28.24 | 65 | 64.02 |
| **Tucano2-qwen-0.5B-Instruct** | 26.08 | 27.77 | 30 | 10.37 |
| Qwen3-0.6B | 22.21 | 15.13 | 55 | 39.02 |
| Llama-3.2-1B-Instruct | 20.14 | 15.37 | 44.33 | 29.27 |
| Qwen2.5-0.5B-Instruct | 17.8 | 14.98 | 31 | 24.39 |
| Tucano-2b4-Instruct | 3.78 | 2.71 | 15 | 0 |
| Tucano-1b1-Instruct | 2.59 | 1.42 | 13.33 | 0 |
| TeenyTinyLlama-460m-Chat | 0.07 | -1.68 | 12.33 | 0 |
<details>
<summary><b>Evaluation Suite</b></summary>
| **Benchmark** | **n-shot** | **Type** | **Baseline** | **Metric** |
| ------------------------- | ---------- | ------------- | ------------ | ------------------------ |
| **Knowledge & Reasoning** | | | | |
| ARC-Challenge | 5-shot | MC-Q&A | 25 | `acc_norm` |
| ENEM | 3-shot | MC-Q&A | 20 | `acc` |
| BLUEX | 3-shot | MC-Q&A | 22.5 | `acc` |
| OAB Exams | 3-shot | MC-Q&A | 25 | `acc` |
| BELEBELE | 5-shot | MC-Q&A | 25 | `acc_norm` |
| MMLU | 5-shot | MC-Q&A | 25 | `acc` |
| GSM8K-PT | 0-shot | Math Problems | 0 | `flexible-extract` |
| **Instruction Following** | | | | |
| IFEval-PT | 0-shot | Instruction | 0 | `prompt_level_loose_acc` |
| **Coding** | | | | |
| HumanEval | 0-shot | Coding | 0 | `pass@1` |
</details>
<details>
<summary><b>Individual Benchmarks</b></summary>
| | BLUEX | ENEM | OAB | ARC Challenge | BELEBELE | MMLU | IFEval-PT | GSM8K-PT | HumanEval |
| ------------------------------ | ----- | ----- | ----- | ------------- | -------- | ----- | --------- | -------- | --------- |
| **Tucano2-qwen-3.7B-Instruct** | 64.53 | 72.92 | 54.31 | 60.34 | 85.22 | 64.64 | 41.67 | 53.81 | 47.56 |
| Jurema-7B | 63.42 | 70.96 | 64.97 | 52.56 | 88.44 | 49.91 | 47 | 30.29 | 75.61 |
| Qwen2.5-3B-Instruct | 56.88 | 68.65 | 46.79 | 41.71 | 84 | 58.22 | 63.33 | 51.9 | 70.73 |
| Qwen3-4B | 63.28 | 72.15 | 50.3 | 43.08 | 83.67 | 26.93 | 79.33 | 39.88 | 86.59 |
| Gemma-3-Gaia-PT-BR-4b-it | 50.9 | 64.52 | 43.46 | 54.7 | 78.89 | 51.49 | 70.33 | 51.29 | 64.02 |
| SmolLM3-3B | 53.55 | 64.73 | 41 | 52.74 | 78.67 | 53.23 | 69.67 | 44.44 | 68.29 |
| Llama-3.2-3B-Instruct | 52.02 | 59.13 | 44.97 | 43.93 | 78.56 | 52.14 | 62.67 | 55.1 | 48.17 |
| Qwen2.5-1.5B-Instruct | 52.02 | 61.79 | 44.28 | 39.74 | 76 | 51.91 | 42 | 42.16 | 48.78 |
| **Tucano2-qwen-1.5B-Instruct** | 52.85 | 62.7 | 43.42 | 50.26 | 77.56 | 52.54 | 34.33 | 19.71 | 26.22 |
| Qwen3-1.7B | 50.49 | 58.64 | 32.62 | 36.67 | 64.89 | 30.56 | 65 | 26.94 | 64.02 |
| **Tucano2-qwen-0.5B-Instruct** | 40.33 | 53.6 | 40.73 | 38.63 | 62.33 | 41.46 | 30 | 18.49 | 10.37 |
| Qwen3-0.6B | 34.91 | 41.15 | 29.75 | 30.51 | 37.11 | 26.48 | 55 | 31.66 | 39.02 |
| Llama-3.2-1B-Instruct | 30.04 | 34.01 | 30.84 | 32.82 | 41.56 | 35.15 | 44.33 | 26.56 | 29.27 |
| Qwen2.5-0.5B-Instruct | 30.18 | 34.08 | 29.34 | 27.44 | 50.67 | 39.54 | 31 | 14.69 | 24.39 |
| Tucano-2b4-Instruct | 25.87 | 20.01 | 26.74 | 31.97 | 24 | 26.72 | 15 | 2.05 | 0 |
| Tucano-1b1-Instruct | 22.95 | 19.94 | 25.33 | 30 | 24.89 | 25.59 | 13.33 | 1.67 | 0 |
| TeenyTinyLlama-460m-Chat | 17.25 | 18.19 | 19.73 | 26.84 | 22.89 | 26.97 | 12.33 | 2.05 | 0 |
</details>
<details>
<summary><b>Inference Samples on Various Tasks</b></summary>
### Coding
**Prompt:**
<|im_start|>system
Você é um mentor técnico com foco em programação. Ensine o usuário com exemplos, analogias e linguagem acessível.<|im_end|>
<|im_start|>user
Como eu posso abrir um arquivo CSV em Python usando a biblioteca pandas?<|im_end|>
<|im_start|>assistant
**Response:**
Para abrir um arquivo CSV utilizando a biblioteca Pandas em Python, você pode seguir os passos abaixo:
1. **Importar Bibliotecas Necessárias**: Primeiro, certifique-se de ter instalado tanto `pandas` quanto `csv`. Caso contrário, instale-os via pip (`pip install pandas`) antes de prosseguirmos. Em seguida, importe as bibliotecas necessárias no início do seu script ou notebook Jupyter:
```python
import pandas as pd
import csv
```
2. **Abrir Arquivo CSV Usando Função read_csv()**: A função `pd.read_csv()` permite ler dados de arquivos CSV diretamente na memória. Aqui está como fazer isso:
```python
df = pd.read_csv('caminho/para/seuarquivo.csv')
print(df) # Imprime todos os registros presentes no DataFrame criado pelo dataframe df
```
3. **Verificar Conteúdo dos Dados Lidos**: Após carregar seus dados num objeto DataFrame, verifique se tudo foi lido corretamente através da exibição das colunas disponíveis nesse DataFrame:
```python
print(df.columns) # Exibe todas as colunas existentes nos dados
```
4. **Fechar O Arquivo Corretamente**: É importante lembrar que após terminar qualquer operação sobre esse arquivo, devemos fechar explicitamente nosso fluxo de trabalho para evitar problemas futuros relacionados à persistência desses recursos. Isso geralmente envolve chamar uma instrução `with`, onde especificamos qual método usar dependendo do contexto (como abrir/ler/gravar):
5. **Manipulação De Erros E Validação Dos Dados** : Dependendo do caso específico, talvez seja necessário validar ainda mais esses dados contra algum esquema pré-definido - por exemplo, verificar valores ausentes, duplicatas etc., além disso também poderiam ser feitas transformações básicas nestes conjuntos de dados conforme necessidades específicas exigidas pela aplicação final desejada.
Essencialmente, essa abordagem garante não só a capacidade básica de leitura mas também manipulação eficiente destes grandes volumes de informação armazenados numa única tabela unificada chamada "DataFrame". Além disto, mantém intacta toda infraestrutura subjacente responsável pelas operações realizadas durante todo este processo desde a localização inicial até mesmo eventual salvamento posterior deste conjunto particular de informações.<|im_end|>
---
### Math
**Prompt:**
<|im_start|>user
Como eu posso resolver o seguinte problema: 2x + 3 = 11?<|im_end|>
<|im_start|>assistant
**Response:**
Para resolver a equação linear 2x + 3 = 11, siga estes passos:
Etapa 1: subtraia 3 de ambos os lados da equação. Isso eliminará o termo constante no lado esquerdo e isolará x em um lado da equação.
2x + 3 - 3 = 11 - 3
2x = 8
Passo 2: Divida ambos os lados por 2. Para obter o valor de x, divida cada termo pelo coeficiente do seu lado direito (que é 2).
(2x) / 2 = 8/2
x = 4
Portanto, a solução para a equação 2x + 3 = 11 é x = 4.<|im_end|>
---
### Retrieval
**Prompt:**
<|im_start|>system
Você é um assistente que utiliza apenas dados extraídos do contexto para responder perguntas. Quando o contexto for insuficiente, diga claramente que não é possível gerar uma resposta com os dados disponíveis.<|im_end|>
<|im_start|>user
De quem o autor to texto abaixo está se referindo?
<context>
Não aceito que o Sr. Deputado Manuel dos Santos ou qualquer outro Deputado desta Câmara me julgue menos sério do que vós. Não aceito isso de ninguém e foi isso o que o Sr. Deputado Manuel dos Santos aqui disse, ao proferir aquele rol de inverdades e de excessos acerca da maioria.
</context><|im_end|>
<|im_start|>assistant
**Response:**
O autor deste trecho parece estar falando sobre si mesmo (ou possivelmente alguém próximo dele), mas também pode ser referenciado como "Sr." Manuel dos Santos na frase dada. Portanto, a resposta à pergunta seria: Sim, ele está se referindo ao Sr. Manuel dos Santos.<|im_end|>
---
### Structured Output
**Prompt:**
<|im_start|>system
Sempre responda em formato JSON estruturado conforme solicitado.<|im_end|>
<|im_start|>user
Extraia e resuma as informações principais do e-mail abaixo. Escreva sua resposta (em formato JSON) contendo as seguintes chaves: 'assunto', 'remetente', 'destinatário', 'resumo'. Aqui está o e-mail:
Assunto: RE: Atualização sobre o Projeto de Conservação de Bacias Hidrográfica
Carlos,
Obrigado por enviar o currículo atualizado. Tive a oportunidade de revisá-lo e achei que ficou ótimo! Você fez um excelente trabalho ao tornar as informações acessíveis e envolventes para uma ampla audiência.
Em relação à possível resistência dos membros da comunidade, concordo que devemos estar preparados para abordar suas preocupações. Uma ideia que tive foi incluir alguns exemplos práticos de como o uso indevido das águas no rio Amazonas ou na Baía de Guanabara e o descarte incorreto de resíduos sólidos têm prejudicado essas áreas. Ouvi-los falar diretamente sobre as consequências pode ser muito mais persuasivo do que simplesmente mostrar dados estatísticos.
Além disso, também considero importante destacarmos os ganhos econômicos trazidos pela adoção de práticas mais sustentáveis, como tarifas de água menores e gastos diminutos relacionados à limpeza urbana. No final das contas, as pessoas costumam responder bem quando veem vantagens tangíveis além dos aspectos puramente ambientais.
Diga-me o que você pensa dessas sugestões! Ficarei contente em ajudar a desenvolver ainda mais estratégias para vencer essa resistência e engajar as pessoas nessa nossa jornada.
Atenciosamente,
Helena<|im_end|>
<|im_start|>assistant
**Response:**
```json
{
"assunto": "RE: Atualização sobre o Projeto de Conservação de Bacias Hidrográficas",
"remetente": "Helena",
"destinatario": "Carlos",
"resumo": "A remetente elogia o novo currículo enviado pelo destinatário, enfocando seu potencial impacto positivo nas comunidades locais através de casos reais de poluição hídrica e redução nos custos urbanos associados."
}
```<|im_end|>
---
### Rewriting
**Prompt:**
<|im_start|>user
Remova todas as informações irrelevantes da frase a seguir.
"O novo restaurante que abriu no centro da cidade, de propriedade do primo de Jorge, que costumava ser chef de um restaurante em Ipanema, serve uma variedade de cozinhas de todo o mundo."<|im_end|>
<|im_start|>assistant
**Response:**
O novo restaurante localizado no centro da cidade, de propriedade do primo de Jorge, anteriormente conhecido como chefe de um estabelecimento em Ipanema, oferece diversas culinárias internacionais.<|im_end|>
---
### Function Call / Tool Use
**Prompt:**
<|im_start|>system
Utilize as ferramentas para resolver as tarefas que o usuário lhe solicitar. Se as ferramentas forem insuficientes, explique ao usuário que não é possível completar a tarefa.
\# Tools / Ferramentas
Você pode chamar uma ou mais funções para auxiliar na consulta do usuário.
Você recebe assinaturas de funções dentro de tags XML <tools></tools>:
<tools>
{"type": "function", "function": {"name": "create_todo", "description": "Cria uma nova tarefa no aplicativo de todo.", "parameters": {"type": "object", "properties": {"task_description": {"type": "string", "description": "Descrição da tarefa a ser criada."}, "due_date": {"type": "string", "description": "Data de entrega da tarefa no formato YYYY-MM-DD."}}, "required": ["task_description", "due_date"]}}}
</tools>
Para cada chamada de função, retorne um objeto json com o nome da função e os argumentos dentro das tags XML <tool_call></tool_call>:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call><|im_end|>
<|im_start|>user
Eu preciso criar uma nova tarefa para o meu projeto.<|im_end|>
<|im_start|>assistant
Claro, eu posso ajudar com isso. Você poderia, por favor, me fornecer a descrição da tarefa e a data de entrega?<|im_end|>
<|im_start|>user
A tarefa é finalizar o relatório do projeto e a data de entrega é 2022-03-15.<|im_end|>
<|im_start|>assistant
**Response:**
<tool_call>
{"name": "create_todo", "arguments": {"task_description": "Finalize the project report", "due_date": "2022-03-15"}}
</tool_call><|im_end|>
---
### System Prompts / Steering
**Prompt:**
<|im_start|>system
Você é Jack Sparrow, o famoso pirata dos filmes. Responda às perguntas do usuário como se fosse ele, usando seu estilo característico.<|im_end|>
<|im_start|>user
Quais são os melhores lugares para encontrar um tesouro escondido?<|im_end|>
<|im_start|>assistant
**Response:**
Bem, meu amigo, você está procurando por uma aventura de tesouros, certo? Tudo bem então! Eu tenho algumas dicas que podem te ajudar a descobrir esse suposto tesouro oculto:
1. Ilhas Desabitadas: Essas são geralmente as mais procuradas pelos buscadores de tesouros. Elas estão vazias e intocadas pelo homem civilizado, tornando-as perfeitas para esconder algo valioso ou misterioso.
2. O Mar das Trevas (Deep Blue Sea): Este mar profundo tem sido objeto de muita especulação sobre ser lar de riquezas escondidas. Se estiver interessado nisso, pode querer dar uma olhada nos livros "O Livro da Vida Marinha" ou assistir ao filme "A Ilha Perdida".
3. As Terras Altas Escocesas: Há rumores de haver ouro nas montanhas névoas lá em cima. Mas lembre-se, não há nenhum lugar real onde possa encontrá-lo; apenas lendas urbanas.
4. A Floresta Amazônica: Alguns dizem que existe um lendário baú cheio de moedas de ouro enterrado sob árvores antigas na selva amazônica. Claro, isso só serve pra aumentar suas expectativas... mas quem sabe? Talvez seja verdade algum dia.
5. Os Lagos Mediterrâneos: Dizem estar cheios de pepinos gigantes com pregos no fundo. Embora eles possam parecer bizarros à primeira vista, esses lagos têm histórias próprias e segredos esperando serem descobertos.
Lembre-se, estas são meros contos de fogueiras e nada além disso. Boa sorte nessa busca pela fortuna perdida!<|im_end|>
---
### Similarity Scoring
**Prompt:**
<|im_start|>user
Frase 1: O artista pintou um quadro inspirado nos campos floridos da primavera.
Frase 2: O criador produziu uma obra que representava paisagens urbanas cinzentas.
Pergunta: Qu\u00e3o similares s\u00e3o as duas frases? D\u00ea uma pontua\u00e7\u00e3o entre 1,0 a 5,0.
Resposta:<|im_end|>
<|im_start|>assistant
**Response:**
2.5. As duas frases tratam sobre obras de arte, mas diferem significativamente nas descrições - uma fala sobre flores na primavera enquanto outra menciona cidades cinzentas, resultando numa pontuação média de similaridade de 2.5.<|im_end|>
---
### Classification
**Prompt:**
<|im_start|>user
Classifique o sentimento da seguinte resenha de filme como 'Positiva', 'Negativa' ou 'Neutra':
"O filme foi uma experiência cinematográfica incrível, com atuações excepcionais e uma trama envolvente que me manteve na ponta da cadeira do começo ao fim."<|im_end|>
<|im_start|>assistant
**Response:**
Sentimento: Positivo.<|im_end|>
---
</details>
Below, we compare the performance of Tucano2-qwen-0.5B-Instruct with Qwen3-0.6B, a strong baseline in the 0.5B parameter range. The percentages represent the absolute difference in performance between the two models on each benchmark. All other plots can be found in the [.plots](https://huggingface.co/Polygl0t/Tucano2-qwen-0.5B-Instruct/tree/main/.plots/) folder.
**Tucano2-qwen-0.5B-Instruct vs Qwen3-0.6B**
![Performance Comparison](./.plots/model_comparison.png)
## Cite as 🤗
```latex
@misc{correa2026tucano2cool,
title={{Tucano 2 Cool: Better Open Source LLMs for Portuguese}},
author={Nicholas Kluge Corr{\^e}a and Aniket Sen and Shiza Fatimah and Sophia Falk and Lennard Landgraf and Julia Kastner and Lucie Flek},
year={2026},
eprint={2603.03543},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.03543},
}
```
## Aknowlegments
Polyglot is a project funded by the Federal Ministry of Education and Research (BMBF) and the Ministry of Culture and Science of the State of North Rhine-Westphalia (MWK) as part of TRA Sustainable Futures (University of Bonn) and the Excellence Strategy of the federal and state governments.
We also gratefully acknowledge the granted access to the [Marvin cluster](https://www.hpc.uni-bonn.de/en/systems/marvin) hosted by [University of Bonn](https://www.uni-bonn.de/en) along with the support provided by its High Performance Computing & Analytics Lab.
## License
Tucano2-qwen-0.5B-Instruct is licensed under the Apache License, Version 2.0. For more details, see the [LICENSE](LICENSE) file.

83
chat_template.jinja Normal file
View File

@@ -0,0 +1,83 @@
{#- Handle tool/function calling setup #}
{%- if tools %}
{{- '<|im_start|>system\n' }}
{#- Include system message if present #}
{%- if messages[0].role == 'system' %}
{{- messages[0].content + '\n\n' }}
{%- endif %}
{#- Add tool calling instructions in Portuguese #}
{{- "# Tools / Ferramentas\n\nVocê pode chamar uma ou mais funções para auxiliar na consulta do usuário.\n\nVocê recebe assinaturas de funções dentro de tags XML <tools></tools>:\n<tools>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\n</tools>\n\nPara cada chamada de função, retorne um objeto json com o nome da função e os argumentos dentro das tags XML <tool_call></tool_call>:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
{%- else %}
{#- Standard system message without tools #}
{%- if messages[0].role == 'system' %}
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{#- Process each message in the conversation #}
{%- for message in messages %}
{#- Normalize content to string #}
{%- if message.content is string %}
{%- set content = message.content %}
{%- else %}
{%- set content = '' %}
{%- endif %}
{#- Handle user messages and non-first system messages #}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
{#- Handle assistant messages without reasoning #}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{% generation %}
{{- content }}
{#- Add tool calls if present #}
{%- if message.tool_calls %}
{%- for tool_call in message.tool_calls %}
{%- if (loop.first and content) or (not loop.first) %}
{{- '\n' }}
{%- endif %}
{#- Normalize tool call format #}
{%- if tool_call.function %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{%- if tool_call.arguments is string %}
{{- tool_call.arguments }}
{%- else %}
{{- tool_call.arguments | tojson }}
{%- endif %}
{{- '}\n</tool_call>' }}
{%- endfor %}
{%- endif %}
{{- '<|im_end|>' }}
{% endgeneration %}
{#- Handle tool response messages #}
{%- elif message.role == "tool" %}
{#- Group consecutive tool responses under one user message #}
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- content }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{#- Add generation prompt if requested #}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- endif %}

61
config.json Normal file
View File

@@ -0,0 +1,61 @@
{
"architectures": [
"Qwen3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 1,
"dtype": "bfloat16",
"eos_token_id": 2,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 1024,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 4096,
"max_window_layers": 28,
"model_type": "qwen3",
"num_attention_heads": 16,
"num_hidden_layers": 28,
"num_key_value_heads": 8,
"pad_token_id": 49109,
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000,
"sliding_window": null,
"tie_word_embeddings": true,
"transformers_version": "4.57.3",
"use_cache": false,
"use_sliding_window": false,
"vocab_size": 49152
}

207
evals.yaml Normal file
View File

@@ -0,0 +1,207 @@
evaluations:
arc_challenge_poly_pt_acc: 0.352991452991453
arc_challenge_poly_pt_acc_norm: 0.38632478632478634
arc_challenge_poly_pt_acc_norm_stderr: 0.014240929032392555
arc_challenge_poly_pt_acc_stderr: 0.013977511178298731
arc_challenge_poly_pt_alias: arc_challenge_poly_pt
assin2_rte_acc,all: 0.8929738562091504
assin2_rte_acc_stderr,all: 0.004411530421702684
assin2_rte_alias: assin2_rte
assin2_rte_f1_macro,all: 0.8929452735255472
assin2_rte_f1_macro_stderr,all: 0.004413430512294061
assin2_sts_alias: assin2_sts
assin2_sts_mse,all: 0.8459722222222222
assin2_sts_mse_stderr,all: N/A
assin2_sts_pearson,all: 0.5030690041913517
assin2_sts_pearson_stderr,all: 0.011288134306476946
assin_entailment_acc: 0.70525
assin_entailment_acc_stderr: 0.007209792275174285
assin_entailment_alias: assin_entailment
assin_paraphrase_acc: 0.69825
assin_paraphrase_acc_stderr: 0.007258609111018215
assin_paraphrase_alias: assin_paraphrase
belebele_por_Latn_acc: 0.6233333333333333
belebele_por_Latn_acc_norm: 0.6233333333333333
belebele_por_Latn_acc_norm_stderr: 0.016160653713997004
belebele_por_Latn_acc_stderr: 0.016160653713997004
belebele_por_Latn_alias: belebele_por_Latn
bluex_acc,all: 0.40333796940194716
bluex_acc,exam_id__UNICAMP_2018: 0.2962962962962963
bluex_acc,exam_id__UNICAMP_2019: 0.36
bluex_acc,exam_id__UNICAMP_2020: 0.4
bluex_acc,exam_id__UNICAMP_2021_1: 0.41304347826086957
bluex_acc,exam_id__UNICAMP_2021_2: 0.3333333333333333
bluex_acc,exam_id__UNICAMP_2022: 0.46153846153846156
bluex_acc,exam_id__UNICAMP_2023: 0.4883720930232558
bluex_acc,exam_id__UNICAMP_2024: 0.4666666666666667
bluex_acc,exam_id__USP_2018: 0.3333333333333333
bluex_acc,exam_id__USP_2019: 0.45
bluex_acc,exam_id__USP_2020: 0.4107142857142857
bluex_acc,exam_id__USP_2021: 0.4230769230769231
bluex_acc,exam_id__USP_2022: 0.3673469387755102
bluex_acc,exam_id__USP_2023: 0.4090909090909091
bluex_acc,exam_id__USP_2024: 0.5121951219512195
bluex_acc_stderr,all: 0.010516220290583876
bluex_acc_stderr,exam_id__UNICAMP_2018: 0.0358436954826324
bluex_acc_stderr,exam_id__UNICAMP_2019: 0.0394709635049564
bluex_acc_stderr,exam_id__UNICAMP_2020: 0.038090964110030476
bluex_acc_stderr,exam_id__UNICAMP_2021_1: 0.041990517186998776
bluex_acc_stderr,exam_id__UNICAMP_2021_2: 0.03818899745793331
bluex_acc_stderr,exam_id__UNICAMP_2022: 0.046109614865865844
bluex_acc_stderr,exam_id__UNICAMP_2023: 0.04411333155530449
bluex_acc_stderr,exam_id__UNICAMP_2024: 0.042938801698654536
bluex_acc_stderr,exam_id__USP_2018: 0.036947905283078404
bluex_acc_stderr,exam_id__USP_2019: 0.045372630608773945
bluex_acc_stderr,exam_id__USP_2020: 0.037832930915152975
bluex_acc_stderr,exam_id__USP_2021: 0.039528870694831665
bluex_acc_stderr,exam_id__USP_2022: 0.039697954399404815
bluex_acc_stderr,exam_id__USP_2023: 0.04283372427132068
bluex_acc_stderr,exam_id__USP_2024: 0.04496015455368913
bluex_alias: bluex
calame_pt_acc: 0.30009633911368017
calame_pt_acc_stderr: 0.010060983361463095
calame_pt_alias: calame_pt
calame_pt_perplexity: 40.330510797408564
calame_pt_perplexity_stderr: 2.812293830784164
enem_challenge_acc,all: 0.5360391882435269
enem_challenge_acc,exam_id__2009: 0.4956521739130435
enem_challenge_acc,exam_id__2010: 0.5555555555555556
enem_challenge_acc,exam_id__2011: 0.5555555555555556
enem_challenge_acc,exam_id__2012: 0.5344827586206896
enem_challenge_acc,exam_id__2013: 0.6296296296296297
enem_challenge_acc,exam_id__2014: 0.5504587155963303
enem_challenge_acc,exam_id__2015: 0.453781512605042
enem_challenge_acc,exam_id__2016: 0.5041322314049587
enem_challenge_acc,exam_id__2016_2: 0.5528455284552846
enem_challenge_acc,exam_id__2017: 0.4827586206896552
enem_challenge_acc,exam_id__2022: 0.5263157894736842
enem_challenge_acc,exam_id__2023: 0.5925925925925926
enem_challenge_acc_stderr,all: 0.0076181405479343375
enem_challenge_acc_stderr,exam_id__2009: 0.02694086035194982
enem_challenge_acc_stderr,exam_id__2010: 0.026490028965817942
enem_challenge_acc_stderr,exam_id__2011: 0.026490390134681466
enem_challenge_acc_stderr,exam_id__2012: 0.026706675890852467
enem_challenge_acc_stderr,exam_id__2013: 0.026844859183194552
enem_challenge_acc_stderr,exam_id__2014: 0.027471406425669677
enem_challenge_acc_stderr,exam_id__2015: 0.02625010092250836
enem_challenge_acc_stderr,exam_id__2016: 0.026323579775844996
enem_challenge_acc_stderr,exam_id__2016_2: 0.025854198995497416
enem_challenge_acc_stderr,exam_id__2017: 0.02675016875866561
enem_challenge_acc_stderr,exam_id__2022: 0.02494321437851413
enem_challenge_acc_stderr,exam_id__2023: 0.024375802527465587
enem_challenge_alias: enem
faquad_nli_acc,all: 0.5461538461538461
faquad_nli_acc_stderr,all: 0.013824178717859308
faquad_nli_alias: faquad_nli
faquad_nli_f1_macro,all: 0.5378749719832936
faquad_nli_f1_macro_stderr,all: 0.013886770545945497
global_piqa_completions_por_latn_braz_acc: 0.66
global_piqa_completions_por_latn_braz_acc_bytes: 0.63
global_piqa_completions_por_latn_braz_acc_bytes_stderr: 0.048523658709390974
global_piqa_completions_por_latn_braz_acc_norm: 0.62
global_piqa_completions_por_latn_braz_acc_norm_stderr: 0.04878317312145634
global_piqa_completions_por_latn_braz_acc_stderr: 0.04760952285695234
global_piqa_completions_por_latn_braz_alias: global_piqa_completions_por_latn_braz
gsm8k_pt_alias: gsm8k_pt
gsm8k_pt_exact_match,flexible-extract: 0.18493150684931506
gsm8k_pt_exact_match,strict-match: 0.0
gsm8k_pt_exact_match_stderr,flexible-extract: 0.010714456449924532
gsm8k_pt_exact_match_stderr,strict-match: 0.0
hatebr_offensive_acc,all: 0.8514285714285714
hatebr_offensive_acc_stderr,all: 0.0067137369109427445
hatebr_offensive_alias: hatebr_offensive_binary
hatebr_offensive_f1_macro,all: 0.8513918743199851
hatebr_offensive_f1_macro_stderr,all: 0.006717339873214156
hellaswag_poly_pt_acc: 0.38129808213240873
hellaswag_poly_pt_acc_norm: 0.47827500270885254
hellaswag_poly_pt_acc_norm_stderr: 0.005200030264123482
hellaswag_poly_pt_acc_stderr: 0.005056141839024339
hellaswag_poly_pt_alias: hellaswag_poly_pt
humaneval_instruct_alias: humaneval_instruct
humaneval_instruct_pass@1,create_test: 0.10365853658536585
humaneval_instruct_pass@1_stderr,create_test: 0.023875115311878508
ifeval_pt_alias: ifeval_pt
ifeval_pt_inst_level_loose_acc: 0.4186046511627907
ifeval_pt_inst_level_loose_acc_stderr: N/A
ifeval_pt_inst_level_strict_acc: 0.37906976744186044
ifeval_pt_inst_level_strict_acc_stderr: N/A
ifeval_pt_prompt_level_loose_acc: 0.3
ifeval_pt_prompt_level_loose_acc_stderr: 0.02650171951258532
ifeval_pt_prompt_level_strict_acc: 0.26666666666666666
ifeval_pt_prompt_level_strict_acc_stderr: 0.02557404853322572
lambada_poly_pt_acc: 0.36425383271880457
lambada_poly_pt_acc_stderr: 0.006704339729529026
lambada_poly_pt_alias: lambada_poly_pt
lambada_poly_pt_perplexity: 34.54764793589513
lambada_poly_pt_perplexity_stderr: 1.5172274553216532
mmlu_poly_pt_acc: 0.41459021314920447
mmlu_poly_pt_acc_stderr: 0.004268138446999436
mmlu_poly_pt_alias: mmlu_poly_pt
oab_exams_acc,all: 0.40728929384965834
oab_exams_acc,exam_id__2010-01: 0.4
oab_exams_acc,exam_id__2010-02: 0.5
oab_exams_acc,exam_id__2011-03: 0.3434343434343434
oab_exams_acc,exam_id__2011-04: 0.35
oab_exams_acc,exam_id__2011-05: 0.45
oab_exams_acc,exam_id__2012-06: 0.3625
oab_exams_acc,exam_id__2012-06a: 0.525
oab_exams_acc,exam_id__2012-07: 0.425
oab_exams_acc,exam_id__2012-08: 0.425
oab_exams_acc,exam_id__2012-09: 0.33766233766233766
oab_exams_acc,exam_id__2013-10: 0.45
oab_exams_acc,exam_id__2013-11: 0.3875
oab_exams_acc,exam_id__2013-12: 0.4125
oab_exams_acc,exam_id__2014-13: 0.4
oab_exams_acc,exam_id__2014-14: 0.375
oab_exams_acc,exam_id__2014-15: 0.4230769230769231
oab_exams_acc,exam_id__2015-16: 0.475
oab_exams_acc,exam_id__2015-17: 0.41025641025641024
oab_exams_acc,exam_id__2015-18: 0.3875
oab_exams_acc,exam_id__2016-19: 0.4358974358974359
oab_exams_acc,exam_id__2016-20: 0.4125
oab_exams_acc,exam_id__2016-20a: 0.2875
oab_exams_acc,exam_id__2016-21: 0.3625
oab_exams_acc,exam_id__2017-22: 0.4625
oab_exams_acc,exam_id__2017-23: 0.375
oab_exams_acc,exam_id__2017-24: 0.3625
oab_exams_acc,exam_id__2018-25: 0.45
oab_exams_acc_stderr,all: 0.006075587781828954
oab_exams_acc_stderr,exam_id__2010-01: 0.030623794065745072
oab_exams_acc_stderr,exam_id__2010-02: 0.028916493865834454
oab_exams_acc_stderr,exam_id__2011-03: 0.02741417034369018
oab_exams_acc_stderr,exam_id__2011-04: 0.030903722521126956
oab_exams_acc_stderr,exam_id__2011-05: 0.032119480960382765
oab_exams_acc_stderr,exam_id__2012-06: 0.03092116447159791
oab_exams_acc_stderr,exam_id__2012-06a: 0.0323716859938887
oab_exams_acc_stderr,exam_id__2012-07: 0.03197065291082094
oab_exams_acc_stderr,exam_id__2012-08: 0.03199897400280611
oab_exams_acc_stderr,exam_id__2012-09: 0.03113015227112767
oab_exams_acc_stderr,exam_id__2013-10: 0.03220496656457049
oab_exams_acc_stderr,exam_id__2013-11: 0.03141807801888442
oab_exams_acc_stderr,exam_id__2013-12: 0.031705964116907834
oab_exams_acc_stderr,exam_id__2014-13: 0.031523570709171646
oab_exams_acc_stderr,exam_id__2014-14: 0.031348698849557335
oab_exams_acc_stderr,exam_id__2014-15: 0.032308173836725206
oab_exams_acc_stderr,exam_id__2015-16: 0.032275444416125405
oab_exams_acc_stderr,exam_id__2015-17: 0.032242261750832044
oab_exams_acc_stderr,exam_id__2015-18: 0.031327883513865735
oab_exams_acc_stderr,exam_id__2016-19: 0.03247625408703544
oab_exams_acc_stderr,exam_id__2016-20: 0.031762853683104365
oab_exams_acc_stderr,exam_id__2016-20a: 0.02914121034414819
oab_exams_acc_stderr,exam_id__2016-21: 0.030958650868779976
oab_exams_acc_stderr,exam_id__2017-22: 0.032214831966249774
oab_exams_acc_stderr,exam_id__2017-23: 0.03125268775237781
oab_exams_acc_stderr,exam_id__2017-24: 0.030936224842605275
oab_exams_acc_stderr,exam_id__2018-25: 0.03208477618412235
oab_exams_alias: oab_exams
portuguese_hate_speech_acc,all: 0.7297297297297297
portuguese_hate_speech_acc_stderr,all: 0.010726825349374063
portuguese_hate_speech_alias: portuguese_hate_speech_binary
portuguese_hate_speech_f1_macro,all: 0.6842412627123019
portuguese_hate_speech_f1_macro_stderr,all: 0.012055600214659706
tweetsentbr_acc,all: 0.5796019900497512
tweetsentbr_acc_stderr,all: 0.007813148658084126
tweetsentbr_alias: tweetsentbr
tweetsentbr_f1_macro,all: 0.5404009095352119
tweetsentbr_f1_macro_stderr,all: 0.008133081854048629
step: 69750

13
generation_config.json Normal file
View File

@@ -0,0 +1,13 @@
{
"bos_token_id": 1,
"do_sample": true,
"eos_token_id": [
2
],
"max_new_tokens": 1024,
"pad_token_id": 49109,
"renormalize_logits": true,
"repetition_penalty": 1.2,
"temperature": 0.1,
"transformers_version": "4.57.3"
}

3
logo.png Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1856d91c3b35390cee5122902d94044657c67df7034ca4005316275c404fc8a0
size 197189

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:725a1d74d10eb15ac0d248ee81788601062726db65a6f55f2c938cd89a98b663
size 981633328

82
ruler.yaml Normal file
View File

@@ -0,0 +1,82 @@
model_name: Tucano2-qwen-0.5B-Instruct
results:
niah_pt_multikey_1_1024: 0.658
niah_pt_multikey_1_1024_stderr: 0.021236147199899316
niah_pt_multikey_1_2048: 0.556
niah_pt_multikey_1_2048_stderr: 0.022242244375731048
niah_pt_multikey_1_4096: 0.42
niah_pt_multikey_1_4096_stderr: N/A
niah_pt_multikey_1_alias: " - niah_pt_multikey_1"
niah_pt_multikey_2_1024: 0.596
niah_pt_multikey_2_1024_stderr: 0.021966635293832883
niah_pt_multikey_2_2048: 0.366
niah_pt_multikey_2_2048_stderr: 0.021564276850201684
niah_pt_multikey_2_4096: 0.184
niah_pt_multikey_2_4096_stderr: N/A
niah_pt_multikey_2_alias: " - niah_pt_multikey_2"
niah_pt_multikey_3_1024: 0.406
niah_pt_multikey_3_1024_stderr: 0.021983962090086417
niah_pt_multikey_3_2048: 0.11
niah_pt_multikey_3_2048_stderr: 0.01400686919941566
niah_pt_multikey_3_4096: 0.038
niah_pt_multikey_3_4096_stderr: N/A
niah_pt_multikey_3_alias: " - niah_pt_multikey_3"
niah_pt_multiquery_1024: 0.554
niah_pt_multiquery_1024_stderr: 0.014700346948313894
niah_pt_multiquery_2048: 0.4545
niah_pt_multiquery_2048_stderr: 0.014300997764986478
niah_pt_multiquery_4096: 0.395
niah_pt_multiquery_4096_stderr: N/A
niah_pt_multiquery_alias: " - niah_pt_multiquery"
niah_pt_multivalue_1024: 0.4885
niah_pt_multivalue_1024_stderr: 0.014608638699389432
niah_pt_multivalue_2048: 0.4675
niah_pt_multivalue_2048_stderr: 0.014090229563008424
niah_pt_multivalue_4096: 0.4145
niah_pt_multivalue_4096_stderr: N/A
niah_pt_multivalue_alias: " - niah_pt_multivalue"
niah_pt_single_1_1024: 0.602
niah_pt_single_1_1024_stderr: 0.021912377885779953
niah_pt_single_1_2048: 0.608
niah_pt_single_1_2048_stderr: 0.02185468495561119
niah_pt_single_1_4096: 0.522
niah_pt_single_1_4096_stderr: N/A
niah_pt_single_1_alias: " - niah_pt_single_1"
niah_pt_single_2_1024: 0.518
niah_pt_single_2_1024_stderr: 0.022368565117387874
niah_pt_single_2_2048: 0.4
niah_pt_single_2_2048_stderr: 0.02193084412072858
niah_pt_single_2_4096: 0.316
niah_pt_single_2_4096_stderr: N/A
niah_pt_single_2_alias: " - niah_pt_single_2"
niah_pt_single_3_1024: 0.63
niah_pt_single_3_1024_stderr: 0.021613289165165816
niah_pt_single_3_2048: 0.596
niah_pt_single_3_2048_stderr: 0.021966635293832883
niah_pt_single_3_4096: 0.522
niah_pt_single_3_4096_stderr: N/A
niah_pt_single_3_alias: " - niah_pt_single_3"
ruler_pt_4096: 0.38164545454545457
ruler_pt_4096_stderr: N/A
ruler_pt_alias: ruler_pt
ruler_pt_cwe_1024: 0.4992
ruler_pt_cwe_1024_stderr: 0.016325801161570425
ruler_pt_cwe_2048: 0.32839999999999997
ruler_pt_cwe_2048_stderr: 0.013636671059873462
ruler_pt_cwe_4096: 0.1778
ruler_pt_cwe_4096_stderr: N/A
ruler_pt_cwe_alias: " - ruler_pt_cwe"
ruler_pt_fwe_1024: 0.8353333333333334
ruler_pt_fwe_1024_stderr: 0.009076286695702566
ruler_pt_fwe_2048: 0.6906666666666667
ruler_pt_fwe_2048_stderr: 0.010496640893696112
ruler_pt_fwe_4096: 0.594
ruler_pt_fwe_4096_stderr: N/A
ruler_pt_fwe_alias: " - ruler_pt_fwe"
ruler_pt_vt_1024: 0.8847999999999999
ruler_pt_vt_1024_stderr: 0.009025566003490679
ruler_pt_vt_2048: 0.7112
ruler_pt_vt_2048_stderr: 0.013468181161820449
ruler_pt_vt_4096: 0.6147999999999999
ruler_pt_vt_4096_stderr: N/A
ruler_pt_vt_alias: " - ruler_pt_vt"

30
special_tokens_map.json Normal file
View File

@@ -0,0 +1,30 @@
{
"bos_token": {
"content": "<|im_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<|unk|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

463711
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

397
tokenizer_config.json Normal file
View File

@@ -0,0 +1,397 @@
{
"add_bos_token": false,
"add_eos_token": false,
"add_prefix_space": null,
"added_tokens_decoder": {
"0": {
"content": "<|unk|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<|im_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"49109": {
"content": "<|pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"49110": {
"content": "<tools>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49111": {
"content": "</tools>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49112": {
"content": "<tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49113": {
"content": "</tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49114": {
"content": "<tool_response>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49115": {
"content": "</tool_response>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49116": {
"content": "<think>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49117": {
"content": "</think>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49118": {
"content": "<answer>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49119": {
"content": "</answer>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49120": {
"content": "<context>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49121": {
"content": "</context>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49122": {
"content": "<|fim_prefix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49123": {
"content": "<|fim_suffix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49124": {
"content": "<|fim_middle|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49125": {
"content": "<|repo_name|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49126": {
"content": "<|image|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49127": {
"content": "<|image_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49128": {
"content": "<|image_placeholder|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49129": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49130": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49131": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49132": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49133": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49134": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49135": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49136": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49137": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49138": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49139": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49140": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49141": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49142": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49143": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49144": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49145": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49146": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49147": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49148": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"49149": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49150": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"49151": {
"content": " ",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
}
},
"bos_token": "<|im_start|>",
"bos_token_id": 1,
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"eos_token_id": 2,
"extra_special_tokens": {},
"legacy": false,
"model_input_names": [
"input_ids",
"attention_mask"
],
"model_max_length": 4096,
"pad_token": "<|pad|>",
"pad_token_id": 49109,
"padding_side": "right",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "PreTrainedTokenizerFast",
"truncation_side": "right",
"unk_token": "<|unk|>",
"unk_token_id": 0,
"use_default_system_prompt": false
}

3
train_logs_apo.parquet Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fcb6cfcf86d05ba279f6d2d0a668fe2ade29e03d72b27721179f5c7ac4c0a0ae
size 90162

3
train_logs_sft.parquet Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:69c1ac4c1bb0830e3b67c4239ce61b09879483522604812f5d24d2b561817d77
size 1324771

102
training_config_apo.yaml Normal file
View File

@@ -0,0 +1,102 @@
# Directory settings
checkpoint_dir: "/polyglot/portuguese/checkpoints/models/Tucano2-qwen-0.5B-Instruct"
train_dataset_dir:
# Total: 28,437 samples (x5 epochs)
# Harmfull samples (without reasoning): 4,267 samples
- /polyglot/portuguese/gigaverbo-v2-dpo/harmfull-no-reasoning
# Harmfull samples (with reasoning, stripped): 4,008 samples
- /polyglot/portuguese/gigaverbo-v2-dpo/harmfull-reasoning-stripped
# Harmless samples (without reasoning): 10,521 samples
- /polyglot/portuguese/gigaverbo-v2-dpo/harmless-no-reasoning
# Harmless samples (with reasoning, stripped): 9,641 samples
- /polyglot/portuguese/gigaverbo-v2-dpo/harmless-reasoning-stripped
val_dataset_dir: null
dataset_type: "jsonl"
cache_dir: "/lustre/mlnvme/data/polyglot/.cache"
# Data loading settings
pin_memory: true
num_workers_for_dataloader: 16
shuffle_dataset: true
mask_eos_token: false
mask_pad_token: false
# Model architecture settings
vocab_size: 49152
num_hidden_layers: 28
num_attention_heads: 16
num_key_value_heads: 8
head_dim: 128
hidden_size: 1024
intermediate_size: 3072
max_position_embeddings: 4096
tie_word_embeddings: true
hidden_act: "silu"
output_hidden_states: false
attn_implementation: "flash_attention_2"
use_cache: false
no_rope_layer_interval: null
rope_theta: 1000000.0
rope_scale_factor: null
rms_norm_eps: 0.000001
# Training settings
total_batch_size: 524288
micro_batch_size: 4
gradient_accumulation_steps: 4
eval_micro_batch_size: null
num_train_epochs: 5
warmup_ratio: 0.1
max_learning_rate: 0.000005
min_learning_rate: 0.0
muon_learning_rate: null
weight_decay: 0.0
beta1: 0.9
beta2: 0.95
eps: 0.00000001
lr_decay_type: "cosine"
use_sqrt: false
lr_decay_iters_coef: 1.
seed: 42
max_steps: 1115
max_grad_norm: 1.0
# APO settings
loss_type: "apo_zero"
dpo_beta: 0.5
precompute_ref_log_probs: true
truncation_mode: "keep_end"
# Precision and optimization settings
torch_compile: false
mat_mul_precision: "highest"
tf32: true
bf16: true
gradient_checkpointing: false
use_liger_kernel: false
static_graph: false
# Hub settings
push_to_hub: false
hub_token: null
hub_model_id: null
# Tokenizer and Reference model
tokenizer_name_or_path: "/polyglot/portuguese/checkpoints/models/Tucano2-qwen-0.5B-Instruct-SFT"
chat_template_path: null
reference_model: "/polyglot/portuguese/checkpoints/models/Tucano2-qwen-0.5B-Instruct-SFT"
continual_pretraining: true
# Checkpoint settings
resume_from_checkpoint: null
checkpointing_steps: 1000
begin_new_stage: true
stage_name: "single_cosine"
# Miscellaneous settings
sanity_check: false
sanity_check_num_samples: 100000
wandb_token: null
wandb_id: "tucano2-qwen-0.5b-instruct-apo"
wandb_project: "Polyglot"
wandb_desc: "Developing LLMs for low-resource languages"

110
training_config_sft.yaml Normal file
View File

@@ -0,0 +1,110 @@
# Directory settings
checkpoint_dir: "/polyglot/portuguese/checkpoints/models/Tucano2-qwen-0.5B-Instruct-SFT"
train_dataset_dir:
# Total: ~874 million tokens (x5 epochs)
# Coding: ~2.3 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/code
# Function Calling: ~17.5 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/function_call
# General Instruction Following: ~700 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/general
# Math and CoT: ~27 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/math_cot
# Retrieval Augmented Generation: ~2.2 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/retrieval
# Structured Outputs: ~35 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/structured
# Summarization: ~290 thousand tokens
- /polyglot/portuguese/gigaverbo-v2-sft/summarization
# Translation: ~5.7 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/translation
# Chosen Data from Preference Dataset: ~14 million tokens
- /polyglot/portuguese/gigaverbo-v2-sft/dpo
val_dataset_dir: null
dataset_type: "jsonl"
cache_dir: "/lustre/mlnvme/data/polyglot/.cache"
# Data loading settings
pin_memory: true
num_workers_for_dataloader: 16
shuffle_dataset: true
mask_eos_token: false
mask_pad_token: true
# Model architecture settings
vocab_size: 49152
num_hidden_layers: 28
num_attention_heads: 16
num_key_value_heads: 8
head_dim: 128
hidden_size: 1024
intermediate_size: 3072
max_position_embeddings: 4096
tie_word_embeddings: true
hidden_act: "silu"
output_hidden_states: false
attn_implementation: "flash_attention_2"
use_cache: false
no_rope_layer_interval: null
rope_theta: 1000000.0
rope_scale_factor: null
rms_norm_eps: 0.000001
# Training settings
total_batch_size: 524288
micro_batch_size: 4
gradient_accumulation_steps: 4
eval_micro_batch_size: null
num_train_epochs: 5
warmup_ratio: 0.1
max_learning_rate: 0.000085
min_learning_rate: 0.0
muon_learning_rate: null
weight_decay: 0.0
beta1: 0.9
beta2: 0.95
eps: 0.00000001
lr_decay_type: "cosine"
use_sqrt: false
lr_decay_iters_coef: 1.
seed: 42
max_steps: 68635
max_grad_norm: 1.0
# SFT settings
packing: false
assistant_only_loss: true
# Precision and optimization settings
torch_compile: false
mat_mul_precision: "highest"
tf32: true
bf16: true
gradient_checkpointing: false
use_liger_kernel: true
static_graph: false
# Hub settings
push_to_hub: false
hub_token: null
hub_model_id: null
# Tokenizer and Reference model
tokenizer_name_or_path: "Polygl0t/Tucano2-qwen-0.5B-Base"
chat_template_path: null
reference_model: "Polygl0t/Tucano2-qwen-0.5B-Base"
continual_pretraining: true
# Checkpoint settings
resume_from_checkpoint: null
checkpointing_steps: 1000
begin_new_stage: true
stage_name: "single_cosine"
# Miscellaneous settings
sanity_check: false
sanity_check_num_samples: 100000
wandb_token: null
wandb_id: "tucano2-qwen-0.5b-instruct-sft"
wandb_project: "Polyglot"
wandb_desc: "Developing LLMs for low-resource languages"