ChatGPT 정보성 (Wikipedia) κΈ€ 탐지기

Description

Model that detects if a Korean wikipedia-style text is written by ChatGPT.

KoBigBird model fine-tuned with approximately 30,000 data of human written wikipedia summaries and ChatGPT generated wikipedia summaries.

Our classifier based on this checkpoint reached a validation accuracy of 99.2% after 10 epochs of training.

Example Usage

from transformers import *
import torch
import torch.nn as nn

model = AutoModelForSequenceClassification.from_pretrained("LDKSolutions/Ko-Wiki-ChatGPT-Detector-v1", num_labels=2) 
model.eval() 
tokenizer = AutoTokenizer.from_pretrained("LDKSolutions/Ko-Wiki-ChatGPT-Detector-v1")

# this is text generated by ChatGPT (GPT 3.5)
text = '''슀마트 μ»¨νŠΈλž™νŠΈλŠ” 블둝체인 κΈ°μˆ μ—μ„œ μ‚¬μš©λ˜λŠ” ν”„λ‘œκ·Έλž¨ μ½”λ“œμ˜ μΌμ’…μœΌλ‘œ, 계약 쑰건을 μžλ™μœΌλ‘œ κ²€μ¦ν•˜κ³  μ‹€ν–‰ν•˜λŠ” ν”„λ‘œκ·Έλž¨μž…λ‹ˆλ‹€. 슀마트 μ»¨νŠΈλž™νŠΈλŠ” 블둝체인 λ„€νŠΈμ›Œν¬ μƒμ—μ„œ μ‹€ν–‰λ˜λ©°, λΈ”λ‘μ²΄μΈμ—μ„œ λ°œμƒν•˜λŠ” λͺ¨λ“  νŠΈλžœμž­μ…˜μ€ 슀마트 μ»¨νŠΈλž™νŠΈλ₯Ό 톡해 μ²˜λ¦¬λ©λ‹ˆλ‹€.

슀마트 μ»¨νŠΈλž™νŠΈλŠ” 쑰건과 μ‹€ν–‰ μ½”λ“œλ‘œ 이루어져 μžˆμŠ΅λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄, Aκ°€ Bμ—κ²Œ 1,000λ‹¬λŸ¬λ₯Ό μ§€λΆˆν•΄μ•Όν•˜λŠ” 계약이 μžˆλ‹€λ©΄, 이 κ³„μ•½μ˜ 쑰건을 슀마트 μ»¨νŠΈλž™νŠΈλ‘œ μž‘μ„±ν•˜μ—¬ 계약이 μžλ™μœΌλ‘œ μ‹€ν–‰λ˜λ„λ‘ ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ΄λŸ¬ν•œ 슀마트 μ»¨νŠΈλž™νŠΈλŠ” μžλ™μœΌλ‘œ 쑰건을 κ²€μ¦ν•˜κ³ , μ§€μ •λœ 쑰건이 μΆ©μ‘±λ˜μ—ˆμ„ λ•Œ κ³„μ•½μ˜ μ‹€ν–‰ μ½”λ“œλ₯Ό μ‹€ν–‰ν•˜μ—¬ 계약을 μ΄ν–‰ν•©λ‹ˆλ‹€. 이λ₯Ό 톡해 계약 λ‹Ήμ‚¬μžλŠ” μ„œλ‘œλ₯Ό μ‹ λ’°ν•˜μ§€ μ•Šμ•„λ„ μ•ˆμ „ν•˜κ²Œ 거래λ₯Ό μ§„ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

슀마트 μ»¨νŠΈλž™νŠΈλŠ” λΈ”λ‘μ²΄μΈμ—μ„œ μ‹€ν–‰λ˜κΈ° λ•Œλ¬Έμ— λͺ¨λ“  거래 내역이 투λͺ…ν•˜κ²Œ 기둝되며, μ€‘κ°œμΈμ΄λ‚˜ 쀑앙 κΈ°κ΄€μ˜ κ°œμž…μ΄ μ—†κΈ° λ•Œλ¬Έμ— 거래 λΉ„μš©μ΄ μ€„μ–΄λ“­λ‹ˆλ‹€. λ˜ν•œ 슀마트 μ»¨νŠΈλž™νŠΈλŠ” μ½”λ“œλ‘œ μž‘μ„±λ˜κΈ° λ•Œλ¬Έμ— μžλ™ν™”κ°€ κ°€λŠ₯ν•˜λ©°, ν”„λ‘œκ·Έλž¨μ— λ”°λ₯Έ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μ‹€ν–‰ν•˜λŠ” 것이 κ°€λŠ₯ν•©λ‹ˆλ‹€. λ”°λΌμ„œ 슀마트 μ»¨νŠΈλž™νŠΈλŠ” 블둝체인 기술의 핡심 κΈ°λŠ₯ 쀑 ν•˜λ‚˜λ‘œ, λΆ„μ‚°ν˜• μ• ν”Œλ¦¬μΌ€μ΄μ…˜(DApp) 개발 등에 ν™œμš©λ˜κ³  μžˆμŠ΅λ‹ˆλ‹€.'''

encoded_inputs = tokenizer(text, max_length=512, truncation=True, padding="max_length", return_tensors="pt") 

with torch.no_grad(): 
    outputs = model(**encoded_inputs).logits 
    probability = nn.Softmax()(outputs) 
    predicted_class = torch.argmax(probability).item() 
    if predicted_class == 1: 
        print("ChatGPTκ°€ μƒμ„±ν–ˆμ„ ν™•λ₯ μ΄ λ†’μŠ΅λ‹ˆλ‹€!") 
    else: 
        print("인간이 μž‘μ„±ν–ˆμ„ ν™•λ₯ μ΄ λ†’μŠ΅λ‹ˆλ‹€!") 
Downloads last month
96
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support