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

Model: cnmoro/Qwen2.5-0.5B-Portuguese-v1
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-20 12:15:18 +08:00
commit 910a36074d
11 changed files with 152145 additions and 0 deletions

36
.gitattributes vendored Normal file
View File

@@ -0,0 +1,36 @@
*.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
tokenizer.json filter=lfs diff=lfs merge=lfs -text

404
README.md Normal file
View File

@@ -0,0 +1,404 @@
---
license: mit
language:
- zho
- eng
- fra
- spa
- por
- deu
- ita
- rus
- jpn
- kor
- vie
- tha
- ara
base_model:
- Qwen/Qwen2.5-0.5B-Instruct
pipeline_tag: text-generation
datasets:
- adalbertojunior/openHermes_portuguese
- cnmoro/smoltalk-555k-ptbr
- cnmoro/RagMixPTBR-Legal-Alpaca-2M
model-index:
- name: Qwen2.5-0.5B-Portuguese-v1
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: ENEM Challenge (No Images)
type: eduagarcia/enem_challenge
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 37.86
name: accuracy
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: BLUEX (No Images)
type: eduagarcia-temp/BLUEX_without_images
split: train
args:
num_few_shot: 3
metrics:
- type: acc
value: 34.63
name: accuracy
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- 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: 33.12
name: accuracy
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: Assin2 RTE
type: assin2
split: test
args:
num_few_shot: 15
metrics:
- type: f1_macro
value: 86.3
name: f1-macro
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: Assin2 STS
type: eduagarcia/portuguese_benchmark
split: test
args:
num_few_shot: 15
metrics:
- type: pearson
value: 54.3
name: pearson
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: FaQuAD NLI
type: ruanchaves/faquad-nli
split: test
args:
num_few_shot: 15
metrics:
- type: f1_macro
value: 65.33
name: f1-macro
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: HateBR Binary
type: ruanchaves/hatebr
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 44.06
name: f1-macro
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: PT Hate Speech Binary
type: hate_speech_portuguese
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 55.1
name: f1-macro
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: tweetSentBR
type: eduagarcia/tweetsentbr_fewshot
split: test
args:
num_few_shot: 25
metrics:
- type: f1_macro
value: 45.96
name: f1-macro
source:
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=cnmoro/Qwen2.5-0.5B-Portuguese-v1
name: Open Portuguese LLM Leaderboard
---
Qwen2.5-0.5B finetuned for proficiency in Portuguese language and increased intelligence.
```text
https://ollama.com/cnmoro/Qwen2.5-0.5B-Portuguese-v1
```
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "cnmoro/Qwen2.5-0.5B-Portuguese-v1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Escreva uma breve introdução sobre LLMs (Large Language Models) e suas aplicações."
# System prompt is always injected and hardcoded automatically
# for ideal performance in portuguese language.
# No need to write it again.
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
response
# LLM significa Large Language Models, que são modelos de linguagem computacional
# projetados para simular a inteligência humana no processamento e geração de texto.
# Esses modelos usam técnicas avançadas de aprendizado de máquina e redes neurais para
# compreender e gerar texto com base em dados de entrada. As aplicações de LLM incluem
# tradução automática, análise de sentimento, modelagem de tópicos e resposta a perguntas
# automatizadas. Eles estão sendo cada vez mais utilizados em diversas áreas, como
# saúde, educação e finanças, para melhorar a comunicação, as experiências dos clientes
# e os resultados da pesquisa.
```
## Overall Results
| Task | Metric | Value | Stdev |
| ------------------------ | --------------- | ------- | ------- |
| assin2_rte | f1_macro | 0.391 | 0.006 |
| assin2_rte | acc | 0.527 | 0.007 |
| assin2_sts | pearson | 0.115 | 0.014 |
| assin2_sts | mse | 1.011 | N/A |
| bluex | acc | 0.349 | 0.010 |
| enem_challenge | acc | 0.363 | 0.007 |
| faquad_nli | f1_macro | 0.595 | 0.017 |
| faquad_nli | acc | 0.791 | 0.011 |
| hatebr_offensive | f1_macro | 0.338 | 0.005 |
| hatebr_offensive | acc | 0.502 | 0.009 |
| oab_exams | acc | 0.326 | 0.006 |
| portuguese_hate_speech | f1_macro | 0.412 | 0.004 |
| portuguese_hate_speech | acc | 0.702 | 0.011 |
| tweetsentbr | f1_macro | 0.455 | 0.005 |
| tweetsentbr | acc | 0.594 | 0.008 |
## Detailed Results
### assin2_rte
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| f1_macro | 0.391 | 0.006 |
| acc | 0.527 | 0.007 |
### assin2_sts
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| pearson | 0.115 | 0.014 |
| mse | 1.011 | N/A |
### bluex
| Exam ID | Metric | Value | Stdev |
| ----------------------- | ------ | -------- | -------- |
| all | acc | 0.349 | 0.010 |
| USP_2019 | acc | 0.225 | 0.038 |
| USP_2024 | acc | 0.293 | 0.041 |
| USP_2021 | acc | 0.423 | 0.040 |
| UNICAMP_2018 | acc | 0.241 | 0.034 |
| UNICAMP_2024 | acc | 0.444 | 0.043 |
| USP_2020 | acc | 0.393 | 0.038 |
| UNICAMP_2020 | acc | 0.291 | 0.035 |
| UNICAMP_2021_1 | acc | 0.326 | 0.040 |
| UNICAMP_2022 | acc | 0.487 | 0.046 |
| USP_2022 | acc | 0.388 | 0.040 |
| UNICAMP_2019 | acc | 0.280 | 0.037 |
| UNICAMP_2021_2 | acc | 0.294 | 0.037 |
| UNICAMP_2023 | acc | 0.558 | 0.044 |
| USP_2023 | acc | 0.364 | 0.042 |
| USP_2018 | acc | 0.278 | 0.035 |
### enem_challenge
| Exam ID | Metric | Value | Stdev |
| --------- | ------ | ----- | ----- |
| all | acc | 0.363 | 0.007 |
| 2016_2 | acc | 0.390 | 0.025 |
| 2015 | acc | 0.319 | 0.025 |
| 2011 | acc | 0.410 | 0.026 |
| 2013 | acc | 0.398 | 0.027 |
| 2017 | acc | 0.319 | 0.025 |
| 2022 | acc | 0.376 | 0.024 |
| 2009 | acc | 0.226 | 0.023 |
| 2010 | acc | 0.444 | 0.026 |
| 2012 | acc | 0.345 | 0.025 |
| 2014 | acc | 0.339 | 0.026 |
| 2016 | acc | 0.397 | 0.026 |
| 2023 | acc | 0.385 | 0.024 |
### faquad_nli
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| f1_macro | 0.595 | 0.017 |
| acc | 0.791 | 0.011 |
### hatebr_offensive
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| f1_macro | 0.338 | 0.005 |
| acc | 0.502 | 0.009 |
### oab_exams
| Exam ID | Metric | Value | Stdev |
| ------------- | ------ | ----- | ----- |
| all | acc | 0.326 | 0.006 |
| 2018-25 | acc | 0.400 | 0.032 |
| 2016-20a | acc | 0.238 | 0.027 |
| 2011-05 | acc | 0.400 | 0.032 |
| 2012-08 | acc | 0.325 | 0.030 |
| 2012-09 | acc | 0.260 | 0.029 |
| 2014-13 | acc | 0.325 | 0.030 |
| 2011-03 | acc | 0.313 | 0.027 |
| 2016-20 | acc | 0.275 | 0.029 |
| 2012-06a | acc | 0.325 | 0.030 |
| 2017-22 | acc | 0.338 | 0.031 |
| 2015-16 | acc | 0.325 | 0.030 |
| 2013-12 | acc | 0.300 | 0.030 |
| 2017-24 | acc | 0.250 | 0.028 |
| 2012-06 | acc | 0.238 | 0.027 |
| 2014-14 | acc | 0.325 | 0.030 |
| 2013-11 | acc | 0.325 | 0.030 |
| 2013-10 | acc | 0.413 | 0.032 |
| 2010-02 | acc | 0.390 | 0.028 |
| 2016-21 | acc | 0.375 | 0.031 |
| 2015-18 | acc | 0.300 | 0.030 |
| 2015-17 | acc | 0.282 | 0.029 |
| 2016-19 | acc | 0.333 | 0.031 |
| 2012-07 | acc | 0.388 | 0.031 |
| 2017-23 | acc | 0.325 | 0.030 |
| 2011-04 | acc | 0.350 | 0.031 |
| 2010-01 | acc | 0.282 | 0.028 |
| 2014-15 | acc | 0.385 | 0.032 |
### portuguese_hate_speech
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| f1_macro | 0.412 | 0.004 |
| acc | 0.702 | 0.011 |
### tweetsentbr
| Metric | Value | Stdev |
| --------- | ----- | ----- |
| f1_macro | 0.455 | 0.005 |
| acc | 0.594 | 0.008 |
## Model Meta Information
* **Truncated Samples:** 3863
* **Non-Truncated Samples:** 10287
* **Padded Samples:** 0
* **Non-Padded Samples:** 14150
* **Fewshots Truncated:** 3863
* **Has Chat Template:** True
* **Chat Type:** system\_user\_assistant
* **Number of GPUs:** 1
* **Accelerate Number of Processes:** N/A
* **Model SHA:** None
* **Model Data Type:** torch.bfloat16
* **Model Memory Footprint:** 988065664 bytes
* **Model Number of Parameters:** 494032768
* **Model is Loaded in 4bit:** N/A
* **Model is Loaded in 8bit:** N/A
* **Model is Quantized:** N/A
* **Model Device:** cuda:0
* **Batch Size:** 1
* **Max Length:** 512
* **Max Context Length** 480
* **Max Generation Tokens:** 32
* **Effective Batch Size:** 1.0
# Open Portuguese LLM Leaderboard Evaluation Results
Detailed results can be found [here](https://huggingface.co/datasets/eduagarcia-temp/llm_pt_leaderboard_raw_results/tree/main/cnmoro/Qwen2.5-0.5B-Portuguese-v1) and on the [🚀 Open Portuguese LLM Leaderboard](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)
| Metric | Value |
|--------------------------|---------|
|Average |**50.74**|
|ENEM Challenge (No Images)| 37.86|
|BLUEX (No Images) | 34.63|
|OAB Exams | 33.12|
|Assin2 RTE | 86.30|
|Assin2 STS | 54.30|
|FaQuAD NLI | 65.33|
|HateBR Binary | 44.06|
|PT Hate Speech Binary | 55.10|
|tweetSentBR | 45.96|

24
added_tokens.json Normal file
View File

@@ -0,0 +1,24 @@
{
"</tool_call>": 151658,
"<tool_call>": 151657,
"<|box_end|>": 151649,
"<|box_start|>": 151648,
"<|endoftext|>": 151643,
"<|file_sep|>": 151664,
"<|fim_middle|>": 151660,
"<|fim_pad|>": 151662,
"<|fim_prefix|>": 151659,
"<|fim_suffix|>": 151661,
"<|im_end|>": 151645,
"<|im_start|>": 151644,
"<|image_pad|>": 151655,
"<|object_ref_end|>": 151647,
"<|object_ref_start|>": 151646,
"<|quad_end|>": 151651,
"<|quad_start|>": 151650,
"<|repo_name|>": 151663,
"<|video_pad|>": 151656,
"<|vision_end|>": 151653,
"<|vision_pad|>": 151654,
"<|vision_start|>": 151652
}

31
config.json Normal file
View File

@@ -0,0 +1,31 @@
{
"_name_or_path": "cnmoro/Qwen2.5-0.5B-Portuguese-v1",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 896,
"initializer_range": 0.02,
"intermediate_size": 4864,
"max_position_embeddings": 32768,
"max_window_layers": 21,
"model_type": "qwen2",
"num_attention_heads": 14,
"num_hidden_layers": 24,
"num_key_value_heads": 2,
"pad_token_id": 151654,
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": true,
"torch_dtype": "bfloat16",
"transformers_version": "4.47.1",
"unsloth_fixed": true,
"unsloth_version": "2024.12.12",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 151936
}

15
generation_config.json Normal file
View File

@@ -0,0 +1,15 @@
{
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"max_length": 32768,
"pad_token_id": 151654,
"repetition_penalty": 1.1,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8,
"transformers_version": "4.47.1"
}

151388
merges.txt Normal file

File diff suppressed because it is too large Load Diff

3
model.safetensors Normal file
View File

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

31
special_tokens_map.json Normal file
View File

@@ -0,0 +1,31 @@
{
"additional_special_tokens": [
"<|im_start|>",
"<|im_end|>",
"<|object_ref_start|>",
"<|object_ref_end|>",
"<|box_start|>",
"<|box_end|>",
"<|quad_start|>",
"<|quad_end|>",
"<|vision_start|>",
"<|vision_end|>",
"<|vision_pad|>",
"<|image_pad|>",
"<|video_pad|>"
],
"eos_token": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|vision_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

3
tokenizer.json Normal file
View File

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

209
tokenizer_config.json Normal file
View File

@@ -0,0 +1,209 @@
{
"add_bos_token": false,
"add_prefix_space": false,
"added_tokens_decoder": {
"151643": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151644": {
"content": "<|im_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151645": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151646": {
"content": "<|object_ref_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151647": {
"content": "<|object_ref_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151648": {
"content": "<|box_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151649": {
"content": "<|box_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151650": {
"content": "<|quad_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151651": {
"content": "<|quad_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151652": {
"content": "<|vision_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151653": {
"content": "<|vision_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151654": {
"content": "<|vision_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151655": {
"content": "<|image_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151656": {
"content": "<|video_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"151657": {
"content": "<tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151658": {
"content": "</tool_call>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151659": {
"content": "<|fim_prefix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151660": {
"content": "<|fim_middle|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151661": {
"content": "<|fim_suffix|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151662": {
"content": "<|fim_pad|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151663": {
"content": "<|repo_name|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"151664": {
"content": "<|file_sep|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
}
},
"additional_special_tokens": [
"<|im_start|>",
"<|im_end|>",
"<|object_ref_start|>",
"<|object_ref_end|>",
"<|box_start|>",
"<|box_end|>",
"<|quad_start|>",
"<|quad_end|>",
"<|vision_start|>",
"<|vision_end|>",
"<|vision_pad|>",
"<|image_pad|>",
"<|video_pad|>"
],
"bos_token": null,
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {{- 'Você é um assistente que sempre responde em português brasileiro, fornecendo respostas de qualidade para o usuário.' }}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {{- '<|im_start|>system\\nVocê é um assistente que sempre responde em português brasileiro, fornecendo respostas de qualidade para o usuário.<|im_end|>\\n' }}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"errors": "replace",
"extra_special_tokens": {},
"model_max_length": 32768,
"pad_token": "<|vision_pad|>",
"padding_side": "right",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null
}

1
vocab.json Normal file

File diff suppressed because one or more lines are too long