monologg / koelectra-base-discriminator

huggingface.co
Total runs: 843
24-hour runs: 23
7-day runs: 97
30-day runs: -133
Model's Last Updated: October 21 2021

Introduction of koelectra-base-discriminator

Model Details of koelectra-base-discriminator

KoELECTRA (Base Discriminator)

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

For more detail, please see original repository .

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

>>> model = ElectraModel.from_pretrained("monologg/koelectra-base-discriminator")
>>> tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-base-discriminator")
Tokenizer example
>>> from transformers import ElectraTokenizer
>>> tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-base-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-base-discriminator")
tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-base-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-base-discriminator on huggingface.co

843
Total runs
23
24-hour runs
67
3-day runs
97
7-day runs
-133
30-day runs

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

More koelectra-base-discriminator license Visit here:

https://choosealicense.com/licenses/apache-2.0

koelectra-base-discriminator huggingface.co

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

koelectra-base-discriminator huggingface.co Url

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

monologg koelectra-base-discriminator online free

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

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

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

koelectra-base-discriminator install

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

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

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

Url of koelectra-base-discriminator

koelectra-base-discriminator huggingface.co Url

Provider of koelectra-base-discriminator huggingface.co

monologg
ORGANIZATIONS

Other API from monologg

huggingface.co

Total runs: 66.9K
Run Growth: 66.5K
Growth Rate: 99.52%
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