Fill-Mask
Transformers
ONNX
Safetensors
indim
indic
multilingual
romanized
code-mixed
modernbert
encoder
custom_code
Instructions to use CobuildX-AI/InDIM-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CobuildX-AI/InDIM-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="CobuildX-AI/InDIM-small", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("CobuildX-AI/InDIM-small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_indim.py from CobuildX-AI/InDIM-small: direct link, hf CLI and curl.
- Browser
- Download file 543 Bytes
-
https://huggingface.co/CobuildX-AI/InDIM-small/resolve/main/configuration_indim.py
- Command line
-
hf download hf://CobuildX-AI/InDIM-small/configuration_indim.py
-
curl -L -o configuration_indim.py https://huggingface.co/CobuildX-AI/InDIM-small/resolve/main/configuration_indim.py
543 Bytes
| """InDIM configuration: ModernBERT with a factorized (ALBERT-style) word embedding. | |
| InDIM-small (32M) keeps a 128,064 x 128 word table and projects it to the 384-wide encoder; the masked-LM output | |
| layer reuses the same table (tied). Everything else is the ModernBERT encoder as in `transformers`. | |
| """ | |
| from transformers import ModernBertConfig | |
| class InDIMConfig(ModernBertConfig): | |
| model_type = "indim" | |
| def __init__(self, embedding_rank=128, **kwargs): | |
| super().__init__(**kwargs) | |
| self.embedding_rank = embedding_rank | |