loodos / electra-base-turkish-uncased-discriminator

huggingface.co
Total runs: 16
24-hour runs: 2
7-day runs: 1
30-day runs: 4
Model's Last Updated: December 12 2020

Introduction of electra-base-turkish-uncased-discriminator

Model Details of electra-base-turkish-uncased-discriminator

Turkish Language Models with Huggingface's Transformers

As R&D Team at Loodos, we release cased and uncased versions of most recent language models for Turkish. More details about pretrained models and evaluations on downstream tasks can be found here (our repo) .

Turkish ELECTRA-Base-discriminator (uncased)

This is ELECTRA-Base model's discriminator which has the same structure with BERT-Base trained on uncased Turkish dataset.

Usage

Using AutoModelWithLMHead and AutoTokenizer from Transformers, you can import the model as described below.

from transformers import AutoModel, AutoModelWithLMHead

tokenizer = AutoTokenizer.from_pretrained("loodos/electra-base-turkish-uncased-discriminator", do_lower_case=False)

model = AutoModelWithLMHead.from_pretrained("loodos/electra-base-turkish-uncased-discriminator")
 
normalizer = TextNormalization()
normalized_text = normalizer.normalize(text, do_lower_case=True, is_turkish=True)

tokenizer.tokenize(normalized_text)
Notes on Tokenizers

Currently, Huggingface's tokenizers (which were written in Python) have a bug concerning letters "ı, i, I, İ" and non-ASCII Turkish specific letters. There are two reasons.

1- Vocabulary and sentence piece model is created with NFC/NFKC normalization but tokenizer uses NFD/NFKD. NFD/NFKD normalization changes text that contains Turkish characters I-ı, İ-i, Ç-ç, Ö-ö, Ş-ş, Ğ-ğ, Ü-ü. This causes wrong tokenization, wrong training and loss of information. Some tokens are never trained.(like "şanlıurfa", "öğün", "çocuk" etc.) NFD/NFKD normalization is not proper for Turkish.

2- Python's default string.lower() and string.upper() make the conversions

  • "I" and "İ" to 'i'
  • 'i' and 'ı' to 'I'

respectively. However, in Turkish, 'I' and 'İ' are two different letters.

We opened an issue in Huggingface's github repo about this bug. Until it is fixed, in case you want to train your model with uncased data, we provide a simple text normalization module ( TextNormalization() in the code snippet above) in our repo .

Details and Contact

You contact us to ask a question, open an issue or give feedback via our github repo .

Acknowledgments

Many thanks to TFRC Team for providing us cloud TPUs on Tensorflow Research Cloud to train our models.

Runs of loodos electra-base-turkish-uncased-discriminator on huggingface.co

16
Total runs
2
24-hour runs
2
3-day runs
1
7-day runs
4
30-day runs

More Information About electra-base-turkish-uncased-discriminator huggingface.co Model

electra-base-turkish-uncased-discriminator huggingface.co

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

electra-base-turkish-uncased-discriminator huggingface.co Url

https://huggingface.co/loodos/electra-base-turkish-uncased-discriminator

loodos electra-base-turkish-uncased-discriminator online free

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

loodos electra-base-turkish-uncased-discriminator online free url in huggingface.co:

https://huggingface.co/loodos/electra-base-turkish-uncased-discriminator

electra-base-turkish-uncased-discriminator install

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

electra-base-turkish-uncased-discriminator install url in huggingface.co:

https://huggingface.co/loodos/electra-base-turkish-uncased-discriminator

Url of electra-base-turkish-uncased-discriminator

electra-base-turkish-uncased-discriminator huggingface.co Url

Provider of electra-base-turkish-uncased-discriminator huggingface.co

loodos
ORGANIZATIONS

Other API from loodos