

## Intro 
  Trained on IndicNLGSuit [IndicQuestionGeneration](https://huggingface.co/datasets/ai4bharat/IndicQuestionGeneration) data for Bengali the model is finetuned from [IndicBART](https://huggingface.co/ai4bharat/IndicBART)

## Finetuned Command

    python run_summarization.py --model_name_or_path bnQG_models/checkpoint-32000 --do_eval --train_file train_bn.json 
    --validation_file valid_bn.json --output_dir bnQG_models --overwrite_output_dir --per_device_train_batch_size=2 
    --per_device_eval_batch_size=4 --predict_with_generate --text_column src --summary_column tgt --save_steps 4000 
    --evaluation_strategy steps --gradient_accumulation_steps 4 --eval_steps 1000 --learning_rate 0.001 --num_beams 4 
    --forced_bos_token "<2bn>" --num_train_epochs 10 --warmup_steps 10000
    
## Sample Line from train data

    {"src": "प्राणबादी [SEP] अर्थाॎ, तिनि छिलेन एकजन सर्बप्राणबादी। </s> <2bn>", "tgt": "<2bn> कोन दार्शनिक दृष्टिभङ्गि ओय़ाइटजेर छिल? </s>"}

## Inference
  
    script = "সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের (অধুনা, ভারতের ওড়িশা রাজ্য) কটকে জন্মগ্রহণ করেন।"
    answer = "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি"
    inp = answer +" [SEP] "+script + " </s> <2bn>"
    inp_tok = tokenizer(inp, add_special_tokens=False, return_tensors="pt", padding=True).input_ids
    model.eval() # Set dropouts to zero

    model_output=model.generate(inp_tok, use_cache=True, 
                                num_beams=4, 
                                max_length=20, 
                                min_length=1, 
                                early_stopping=True, 
                                pad_token_id=pad_id, 
                                bos_token_id=bos_id, 
                                eos_token_id=eos_id, 
                                decoder_start_token_id=tokenizer._convert_token_to_id_with_added_voc("<2bn>")
                            )
    decoded_output=tokenizer.decode(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
    


## Citations

    @inproceedings{dabre2021indicbart,
        title={IndicBART: A Pre-trained Model for Natural Language Generation of Indic Languages}, 
        author={Raj Dabre and Himani Shrotriya and Anoop Kunchukuttan and Ratish Puduppully and Mitesh M. Khapra and Pratyush Kumar},
        year={2022},
        booktitle={Findings of the Association for Computational Linguistics},
        }    
    

    @misc{kumar2022indicnlg,
      title={IndicNLG Suite: Multilingual Datasets for Diverse NLG Tasks in Indic Languages}, 
      author={Aman Kumar and Himani Shrotriya and Prachi Sahu and Raj Dabre and Ratish Puduppully and Anoop Kunchukuttan and Amogh Mishra and Mitesh M. Khapra and Pratyush Kumar},
      year={2022},
      eprint={2203.05437},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
    }   
  
{"language": ["bn"], "license": "mit", "tags": ["text2text-generation"], "widget": [{"text": "\u09e7\u09ee\u09ef\u09ed \u0996\u09cd\u09b0\u09bf\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6\u09c7\u09b0 \u09e8\u09e9 \u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09bf [SEP] \u09b8\u09c1\u09ad\u09be\u09b7 \u09e7\u09ee\u09ef\u09ed \u0996\u09cd\u09b0\u09bf\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6\u09c7\u09b0 \u09e8\u09e9 \u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09bf \u09ac\u09cd\u09b0\u09bf\u099f\u09bf\u09b6 \u09ad\u09be\u09b0\u09a4\u09c7\u09b0 \u0985\u09a8\u09cd\u09a4\u09b0\u09cd\u0997\u09a4 \u09ac\u09be\u0982\u09b2\u09be \u09aa\u09cd\u09b0\u09a6\u09c7\u09b6\u09c7\u09b0 \u0989\u09a1\u09bc\u09bf\u09b7\u09cd\u09af\u09be \u09ac\u09bf\u09ad\u09be\u0997\u09c7\u09b0 \u0995\u099f\u0995\u09c7 \u099c\u09a8\u09cd\u09ae\u0997\u09cd\u09b0\u09b9\u09a3 \u0995\u09b0\u09c7\u09a8\u0964 </s> <2bn>"}]}
transformers pytorch mbart text2text-generation bn arxiv:2203.05437 license:mit autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #mbart #text2text-generation #bn #arxiv-2203.05437 #license-mit #autotrain_compatible #endpoints_compatible #region-us 



## Intro 
  Trained on IndicNLGSuit IndicQuestionGeneration data for Bengali the model is finetuned from IndicBART

## Finetuned Command

    python run_summarization.py --model_name_or_path bnQG_models/checkpoint-32000 --do_eval --train_file train_bn.json 
    --validation_file valid_bn.json --output_dir bnQG_models --overwrite_output_dir --per_device_train_batch_size=2 
    --per_device_eval_batch_size=4 --predict_with_generate --text_column src --summary_column tgt --save_steps 4000 
    --evaluation_strategy steps --gradient_accumulation_steps 4 --eval_steps 1000 --learning_rate 0.001 --num_beams 4 
    --forced_bos_token "<2bn>" --num_train_epochs 10 --warmup_steps 10000
    
## Sample Line from train data

    {"src": "प्राणबादी [SEP] अर्थाॎ, तिनि छिलेन एकजन सर्बप्राणबादी। </s> <2bn>", "tgt": "<2bn> कोन दार्शनिक दृष्टिभङ्गि ओय़ाइटजेर छिल? </s>"}

## Inference
  
    script = "সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের (অধুনা, ভারতের ওড়িশা রাজ্য) কটকে জন্মগ্রহণ করেন।"
    answer = "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি"
    inp = answer +" [SEP] "+script + " </s> <2bn>"
    inp_tok = tokenizer(inp, add_special_tokens=False, return_tensors="pt", padding=True).input_ids
    URL() # Set dropouts to zero

    model_output=model.generate(inp_tok, use_cache=True, 
                                num_beams=4, 
                                max_length=20, 
                                min_length=1, 
                                early_stopping=True, 
                                pad_token_id=pad_id, 
                                bos_token_id=bos_id, 
                                eos_token_id=eos_id, 
                                decoder_start_token_id=tokenizer._convert_token_to_id_with_added_voc("<2bn>")
                            )
    decoded_output=URL(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
    


s

    @inproceedings{dabre2021indicbart,
        title={IndicBART: A Pre-trained Model for Natural Language Generation of Indic Languages}, 
        author={Raj Dabre and Himani Shrotriya and Anoop Kunchukuttan and Ratish Puduppully and Mitesh M. Khapra and Pratyush Kumar},
        year={2022},
        booktitle={Findings of the Association for Computational Linguistics},
        }    
    

    @misc{kumar2022indicnlg,
      title={IndicNLG Suite: Multilingual Datasets for Diverse NLG Tasks in Indic Languages}, 
      author={Aman Kumar and Himani Shrotriya and Prachi Sahu and Raj Dabre and Ratish Puduppully and Anoop Kunchukuttan and Amogh Mishra and Mitesh M. Khapra and Pratyush Kumar},
      year={2022},
      eprint={2203.05437},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
    }   
  
## Intro 
  Trained on IndicNLGSuit IndicQuestionGeneration data for Bengali the model is finetuned from IndicBART ## Finetuned Command

    python run_summarization.py --model_name_or_path bnQG_models/checkpoint-32000 --do_eval --train_file train_bn.json 
    --validation_file valid_bn.json --output_dir bnQG_models --overwrite_output_dir --per_device_train_batch_size=2 
    --per_device_eval_batch_size=4 --predict_with_generate --text_column src --summary_column tgt --save_steps 4000 
    --evaluation_strategy steps --gradient_accumulation_steps 4 --eval_steps 1000 --learning_rate 0.001 --num_beams 4 
    --forced_bos_token "<2bn>" --num_train_epochs 10 --warmup_steps 10000 ## Sample Line from train data

    {"src": "प्राणबादी [SEP] अर्थाॎ, तिनि छिलेन एकजन सर्बप्राणबादी। </s> <2bn>", "tgt": "<2bn> कोन दार्शनिक दृष्टिभङ्गि ओय़ाइटजेर छिल? </s>"} ## Inference
  
    script = "সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের (অধুনা, ভারতের ওড়িশা রাজ্য) কটকে জন্মগ্রহণ করেন।"
    answer = "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি"
    inp = answer +" [SEP] "+script + " </s> <2bn>"
    inp_tok = tokenizer(inp, add_special_tokens=False, return_tensors="pt", padding=True).input_ids
    URL() # Set dropouts to zero

    model_output=model.generate(inp_tok, use_cache=True, 
                                num_beams=4, 
                                max_length=20, 
                                min_length=1, 
                                early_stopping=True, 
                                pad_token_id=pad_id, 
                                bos_token_id=bos_id, 
                                eos_token_id=eos_id, 
                                decoder_start_token_id=tokenizer._convert_token_to_id_with_added_voc("<2bn>")
                            )
    decoded_output=URL(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
    


s

    @inproceedings{dabre2021indicbart,
        title={IndicBART: A Pre-trained Model for Natural Language Generation of Indic Languages}, 
        author={Raj Dabre and Himani Shrotriya and Anoop Kunchukuttan and Ratish Puduppully and Mitesh M. Khapra and Pratyush Kumar},
        year={2022},
        booktitle={Findings of the Association for Computational Linguistics},
        }    
    

    @misc{kumar2022indicnlg,
      title={IndicNLG Suite: Multilingual Datasets for Diverse NLG Tasks in Indic Languages}, 
      author={Aman Kumar and Himani Shrotriya and Prachi Sahu and Raj Dabre and Ratish Puduppully and Anoop Kunchukuttan and Amogh Mishra and Mitesh M. Khapra and Pratyush Kumar},
      year={2022},
      eprint={2203.05437},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
    }
TAGS
#transformers #pytorch #mbart #text2text-generation #bn #arxiv-2203.05437 #license-mit #autotrain_compatible #endpoints_compatible #region-us 
 ## Intro 
  Trained on IndicNLGSuit IndicQuestionGeneration data for Bengali the model is finetuned from IndicBART ## Finetuned Command

    python run_summarization.py --model_name_or_path bnQG_models/checkpoint-32000 --do_eval --train_file train_bn.json 
    --validation_file valid_bn.json --output_dir bnQG_models --overwrite_output_dir --per_device_train_batch_size=2 
    --per_device_eval_batch_size=4 --predict_with_generate --text_column src --summary_column tgt --save_steps 4000 
    --evaluation_strategy steps --gradient_accumulation_steps 4 --eval_steps 1000 --learning_rate 0.001 --num_beams 4 
    --forced_bos_token "<2bn>" --num_train_epochs 10 --warmup_steps 10000 ## Sample Line from train data

    {"src": "प्राणबादी [SEP] अर्थाॎ, तिनि छिलेन एकजन सर्बप्राणबादी। </s> <2bn>", "tgt": "<2bn> कोन दार्शनिक दृष्टिभङ्गि ओय़ाइटजेर छिल? </s>"} ## Inference
  
    script = "সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের (অধুনা, ভারতের ওড়িশা রাজ্য) কটকে জন্মগ্রহণ করেন।"
    answer = "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি"
    inp = answer +" [SEP] "+script + " </s> <2bn>"
    inp_tok = tokenizer(inp, add_special_tokens=False, return_tensors="pt", padding=True).input_ids
    URL() # Set dropouts to zero

    model_output=model.generate(inp_tok, use_cache=True, 
                                num_beams=4, 
                                max_length=20, 
                                min_length=1, 
                                early_stopping=True, 
                                pad_token_id=pad_id, 
                                bos_token_id=bos_id, 
                                eos_token_id=eos_id, 
                                decoder_start_token_id=tokenizer._convert_token_to_id_with_added_voc("<2bn>")
                            )
    decoded_output=URL(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
    


s

    @inproceedings{dabre2021indicbart,
        title={IndicBART: A Pre-trained Model for Natural Language Generation of Indic Languages}, 
        author={Raj Dabre and Himani Shrotriya and Anoop Kunchukuttan and Ratish Puduppully and Mitesh M. Khapra and Pratyush Kumar},
        year={2022},
        booktitle={Findings of the Association for Computational Linguistics},
        }    
    

    @misc{kumar2022indicnlg,
      title={IndicNLG Suite: Multilingual Datasets for Diverse NLG Tasks in Indic Languages}, 
      author={Aman Kumar and Himani Shrotriya and Prachi Sahu and Raj Dabre and Ratish Puduppully and Anoop Kunchukuttan and Amogh Mishra and Mitesh M. Khapra and Pratyush Kumar},
      year={2022},
      eprint={2203.05437},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
    }
passage: TAGS
#transformers #pytorch #mbart #text2text-generation #bn #arxiv-2203.05437 #license-mit #autotrain_compatible #endpoints_compatible #region-us 
## Intro 
  Trained on IndicNLGSuit IndicQuestionGeneration data for Bengali the model is finetuned from IndicBART## Finetuned Command

    python run_summarization.py --model_name_or_path bnQG_models/checkpoint-32000 --do_eval --train_file train_bn.json 
    --validation_file valid_bn.json --output_dir bnQG_models --overwrite_output_dir --per_device_train_batch_size=2 
    --per_device_eval_batch_size=4 --predict_with_generate --text_column src --summary_column tgt --save_steps 4000 
    --evaluation_strategy steps --gradient_accumulation_steps 4 --eval_steps 1000 --learning_rate 0.001 --num_beams 4 
    --forced_bos_token "<2bn>" --num_train_epochs 10 --warmup_steps 10000## Sample Line from train data

    {"src": "प्राणबादी [SEP] अर्थाॎ, तिनि छिलेन एकजन सर्बप्राणबादी। </s> <2bn>", "tgt": "<2bn> कोन दार्शनिक दृष्टिभङ्गि ओय़ाइटजेर छिल? </s>"}