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