Downloads · 30 days
10
1% of all-time downloads
9unu/formal_speech_translation
formal_speech_translation is a machine learning model from 9unu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
카카오톡 AI 말투 변환기의 역공학 엔지니어링을 통해 개발한 대화체에 견고한 상냥체 변환기입니다.
Downloads · 30 days
10
1% of all-time downloads
All-time downloads
1.8K
Public
Parameters
276M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 100%
From the Hugging Face model README
카카오톡 AI 말투 변환기의 역공학 엔지니어링을 통해 개발한 대화체에 견고한 상냥체 변환기입니다.
t5모델을 한국어 전용 데이터로 학습한 pko-t5-base 모델을 활용하여 학습을 진행했습니다.
transformers의 pipe, from_pretrained 등의 api를 활용하여 접근 가능합니다.
from transformers import T5TokenizerFast, T5ForConditionalGeneration, pipeline
# 모델 경로 및 cpu, gpu 지정
cache_dir = "./hugging_face"
gentle_model_path='9unu/formal_speech_translation'
gentle_model = T5ForConditionalGeneration.from_pretrained(formal_model_path, cache_dir=cache_dir)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# transformers 파이프라인 생성
gentle_pipeline = pipeline(model = gentle_model, tokenizer = tokenizer, device = device, max_length=60)
# text 말투 변환
text = "밥 먹는 중이야"
num_return_sequences = 1
max_length = 60
out = gentle_pipeline(text, num_return_sequences = num_return_sequences, max_length=max_length)
print([x['generated_text'] for x in out])
본 모델은 MIT license 하에 공개되어 있습니다.