region:us
---
{}
---
Quantization made by Richard Erkhov.

[Github](https://github.com/RichardErkhov)

[Discord](https://discord.gg/pvy7H8DZMG)

[Request more models](https://github.com/RichardErkhov/quant_request)


Gemma-2B-Telugu_Instruct_Finetuned - EXL2
- Model creator: https://huggingface.co/TeluguHouseCollective/
- Original model: https://huggingface.co/TeluguHouseCollective/Gemma-2B-Telugu_Instruct_Finetuned/


## Available sizes

| Branch | Bits | Description |
| ----- | ---- | ------------ |
| [8_0](https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2/tree/8_0) | 8.0 | Maximum quality that ExLlamaV2 can produce, near unquantized performance. |
| [6_5](https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2/tree/6_5) | 6.5 | Very similar to 8.0, good tradeoff of size vs performance, **recommended**. |
| [5_0](https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2/tree/5_0) | 5.0 | Slightly lower quality vs 6.5, but usable |
| [4_25](https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2/tree/4_25) | 4.25 | GPTQ equivalent bits per weight, slightly higher quality. |
| [3_5](https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2/tree/3_5) | 3.5 | Lower quality, only use if you have to. |


## Download instructions
With git:
```shell
git clone --single-branch --branch 6_5 https://huggingface.co/TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 Gemma-2B-Telugu_Instruct_Finetuned-6_5
```
With huggingface hub:
```shell
pip3 install huggingface-hub
```
To download a specific branch, use the `--revision` parameter. For example, to download the 6.5 bpw branch:
Linux:
```shell
huggingface-cli download TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 --revision 6_5 --local-dir Gemma-2B-Telugu_Instruct_Finetuned-6_5 --local-dir-use-symlinks False
```
Windows (which apparently doesn't like _ in folders sometimes?):

```shell
huggingface-cli download TeluguHouseCollective_-_Gemma-2B-Telugu_Instruct_Finetuned-exl2 --revision 6_5 --local-dir Gemma-2B-Telugu_Instruct_Finetuned-6.5 --local-dir-use-symlinks False
```
    



  Original model description:
  ---
library_name: transformers
tags:
- unsloth
datasets:
- Telugu-LLM-Labs/yahma_alpaca_cleaned_telugu_filtered_and_romanized
- >-
  Telugu-LLM-Labs/teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized
pipeline_tag: text-generation
---

# Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->
Gemma 2B Model Finetuned on two Telugu Instruct Datasets:

1. Telugu-LLM-Labs/yahma_alpaca_cleaned_telugu_filtered_and_romanized
2. Telugu-LLM-Labs/teknium_GPTeacher_general_instruct_telugu_filtered_and_romanized


## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

- **Developed by:** Sai Teja Mummadi
- **Language(s) (NLP):** English, Telugu (Original Script and Transliterated(Romanized))
- **Finetuned from model:** google/gemma-2b


## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Text Generation, Telugu Chatbot, Telugu Text Generation

### Downstream Use [optional]

<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
Telugu Text Summarization, Further Finetuning on Telugu Datasets

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->
Model is still under development, might need further finetuning on other datasets

### Recommendations

<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

## How to Get Started with the Model

Use the code below to get started with the model.

```
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{}

### Input:
{}

### Response:
{}"""
```
```
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

model_name = "TeluguHouseCollective/Gemma-2B-Telugu_Instruct_Finetuned"

tokenizer = AutoTokenizer.from_pretrained(model_name, padding_side="right")
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16).to(device)
```
```
inputs = tokenizer(
[
    alpaca_prompt.format(
        "fibonacci series rayadaniki python program ivvu", # instruction
        "", # input
        "", # output - leave this blank for generation!
    )
], return_tensors = "pt").to("cuda")

outputs = model.generate(**inputs, max_new_tokens = 256, use_cache = True)
tokenizer.batch_decode(outputs)
```

Model Output was as following:

```
Response:\nfibonnaci rayadaniki python program ikkada vundi:\n\n\'\'\'\n
def fibonacci(n):\n    """\n    fibonacci series rayadaniki python program.\n    """\n
a = 0\n    b = 1\n    series = [a, b]\n
for i in range(2, n + 1):\n
series.append(a + b)\n
a, b = b, a + b\n
return series\n\n#
fibonacci series rayadaniki 10 vibhinna sankhyalanu rayandi\n
series = fibonacci(10)\nprint(series)\n\'\'\'\n\n
e program fibonacci series rayadaniki python language upayogistamdi
mariyu fibonacci(n) function upayoginchi fibonacci(n) sankhyanu
rayadaniki fibonacci(n) function upayogistamdi.
fibonacci(n) function yokka prarambha viluvanu 0 mariyu 1 set cheyadam dwara prarambhamavuthundi,
mariyu idi fibonacci(n) yokka prarambha viluvanu 0 mariyu 1 nundi n nundi 1 nundi 0 varaku prarambhama

```

Another input in telugu


```
inputs = tokenizer(
[
    alpaca_prompt.format(
        "ఆరోగ్యంగా ఉండాలి అంటే ఎం చేయాలి?", # instruction
        "", # input
        "", # output - leave this blank for generation!
    )
], return_tensors = "pt").to("cuda")

outputs = model.generate(**inputs, max_new_tokens = 256, use_cache = True)
tokenizer.batch_decode(outputs)
```


Model Output was as following:

```
### Response:
oka nirdishta anubhavanni batti, miru aaharam mariyu poshanalapai drishti pettavachu. kani, oka nirdishta anubhavanni batti, miru aaharam mariyu poshanalapai drishti pettavachu.

meeru aaharam mariyu poshanalapai drishti pettavachchu,
endukante idi mee aarogyanni meruguparachadamla sahayapaduthundi.
meeru aaharam mariyu poshanalapai drishti pettavachchu, endukante idi mee sarirak srama,
nidra mariyu manasika aarogyanni meruguparachadamla sahayapaduthundi.

meeru aaharam mariyu poshanalapai drishti pettavachchu,
endukante idi mee sarirak srama, nidra mariyu manasika aarogyanni meruguparachadamla sahayapaduthundi.
meeru aaharam mariyu poshanalapai drishti pettavachchu, endukante idi mee sarirak srama,
nidra mariyu manasika aarogyanni meruguparachad


```


## Model Card Authors [optional]
Sai Teja Mummadi


  