Git Product home page Git Product logo

kdt-a2's Introduction

Grepp Programmers KDT 인공지능 데브 코스 3기 A2 팀 프로젝트. HuggingFace에 공유된 모델

같은 정치적 이슈라도 언론사에 따라 미세하게 다른 논조를 보인다는 점에 착안하여, SKT의 KoGPT2를 5대 일간지(조선일보, 동아일보, 한겨레, 중앙일보, 경향신문)의 사설(일간지별 각 만여개)로 파인튜닝한 생성모델을 생성.

KoGPT-taf Tokenizer 사양

vocab size max_length class special tokens
51,213 128 PreTrainedTokenizerFast (from HuggingFace) </s>, <unk>, <pad>, <mask>

SKT의 KoGPT2의 사전(51,200)에 13개의 정치적으로 주요한 개체명을 추가함. (추가한 토큰: "박근혜", "트럼프", "김정은", "문재인", "안철수", "윤석열", "이명박", "코로나", "세월호", "사드", "새누리당", "4대강", "청와대")

Model

model type # of hidden # of layers and heads 최대 생성 길이
GPT2 768 12 128 토큰
import torch
from transformers import PreTrainedTokenizerFast, GPT2LMHeadModel

checkpoint = 'A2/kogpt2-taf'
tokenizer = PreTrainedTokenizerFast.from_pretrained(checkpoint)
model = GPT2LMHeadModel.from_pretrained(checkpoint)

text = '고용유연화에 대한 정부의 입장은'
results = model.generate(text)
print(results)

kogpt_taf_ex1

kdt-a2's People

Contributors

wjlee-ling avatar tay-son avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.