Instructions to use FrontiersMind/Nandi-Mini-150M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FrontiersMind/Nandi-Mini-150M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FrontiersMind/Nandi-Mini-150M-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FrontiersMind/Nandi-Mini-150M-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FrontiersMind/Nandi-Mini-150M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FrontiersMind/Nandi-Mini-150M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FrontiersMind/Nandi-Mini-150M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FrontiersMind/Nandi-Mini-150M-Instruct
- SGLang
How to use FrontiersMind/Nandi-Mini-150M-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "FrontiersMind/Nandi-Mini-150M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FrontiersMind/Nandi-Mini-150M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "FrontiersMind/Nandi-Mini-150M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FrontiersMind/Nandi-Mini-150M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FrontiersMind/Nandi-Mini-150M-Instruct with Docker Model Runner:
docker model run hf.co/FrontiersMind/Nandi-Mini-150M-Instruct
Updated Readme.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
base_model:
|
| 18 |
+
- Rta-AILabs/Nandi-Mini-150M
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Nandi-Mini-150M-Instruct
|
| 22 |
+
|
| 23 |
+
## Introduction
|
| 24 |
+
|
| 25 |
+
Nandi-Mini-150M-Instruct is a compact, efficient multilingual language model designed for strong performance in resource-constrained environments. It is pre-trained from scratch on 525 billion tokens and further enhanced through instruction tuning and Direct Preference Optimization (DPO). The model supports English and 10 Indic languages.
|
| 26 |
+
|
| 27 |
+
We do not employ any benchmaxing tricks; the model is designed to be genuinely strong and highly effective for fine-tuning on downstream tasks.
|
| 28 |
+
|
| 29 |
+
Nandi-Mini-150M-Instruct focuses on maximizing performance per parameter through architectural efficiency rather than scale. It is optimized for edge devices, on-prem deployments, and low-latency applications, making it ideal for resource-constrained environments.
|
| 30 |
+
Nandi-Mini-150M-Instruct brings the following key features:
|
| 31 |
+
|
| 32 |
+
- Strong **multilingual capability** across English and Indic languages
|
| 33 |
+
- Efficient design enabling **high performance at small scale (150M parameters)**
|
| 34 |
+
- Reduced memory footprint using **factorized embeddings**
|
| 35 |
+
- Better parameter efficiency through **layer sharing**
|
| 36 |
+
|
| 37 |
+
## 📝 Upcoming Releases & Roadmap
|
| 38 |
+
|
| 39 |
+
We’re just getting started with the Nandi series 🚀
|
| 40 |
+
|
| 41 |
+
- **Nandi-Mini-150M-Tool-Calling** — Coming Soon
|
| 42 |
+
- **Nandi-Mini-500M (Base + Instruct)** — Pre-Training Going On
|
| 43 |
+
- **Nandi-Mini-1B (Base + Instruct)** — Pre-Training Going On
|
| 44 |
+
|
| 45 |
+
We are actively working on expanding the Nandi family to cover a wider range of use cases—from lightweight edge deployments to more capable instruction-tuned systems.
|
| 46 |
+
|
| 47 |
+
📢 **Blogs & technical deep-dives coming soon**, where we’ll share:
|
| 48 |
+
- Architecture decisions and design trade-offs
|
| 49 |
+
- Training insights and dataset composition
|
| 50 |
+
- Benchmarks and real-world applications
|
| 51 |
+
|
| 52 |
+
Stay tuned!
|
| 53 |
+
|
| 54 |
+
**This repo contains the instruct Nandi-Mini-150M model**, which has the following features:
|
| 55 |
+
|
| 56 |
+
- Type: Causal Language Model
|
| 57 |
+
- Training Stage: Pretraining (from scratch)
|
| 58 |
+
- Architecture: Transformer decoder with RoPE, RMSNorm, SwiGLU, GQA, tied embeddings, **factorize embeddings**
|
| 59 |
+
- Number of Layers: 16*2 [Layer Sharing, effective layer =32]
|
| 60 |
+
- Context Length: 2,048 tokens
|
| 61 |
+
- Vocabulary Size: 131,072
|
| 62 |
+
|
| 63 |
+
## 🌍 Supported Languages
|
| 64 |
+
|
| 65 |
+
The model is trained on English and a diverse set of Indic languages, including:
|
| 66 |
+
|
| 67 |
+
- Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia
|
| 68 |
+
|
| 69 |
+
## Benchmark Results
|
| 70 |
+
|
| 71 |
+
## 📊 Benchmark Comparison (~150M Class)
|
| 72 |
+
|
| 73 |
+
| Model Name | Parameters | Tokens(B) | HellaSwag | Winogrande | GPQA | MMLU | GSM8K | HumanEval | Average |
|
| 74 |
+
|------------------|---------------|------------------|----------|------------|------|------|-------|-----------|---------|
|
| 75 |
+
| Mobile-LLM-125M | 125 | 1000 | 38.90 | 53.10 | - | - | - | - | - |
|
| 76 |
+
| SmolLM-135M-Base | 135 | 600 | 42.66| 53.03 | 25.44| 25.30| 1.36 | 0.00 | 24.63 |
|
| 77 |
+
| SmolLM2-135M-Base| 135 | 2000 | 43.13| 53.27 | 22.09| 24.09| 1.74 | 0.00 | 24.05 |
|
| 78 |
+
| **Nandi-Mini-150M-Base-Instruct** | **150** | **500** | 37.20 | 52.32 | **28.57** | **28.86** | **2.58** | **4.27** | **25.63** |
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
## 📊 Model Benchmark Comparison With Slightly Bigger Models (350M–600M Class)
|
| 82 |
+
|
| 83 |
+
| Model Name | Parameters | Tokens(B) | HellaSwag | Winogrande | GPQA | MMLU | GSM8K | HumanEval | Average |
|
| 84 |
+
|---------------------|---------------|------------------|----------|------------|------|------|-------|-----------|---------|
|
| 85 |
+
| Mobile-LLM-360M | 350 | 1000 | 49.60 | 56.59 | - | - | - | - | - |
|
| 86 |
+
| Qwen-2-0.5-Base | 500 | 12000 | 49.01 | 57.69 | 27.23| 44.06| 10.61 | 22.56 | 35.19 |
|
| 87 |
+
| Qwen2.5-0.5B-Base | 500 | 18000 | 52.16 | 56.82 | 24.10| 47.41| 4.77 | 29.87 | 35.86 |
|
| 88 |
+
| Qwen3-0.6B-Base | 600 | 36000 | 53.77 | 59.19 | 30.80| 50.34| 15.31 | 28.04 | 39.58 |
|
| 89 |
+
| SmolLM-360M-Base | 360 | 600 | 53.33 | 57.22 | 21.20| 24.92| 2.19 | 1.21 | 26.68 |
|
| 90 |
+
| SmolLM2-360M-Base | 360 | 4000 | 56.30 | 59.19 | 25.22| 25.55| 2.88 | 0.00 | 28.19 |
|
| 91 |
+
| **Nandi-Mini-150M-Base** | **150** | 500 | 37.20| 52.32 | 28.57 | 28.86 | 2.58 | 4.27 | 25.63 |
|
| 92 |
+
|
| 93 |
+
### Note
|
| 94 |
+
Human-Eval, IfEval & GSM8K have been evaluated using Greedy-decoding for now for all models.
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
## 🚀 Usage
|
| 99 |
+
|
| 100 |
+
```python
|
| 101 |
+
!pip install transformers=='5.4.0'
|
| 102 |
+
|
| 103 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
model_name = "Rta-AILabs/Nandi-mini-150M-Instruct"
|
| 107 |
+
|
| 108 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
| 109 |
+
|
| 110 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 111 |
+
model_name,
|
| 112 |
+
trust_remote_code=True,
|
| 113 |
+
device_map="auto",
|
| 114 |
+
).eval()
|
| 115 |
+
|
| 116 |
+
prompt = """
|
| 117 |
+
Explain Newton's second Law of Motion
|
| 118 |
+
"""
|
| 119 |
+
model_inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
|
| 120 |
+
|
| 121 |
+
outputs = model.generate(
|
| 122 |
+
**model_inputs,
|
| 123 |
+
max_new_tokens=50,
|
| 124 |
+
do_sample=True,
|
| 125 |
+
temperature=0.3,
|
| 126 |
+
top_k=20,
|
| 127 |
+
repetition_penalty=1.1,
|
| 128 |
+
top_p=0.95
|
| 129 |
+
)
|
| 130 |
+
|
| 131 |
+
response = tokenizer.decode(
|
| 132 |
+
outputs[0],
|
| 133 |
+
skip_special_tokens=True,
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
print(response)
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
## 📬 Feedback & Suggestions
|
| 142 |
+
|
| 143 |
+
We’d love to hear your thoughts, feedback, and ideas!
|
| 144 |
+
|
| 145 |
+
- **Email:** support@rtaailabs.com
|
| 146 |
+
- **Official Website** https://rtaailabs.com/
|
| 147 |
+
- **LinkedIn:** https://www.linkedin.com/company/rta-ai-lab
|
| 148 |
+
- **X (Twitter):** https://x.com/Rta_AILabs
|