Instructions to use ai4bharat/indic-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ai4bharat/indic-bert with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ai4bharat/indic-bert", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Using Tokenizer
#6
by pushpdeep - opened
I ran to problem while using :
tokenizer = AutoTokenizer.from_pretrained('ai4bharat/indic-bert')
I was working in colab, upon searching for the solution , I found that sentencepiece need to be installed. I uninstalled transformers and installed it like :
!pip install --no-cache-dir transformers sentencepiece
and then loaded the tokenizer using :
tokenizer = AutoTokenizer.from_pretrained('ai4bharat/indic-bert', use_fast=False)
Hope this helps !
pushpdeep changed discussion status to closed