🚀 帕梅拉·博雷利/flan - t5 - base - 葡萄牙语摘要模型卡
本模型主要用于葡萄牙语的文本摘要任务,基于flan - t5 - base模型微调而来,在特定数据集上训练,以提升葡萄牙语文本摘要的能力。
🚀 快速开始
使用示例
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("PamelaBorelli/flan-t5-base-summarization-pt-br")
model = T5ForConditionalGeneration.from_pretrained("PamelaBorelli/flan-t5-base-summarization-pt-br")
input_text = "O corpo está mais propenso a sentir dores com exercícios de alta intensidade | Foto: Getty Images O problema está em saber identificar qual é qual. \"Em algumas situações, é difícil diferenciar uma da outra\", reconhece Juan Francisco Marco, professor do Centro de Ciência do Esporte, Treinamento e Fitness Alto Rendimento, na Espanha. \"A dor boa é aquela que associamos ao exercício físico, que não limita (o movimento) e permite continuar (a se exercitar) até o momento em que o músculo fica realmente esgotado e não trabalha mais\", explica. É importante detectar qual é o tipo de dor que você está sentindo, para evitar ter problemas mais sérios | Foto: Getty Images Para Francisco Sánchez Diego, diretor do centro de treinamento Corpore 10, \"a dor boa se sente no grupo muscular que você trabalhou, tanto durante o treinamento como nos dias seguintes\"."
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
✨ 主要特性
- 基于多语言模型:原始模型 [flan - t5 - base](https://huggingface.co/google/flan - t5 - base#model - details) 是一个多语言模型,大小为2.48亿参数,采用基于T5(Text - to - Text Transfer Transformer)的编码器 - 解码器架构。
- 微调优化:最终模型 [PamelaBorelli/flan - t5 - base - summarization - pt - br](PamelaBorelli/flan - t5 - base - summarization - pt - br) 经过了两次微调,先进行文本翻译微调,后进行葡萄牙语文本摘要任务微调。
- 特定语言适用:专为葡萄牙语文本摘要任务设计,未在其他语言上进行测试。
📚 详细文档
一般信息
属性 |
详情 |
名称 |
[PamelaBorelli/flan - t5 - base - summarization - pt - br](PamelaBorelli/flan - t5 - base - summarization - pt - br) |
类型 |
语言模型,Transformer编码器 - 解码器 |
许可证 |
MIT |
基础模型 |
[google/flan - t5 - base](https://huggingface.co/google/flan - t5 - base#model - details) |
相关模型 |
FLAN - T5的检查点 |
原始检查点 |
FLAN - T5的检查点 |
训练数据
训练参数
evaluation_strategy="steps"
eval_steps=
learning_rate=
per_device_train_batch_size=
per_device_eval_batch_size=
gradient_accumulation_steps=
weight_decay=
num_train_epochs=
save_strategy="steps"
save_steps =
push_to_hub=False
load_best_model_at_end=True
分词参数
start_prompt= "Sumarize: \n"
end_prompt= "\n\nSumário: "
input_name="coluna_imput"
target_name="coluna_target"
max_input_length = 256
max_target_length = 256
columns_to_remove= ['coluna_to_remove']
支持语言
葡萄牙语
使用目的
该模型旨在完成葡萄牙语文本的摘要任务,未在其他语言上进行测试。
📄 许可证
本模型使用MIT许可证。