monsoon-nlp / hindi-bert

huggingface.co
Total runs: 979
24-hour runs: 0
7-day runs: 38
30-day runs: 382
Model's Last Updated: Setembro 21 2023
feature-extraction

Introduction of hindi-bert

Model Details of hindi-bert

Releasing Hindi ELECTRA model

This is a first attempt at a Hindi language model trained with Google Research's ELECTRA .

As of 2022 I recommend Google's MuRIL model trained on English, Hindi, and other major Indian languages, both in their script and latinized script : https://huggingface.co/google/muril-base-cased and https://huggingface.co/google/muril-large-cased

For causal language models, I would suggest https://huggingface.co/sberbank-ai/mGPT , though this is a large model

Tokenization and training CoLab

I originally used a modified ELECTRA for finetuning, but now use SimpleTransformers.

Blog post - I was greatly influenced by: https://huggingface.co/blog/how-to-train

Example Notebooks

This small model has comparable results to Multilingual BERT on BBC Hindi news classification and on Hindi movie reviews / sentiment analysis (using SimpleTransformers)

You can get higher accuracy using ktrain by adjusting learning rate (also: changing model_type in config.json - this is an open issue with ktrain): https://colab.research.google.com/drive/1mSeeSfVSOT7e-dVhPlmSsQRvpn6xC05w?usp=sharing

Question-answering on MLQA dataset: https://colab.research.google.com/drive/1i6fidh2tItf_-IDkljMuaIGmEU6HT2Ar#scrollTo=IcFoAHgKCUiQ

A larger model ( Hindi-TPU-Electra ) using ELECTRA base size outperforms both models on Hindi movie reviews / sentiment analysis, but does not perform as well on the BBC news classification task.

Corpus

Download: https://drive.google.com/drive/folders/1SXzisKq33wuqrwbfp428xeu_hDxXVUUu?usp=sharing

The corpus is two files:

Bonus notes:

  • Adding English wiki text or parallel corpus could help with cross-lingual tasks and training
Vocabulary

https://drive.google.com/file/d/1-6tXrii3tVxjkbrpSJE9MOG_HhbvP66V/view?usp=sharing

Bonus notes:

  • Created with HuggingFace Tokenizers; you can increase vocabulary size and re-train; remember to change ELECTRA vocab_size
Training

Structure your files, with data-dir named "trainer" here

trainer
- vocab.txt
- pretrain_tfrecords
-- (all .tfrecord... files)
- models
-- modelname
--- checkpoint
--- graph.pbtxt
--- model.*

CoLab notebook gives examples of GPU vs. TPU setup

configure_pretraining.py

Conversion

Use this process to convert an in-progress or completed ELECTRA checkpoint to a Transformers-ready model:

git clone https://github.com/huggingface/transformers
python ./transformers/src/transformers/convert_electra_original_tf_checkpoint_to_pytorch.py
  --tf_checkpoint_path=./models/checkpointdir
  --config_file=config.json
  --pytorch_dump_path=pytorch_model.bin
  --discriminator_or_generator=discriminator
python
from transformers import TFElectraForPreTraining
model = TFElectraForPreTraining.from_pretrained("./dir_with_pytorch", from_pt=True)
model.save_pretrained("tf")

Once you have formed one directory with config.json, pytorch_model.bin, tf_model.h5, special_tokens_map.json, tokenizer_config.json, and vocab.txt on the same level, run:

transformers-cli upload directory

Runs of monsoon-nlp hindi-bert on huggingface.co

979
Total runs
0
24-hour runs
9
3-day runs
38
7-day runs
382
30-day runs

More Information About hindi-bert huggingface.co Model

hindi-bert huggingface.co

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

monsoon-nlp hindi-bert online free

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

monsoon-nlp hindi-bert online free url in huggingface.co:

https://huggingface.co/monsoon-nlp/hindi-bert

hindi-bert install

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

hindi-bert install url in huggingface.co:

https://huggingface.co/monsoon-nlp/hindi-bert

Url of hindi-bert

Provider of hindi-bert huggingface.co

monsoon-nlp
ORGANIZATIONS

Other API from monsoon-nlp

huggingface.co

Total runs: 48
Run Growth: 31
Growth Rate: 64.58%
Updated:Março 10 2025
huggingface.co

Total runs: 48
Run Growth: 26
Growth Rate: 54.17%
Updated:Setembro 03 2023
huggingface.co

Total runs: 16
Run Growth: 6
Growth Rate: 37.50%
Updated:Fevereiro 25 2025
huggingface.co

Total runs: 14
Run Growth: -1
Growth Rate: -7.14%
Updated:Fevereiro 03 2025
huggingface.co

Total runs: 7
Run Growth: -8
Growth Rate: -114.29%
Updated:Maio 23 2021