🇮🇳 Bharat-Tiny-LLM — Edge AI for Hindi & Hinglish
33.8% Hindi token compression via Brahmi vocabulary injection. Runs offline on Apple Silicon.
bharat-tiny-llm is the official Python package for Bharat-Tiny-LLM v2: a 1.5B-parameter LLM fine-tuned for Hinglish and Devanagari Hindi, with 33.8% token compression achieved via Brahmi script injection — 300 Devanagari subwords injected into Qwen2.5's tokenizer.
Built by eulogik — an India-first AI lab shipping edge AI.
✨ v0.2.0 — Brahmi Token Injection
| Feature | Description |
|---|---|
| Brahmi injection | 300 Devanagari subwords → 33.8% fewer tokens for Hindi |
| v2 model | eulogik/Bharat-Tiny-LLM-v2-MLX with LoRA adapter |
| 52.5% loss improvement | Vs base Qwen2.5-1.5B on Hindi text |
| 880 MB | Q4 MLX, runs offline on Mac/iPhone/iPad |
Install
# Apple Silicon (recommended — MLX, fastest)
pip install bharat-tiny-llm[mlx]
# Other platforms (CPU / CUDA, transformers)
pip install bharat-tiny-llm[torch]
Quick start
v2 model (recommended)
from bharat_tiny_llm import chat
# Uses the v2 MLX model with LoRA adapter
reply = chat(
[{"role": "user", "content": "कितने बजे मिलना है?"}],
use_v2=True,
adapter_path="eulogik/Bharat-Tiny-LLM-v2-MLX/lora_adapter",
)
print(reply)
v1 model (legacy)
from bharat_tiny_llm import chat
reply = chat([{"role": "user", "content": "Chai peete hain?"}])
print(reply)
Low-level MLX
from bharat_tiny_llm import load
from mlx_lm import generate
model, tokenizer = load(use_v2=True)
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "नमस्ते, आप कैसे हैं?"}],
tokenize=False, add_generation_prompt=True,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=128))
Model variants
| Repo | Format | Size | Description |
|---|---|---|---|
eulogik/Bharat-Tiny-LLM-v2-MLX |
Q4 MLX | 880 MB | v2 edge model (recommended) |
eulogik/Bharat-Tiny-LLM-v2 |
PyTorch fp16 | 3.6 GB | v2 for server/fine-tuning |
eulogik/Bharat-Tiny-LLM |
Q4 MLX | 880 MB | v1 edge model (legacy) |
eulogik/Bharat-Tiny-LLM-fused |
PyTorch fp16 | 3.3 GB | v1 for server/fine-tuning |
License
Apache-2.0
Links
- 🤗 Model: https://huggingface.co/eulogik/Bharat-Tiny-LLM-v2-MLX
- 💻 Source: https://github.com/eulogik/Bharat-Tiny-LLM
- 🏢 Built by eulogik
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bharat_tiny_llm-0.2.0.tar.gz.
File metadata
- Download URL: bharat_tiny_llm-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
447143c6af2996d0a67859df9963a50a4e2dc180efc67196d2e2e1bd108780f8
|
|
| MD5 |
0c2f9deb820d05544e32ef0f7ca9ea9f
|
|
| BLAKE2b-256 |
46263165b5f2365f0a14e29334453383a27009131653ece9fe64f338bd20386e
|
File details
Details for the file bharat_tiny_llm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: bharat_tiny_llm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25a33b91d5a65347d09b363204739376b4a44c06d910951be48c48873447ee4d
|
|
| MD5 |
f8d4e1e7af99a049a7b7deafe054445a
|
|
| BLAKE2b-256 |
0cc795c497946b37ffd0ab3d4c945c6f16596884a3eb413aa513115131d213d8
|