Instructions to use Timegravity/tamil-lm-2b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Timegravity/tamil-lm-2b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Timegravity/tamil-lm-2b-instruct") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Timegravity/tamil-lm-2b-instruct") model = AutoModelForMultimodalLM.from_pretrained("Timegravity/tamil-lm-2b-instruct", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Timegravity/tamil-lm-2b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Timegravity/tamil-lm-2b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Timegravity/tamil-lm-2b-instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Timegravity/tamil-lm-2b-instruct
- SGLang
How to use Timegravity/tamil-lm-2b-instruct 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 "Timegravity/tamil-lm-2b-instruct" \ --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": "Timegravity/tamil-lm-2b-instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Timegravity/tamil-lm-2b-instruct" \ --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": "Timegravity/tamil-lm-2b-instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Timegravity/tamil-lm-2b-instruct with Docker Model Runner:
docker model run hf.co/Timegravity/tamil-lm-2b-instruct
Download eval_results/base_test.json from Timegravity/tamil-lm-2b-instruct: direct link, hf CLI and curl.
- Browser
- Download file 5.41 kB
-
https://huggingface.co/Timegravity/tamil-lm-2b-instruct/resolve/main/eval_results/base_test.json
- Command line
-
hf download hf://Timegravity/tamil-lm-2b-instruct/eval_results/base_test.json
-
curl -L -o base_test.json https://huggingface.co/Timegravity/tamil-lm-2b-instruct/resolve/main/eval_results/base_test.json
5.41 kB
| [ | |
| { | |
| "benchmark": "indicmmlu_pro_ta", | |
| "split": "test", | |
| "n": 12032, | |
| "metric": "acc", | |
| "score": 0.1167, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:05:28", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "belebele_ta", | |
| "split": "test", | |
| "n": 720, | |
| "metric": "acc", | |
| "score": 0.2181, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:06:37", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "include_ta", | |
| "split": "test", | |
| "n": 448, | |
| "metric": "acc", | |
| "score": 0.2344, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:07:20", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "mmlu_en", | |
| "split": "test", | |
| "n": 400, | |
| "metric": "acc", | |
| "score": 0.5525, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:08:00", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "gsm8k_en", | |
| "split": "test", | |
| "n": 160, | |
| "metric": "acc", | |
| "score": 0.6375, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:19:33", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "indicxnli_ta", | |
| "split": "test", | |
| "n": 5010, | |
| "metric": "acc", | |
| "score": 0.3333, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:26:19", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "indiccopa_ta", | |
| "split": "test", | |
| "n": 400, | |
| "metric": "acc", | |
| "score": 0.4775, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:26:40", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "indicsentiment_ta", | |
| "split": "test", | |
| "n": 998, | |
| "metric": "acc", | |
| "score": 0.481, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:27:33", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "indicqa_ta", | |
| "split": "test", | |
| "n": 1022, | |
| "metric": "f1", | |
| "score": 0.0422, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T20:47:43", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "flores_en_ta", | |
| "split": "test", | |
| "n": 1012, | |
| "metric": "chrf++", | |
| "score": 3.2674, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T21:40:06", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "flores_en_ta", | |
| "split": "test", | |
| "n": 1012, | |
| "metric": "bleu", | |
| "score": 0.0786, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T21:40:06", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "flores_ta_en", | |
| "split": "test", | |
| "n": 1012, | |
| "metric": "chrf++", | |
| "score": 11.8811, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T22:28:27", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "flores_ta_en", | |
| "split": "test", | |
| "n": 1012, | |
| "metric": "bleu", | |
| "score": 1.491, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T22:28:27", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "xlsum_ta", | |
| "split": "test", | |
| "n": 2027, | |
| "metric": "rougeL", | |
| "score": 0.3586, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T23:43:31", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "tanglish_heldout", | |
| "split": "test", | |
| "n": 2740, | |
| "metric": "bpc", | |
| "score": 3.2534, | |
| "script": "eval/suite.py", | |
| "commit": "d6a1c36", | |
| "timestamp": "2026-08-25T23:44:34", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "milu_ta", | |
| "split": "test", | |
| "n": 6372, | |
| "metric": "acc", | |
| "score": 0.2666, | |
| "script": "eval/suite.py", | |
| "commit": "b160a84", | |
| "timestamp": "2026-08-26T11:55:13", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "in22gen_en_ta", | |
| "split": "test", | |
| "n": 820, | |
| "metric": "chrf++", | |
| "score": 3.9127, | |
| "script": "eval/suite.py", | |
| "commit": "b160a84", | |
| "timestamp": "2026-08-26T12:47:23", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "in22gen_en_ta", | |
| "split": "test", | |
| "n": 820, | |
| "metric": "bleu", | |
| "score": 0.0671, | |
| "script": "eval/suite.py", | |
| "commit": "b160a84", | |
| "timestamp": "2026-08-26T12:47:23", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "in22gen_ta_en", | |
| "split": "test", | |
| "n": 820, | |
| "metric": "chrf++", | |
| "score": 11.6249, | |
| "script": "eval/suite.py", | |
| "commit": "b160a84", | |
| "timestamp": "2026-08-26T13:32:55", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| }, | |
| { | |
| "benchmark": "in22gen_ta_en", | |
| "split": "test", | |
| "n": 820, | |
| "metric": "bleu", | |
| "score": 2.0367, | |
| "script": "eval/suite.py", | |
| "commit": "b160a84", | |
| "timestamp": "2026-08-26T13:32:55", | |
| "stage": "base", | |
| "model": "Qwen/Qwen3.5-2B-Base", | |
| "adapter": null | |
| } | |
| ] |