🚀 Qwen2.5-0.5B葡萄牙語v1
Qwen2.5-0.5B經過微調,能夠熟練使用葡萄牙語,並提升了智能水平。該模型可用於文本生成任務,如自動翻譯、情感分析、話題建模和自動問答等。
🚀 快速開始
你可以通過以下鏈接訪問該模型:
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."
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
📚 詳細文檔
整體結果
任務 |
指標 |
值 |
標準差 |
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 |
詳細結果
assin2_rte
指標 |
值 |
標準差 |
f1_macro |
0.391 |
0.006 |
acc |
0.527 |
0.007 |
assin2_sts
指標 |
值 |
標準差 |
pearson |
0.115 |
0.014 |
mse |
1.011 |
N/A |
bluex
考試ID |
指標 |
值 |
標準差 |
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
考試ID |
指標 |
值 |
標準差 |
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
指標 |
值 |
標準差 |
f1_macro |
0.595 |
0.017 |
acc |
0.791 |
0.011 |
hatebr_offensive
指標 |
值 |
標準差 |
f1_macro |
0.338 |
0.005 |
acc |
0.502 |
0.009 |
oab_exams
考試ID |
指標 |
值 |
標準差 |
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
指標 |
值 |
標準差 |
f1_macro |
0.412 |
0.004 |
acc |
0.702 |
0.011 |
tweetsentbr
指標 |
值 |
標準差 |
f1_macro |
0.455 |
0.005 |
acc |
0.594 |
0.008 |
模型元信息
屬性 |
詳情 |
截斷樣本數 |
3863 |
非截斷樣本數 |
10287 |
填充樣本數 |
0 |
非填充樣本數 |
14150 |
少樣本截斷數 |
3863 |
是否有聊天模板 |
是 |
聊天類型 |
system_user_assistant |
GPU數量 |
1 |
Accelerate進程數 |
N/A |
模型SHA值 |
無 |
模型數據類型 |
torch.bfloat16 |
模型內存佔用 |
988065664字節 |
模型參數數量 |
494032768 |
模型是否以4位加載 |
N/A |
模型是否以8位加載 |
N/A |
模型是否量化 |
N/A |
模型設備 |
cuda:0 |
批次大小 |
1 |
最大長度 |
512 |
最大上下文長度 |
480 |
最大生成令牌數 |
32 |
有效批次大小 |
1.0 |
開放葡萄牙語大語言模型排行榜評估結果
詳細結果可在此處和🚀 開放葡萄牙語大語言模型排行榜查看。
指標 |
值 |
平均值 |
50.74 |
巴西國家高中考試挑戰(無圖像) |
37.86 |
BLUEX(無圖像) |
34.63 |
巴西律師協會考試 |
33.12 |
Assin2 RTE |
86.30 |
Assin2 STS |
54.30 |
FaQuAD NLI |
65.33 |
HateBR 二分類 |
44.06 |
葡萄牙語仇恨言論二分類 |
55.10 |
tweetSentBR |
45.96 |
📄 許可證
本項目採用MIT許可證。