Text Generation
Transformers
PyTorch
English
Malayalam
llama
conversational
text-generation-inference
Instructions to use abhinand/malayalam-llama-7b-instruct-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abhinand/malayalam-llama-7b-instruct-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abhinand/malayalam-llama-7b-instruct-v0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abhinand/malayalam-llama-7b-instruct-v0.1") model = AutoModelForCausalLM.from_pretrained("abhinand/malayalam-llama-7b-instruct-v0.1", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abhinand/malayalam-llama-7b-instruct-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abhinand/malayalam-llama-7b-instruct-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhinand/malayalam-llama-7b-instruct-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abhinand/malayalam-llama-7b-instruct-v0.1
- SGLang
How to use abhinand/malayalam-llama-7b-instruct-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/malayalam-llama-7b-instruct-v0.1" \ --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": "abhinand/malayalam-llama-7b-instruct-v0.1", "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 "abhinand/malayalam-llama-7b-instruct-v0.1" \ --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": "abhinand/malayalam-llama-7b-instruct-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abhinand/malayalam-llama-7b-instruct-v0.1 with Docker Model Runner:
docker model run hf.co/abhinand/malayalam-llama-7b-instruct-v0.1
Adding Evaluation Results
Browse filesThis is an automated PR created with https://huggingface.co/spaces/Weyaxi/open-llm-leaderboard-results-pr
The purpose of this PR is to add evaluation results from the Open LLM Leaderboard to your model card.
If you encounter any issues, please report them to https://huggingface.co/spaces/Weyaxi/open-llm-leaderboard-results-pr/discussions
README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
base_model: abhinand/malayalam-llama-pt-v0
|
| 3 |
model-index:
|
| 4 |
- name: malayalam-llama-instruct-v0.1
|
| 5 |
results: []
|
| 6 |
-
license: llama2
|
| 7 |
-
language:
|
| 8 |
-
- en
|
| 9 |
-
- ml
|
| 10 |
---
|
| 11 |
|
| 12 |
# Malayalam LLaMA 7B Instruct v0.1
|
|
@@ -173,4 +173,17 @@ If you use this model or any of the the Tamil-Llama related work in your researc
|
|
| 173 |
}
|
| 174 |
```
|
| 175 |
|
| 176 |
-
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ml
|
| 5 |
+
license: llama2
|
| 6 |
base_model: abhinand/malayalam-llama-pt-v0
|
| 7 |
model-index:
|
| 8 |
- name: malayalam-llama-instruct-v0.1
|
| 9 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Malayalam LLaMA 7B Instruct v0.1
|
|
|
|
| 173 |
}
|
| 174 |
```
|
| 175 |
|
| 176 |
+
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.
|
| 177 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 178 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_abhinand__malayalam-llama-7b-instruct-v0.1)
|
| 179 |
+
|
| 180 |
+
| Metric |Value|
|
| 181 |
+
|---------------------------------|----:|
|
| 182 |
+
|Avg. |39.69|
|
| 183 |
+
|AI2 Reasoning Challenge (25-Shot)|37.20|
|
| 184 |
+
|HellaSwag (10-Shot) |67.81|
|
| 185 |
+
|MMLU (5-Shot) |23.12|
|
| 186 |
+
|TruthfulQA (0-shot) |47.11|
|
| 187 |
+
|Winogrande (5-shot) |62.90|
|
| 188 |
+
|GSM8k (5-shot) | 0.00|
|
| 189 |
+
|