Text Generation
Transformers
Safetensors
gemma
unsloth
conversational
Inference Endpoints
text-generation-inference
Edit model card

Model Card for Model ID

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

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

Text Generation, Telugu Chatbot, Telugu Text Generation

Downstream Use [optional]

Telugu Text Summarization, Further Finetuning on Telugu Datasets

Bias, Risks, and Limitations

Model is still under development, might need further finetuning on other datasets

Recommendations

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

Downloads last month
2
Safetensors
Model size
2.51B params
Tensor type
FP16
·

Datasets used to train TeluguHouseCollective/Gemma-2B-Telugu_Instruct_Finetuned