HemanthSai7 commited on
Commit
523221e
·
verified ·
1 Parent(s): 5666639

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -1
README.md CHANGED
@@ -1,3 +1,81 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  library_name: transformers
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - hi
6
+ - mr
7
+ - ta
8
+ - te
9
+ - kn
10
+ - ml
11
+ - bn
12
+ - pa
13
+ - gu
14
+ - or
15
+ pipeline_tag: text-generation
16
  library_name: transformers
17
+ ---
18
+
19
+ # Nandi-150M
20
+
21
+ ## Introduction
22
+
23
+ Nandi-150M is a compact, efficient multilingual language model designed for strong performance in resource-constrained environments. It is trained from scratch on **475 billion tokens** and supports **English and 10 Indic languages**.
24
+
25
+ Nandi-150M focuses on maximizing performance per parameter through architectural efficiency rather than scale. It is well-suited for **on-prem deployments**, **low-latency applications**, and **edge use cases**.
26
+
27
+ Nandi-150M brings the following key features:
28
+
29
+ - Strong **multilingual capability** across English and Indic languages
30
+ - Efficient design enabling **high performance at small scale (150M parameters)**
31
+ - Improved training stability via **layer rescaling and z-loss regularization**
32
+ - Reduced memory footprint using **factorized embeddings**
33
+ - Better parameter efficiency through **layer sharing**
34
+ - **Grouped Query Attention (GQA)** for faster inference
35
+ - **RoPE-based positional encoding** for improved sequence modeling
36
+
37
+ **This repo contains the base Nandi-150M model**, which has the following features:
38
+
39
+ - Type: Causal Language Model
40
+ - Training Stage: Pretraining (from scratch)
41
+ - Architecture: Transformer decoder with RoPE, RMSNorm, SwiGLU, GQA, tied embeddings
42
+ - Number of Parameters: ~150M
43
+ - Number of Layers: 16
44
+ - Number of Attention Heads: 16 (Q) / 4 (KV)
45
+ - Context Length: 2,048 tokens
46
+ - Vocabulary Size: 131,072
47
+ - Embedding: Factorized (rank = 196)
48
+ - Precision: bfloat16
49
+
50
+ ## 🌍 Supported Languages
51
+
52
+ The model is trained on English and a diverse set of Indic languages, including (but not limited to):
53
+
54
+ - Hindi
55
+ - Bengali
56
+ - Tamil
57
+ - Telugu
58
+ - Marathi
59
+ - Gujarati
60
+ - Kannada
61
+ - Malayalam
62
+ - Punjabi
63
+ - Odia
64
+
65
+ ---
66
+
67
+ ## 🚀 Usage
68
+
69
+ ```python
70
+ from transformers import AutoModelForCausalLM, AutoTokenizer
71
+
72
+ model_name = "Rta-AILabs/Nandi-150M"
73
+
74
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
75
+ model = AutoModelForCausalLM.from_pretrained(model_name)
76
+
77
+ prompt = "Explain transformer in simple words."
78
+ inputs = tokenizer(prompt, return_tensors="pt")
79
+
80
+ outputs = model.generate(**inputs, max_new_tokens=100)
81
+ print(tokenizer.decode(outputs[0]))