Instructions to use eulogik/Bharat-Tiny-LLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use eulogik/Bharat-Tiny-LLM with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("eulogik/Bharat-Tiny-LLM") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use eulogik/Bharat-Tiny-LLM with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "eulogik/Bharat-Tiny-LLM"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "eulogik/Bharat-Tiny-LLM" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use eulogik/Bharat-Tiny-LLM with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "eulogik/Bharat-Tiny-LLM"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default eulogik/Bharat-Tiny-LLM
Run Hermes
hermes
- OpenClaw new
How to use eulogik/Bharat-Tiny-LLM with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "eulogik/Bharat-Tiny-LLM"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "eulogik/Bharat-Tiny-LLM" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use eulogik/Bharat-Tiny-LLM with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "eulogik/Bharat-Tiny-LLM"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "eulogik/Bharat-Tiny-LLM" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eulogik/Bharat-Tiny-LLM", "messages": [ {"role": "user", "content": "Hello"} ] }'
Bharat-Tiny-LLM 🇮🇳
Hinglish AI — trained on a Mac Mini M4, runs on ₹8,000 phones.
The Story
I trained an AI to speak Hinglish on a Mac Mini. No cloud compute. No GPU cluster. Just $750 of Apple Silicon and a lot of chai.
This is Bharat-Tiny-LLM — a Qwen2.5-1.5B model fine-tuned on 376K Hinglish conversations. Quantized to 828 MB (Q4), it delivers ~57 tokens/second on a Mac Mini M4 and is small enough to run on an ₹8,000 smartphone.
Most AI models today are skyscrapers — built by billion-dollar companies, requiring data centers, and serving only English. We built a bicycle. A tiny, efficient, open-source model that speaks the way 600 million Indians actually talk: Hinglish.
What Makes This Different
| Big AI | Bharat-Tiny-LLM | |
|---|---|---|
| Hardware | $100M GPU clusters | Mac Mini M4 (16GB) |
| Cloud Cost | Millions | $0 |
| Language | English only | Hinglish (हिंग्लिश) |
| Model Size | 70B–405B params | 1.5B (828 MB Q4) |
| Device | Data centers | ₹8,000 phones |
| Speed | API latency | 57 tok/s on-device |
| License | Proprietary/Research | Apache 2.0 |
Model Details
Architecture
- Base Model: Qwen2.5-1.5B (Apache 2.0)
- Fine-Tuning Method: LoRA (16 layers, rank 8, alpha 16)
- Training Hardware: Mac Mini M4, 16GB unified memory
- Training Duration: ~3.3 days for 76K iterations
- Quantization: 4-bit (Q4) via MLX — 4.501 bits/weight
- Total Trainable Parameters: 5.276M (0.342% of base)
Base model details (click to expand)
This model is fine-tuned from Qwen2.5-1.5B (Apache 2.0), one of the few small models with native multilingual support (29 languages including Hindi). Unlike English-only models (like SmolLM2, which we tried first — val loss plateaued at 1.32), Qwen2.5 already understands Hindi morphology. LoRA fine-tuning on Hinglish data was enough to make it conversational.
Performance
| Metric | Value |
|---|---|
| Training Data | 376,040 conversations |
| Validation Loss | 0.781 (best at 75K iters) |
| Inference Speed | ~57 tok/s (Mac Mini M4) |
| Model Size | 828 MB (Q4 quantized) |
| Memory Usage | ~1.2 GB at inference |
| Context Length | 512 tokens |
Quick Start
Using mlx-lm (macOS / Apple Silicon)
pip install mlx-lm
python3 -c "
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load('eulogik/Bharat-Tiny-LLM')
sampler = make_sampler(temp=0.7)
prompt = '<|im_start|>user\nChai peete hain?<|im_end|>\n<|im_start|>assistant\n'
response = generate(model, tokenizer, prompt=prompt, max_tokens=200, sampler=sampler)
print(response)
"
Platform Support
| Platform | Status | Instructions |
|---|---|---|
| macOS (Apple Silicon) | ✅ Works | Use mlx-lm (above) |
| Linux / Windows | 🔄 Coming | Need transformers-compatible bf16 export |
| Android | 🔄 Coming | MLX Android bindings in development |
| Raspberry Pi 5 | 🔄 Coming | Testing in progress |
Example Outputs
| Prompt | Response | Quality |
|---|---|---|
| "Kal interview hai, nervous ho raha hoon" | "Chill maaro, you'll be alright. Bas apne aap ko confident rakhna aur jo aata hai woh bol dena. Sab theek hoga." | ✅ |
| "Biryani kaise banate hain?" | Gives structured recipe with ingredients list and step-by-step instructions in Hinglish | ✅ |
| "Delhi me rehne ke liye kya karna padega?" | Specific advice on metro, parking, traffic, and areas to live | ✅ |
| "Weekend pe kya karein?" | 10 ideas with examples — museums, parks, street food, movies | ✅ |
| "Mujhe Hindi seekhni hai" | Practical listening tips, YouTube channels, and practice strategies | ✅ |
| "Chai peetey hain?" | Full chai recipe with proportions and tips | ✅ |
| "Mera phone charge nahi ho raha" | Troubleshooting steps (though slightly repetitive) | ⚠️ |
| "Job nahi mil rahi" | Can get confused — still improving on emotional/career topics | ❌ |
Training Data
We curated 376,040 conversations from 5 open-source datasets, deduplicated and formatted as chat messages:
| Dataset | Samples | Domain |
|---|---|---|
| Hinglish Conversations | 201,633 | Natural Hinglish dialogue |
| IndicVault (Hindi) | 74,053 | 20-topic Hindi QA |
| IndicVault (Hinglish) | 77,210 | 20-topic Hinglish QA |
| Hinglish Instruct | 10,378 | Instruction tuning |
| Yojana Sahayak | 6,828 | Government scheme info |
| cookGPT | 5,938 | Indian recipes |
All data was:
- Trimmed to 512 characters per message (to fit within model context)
- Converted to
messagesformat withuser/assistantroles - Split 95% train / 5% validation
Training Details
Hyperparameters
Base model: Qwen2.5-1.5B (bf16 from mlx-community)
Method: LoRA (16 layers, rank 8, alpha 16)
Batch size: 4
Seq length: 512
Learning rate: 5e-5 (with cosine schedule)
Iterations: 76,420
Optimizer: AdamW
Warmup: 100 steps
Seed: 42
Training Curve
Val Loss
1.25 | █
1.20 | ██
1.15 | ███
1.10 | ████
1.05 | █████
1.00 | ██████
0.95 | ████████
0.90 | ██████████
0.85 | ████████████
0.80 | ██████████████
0.78 | ████████████████ ← Best at 75K iters
+------------------------
0 20K 40K 60K 80K
Speed Optimization
| Config | it/s | Memory | Notes |
|---|---|---|---|
| batch=2, seq=1024 | 0.30 | 10.7 GB | Initial config |
| batch=8, seq=256 | 0.24 | 10.0 GB | Too much overhead |
| batch=4, seq=512 | 0.30 | 10.3 GB | Final — best balance |
| batch=4, seq=1024 | OOM | — | Exceeded Metal GPU |
Limitations
- Not fully converged — Only 76K iterations; val loss was still decreasing at 0.781. More training (target: 110K) would help.
- Occasional English drift — Some responses switch entirely to English. Needs more Hinglish-only examples.
- Telugu leakage — IndicVault Hindi data contains some Telugu examples that leak into responses.
- Emotional/career topics — Responses to queries about jobs, relationships, or mental health can be confused or repetitive.
- Short context — 512 token limit prevents multi-turn conversations or long-form generation.
- MLX format only — The Q4 quantized model is in Apple MLX format. We plan to release a transformers-compatible version.
- Not instruction-tuned — This is a base model fine-tuned on conversations, not RLHF/DPO-tuned. Responses are helpful but not aligned.
Roadmap
- Phase 0: Fine-tune Qwen2.5-1.5B with LoRA on Hinglish data
- Phase 1: Quantize to Q4 (828 MB) for edge deployment
- Phase 2: Extend to 8 Indian languages (Tamil, Telugu, Bengali, Marathi, etc.)
- Phase 3: DPO/RLHF for quality improvement
- Phase 4: BharatTiny-Bench evaluation suite
- Phase 5: Web demo with Gradio
- Phase 6: Android / Raspberry Pi 5 deployment
Why "Bharat-Tiny-LLM"?
600 million Indians speak Hinglish — a natural mix of Hindi and English. But every LLM today is either English-only or pure Hindi. There is no model that understands "Yaar, kal ka match dekh liya? Rohit ne toh maara!"
We built this because:
- No one builds for edge devices in India. Everyone targets data centers.
- No one speaks Hinglish. Everyone speaks either English or "pure" Hindi.
- No one does it on a budget. Everyone burns millions in cloud compute.
We're building the bicycle while everyone else builds skyscrapers.
Citation
@misc{bharat-tiny-llm-2026,
title = {Bharat-Tiny-LLM: Hinglish Edge AI Trained on a Mac Mini},
author = {Gautam Kishore},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/eulogik/Bharat-Tiny-LLM}
}
License
Apache 2.0 — Free for commercial and research use. The base model (Qwen2.5-1.5B) is also Apache 2.0.
Built with chai ☕, patience 🧘, and a Mac Mini M4 💻 — somewhere in India.
- Downloads last month
- -
4-bit