Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ko
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- korean
|
| 7 |
+
- gpt
|
| 8 |
+
- causal-lm
|
| 9 |
+
- from-scratch
|
| 10 |
+
datasets:
|
| 11 |
+
- oz1115/korean-pretraining-corpus
|
| 12 |
+
widget:
|
| 13 |
+
- text: "인공지능의 미래는"
|
| 14 |
+
- text: "한국의 전통 문화는"
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# korean-gpt-150m
|
| 18 |
+
|
| 19 |
+
한국어 Foundation Model (GPT-style, From Scratch)
|
| 20 |
+
|
| 21 |
+
## Model Description
|
| 22 |
+
|
| 23 |
+
이 모델은 처음부터(from scratch) 학습된 한국어 생성 모델입니다.
|
| 24 |
+
|
| 25 |
+
- **Language:** Korean (한국어)
|
| 26 |
+
- **Model Type:** Autoregressive Language Model
|
| 27 |
+
- **Architecture:** Custom GPT (Transformer Decoder)
|
| 28 |
+
- **Training:** Self-supervised causal language modeling
|
| 29 |
+
- **Dataset:** Korean text corpus
|
| 30 |
+
|
| 31 |
+
## Intended Uses
|
| 32 |
+
|
| 33 |
+
### Primary Use
|
| 34 |
+
|
| 35 |
+
한국어 텍스트 생성:
|
| 36 |
+
- 문장 완성
|
| 37 |
+
- 창의적 글쓰기
|
| 38 |
+
- 대화 생성
|
| 39 |
+
|
| 40 |
+
### Out-of-Scope Uses
|
| 41 |
+
|
| 42 |
+
- 사실 확인이 중요한 작업 (모델이 환각을 생성할 수 있음)
|
| 43 |
+
- 의료, 법률 등 전문적 조언
|
| 44 |
+
- 악의적 목적의 텍스트 생성
|
| 45 |
+
|
| 46 |
+
## How to Use
|
| 47 |
+
|
| 48 |
+
### Installation
|
| 49 |
+
```bash
|
| 50 |
+
pip install torch transformers tokenizers
|
| 51 |
+
|
| 52 |
+
import torch
|
| 53 |
+
from tokenizers import Tokenizer
|
| 54 |
+
|
| 55 |
+
# 토크나이저 로드
|
| 56 |
+
tokenizer = Tokenizer.from_pretrained("oz1115/korean-gpt-150m")
|
| 57 |
+
|
| 58 |
+
# 모델 로드 (커스텀 구현 필요)
|
| 59 |
+
# model = CustomGPTModel.from_pretrained("oz1115/korean-gpt-150m")
|
| 60 |
+
|
| 61 |
+
# 텍스트 생성
|
| 62 |
+
prompt = "인공지능의 미래는"
|
| 63 |
+
input_ids = tokenizer.encode(prompt).ids
|
| 64 |
+
# output = model.generate(input_ids, max_length=50)
|
| 65 |
+
# generated_text = tokenizer.decode(output)
|
| 66 |
+
Training Data
|
| 67 |
+
한국어 위키피디아 및 공개 한국어 텍스트 코퍼스
|
| 68 |
+
Training Procedure
|
| 69 |
+
Preprocessing
|
| 70 |
+
|
| 71 |
+
Tokenizer: BPE (Byte-Pair Encoding)
|
| 72 |
+
Vocabulary Size: 32,000
|
| 73 |
+
Max Sequence Length: 512
|
| 74 |
+
|
| 75 |
+
Training
|
| 76 |
+
|
| 77 |
+
Optimizer: AdamW
|
| 78 |
+
Learning Rate: 5e-4
|
| 79 |
+
Batch Size: 32 (effective)
|
| 80 |
+
Training Steps: ~10,000
|
| 81 |
+
Hardware: Google Colab (T4 GPU)
|
| 82 |
+
|
| 83 |
+
Evaluation
|
| 84 |
+
한국어 텍스트 생성 품질 평가는 korean_evaluation.json 파일을 참조하세요.
|
| 85 |
+
Limitations
|
| 86 |
+
|
| 87 |
+
학습 데이터가 제한적이어서 일반화 성능에 한계가 있을 수 있습니다
|
| 88 |
+
긴 문맥 처리에 제한이 있습니다 (max 512 tokens)
|
| 89 |
+
사실 정확성이 보장되지 않습니다
|
| 90 |
+
|
| 91 |
+
Bias and Risks
|
| 92 |
+
모델이 학습 데이터의 편향을 반영할 수 있습니다. 생성된 텍스트를 비판적으로 검토하시기 바랍니다.
|
| 93 |
+
Citation
|
| 94 |
+
bibtex@misc{korean-gpt-150m,
|
| 95 |
+
author = {oz1115},
|
| 96 |
+
title = {korean-gpt-150m: Korean Foundation Model},
|
| 97 |
+
year = {2025},
|
| 98 |
+
publisher = {HuggingFace},
|
| 99 |
+
url = {https://huggingface.co/oz1115/korean-gpt-150m}
|
| 100 |
+
}
|
| 101 |
+
Contact
|
| 102 |
+
|
| 103 |
+
HuggingFace: @oz1115
|
| 104 |
+
|
| 105 |
+
License
|
| 106 |
+
MIT
|