Downloads · 30 days
15
16% of all-time downloads
AiventraLab/maithili-clm
maithili-clm is a text generation model from AiventraLab. Use it when you need the model to write or continue text. The card lists the license as cc-by-4.0.
MaithiliCLM is a decoder-only causal language model (109.5M parameters) pretrained from scratch on MaithiliCorpus — the largest open Maithili text corpus comprising 39.8M clean, LID-filtered, and deduplicated words. T…
Downloads · 30 days
15
16% of all-time downloads
All-time downloads
93
Public
Repo size
488 MB
Likes
0
Public
Click a slice to open those files.
.pt488 MB · 99%
From the Hugging Face model README
MaithiliCLM is a decoder-only causal language model (109.5M parameters) pretrained from scratch on MaithiliCorpus — the largest open Maithili text corpus comprising 39.8M clean, LID-filtered, and deduplicated words. This is the first causal/generative language model ever trained specifically for Maithili, a low-resource Indo-Aryan language spoken by approximately 50 million people primarily in Bihar, India and Nepal.
Unlike encoder-only models (BERT, RoBERTa) that only support understanding tasks, MaithiliCLM enables text generation, making it suitable for creative writing, dialogue systems, summarization, and other generative applications in Maithili.
| Property | Value |
|---|---|
| Architecture | Decoder-only Transformer (GPT-family) |
| Parameters | 109,545,984 |
| Vocabulary | Byte-level BPE, 32,000 tokens |
| Context Window | 1,024 tokens |
| Hidden Size | 768 |
| Intermediate Size | 3,072 |
| Attention Heads | 12 |
| Hidden Layers | 12 |
| Activation | SwiGLU |
| Normalization | RMSNorm |
| Position Encoding | Rotary Position Embeddings (RoPE) |
| Dropout | 0.1 |
| Training Data | MaithiliCorpus LID-filtered (48,064 documents, 27.5M words) |
| Training Tokens | 983M |
| Training Steps | 30,000 |
| Effective Batch Size | 32 |
| Optimizer | AdamW (lr=3e-4, weight_decay=0.1) |
| LR Schedule | Cosine with warmup |
| Precision | FP16 mixed |
| License | CC-BY-4.0 |
MaithiliCLM implements a modernized GPT-2 family architecture with the following enhancements:
The tokenizer is a byte-level BPE trained from scratch on MaithiliCorpus with a vocabulary of 32,000 tokens. This compact vocabulary reduces embedding parameters from 153.6M to 24.6M, shrinking the embedding layer from 55% to 22% of total model parameters.
| Property | Value |
|---|---|
| Algorithm | Byte-level BPE |
| Vocabulary Size | 32,000 |
| Training Data | MaithiliCorpus (39.8M words) |
| Tokens per Word | 3.53 |
| Special Tokens | <s>, </s>, <unk>, <pad> |
The training corpus underwent rigorous cleaning and quality filtering:
| Metric | Step 0 | Step 10K | Step 20K | Step 30K |
|---|---|---|---|---|
| Train Loss | 10.32 | 3.65 | 3.18 | 3.04 |
| Val Loss | 10.31 | 3.42 | 3.18 | 3.12 |
| Val PPL | 29,674 | 30.56 | 24.05 | 22.68 |
Training plateaued after ~30K steps with diminishing returns (<1 ppl improvement per 5K steps).
The model generates coherent Maithili text across diverse prompts. Generated continuations are syntactically correct and semantically plausible, though coherence degrades with longer sequences due to the limited training data.
from transformers import AutoTokenizer
import torch
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("AiventraLab/maithili-clm")
# Load model (requires custom model class - see model.py)
# model = MaithiliGPT.from_pretrained("AiventraLab/maithili-clm")
# Generate text
prompt = "मैथिली भाषा एक"
input_ids = tokenizer.encode(prompt, return_tensors="pt")
# Autoregressive generation
output = model.generate(
input_ids,
max_new_tokens=100,
temperature=0.8,
top_k=50,
top_p=0.95,
do_sample=True
)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
The authors gratefully acknowledge AnK Komputing for providing the computational resources and infrastructure used to conduct the simulations/analyses presented in this work. We thank the team at AnK Komputing for their technical support and access to their high-performance computing services.
@article{maithili2026clm,
title={MaithiliCLM: First Causal Language Model for the Maithili Language},
author={[Authors]},
journal={arXiv preprint},
year={2026}
}
CC-BY 4.0 applies to the model weights, tokenizer, and documentation. The training data (MaithiliCorpus) retains its original license terms.