kfkas's picture
Update README.md
3ffc0e2
|
raw
history blame
1.52 kB
metadata
language:
  - ko
tags:
  - generated_from_keras_callback
model-index:
  - name: RoBERTa-large-Detection-P2G
    results: []

RoBERTa-large-Detection-P2G

์ด ๋ชจ๋ธ์€ klue/roberta-large์„ ๊ตญ๋ฆฝ ๊ตญ์–ด์› ์‹ ๋ฌธ ๋ง๋ญ‰์น˜ 5๋งŒ๊ฐœ์˜ ๋ฌธ์žฅ์„ 2021์„ g2pK๋กœ ํ›ˆ๋ จ์‹œ์ผœ G2P๋œ ๋ฐ์ดํ„ฐ๋ฅผ ํƒ์ง€ํ•ฉ๋‹ˆ๋‹ค.
git : https://github.com/taemin6697

Usage

from transformers import AutoTokenizer, RobertaForSequenceClassification
import torch
import numpy as np

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model_dir = "kfkas/RoBERTa-large-Detection-P2G"
tokenizer = AutoTokenizer.from_pretrained('klue/roberta-large')
model = RobertaForSequenceClassification.from_pretrained(model_dir).to(device)

text = "์›”๋“œ์ปค ํŒŒ๋‚˜์€ํ–‰ ๋Œ€ํ‘œํ‹ฐ๋ฉ” ํ–‰์šฐ๋Šฌ ์ด๋‹ฌ๋Ÿฌ ์ด์˜์˜์žฅ ์„ ๋ฌผ"
with torch.no_grad():
    x = tokenizer(text, padding='max_length', truncation=True, return_tensors='pt', max_length=128)
    y_pred = model(x["input_ids"].to(device))
    logits = y_pred.logits
    y_pred = logits.detach().cpu().numpy()
    y = np.argmax(y_pred)
    print(y)
    #1

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • optimizer: None
  • training_precision: float16

Training results

Framework versions

  • Transformers 4.22.1
  • TensorFlow 2.10.0
  • Datasets 2.5.1
  • Tokenizers 0.12.1