Downloads · 30 days
43
11% of all-time downloads
eulogik/Bharat-Tiny-LLM-v2-MLX
Bharat-Tiny-LLM-v2-MLX is a text generation model from eulogik. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
<p align="center" <img src="https://img.shields.io/badge/Params-1.5B-blue?style=flat-square" <img src="https://img.shields.io/badge/Quantization-Q4MLX-brightgreen?style=flat-square" <img src="https://img.shields.io/ba…
Downloads · 30 days
43
11% of all-time downloads
All-time downloads
380
Public
Parameters
1.5B
1.8 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors890 MB · 99%
How the weights are stored.
U321.5B · 100%
From the Hugging Face model README
300 high-frequency Devanagari subword tokens injected into the Qwen2.5 tokenizer (+0.2% vocab), embeddings initialized as the mean of constituent byte tokens, recovered with embedding warmup + LoRA.
| Metric | Base Qwen2.5-1.5B | v2 | Δ |
|---|---|---|---|
| Tokens / 1000 Devanagari chars | 1041.9 | 661.6 | −36.5% |
| Tokens / 1000 chars (mixed Hinglish+Hindi) | 593.3 | 486.6 | −18.0% |
| Bits / char (held-out Hindi, fair protocol) | 1.6531 | 1.4878 | −10.0% |
| Warmup val loss (injected rows) | 2.776 | 1.320 | −52.5% |
End-to-end savings are lower than script-only because Latin/Hinglish spans gain nothing from Devanagari tokens.
bharat CLIpip install "bharat-tiny-llm[mlx]"
bharat chat # interactive Hindi/Hinglish REPL, works offline
bharat ask "नमस्ते!"
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load(
"eulogik/Bharat-Tiny-LLM-v2-MLX",
adapter_path="eulogik/Bharat-Tiny-LLM-v2-MLX", # see note below
)
The LoRA adapter ships in the lora_adapter/ folder of this repo. mlx_lm.load
needs a local directory for adapters — easiest is:
from huggingface_hub import snapshot_download
adir = snapshot_download("eulogik/Bharat-Tiny-LLM-v2-MLX",
allow_patterns=["lora_adapter/*"]) + "/lora_adapter"
model, tokenizer = load("eulogik/Bharat-Tiny-LLM-v2-MLX", adapter_path=adir)
sampler = make_sampler(temp=0.3)
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Chai peete hain?"}],
tokenize=False, add_generation_prompt=True,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=128, sampler=sampler))
lora_adapter/.| Phase | Params | Hardware | Result |
|---|---|---|---|
| Embedding warmup (300 rows) | 614K (0.04%) | Colab T4, 3K steps | val 2.776 → 1.320 |
| LoRA (rank 8, scale 20, 16 layers) | ~5M | Mac Mini M4, 500 steps ≈ 35 min | val 1.837 @ step 400 |
Apache 2.0. Base: Qwen2.5-1.5B © Alibaba Cloud, Apache 2.0. Built by eulogik · GitHub · PyPI
@techreport{kishore2026brahmilite,
title={Brahmi-Lite: Minimal-Budget Devanagari Token Injection for Edge LLMs},
author={Gautam Kishore},
year={2026},
institution={eulogik},
url={https://github.com/eulogik/Bharat-Tiny-LLM}
}