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
Commit History
-
Upload eval_results/contamination_v2.json with huggingface_hub
Verified signaturefa1eed0 -
Upload eval_results/abstention_sft_r1.json with huggingface_hub
Verified signaturebf9ac7f -
Upload eval_results/guard_small_eval.json with huggingface_hub
Verified signature87d6c31 -
Upload eval_results/political_safety_sft_r1.json with huggingface_hub
Verified signaturebf5ca5f -
Upload eval_results/oot_sft_r2.json with huggingface_hub
Verified signaturef215a8f -
Upload eval_results/political_safety_cpt_final.json with huggingface_hub
Verified signaturea85790d -
Upload eval_results/sft_final_test.json with huggingface_hub
Verified signature77f9509 -
Upload eval_results/redteam_cpt_final.json with huggingface_hub
Verified signature6d7e6e4 -
Upload eval_results/abstention_sft_r1b.json with huggingface_hub
Verified signature52c9bcb -
Upload eval_results/redteam_sft_final.json with huggingface_hub
Verified signaturef4f09f6 -
Upload eval_results/redteam_cpt_final_guarded.json with huggingface_hub
Verified signature163bf31 -
Upload eval_results/political_safety_sft_r2_serve_v3.json with huggingface_hub
Verified signature38a1a32 -
Upload eval_results/exp021_dev.json with huggingface_hub
Verified signaturebba23e7 -
Upload eval_results/political_safety_sft_r2.json with huggingface_hub
Verified signaturee2baaf0 -
Upload eval_results/benign_sweep_sft_final.json with huggingface_hub
Verified signature0de9ab4 -
Upload eval_results/redteam_child_sft_final.json with huggingface_hub
Verified signaturec69a1ae -
Upload eval_results/political_safety_sft_final.json with huggingface_hub
Verified signaturec2f0445 -
Upload eval_results/redteam_sft_r1.json with huggingface_hub
Verified signature5db2764 -
Upload eval_results/abstention_sft_r2.json with huggingface_hub
Verified signature6c94f3c -
Upload eval_results/guard_qwen3guard_eval.json with huggingface_hub
Verified signaturea901081 -
Upload eval_results/sft_r2_dev.json with huggingface_hub
Verified signaturedb858e6 -
Upload eval_results/redteam_sft_r2_guarded.json with huggingface_hub
Verified signature2c9e75f -
Upload eval_results/abstention_sft_final.json with huggingface_hub
Verified signatureb1c65d4 -
Upload eval_results/redteam_child_sft_final_v2e.json with huggingface_hub
Verified signature768c091 -
Upload eval_results/political_safety_sft_r2_serve.json with huggingface_hub
Verified signature5f84180 -
Upload eval_results/cpt_a_dev.json with huggingface_hub
Verified signature00b737c -
Upload eval_results/contamination.json with huggingface_hub
Verified signature0b0b119 -
Upload eval_results/political_safety_sft_r2_serve_v2.json with huggingface_hub
Verified signature6173b1b -
Upload eval_results/guard_v3_eval.json with huggingface_hub
Verified signaturef64a421 -
Upload LICENSES.md with huggingface_hub
Verified signature0bfc802 -
Upload DATACARD.md with huggingface_hub
Verified signaturedd4b0ec -
Upload README.md with huggingface_hub
Verified signature31371c0 -
instruct: weights (upstream layout)
Verified signature1ee7ac9 -
initial commit
Verified signature0909b60