somasekhar-dev commited on
Commit
29d4e0c
·
verified ·
1 Parent(s): aa69efe

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +80 -0
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - hi
4
+ - en
5
+ - bn
6
+ - ta
7
+ - te
8
+ - mr
9
+ - gu
10
+ - kn
11
+ - ml
12
+ - pa
13
+ - or
14
+ library_name: transformers
15
+ pipeline_tag: text-generation
16
+ tags:
17
+ - indic
18
+ - small-language-model
19
+ - qwen3
20
+ ---
21
+
22
+ # NextToken-model-1
23
+
24
+ A 272.7M-parameter base language model pretrained from scratch on 11 Indic
25
+ languages + English (Sangraha corpus). **This is a base next-token model,
26
+ not instruction-tuned** — it continues text, it does not follow
27
+ instructions or answer questions in a chat format. Instruction-tuning for
28
+ a specific downstream task has not been done yet for this model; this
29
+ checkpoint will be updated in place as that work progresses.
30
+
31
+ ## Architecture
32
+
33
+ Built from custom composable primitives, structurally equivalent to Qwen3
34
+ (confirmed by direct source comparison during HF conversion — see
35
+ "Conversion" below) and saved in that format for standard `transformers`
36
+ loading:
37
+
38
+ | | |
39
+ |---|---|
40
+ | Parameters | 272.7M (69.7M embedding, tied with output head; 203.0M transformer) |
41
+ | Layers | 16 |
42
+ | Hidden size | 1024 |
43
+ | Attention | GQA — 16 query heads, 4 KV heads |
44
+ | Normalization | RMSNorm (pre-norm) + per-head QK-norm before RoPE |
45
+ | FFN | SwiGLU, intermediate size 3277 |
46
+ | Positional encoding | RoPE (θ=10000) |
47
+ | Context length | 2048 |
48
+ | Tokenizer | [`sarvamai/sarvam-1`](https://huggingface.co/sarvamai/sarvam-1), vocab 68,096 |
49
+
50
+ ## Training
51
+
52
+ Pretrained on the Sangraha corpus across 11 Indic languages + English.
53
+ Trained on a mix of H100 and V100 GPUs across two phases (~5.7B tokens
54
+ per phase). This checkpoint is from the best validation loss during the
55
+ 11-language phase (step 23,500, loss 2.9318).
56
+
57
+ ## Usage
58
+
59
+ ```python
60
+ from transformers import AutoModelForCausalLM, AutoTokenizer
61
+
62
+ model = AutoModelForCausalLM.from_pretrained("somasekhar-dev/NextToken-model-1")
63
+ tokenizer = AutoTokenizer.from_pretrained("somasekhar-dev/NextToken-model-1")
64
+
65
+ inputs = tokenizer("भारत एक ऐसा देश है जहाँ", return_tensors="pt")
66
+ out = model.generate(**inputs, max_new_tokens=50, do_sample=True, temperature=0.8)
67
+ print(tokenizer.decode(out[0], skip_special_tokens=True))
68
+ ```
69
+
70
+ ## Status and limitations
71
+
72
+ - **Base model only** — no instruction-tuning, no chat template, no
73
+ downstream task specialization. Expect raw text continuation, not
74
+ question-answering or instruction-following behavior.
75
+ - Conversion from the original training format to this `Qwen3ForCausalLM`
76
+ checkpoint was verified numerically (100% argmax agreement between the
77
+ original and converted model on random inputs, plus a full
78
+ `save_pretrained`/`from_pretrained` round-trip) — not just "it loads."
79
+ - This repository will be updated in place as fine-tuning work proceeds;
80
+ check back for updates rather than assuming this snapshot is final.