🚀 Lamini-Prompt-Enchance
Lamini-Prompt-Enchance 是基于 MBZUAI/LaMini-Flan-T5-248M 微调而来的模型,可用于增强描述性提示,在评估集上取得了不错的成绩。
🚀 快速开始
from transformers import pipeline
enhancer = pipeline("summarization", model="gokaygokay/Lamini-Prompt-Enchance", device=0)
prompt = "A blue-tinted bedroom scene, surreal and serene, with a mysterious reflected interior."
prefix = "Enhance the description: "
res = enhancer(prefix + prompt)
print(res[0]['summary_text'])
✨ 主要特性
📦 安装指南
文档未提及安装步骤,可参考 Hugging Face 上关于 transformers
库的安装说明。
💻 使用示例
基础用法
from transformers import pipeline
enhancer = pipeline("summarization", model="gokaygokay/Lamini-Prompt-Enchance", device=0)
prompt = "A blue-tinted bedroom scene, surreal and serene, with a mysterious reflected interior."
prefix = "Enhance the description: "
res = enhancer(prefix + prompt)
print(res[0]['summary_text'])
📚 详细文档
模型信息
此模型是 MBZUAI/LaMini-Flan-T5-248M 在未知数据集上的微调版本,在评估集上取得以下结果:
- Loss: 2.0195
- Rouge1: 31.5042
- Rouge2: 13.2633
- Rougel: 26.4176
- Rougelsum: 28.4846
- Gen Len: 19.0
训练超参数
训练过程中使用了以下超参数:
- learning_rate: 5e-05
- train_batch_size: 24
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 5
训练结果
Training Loss |
Epoch |
Step |
Validation Loss |
Rouge1 |
Rouge2 |
Rougel |
Rougelsum |
Gen Len |
No log |
1.0 |
115 |
2.1369 |
31.6298 |
13.2671 |
26.4264 |
28.5472 |
19.0 |
No log |
2.0 |
230 |
2.0733 |
31.4969 |
13.2677 |
26.5009 |
28.4785 |
19.0 |
No log |
3.0 |
345 |
2.0405 |
31.4735 |
13.01 |
26.1931 |
28.3299 |
19.0 |
No log |
4.0 |
460 |
2.0250 |
31.4761 |
13.2096 |
26.3479 |
28.3059 |
19.0 |
2.2448 |
5.0 |
575 |
2.0195 |
31.5042 |
13.2633 |
26.4176 |
28.4846 |
19.0 |
框架版本
- Transformers 4.42.3
- Pytorch 2.3.0+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1
📄 许可证
本模型采用 CC BY-NC 4.0 许可证。