
Bangla GPT2 model was trained using the Bangla Newspaper dataset. Here we used prothom alo 250mb data for GPT2 model training and also vocab size 50k.

Github link : https://github.com/saiful9379/Bangla_GPT2
```py
from transformers import TFGPT2LMHeadModel, GPT2Tokenizer

tokenizer =  GPT2Tokenizer.from_pretrained("saiful9379/Bangla_GPT2")

model = TFGPT2LMHeadModel.from_pretrained("saiful9379/Bangla_GPT2")
text = "বহুল আলোচিত দশম জাতীয় সংসদ"
input_ids = tokenizer.encode(text, return_tensors='tf')

print(input_ids)


output = model.generate(
        input_ids,
        max_length=175,
        num_beams=10,
        temperature=0.7,
        no_repeat_ngram_size=2,
        num_return_sequences=5
    )
predicted_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(predicted_text)
```


Here is the basic configuration of Bangla GPT2 Model,
```
vocab_size = 50000
block_size = 200
learning_rate=3e-5
num_epoch = 100
batch_size = 12
buffer_size = 1000
```
{"license": "mit", "widget": [{"text": "\u09ac\u09b9\u09c1\u09b2 \u0986\u09b2\u09cb\u099a\u09bf\u09a4 \u09a6\u09b6\u09ae \u099c\u09be\u09a4\u09c0\u09df \u09b8\u0982\u09b8\u09a6"}, {"text": "\u0997\u09be\u099c\u09c0\u09aa\u09c1\u09b0\u09c7\u09b0 \u0995\u09be\u09b2\u09bf\u09af\u09bc\u09be\u0995\u09c8\u09b0 \u0989\u09aa\u099c\u09c7\u09b2\u09be\u09b0 \u09a4\u09c7\u09b2\u09bf\u09b0\u099a\u09be\u09b2\u09be"}]}
transformers tf gpt2 text-generation license:mit autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #tf #gpt2 #text-generation #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 


Bangla GPT2 model was trained using the Bangla Newspaper dataset. Here we used prothom alo 250mb data for GPT2 model training and also vocab size 50k.

Github link : URL



Here is the basic configuration of Bangla GPT2 Model,

TAGS
#transformers #tf #gpt2 #text-generation #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

TAGS
#transformers #tf #gpt2 #text-generation #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
