Model reference · open weights
muril-large-cased is an open-weight embedding model from google. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 512 tokens |
| Runs with | transformers |
| Released | 2022-03-02 |
| Popularity | 8k downloads / month |
| Licence | Unknown |
About
Multilingual Representations for Indian Languages : A BERT Large (24L) model pre-trained on 17 Indian languages, and their transliterated counterparts.
This model uses a BERT large architecture [1] pretrained from scratch using the Wikipedia [2], Common Crawl [3], PMINDIA [4] and Dakshina [5] corpora for 17 [6] Indian languages.
We use a training paradigm similar to multilingual bert, with a few modifications as listed:
See the Training section for more details.
The MuRIL model is pre-trained on monolingual segments as well as parallel segments as detailed below :
We keep an exponent value of 0.3 to calculate duplication multiplier values for upsampling of lower resourced languages and set dupe factors accordingly. Note, we limit transliterated pairs to Wikipedia only.
The model was trained using a self-supervised masked language modeling task. We do whole word masking with a maximum of 80 predictions. The model was trained for 1500K steps, with a batch size of 8192, and a max sequence length of 512.
All parameters in the module are trainable, and fine-tuning all parameters is the recommended practice.
This model is intended to be used for a variety of downstream NLP tasks for Indian languages. This model is trained on transliterated data as well, a phenomenon commonly observed in the Indian context. This model is not expected to perform well on languages other than the ones used in pre-training, i.e. 17 Indian languages.
We provide the results of fine-tuning this model on a set of downstream tasks. We choose these tasks from the XTREME benchmark, with evaluation done on Indian language test-sets. All results are computed in a zero-shot setting, with English being the high resource training set language. The results for XLM-R (Large) are taken from the XTREME paper [9].
Shown below are results on datasets from the XTREME benchmark (in %)
| PANX (F1) | bn | en | hi | ml | mr | ta | te | ur | Average |
|---|---|---|---|---|---|---|---|---|---|
| XLM-R (large) | 78.8 | 84.7 | 73.0 | 67.8 | 68.1 | 59.5 | 55.8 | 56.4 | 68.0 |
| MuRIL (large) | 85.8 | 85.0 | 78.3 | 75.6 | 77.3 | 71.1 | 65.6 | 83.0 | 77.7 |
| UDPOS (F1) | en | hi | mr | ta | te | ur | Average |
|---|---|---|---|---|---|---|---|
| XLM-R (large) | 96.1 | 76.4 | 80.8 | 65.2 | 86.6 | 70.3 | 79.2 |
| MuRIL (large) | 95.7 | 71.3 | 85.7 | 62.6 | 85.8 | 62.8 | 77.3 |
| XNLI (Accuracy) | en | hi | ur | Average |
|---|---|---|---|---|
| XLM-R (large) | 88.7 | 75.6 | 71.7 | 78.7 |
| MuRIL (large) | 88.4 | 75.8 | 71.7 | 78.6 |
| XQUAD (F1/EM) | en | hi | Average |
|---|---|---|---|
| XLM-R (large) | 86.5/75.7 | 76.7/59.7 | 81.6/67.7 |
| MuRIL (large) | 88.2/77.8 | 78.4/62.4 | 83.3/70.1 |
| MLQA (F1/EM) | en | hi | Average |
|---|---|---|---|
| XLM-R (large) | 83.5/70.6 | 70.6/53.1 | 77.1/61.9 |
| MuRIL (large) | 84.4/71.7 | 72.2/54.1 | 78.3/62.9 |
| TyDiQA (F1/EM) | en | bn | te | Average |
|---|---|---|---|---|
| XLM-R (large) | 71.5/56.8 | 64.0/47.8 | 70.1/43.6 | 68.5/49.4 |
| MuRIL (large) | 75.9/66.8 | 67.1/53.1 | 71.5/49.8 | 71.5/56.6 |
The fine-tuning hyperparameters are as follows:
| Task | Batch Size | Learning Rate | Epochs | Warm-up Ratio |
|---|---|---|---|---|
| PANX | 32 | 2e-5 | 10 | 0.1 |
| UDPOS | 64 | 5e-6 | 10 | 0.1 |
| XNLI | 128 | 2e-5 | 5 | 0.1 |
| XQuAD | 32 | 3e-5 | 2 | 0.1 |
| MLQA | 32 | 3e-5 | 2 | 0.1 |
| TyDiQA | 32 | 3e-5 | 3 | 0.1 |
[1]: Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv preprint arXiv:1810.04805, 2018.
[2]: Wikipedia
[3]: Common Crawl
[4]: PMINDIA
[5]: Dakshina
[6]: Assamese (as), Bengali (bn), English (en), Gujarati (gu), Hindi (hi), Kannada (kn), Kashmiri (ks), Malayalam (ml), Marathi (mr), Nepali (ne), Oriya (or), Punjabi (pa), Sanskrit (sa), Sindhi (sd), Tamil (ta), Telugu (te) and Urdu (ur).
[7]: Conneau, Alexis, et al. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116 (2019).
[8]: IndicTrans
[9]: Hu, J., Ruder, S., Siddhant, A., Neubig, G., Firat, O., & Johnson, M. (2020). [Xtreme: A massively multilingual multi-task benchmark for evaluating cross-l
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys muril-large-cased for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (muril-large-cased below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"muril-large-cased","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.