Downloads · 30 days
400
100% of all-time downloads
somasekhar-dev/NextToken-model-1
NextToken-model-1 is a machine learning model from somasekhar-dev. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
A 272.7M-parameter language model, pretrained from scratch on 11 Indic languages + English (Sangraha corpus), then fine-tuned on grounded multilingual QA for the Indian government-schemes / financial-banking domain (P…
Downloads · 30 days
400
100% of all-time downloads
All-time downloads
400
Public
Parameters
273M
3.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 99%
From the Hugging Face model README
A 272.7M-parameter language model, pretrained from scratch on 11 Indic languages + English (Sangraha corpus), then fine-tuned on grounded multilingual QA for the Indian government-schemes / financial-banking domain (PM-KISAN, Ayushman Bharat, banking products, insurance, savings instruments, etc.).
Updated in place — this repo tracks the current best domain checkpoint, not a fixed snapshot; check back for updates as fine-tuning improves.
Built from custom composable primitives, structurally equivalent to Qwen3
(confirmed by direct source comparison during HF conversion) and saved in
that format for standard transformers loading:
| Parameters | 272.7M (69.7M embedding, tied with output head; 203.0M transformer) |
| Layers | 16 |
| Hidden size | 1024 |
| Attention | GQA — 16 query heads, 4 KV heads |
| Normalization | RMSNorm (pre-norm) + per-head QK-norm before RoPE |
| FFN | SwiGLU, intermediate size 3277 |
| Positional encoding | RoPE (θ=10000) |
| Context length | 2048 |
| Tokenizer | sarvamai/sarvam-1, vocab 68,096 |
Pretraining: Sangraha corpus, 11 Indic languages + English, ~5.7B tokens/phase across H100 and V100 GPUs (best validation loss checkpoint, step 23,500, loss 2.9318).
Domain SFT (v2, this checkpoint): full fine-tune (not LoRA) on 38,002 grounded QA examples (40,363 total across train/val/test) covering Indian government schemes and banking/financial products, generated across 9 languages (hi/kn/ta/te/mr/bn/gu/pa/en) from 846 scheme/product source documents (57 schemes/products, 1,445 source-document chunks). Prompt format:
Context: {context}
Question: {question}
Answer: {answer}
Loss masked to the Answer: span only. Trained with early stopping on
validation loss (patience=3 evals with no improvement) rather than a fixed
epoch count — v1 (3 fixed epochs on a smaller, thinner 4,728-example set)
overfit badly (train loss kept falling while val loss rose). This run
stopped at step 1400/3561 (< 1 epoch over the larger v2 set); the published
weights are from step 1100, the actual best-val-loss point (1.886), not the
final step.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("somasekhar-dev/NextToken-model-1")
tokenizer = AutoTokenizer.from_pretrained("somasekhar-dev/NextToken-model-1")
prompt = "Context: PM-KISAN provides Rs. 6,000 per year, paid in three installments of Rs. 2,000 each.\nQuestion: How much does PM-KISAN pay per year?\nAnswer:"
inputs = tokenizer(prompt, return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=60, do_sample=False)
print(tokenizer.decode(out[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True))
somasekhar-dev/nexttoken-model-1-dataset-sft (v2).Qwen3ForCausalLM
was verified numerically (100% argmax agreement, full round-trip) for
the pretrained base this was fine-tuned from.