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
File size: 543 Bytes
838f544 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | """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
|