Vikhrt5 240m
V
Vikhrt5 240m
由 Vikhrmodels 开发
FLAN-T5是基于T5架构的指令微调语言模型,支持多语言文本生成任务
下载量 16
发布时间 : 11/26/2023
模型简介
FLAN-T5是通过指令微调增强的T5模型变体,擅长处理问答、翻译和逻辑推理等多种文本生成任务
模型特点
多语言支持
支持英语、俄语等多种语言的文本生成和翻译任务
指令微调
通过大规模指令数据集微调,显著提升模型对自然语言指令的理解能力
多样化任务处理
能够处理问答、翻译、逻辑推理、科学知识查询等多种文本任务
模型能力
文本生成
多语言翻译
逻辑推理
问答系统
科学知识查询
布尔表达式计算
数学问题求解
使用案例
语言服务
多语言翻译
将文本在英语、德语等语言间进行翻译
高质量的多语言翻译输出
知识问答
事实性问答
回答关于历史人物、科学事实等问题
基于训练知识的准确回答
教育辅助
数学问题求解
解决代数、逻辑等数学问题
分步骤展示解题过程
🚀 FLAN - T5 base模型卡
FLAN - T5 base是一款用于文本生成任务的模型,可处理问答、翻译等多种任务,在自然语言处理研究领域有重要价值。
🚀 快速开始
以下是在transformers
中使用该模型的示例脚本。
💻 使用示例
基础用法
在CPU上运行模型:
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("AlexWortega/Flan_base_translated")
model = T5ForConditionalGeneration.from_pretrained("AlexWortega/Flan_base_translated")
input_text = "translate English to German: How old are you?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
高级用法
在GPU上运行模型:
# pip install accelerate
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("AlexWortega/Flan_base_translated")
model = T5ForConditionalGeneration.from_pretrained("AlexWortega/Flan_base_translated", device_map="auto")
input_text = "translate English to German: How old are you?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
使用不同精度在GPU上运行模型:
FP16
# pip install accelerate
import torch
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("AlexWortega/Flan_base_translated")
model = T5ForConditionalGeneration.from_pretrained("AlexWortega/Flan_base_translated", device_map="auto", torch_dtype=torch.float16)
input_text = "translate English to German: How old are you?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
INT8
# pip install bitsandbytes accelerate
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("AlexWortega/Flan_base_translated")
model = T5ForConditionalGeneration.from_pretrained("AlexWortega/Flan_base_translated", device_map="auto", load_in_8bit=True)
input_text = "translate English to German: How old are you?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
✨ 主要特性
支持的语言
- 英语
- 俄语
- 多语言
标签
- 文本到文本生成
示例任务
模型支持多种任务,以下是一些示例:
示例标题 | 输入文本 |
---|---|
问答 | "Может ли Джеффри Хинтон поговорить с Джорджем Вашингтоном? Прежде чем ответить, дайте обоснование?" |
翻译 | "Translate to German: My name is Arthur" |
问答 | "Please answer to the following question. Who is going to be the next Ballon d'or?" |
逻辑推理 | "Q: Can Geoffrey Hinton have a conversation with George Washington? Give the rationale before answering." |
科学知识 | "Please answer the following question. What is the boiling point of Nitrogen?" |
是非问题 | "Answer the following yes/no question. Can you write a whole Haiku in a single tweet?" |
推理任务 | "Answer the following yes/no question by reasoning step - by - step. Can you write a whole Haiku in a single tweet?" |
布尔表达式 | "Q: ( False or not False or False ) is? A: Let's think step by step" |
数学推理 | "The square root of x is the cube root of y. What is y to the power of 2, if x = 4?" |
前提和假设 | "Premise: At my age you will probably have learnt one lesson. Hypothesis: It's not certain how many lessons you'll learn by your thirties. Does the premise entail the hypothesis?" |
数据集
- svakulenk0/qrecc
- taskmaster2
- djaym7/wiki_dialog
- deepmind/code_contests
- lambada
- gsm8k
- aqua_rat
- esnli
- quasc
- qed
📚 详细文档
直接使用和下游使用
原论文的模型卡(链接)中提到:该模型的主要用途是语言模型研究,包括零样本自然语言处理任务和上下文少样本学习自然语言处理任务的研究,如推理和问答;推进公平性和安全性研究,以及了解当前大语言模型的局限性。更多详情请参阅研究论文。
超出范围的使用
需要更多信息。
🔧 技术细节
偏差、风险和局限性
以下信息摘自模型的官方模型卡:
⚠️ 重要提示
根据Rae等人(2021年)的研究,包括Flan - T5在内的语言模型有可能被用于有害的语言生成。在未对特定应用的安全性和公平性问题进行事先评估的情况下,不应直接将Flan - T5用于任何应用。
伦理考量和风险
Flan - T5是在大量文本数据语料库上进行微调的,这些数据没有经过明确内容过滤或现有偏差评估。因此,模型本身有可能生成不适当的内容,或复制底层数据中固有的偏差。
已知局限性
Flan - T5尚未在实际应用中进行测试。
敏感使用
Flan - T5不应应用于任何不可接受的用例,例如生成辱骂性言论。
训练详情
训练数据
文档未提供详细信息。
训练过程
文档未提供详细信息。
评估
测试数据、因素和指标
文档未提供详细信息。
引用
@misc{https://doi.org/10.48550/arxiv.2210.11416,
doi = {10.48550/ARXIV.2210.11416},
url = {https://arxiv.org/abs/2210.11416},
author = {Chung, Hyung Won and Hou, Le and Longpre, Shayne and Zoph, Barret and Tay, Yi and Fedus, William and Li, Eric and Wang, Xuezhi and Dehghani, Mostafa and Brahma, Siddhartha and Webson, Albert and Gu, Shixiang Shane and Dai, Zhuyun and Suzgun, Mirac and Chen, Xinyun and Chowdhery, Aakanksha and Narang, Sharan and Mishra, Gaurav and Yu, Adams and Zhao, Vincent and Huang, Yanping and Dai, Andrew and Yu, Hongkun and Petrov, Slav and Chi, Ed H. and Dean, Jeff and Devlin, Jacob and Roberts, Adam and Zhou, Denny and Le, Quoc V. and Wei, Jason},
keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Scaling Instruction-Finetuned Language Models},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
📄 许可证
本模型采用Apache - 2.0许可证。
Phi 2 GGUF
其他
Phi-2是微软开发的一个小型但强大的语言模型,具有27亿参数,专注于高效推理和高质量文本生成。
大型语言模型 支持多种语言
P
TheBloke
41.5M
205
Roberta Large
MIT
基于掩码语言建模目标预训练的大型英语语言模型,采用改进的BERT训练方法
大型语言模型 英语
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基础模型的蒸馏版本,在保持相近性能的同时更轻量高效,适用于序列分类、标记分类等自然语言处理任务。
大型语言模型 英语
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一个多语言大语言模型,针对多语言对话用例进行了优化,在常见的行业基准测试中表现优异。
大型语言模型 英语
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基于100种语言的2.5TB过滤CommonCrawl数据预训练的多语言模型,采用掩码语言建模目标进行训练。
大型语言模型 支持多种语言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基于Transformer架构的英语预训练模型,通过掩码语言建模目标在海量文本上训练,支持文本特征提取和下游任务微调
大型语言模型 英语
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI发布的开放预训练Transformer语言模型套件,参数量从1.25亿到1750亿,旨在对标GPT-3系列性能,同时促进大规模语言模型的开放研究。
大型语言模型 英语
O
facebook
6.3M
198
1
基于transformers库的预训练模型,适用于多种NLP任务
大型语言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多语言大语言模型系列,包含8B、70B和405B参数规模,支持8种语言和代码生成,优化了多语言对话场景。
大型语言模型
Transformers 支持多种语言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基础版是由Google开发的文本到文本转换Transformer模型,参数规模2.2亿,支持多语言NLP任务。
大型语言模型 支持多种语言
T
google-t5
5.4M
702
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98