Downloads · 30 days
0
shrey1211/lma-indic-models-shrey715
lma-indic-models-shrey715 is a machine learning model from shrey1211. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Two fully independent, from-scratch (no pretrained models, no pretrained tokenizers, no HuggingFace transformers classes) decoder-only Transformer language models -- Model H (Hindi, higher-resource) and Model L (Nepal…
Downloads · 30 days
0
Access
Public
Updated Sep 4, 2026
Repo size
13.6 GB
Likes
0
Public
Click a slice to open those files.
.gz7.1 GB · 75%
From the Hugging Face model README
Two fully independent, from-scratch (no pretrained models, no pretrained
tokenizers, no HuggingFace transformers classes) decoder-only Transformer
language models -- Model H (Hindi, higher-resource) and Model L (Nepali,
lower-resource) -- built across three phases: Phase 1 (data pipeline +
BPE tokenizer), Phase 2 (pretraining + evaluation, incl. a bonus
no-positional-embedding ablation), Phase 3 (synthetic reasoning
finetuning + attention analysis). 26,524,160 parameters each,
identical architecture, entirely separate data/vocabulary/weights between
languages. Generated by scripts/publish/push_to_hf.py (data) and
scripts/publish/push_checkpoints_to_hf.py (checkpoints, under
checkpoints/); see the source repository's report/phase{1,2,3}/report.tex
for full methodology.
checkpoints/hindi/latest.ptcheckpoints/nepali/latest.ptFull per-variant metrics (main + NoPE ablation + finetuned) and loading
instructions: checkpoints/README.md.
chain_5hop structural-generalization test), leakage audit: passedcheckpoints/hindi_finetune/latest.ptchain_5hop structural-generalization test), leakage audit: passedcheckpoints/nepali_finetune/latest.pthindi/
├── tokenizer/ # all 5 swept BPE vocab sizes (4,096, 8,192, 16,384, 32,768, 65,536), .model+.vocab each
├── perplexity_filter/ # KenLM 5-gram fluency filter used during cleaning
├── reasoning/{train,val,test}.jsonl.gz + generation_stats.json # Phase 3 synthetic reasoning dataset
└── data/
├── processed/{train,val,test}/*.jsonl.gz # final pretraining corpus splits
└── raw/
├── downloaded/ # Sangraha subset actually used (gzipped)
└── manual/ # self-collected news/Wikipedia/archive.org (gzipped)
nepali/
├── tokenizer/ # all 5 swept BPE vocab sizes (4,096, 8,192, 16,384, 32,768, 65,536), .model+.vocab each
├── perplexity_filter/ # KenLM 5-gram fluency filter used during cleaning
├── reasoning/{train,val,test}.jsonl.gz + generation_stats.json # Phase 3 synthetic reasoning dataset
└── data/
├── processed/{train,val,test}/*.jsonl.gz # final pretraining corpus splits
└── raw/
├── downloaded/ # Sangraha subset actually used (gzipped)
└── manual/ # self-collected news/Wikipedia/archive.org (gzipped)
checkpoints/<lang>{,_no_pos_emb,_finetune}/latest.pt # pushed separately, see checkpoints/README.md
.crawl_state_*.json scraper resume-checkpoint files are deliberately excluded
(internal bookkeeping, not corpus content).
datasets.load_dataset handles gzip-compressed JSONL natively -- no manual
decompression needed:
from datasets import load_dataset
ds = load_dataset("json", data_files="hindi/data/processed/train/train.jsonl.gz", split="train")
All 5 swept vocab sizes are included per language (4,096, 8,192, 16,384, 32,768, 65,536); this
project currently uses 8,192 for both (see report/phase1/report.tex,
Vocabulary Size Selection, for why):
import sentencepiece as spm
sp = spm.SentencePieceProcessor(model_file="hindi/tokenizer/hindi_bpe_8192.model")
import kenlm
model = kenlm.Model("hindi/perplexity_filter/perplexity_filter.klm")
from datasets import load_dataset
ds = load_dataset("json", data_files="hindi/reasoning/train.jsonl.gz", split="train")
Not HuggingFace-transformers-compatible; load with the project's own
scripts.model.transformer.MonolingualDecoderLM (see
checkpoints/README.md for the full snippet and
per-variant metrics).