BART
(
B
idirectional and
A
uto-
R
egressive
T
ransformers)는 입력 텍스트 일부에 노이즈를 추가하여 이를 다시 원문으로 복구하는
autoencoder
의 형태로 학습이 됩니다. 한국어 채팅 BART(이하
KoChatBART
) 는 논문에서 사용된
Text Infilling
노이즈 함수를 사용하여 약
10GB
이상의 한국어 대화 텍스트에 대해서 학습한 한국어
encoder-decoder
언어 모델입니다. 이를 통해 도출된 대화 생성에 강건한
KoChatBART-base
를 배포합니다.
Quick tour
from transformers import AutoTokenizer, BartForConditionalGeneration
tokenizer = AutoTokenizer.from_pretrained("BM-K/KoChatBART")
model = BartForConditionalGeneration.from_pretrained("BM-K/KoChatBART")
inputs = tokenizer("안녕 세상아!", return_tensors="pt")
outputs = model(**inputs)
KoChatBART를 학습시키기 위하여 한국어 대화 데이터셋들을 전처리 후 합쳐 대량의 한국어 대화 말뭉치를 만들었습니다.
데이터의 중복을 줄이기 위해 'ㅋㅋㅋㅋㅋㅋ'와 같은 중복된 표현이 2번 이상 반복될 때는 'ㅋㅋ'와 같이 2번으로 바꿨습니다.
너무 짧은 데이터는 학습에 방해가 될 수 있기 때문에 KoBART 토크나이저 기준 전체 토큰 길이가 3을 넘는 데이터만을 선별했습니다.
가명처리된 데이터는 제거하였습니다.
Model
Model
# of params
vocab size
Type
# of layers
# of heads
ffn_dim
hidden_dims
KoChatBART
139M
50265
Encoder
6
16
3072
768
Decoder
6
16
3072
768
대화 생성 성능 측정
다음 코드
(Dialogue Generator)
를 기반으로 각 모델을 fine-tuning 하였습니다. 대화 생성 성능 측정을 위해 추론 시 토크나이징되어 생성된 응답을 복원한 후, BPE tokenizer를 사용하여 실제 응답과 생성된 응답 사이의 overlap 및 distinct를 측정하였습니다.
Warning
일반적으로 짧은 대화 데이터로 모델을 사전학습하였기 때문에 긴 문장 처리가 요구되는 태스크(요약) 등에 대해서는 약한 모습을 보입니다.
More Information About KoChatBART huggingface.co Model
KoChatBART huggingface.co
KoChatBART huggingface.co is an AI model on huggingface.co that provides KoChatBART's model effect (), which can be used instantly with this BM-K KoChatBART model. huggingface.co supports a free trial of the KoChatBART model, and also provides paid use of the KoChatBART. Support call KoChatBART model through api, including Node.js, Python, http.
KoChatBART huggingface.co is an online trial and call api platform, which integrates KoChatBART's modeling effects, including api services, and provides a free online trial of KoChatBART, you can try KoChatBART online for free by clicking the link below.
BM-K KoChatBART online free url in huggingface.co:
KoChatBART is an open source model from GitHub that offers a free installation service, and any user can find KoChatBART on GitHub to install. At the same time, huggingface.co provides the effect of KoChatBART install, users can directly use KoChatBART installed effect in huggingface.co for debugging and trial. It also supports api for free installation.