Text Generation
MLX
Safetensors
Hindi
English
qwen2
hindi
devanagari
brahmi
qwen2.5
edge-ai
india
llm
apple-silicon
conversational
4-bit precision
Instructions to use eulogik/Bharat-Tiny-LLM-v2-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use eulogik/Bharat-Tiny-LLM-v2-MLX 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-v2-MLX") 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-v2-MLX 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-v2-MLX"
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-v2-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use eulogik/Bharat-Tiny-LLM-v2-MLX 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-v2-MLX"
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-v2-MLX
Run Hermes
hermes
- OpenClaw new
How to use eulogik/Bharat-Tiny-LLM-v2-MLX 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-v2-MLX"
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-v2-MLX" \ --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-v2-MLX 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-v2-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "eulogik/Bharat-Tiny-LLM-v2-MLX" # 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-v2-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
🇮🇳 Bharat-Tiny-LLM v2 — MLX
1.5B Hindi-capable Open-Weights LLM with Brahmi Token Injection. Optimized for Apple Silicon (Mac, iPhone, iPad).
✨ Key Innovation: Brahmi Token Injection
Bharat-Tiny-LLM v2 introduces 300 surgically-injected Devanagari subword tokens into the Qwen2.5-1.5B tokenizer. This achieves 33.8% fewer tokens when encoding Hindi text — resulting in faster inference, lower memory footprint, and higher throughput on edge devices.
📊 Performance Benchmarks & Technical Advantages
| Metric | Base Qwen2.5-1.5B | Bharat-Tiny-LLM v2 MLX | Technical Advantage |
|---|---|---|---|
| Tokens for 1,000 Hindi Chars | ~950 tokens | ~630 tokens | 33.8% Token Reduction (up to 58% on chat prompts) |
| Model Size (Q4 Quantized) | 880 MB | 880 MB | Fits in <3.8 GB RAM |
| Inference Speed (Hindi) | 50 tok/s | 68 tok/s | +36% Faster Throughput |
| Validation Loss (Hindi Corpus) | 2.776 | 1.837 | 52.5% Loss Reduction (Perplexity: 16.1 → 6.3) |
🚀 Quick Start with MLX
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
# Load quantized open weights + LoRA adapter
model, tokenizer = load(
"eulogik/Bharat-Tiny-LLM-v2-MLX",
adapter_path="eulogik/Bharat-Tiny-LLM-v2-MLX/lora_adapter"
)
# Generate Hindi text
sampler = make_sampler(temp=0.3)
response = generate(
model,
tokenizer,
prompt="मैं आपको बताना चाहता हूँ कि",
max_tokens=100,
sampler=sampler
)
print(response)
💻 Hardware & Platform Support
| Device | Runtime Engine | Peak RAM | Status |
|---|---|---|---|
| Apple Silicon Mac (M1/M2/M3/M4) | MLX / Python | 3.8 GB | ✅ Real-time (68 tok/s) |
| iPhone / iPad | MLX Swift | 3.8 GB | ✅ Real-time (On-Device) |
| PyTorch / Linux / CUDA GPUs | Transformers | Var | Use eulogik/Bharat-Tiny-LLM-v2 |
📜 License & Citation
Licensed under Apache 2.0. Free for commercial and research use.
@misc{kishore2026brahmi,
title={Brahmi: Efficient Devanagari Token Injection for Multilingual LLMs},
author={Gautam Kishore},
year={2026},
publisher={eulogik},
howpublished={\url{https://huggingface.co/eulogik/Bharat-Tiny-LLM-v2-MLX}}
}
- Downloads last month
- 89
Model size
0.2B params
Tensor type
BF16
·
U32 ·
Hardware compatibility
Log In to add your hardware
4-bit

