File size: 11,583 Bytes
c995d84 a7afd6f c995d84 9e574ce a7afd6f c995d84 0eeff64 c5583d6 0eeff64 36e65bb 0eeff64 45c5c97 f8f8152 0eeff64 dad1bf3 0eeff64 c1b9574 c6828c6 c1b9574 bd7fccd c6828c6 45c5c97 c6828c6 c1b9574 0eeff64 c995d84 a7afd6f 7517984 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
---
language:
- en
- hi
license: llama2
library_name: transformers
tags:
- hindi
- 'english '
- Bilingual
datasets:
- sarvamai/samvaad-hi-v1
pipeline_tag: text-generation
model-index:
- name: Gaja-v1.00
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: AI2 Reasoning Challenge (25-Shot)
type: ai2_arc
config: ARC-Challenge
split: test
args:
num_few_shot: 25
metrics:
- type: acc_norm
value: 52.82
name: normalized accuracy
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: HellaSwag (10-Shot)
type: hellaswag
split: validation
args:
num_few_shot: 10
metrics:
- type: acc_norm
value: 76.31
name: normalized accuracy
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: MMLU (5-Shot)
type: cais/mmlu
config: all
split: test
args:
num_few_shot: 5
metrics:
- type: acc
value: 40.83
name: accuracy
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: TruthfulQA (0-shot)
type: truthful_qa
config: multiple_choice
split: validation
args:
num_few_shot: 0
metrics:
- type: mc2
value: 44.64
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: Winogrande (5-shot)
type: winogrande
config: winogrande_xl
split: validation
args:
num_few_shot: 5
metrics:
- type: acc
value: 70.64
name: accuracy
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
- task:
type: text-generation
name: Text Generation
dataset:
name: GSM8k (5-shot)
type: gsm8k
config: main
split: test
args:
num_few_shot: 5
metrics:
- type: acc
value: 0.91
name: accuracy
source:
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=damerajee/Gaja-v1.00
name: Open LLM Leaderboard
---
# Model
# 🐘 Gaja
Gaja is a Hindi/Hinglish chat model, initially trained on SarvamAI's OpenHathi model and further fine-tuned for conversational interactions.
<img src="https://cdn-uploads.huggingface.co/production/uploads/6487239cca30096ea9f52115/sLgskU1h2Tih_bJo0ktYR.jpeg" width="600" alt="Image">
# Inference
hey guys thanks to Bhabha AI, you guys can finally try my [model](https://www.indic.chat/)
# Additional Information
- It outperforms Airavata, AI4Bharat's chat version, on Huggingface OpenLLM benchmark suite.
- It was fine-tuned on only 1k samples
- The code for this can be found in The github code - [Github](https://github.com/dame-cell/Gaja)
# 💬 Prompt template
```
<|im_start|>user
{}<|im_end|>
<|im_start|>assistant
{}<|im_end|>
```
# 😎 Features:
- Language Support: Gaja is designed to understand and generate responses in both Hindi and Hinglish, catering to a diverse range of users.
- Base Model: Built upon SarvamAI's OpenHathi model, Gaja inherits its foundational capabilities while being optimized for conversational tasks.
- Fine-tuning: Gaja has undergone fine-tuning specifically for chat-based interactions, enhancing its ability to engage in meaningful conversations with users.
- Experimental Platform: With its flexibility and adaptability, Gaja serves as a valuable platform for conducting experiments and exploring innovative approaches to chatbot development.
# 😤 Example Output
| User | Assistant |
|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
| what is a large language model | एक बड़ा भाषा मॉडल, जिसे ML या LLM के रूप में भी जाना जाता है, एक प्रकार का एआई एल्गोरिथ्म है जो मानव भाषा को समझने और समझने में निपुण है। यह एल्गोरिथ्म एक बड़ी फिल्टरिंग योजना का उपयोग करता है, जो इसे बड़ी मात्रा में डेटा को संसाधित करने की अनुमति देता है। यह एल्गोरिथ्म एक बड़े डेटासेट से जानकारी निकालता है, जो आमतौर पर इंटरनेट पर पाया जाता है। यह एल्गोरिथ्म मानव भाषा के बारे में जानकारी को समझने और समझने के लिए कई एल्गोरिथमिक तरीकों का उपयोग करता है। बड़े भाषा मॉडल का उपयोग आमतौर पर संभावित संपर्क, अनुप्रयोगों की एक व्यापक श्रृंखला में किया जाता है। |
| How could AI help humans? | AI can help humans in several ways. Firstly, it can assist in decision-making by providing insights and data analysis. For example, AI-powered tools can help individuals and businesses make informed decisions based on real-time data.Secondly, AI can enhance productivity by automating repetitive and mundane tasks. This frees up time and resources for more creative and strategic work.Thirdly, AI can improve healthcare by providing personalized medical diagnoses and treatment plans. AI-powered tools can analyze vast amounts of medical data and provide insights that can lead to more effective and efficient healthcare.Fourthly, AI can enhance security by detecting and preventing cyber threats. AI-powered systems can monitor networks and detect suspicious activity, preventing cyber-attacks before they occur.Lastly, AI can contribute to environmental conservation by optimizing resource utilization and reducing waste. AI-powered systems can monitor and optimize resource usage, leading to more sustainable practices.In summary, AI can help humans by enhancing decision-making, increasing productivity, improving healthcare, enhancing security, and contributing to environmental conservation. |
| क्या आप मुझे बता सकते हैं कि भारत में लोग बड़ों के पैर छूते क्यों हैं? | भारत में, बड़ों के पैर छूना एक आदमी की बड़ों के प्रति श्रद्धा और सम्मान दिखाने की एक पारंपरिक प्रथा है। यह आदमी बड़ों को आदर और आत्मसात करता है। यह एक आदमी के बड़ों के साथ अपने संबंध को स्थापित करने और बड़ों के प्रति अपनी श्रद्धा और आत्मसात को दर्शाित करने का एक तरीका है। यह एक आदमी के बड़ों के साथ अपने घनिष्ठ संबंध को स्थापित करने और बड़ों के प्रति अपनी आत्मात्मकता और आत्मसात को दर्शाित करने का एक तरीका है।|
# Eval
### Hindi eval
| Task | #Samples | Accuracy | Precision | F1 | Recall | Metrics |
|------------------------|----------|----------|-----------|------|--------|----------------------------|
| Indic-Sentiment Analysis | 100 | 0.71 | - | 0.76 | - | Accuracy, F1 score |
| Indic-QA Evaluation | 50 | - | 0.62 | 0.68 | 0.75 | Bert Score |
| Indic-NLI | 50 | 0.24 | - | 0.17 | - | Accuracy, F1 score |
| Indic-Paraphrase | 500 | 0.52 | 0.49 | 0.48 | - | Accuracy, F1 score, Precision |
### English eval
Model name| Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8K|
|-------|------------------------|-----------|----------|-----------|------|--------|------------|
| [damerajee/Gaja-v1.00](https://huggingface.co/damerajee/Gaja-v1.00)| 47.69 | 52.82 | 76.31 | 40.83 | 44.64 | 70.64 | 0.91 |
| [manishiitg/open-aditi-hi-v2](https://huggingface.co/manishiitg/open-aditi-hi-v2) | 59.31 | 59.39 | 82.01 | 61.41 | 45.84 | 77.19 | 30.02 |
| [ai4bharat/Airavata](https://huggingface.co/ai4bharat/Airavata) | 45.52 | 46.5 | 69.26 | 43.9 | 40.62 | 68.82 | 4.02 |
![Screenshot (30).png](https://cdn-uploads.huggingface.co/production/uploads/6487239cca30096ea9f52115/ip_xYv7XpC68RKq7P-Qt-.png)
# 🚀 Infernce(colab or kaggle notebooks)
### Installing dependencies
```python
!pip install -q peft bitsandbytes datasets accelerate
```
### Load the model
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("damerajee/Gaja-v1.00")
model = AutoModelForCausalLM.from_pretrained("damerajee/Gaja-v1.00",load_in_4bit=True)
```
### Try it out
```python
messages = [
{"role": "user", "content": "Why do poeple in India touch the feet of elders when they greet them?"},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize = True,
add_generation_prompt = True, # Must add for generation
return_tensors = "pt",
).to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens = 300, use_cache = True)
```
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_damerajee__Gaja-v1.00)
| Metric |Value|
|---------------------------------|----:|
|Avg. |47.69|
|AI2 Reasoning Challenge (25-Shot)|52.82|
|HellaSwag (10-Shot) |76.31|
|MMLU (5-Shot) |40.83|
|TruthfulQA (0-shot) |44.64|
|Winogrande (5-shot) |70.64|
|GSM8k (5-shot) | 0.91|
|