Instructions to use eulogik/Bharat-Tiny-LLM-fused with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eulogik/Bharat-Tiny-LLM-fused with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="eulogik/Bharat-Tiny-LLM-fused") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("eulogik/Bharat-Tiny-LLM-fused") model = AutoModelForCausalLM.from_pretrained("eulogik/Bharat-Tiny-LLM-fused", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use eulogik/Bharat-Tiny-LLM-fused with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "eulogik/Bharat-Tiny-LLM-fused" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eulogik/Bharat-Tiny-LLM-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/eulogik/Bharat-Tiny-LLM-fused
- SGLang
How to use eulogik/Bharat-Tiny-LLM-fused 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 "eulogik/Bharat-Tiny-LLM-fused" \ --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": "eulogik/Bharat-Tiny-LLM-fused", "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 "eulogik/Bharat-Tiny-LLM-fused" \ --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": "eulogik/Bharat-Tiny-LLM-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use eulogik/Bharat-Tiny-LLM-fused with Docker Model Runner:
docker model run hf.co/eulogik/Bharat-Tiny-LLM-fused
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 "eulogik/Bharat-Tiny-LLM-fused" \
--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": "eulogik/Bharat-Tiny-LLM-fused",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'Bharat-Tiny-LLM (fused ยท fp16)
This is the full-precision fused model for Bharat-Tiny-LLM โ
the LoRA adapter merged into the base Qwen2.5-1.5B weights,
in PyTorch float16.
Use this repo when you want to:
- run inference on CPU / CUDA with
transformers, - fine-tune further, or
- produce your own quantized builds (GGUF, MLX, etc.).
Built by eulogik
For most users
You probably want a smaller, ready-to-run build instead:
| Build | Repo | Size | Use |
|---|---|---|---|
| MLX 4-bit (edge / Apple Silicon) | eulogik/Bharat-Tiny-LLM |
~880 MB | Recommended for Mac / on-device |
| GGUF Q4_K_M (llama.cpp, Android / Pi / CPU) | eulogik/Bharat-Tiny-LLM-GGUF |
~1.06 GB | Cross-platform, llama.cpp |
| PyTorch fp16 (this repo) | eulogik/Bharat-Tiny-LLM-fused |
~3.3 GB | Server / fine-tuning base |
Quick start (transformers)
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("eulogik/Bharat-Tiny-LLM-fused")
tokenizer = AutoTokenizer.from_pretrained("eulogik/Bharat-Tiny-LLM-fused")
messages = [{"role": "user", "content": "Chai peete hain?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
out = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.3,
top_p=0.85,
repetition_penalty=1.25,
no_repeat_ngram_size=3,
do_sample=True,
)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
โ ๏ธ Generation config matters. The base Qwen2.5-1.5B emits garbled out-of-script tokens at high temperature. Always use
temperature โ 0.3+repetition_penalty โฅ 1.25+no_repeat_ngram_size = 3. Thebharat-tiny-llmPyPI package applies these for you.
Links
- ๐ค Edge model (MLX): https://huggingface.co/eulogik/Bharat-Tiny-LLM
- ๐ค GGUF (llama.cpp): https://huggingface.co/eulogik/Bharat-Tiny-LLM-GGUF
- ๐ Demo: https://huggingface.co/spaces/eulogik/Bharat-Tiny-LLM
- ๐ป Source: https://github.com/eulogik/Bharat-Tiny-LLM
- ๐ฆ PyPI: https://pypi.org/project/bharat-tiny-llm/
- ๐ข Built by eulogik
License
Apache-2.0 (base Qwen2.5-1.5B weights Apache-2.0; LoRA adapter Apache-2.0).
- Downloads last month
- 400
Model tree for eulogik/Bharat-Tiny-LLM-fused
Base model
Qwen/Qwen2.5-1.5B
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "eulogik/Bharat-Tiny-LLM-fused" \ --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": "eulogik/Bharat-Tiny-LLM-fused", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'