Instructions to use abhinand/tamil-llama-7b-base-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abhinand/tamil-llama-7b-base-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abhinand/tamil-llama-7b-base-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abhinand/tamil-llama-7b-base-v0.1") model = AutoModelForCausalLM.from_pretrained("abhinand/tamil-llama-7b-base-v0.1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abhinand/tamil-llama-7b-base-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abhinand/tamil-llama-7b-base-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhinand/tamil-llama-7b-base-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/abhinand/tamil-llama-7b-base-v0.1
- SGLang
How to use abhinand/tamil-llama-7b-base-v0.1 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 "abhinand/tamil-llama-7b-base-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhinand/tamil-llama-7b-base-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "abhinand/tamil-llama-7b-base-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhinand/tamil-llama-7b-base-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use abhinand/tamil-llama-7b-base-v0.1 with Docker Model Runner:
docker model run hf.co/abhinand/tamil-llama-7b-base-v0.1
Tamil LLaMA 7B Base v0.1 [pre-trained]
Welcome to the inaugural release of the Tamil LLaMA 7B base model β an important step in advancing LLMs for the Tamil language. This model is ready for immediate inference and is also primed for further fine-tuning to cater to your specific NLP tasks.
To dive deep into the development and capabilities of this model, please read the research paper and the introductory blog post (WIP) that outlines our journey and the model's potential impact.
Please Note: This model, labeled as a foundational Tamil Language Model (LLM), is designed primarily for Causal Language Modeling (LM) purposes. In other words, if you are looking for an instruction following model in Tamil, you may find abhinand/tamil-llama-7b-instruct-v0.1 more suitable for your needs.
Model description
The Tamil LLaMA models have been enhanced and tailored specifically with an extensive Tamil vocabulary of 16,000 tokens, building upon the foundation set by the original LLaMA-2.
- Model type: A 7B parameter model for Causal LM pre-trained on CulturaX dataset's Tamil subset.
- Language(s): Tamil and English
- License: GNU General Public License v3.0
- Source Model: meta-llama/Llama-2-7b-hf
- Training Precision:
float16 - Code: GitHub
Related Models
| Model | Type | Data | Base Model | # Params | Download Links |
|---|---|---|---|---|---|
| Tamil LLaMA 7B Base | Base model | 12GB | LLaMA 7B | 7B | HF Hub |
| Tamil LLaMA 13B Base | Base model | 4GB | LLaMA 13B | 13B | HF Hub |
| Tamil LLaMA 7B Instruct | Instruction following model | 145k instructions | Tamil LLaMA 7B Base | 7B | HF Hub |
| Tamil LLaMA 13B Instruct | Instruction following model | 145k instructions | Tamil LLaMA 13B Base | 13B | HF Hub |
Usage Note
It's important to note that the models have not undergone detoxification. Therefore, while they possess impressive linguistic capabilities, there is a possibility for them to generate content that could be deemed harmful or offensive. We urge users to exercise discretion and supervise the model's outputs closely, especially in public or sensitive applications.
Meet the Developers
Get to know the creators behind this innovative model and follow their contributions to the field:
Citation
If you use this model or the Tamil-Llama dataset in your research, please cite:
@misc{balachandran2023tamilllama,
title={Tamil-Llama: A New Tamil Language Model Based on Llama 2},
author={Abhinand Balachandran},
year={2023},
eprint={2311.05845},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
We hope this model serves as a valuable tool in your NLP toolkit and look forward to seeing the advancements it will enable in the understanding and generation of the Tamil language.
- Downloads last month
- 787