Downloads · 30 days
144
0% of all-time downloads
paust/pko-flan-t5-large
pko-flan-t5-large is a text generation model from paust. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
144
0% of all-time downloads
All-time downloads
73.5K
Public
Parameters
820M
9.8 GB on disk
Likes
7
Public
Click a slice to open those files.
.bin1.6 GB · 50%
From the Hugging Face model README
FLAN T5는 paust/pko-t5-large 모델을 기반으로 다양한 태스크를 instruction finetuning을 통해서 만든 모델입니다.
현재 계속 Instruction Finetuning 을 진행하면서 중간결과를 모델로 업데이트하고 있습니다.
| Task name | Task type |
|---|---|
| NSMC | Classification |
| Klue Ynat | Classification |
| KorNLI | Classification |
| KorSTS | Classification |
| QuestionPair | Classification |
| Klue STS | Classification |
| AIHub news Summary | Summarization |
| AIHub document Summary | Summarization |
| AIHub book Summary | Summarization |
| AIHub conversation Summary | Summarization |
| AIHub ko-to-en | Translation |
| AIHub ko-to-en Expert | Translation |
| AIHub ko-to-en Tech | Translation |
| AIHub ko-to-en social | Translation |
| AIHub ko-to-jp | Translation |
| AIHub ko-to-cn Tech | Translation |
| AIHub Translation Corpus | Translation |
| korquad | QA |
| Klue MRC | QA |
| AIHub mindslab's MRC | QA |
from transformers import T5ForConditionalGeneration, T5TokenizerFast
tokenizer = T5TokenizerFast.from_pretrained('paust/pko-flan-t5-large')
model = T5ForConditionalGeneration.from_pretrained('paust/pko-flan-t5-large', device_map='cuda')
prompt = """서울특별시(서울特別市, 영어: Seoul Metropolitan Government)는 대한민국 수도이자 최대 도시이다. 선사시대부터 사람이 거주하였으나 본 역사는 백제 첫 수도 위례성을 시초로 한다. 삼국시대에는 전략적 요충지로서 고구려, 백제, 신라가 번갈아 차지하였으며, 고려 시대에는 왕실의 별궁이 세워진 남경(南京)으로 이름하였다.
한국의 수도는 어디입니까?"""
input_ids = tokenizer(prompt, add_special_tokens=True, return_tensors='pt').input_ids
output_ids = model.generate(input_ids=input_ids.cuda(), max_new_tokens=32, num_beams=12)
text = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0]
print(text) # 서울특별시
PAUST에서 만든 pko-t5는 MIT license 하에 공개되어 있습니다.