Korean BERT pre-trained cased (KoBERT)
predefined_args = {
'attention_cell': 'multi_head',
'num_layers': 12,
'units': 768,
'hidden_size': 3072,
'max_length': 512,
'num_heads': 12,
'scaled': True,
'dropout': 0.1,
'use_residual': True,
'embed_size': 768,
'embed_dropout': 0.1,
'token_type_vocab_size': 2,
'word_embed': None,
}
학습 환경
사전(Vocabulary)
Install KoBERT as a python package
pip install git+https://[email protected]/SKTBrain/KoBERT.git@master
If you want to modify source codes, please clone this repository
git clone https://github.com/SKTBrain/KoBERT.git
cd KoBERT
pip install -r requirements.txt
Huggingface transformers API가 편하신 분은 여기를 참고하세요.
…
model은 디폴트로 eval()모드로 리턴됨, 따라서 학습 용도로 사용시 model.train()명령을 통해 학습 모드로 변경할 필요가 있다.
…
ONNX 컨버팅은 soeque1께서 도움을 주셨습니다.
…
>>> from gluonnlp.data import SentencepieceTokenizer
>>> from kobert import get_tokenizer_path
>>> tok_path = get_tokenizer_path()
>>> sp = SentencepieceTokenizer(tok_path)
>>> sp('한국어 모델을 공유합니다.')
['▁한국', '어', '▁모델', '을', '▁공유', '합니다', '.']
…
onnx 1.8.0 지원No module named 'kobert.utils'aws s3에서 받도록 변경KoBERT 관련 이슈는 이곳에 등록해 주시기 바랍니다.
KoBERT는 Apache-2.0 라이선스 하에 공개되어 있습니다. 모델 및 코드를 사용할 경우 라이선스 내용을 준수해주세요. 라이선스 전문은 LICENSE 파일에서 확인하실 수 있습니다.
No open issues yet, or sync has not completed.