monologg / koelectra-small-discriminator

huggingface.co
Total runs: 52
24-hour runs: 2
7-day runs: -10
30-day runs: -35
Model's Last Updated: December 27 2020

Introduction of koelectra-small-discriminator

Model Details of koelectra-small-discriminator

KoELECTRA (Small Discriminator)

Pretrained ELECTRA Language Model for Korean ( koelectra-small-discriminator )

For more detail, please see original repository .

Usage
Load model and tokenizer
>>> from transformers import ElectraModel, ElectraTokenizer

>>> model = ElectraModel.from_pretrained("monologg/koelectra-small-discriminator")
>>> tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-small-discriminator")
Tokenizer example
>>> from transformers import ElectraTokenizer
>>> tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-small-discriminator")
>>> tokenizer.tokenize("[CLS] 한국어 ELECTRA를 공유합니다. [SEP]")
['[CLS]', '한국어', 'E', '##L', '##EC', '##T', '##RA', '##를', '공유', '##합니다', '.', '[SEP]']
>>> tokenizer.convert_tokens_to_ids(['[CLS]', '한국어', 'E', '##L', '##EC', '##T', '##RA', '##를', '공유', '##합니다', '.', '[SEP]'])
[2, 18429, 41, 6240, 15229, 6204, 20894, 5689, 12622, 10690, 18, 3]
Example using ElectraForPreTraining
import torch
from transformers import ElectraForPreTraining, ElectraTokenizer

discriminator = ElectraForPreTraining.from_pretrained("monologg/koelectra-small-discriminator")
tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-small-discriminator")

sentence = "나는 방금 밥을 먹었다."
fake_sentence = "나는 내일 밥을 먹었다."

fake_tokens = tokenizer.tokenize(fake_sentence)
fake_inputs = tokenizer.encode(fake_sentence, return_tensors="pt")

discriminator_outputs = discriminator(fake_inputs)
predictions = torch.round((torch.sign(discriminator_outputs[0]) + 1) / 2)

print(list(zip(fake_tokens, predictions.tolist()[1:-1])))

Runs of monologg koelectra-small-discriminator on huggingface.co

52
Total runs
2
24-hour runs
-8
3-day runs
-10
7-day runs
-35
30-day runs

More Information About koelectra-small-discriminator huggingface.co Model

koelectra-small-discriminator huggingface.co

koelectra-small-discriminator huggingface.co is an AI model on huggingface.co that provides koelectra-small-discriminator's model effect (), which can be used instantly with this monologg koelectra-small-discriminator model. huggingface.co supports a free trial of the koelectra-small-discriminator model, and also provides paid use of the koelectra-small-discriminator. Support call koelectra-small-discriminator model through api, including Node.js, Python, http.

koelectra-small-discriminator huggingface.co Url

https://huggingface.co/monologg/koelectra-small-discriminator

monologg koelectra-small-discriminator online free

koelectra-small-discriminator huggingface.co is an online trial and call api platform, which integrates koelectra-small-discriminator's modeling effects, including api services, and provides a free online trial of koelectra-small-discriminator, you can try koelectra-small-discriminator online for free by clicking the link below.

monologg koelectra-small-discriminator online free url in huggingface.co:

https://huggingface.co/monologg/koelectra-small-discriminator

koelectra-small-discriminator install

koelectra-small-discriminator is an open source model from GitHub that offers a free installation service, and any user can find koelectra-small-discriminator on GitHub to install. At the same time, huggingface.co provides the effect of koelectra-small-discriminator install, users can directly use koelectra-small-discriminator installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

koelectra-small-discriminator install url in huggingface.co:

https://huggingface.co/monologg/koelectra-small-discriminator

Url of koelectra-small-discriminator

koelectra-small-discriminator huggingface.co Url

Provider of koelectra-small-discriminator huggingface.co

monologg
ORGANIZATIONS

Other API from monologg

huggingface.co

Total runs: 66.4K
Run Growth: -474
Growth Rate: -0.71%
Updated:August 21 2024
huggingface.co

Total runs: 29.1K
Run Growth: -1.1K
Growth Rate: -3.84%
Updated:August 21 2024
huggingface.co

Total runs: 20
Run Growth: -73
Growth Rate: -365.00%
Updated:August 21 2024