Run this model with HF Jobs
Run arijitx/IndicBART-bn-QuestionGeneration on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/arijitx/IndicBART-bn-QuestionGeneration. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/arijitx/IndicBART-bn-QuestionGeneration on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use arijitx/IndicBART-bn-QuestionGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arijitx/IndicBART-bn-QuestionGeneration with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("arijitx/IndicBART-bn-QuestionGeneration") model = AutoModelForSeq2SeqLM.from_pretrained("arijitx/IndicBART-bn-QuestionGeneration", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files6 unmodified lines7896 unmodified lineswidget:- text: "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি [SEP] সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের কটকে জন্মগ্রহণ করেন। </s> <2bn>"---6 unmodified lines789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676 unmodified lineswidget:- text: "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি [SEP] সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের কটকে জন্মগ্রহণ করেন। </s> <2bn>"---## IntroTrained on IndicNLGSuit [IndicQuestionGeneration](https://huggingface.co/datasets/ai4bharat/IndicQuestionGeneration) data for Bengali the model is finetuned from [IndicBART](https://huggingface.co/ai4bharat/IndicBART)## Finetuned Commandpython 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>"}## Inferencescript = "সুভাষ ১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি ব্রিটিশ ভারতের অন্তর্গত বাংলা প্রদেশের উড়িষ্যা বিভাগের (অধুনা, ভারতের ওড়িশা রাজ্য) কটকে জন্মগ্রহণ করেন।"answer = "১৮৯৭ খ্রিষ্টাব্দের ২৩ জানুয়ারি"inp = answer +" [SEP] "+script + " </s> <2bn>"inp_tok = tokenizer(inp, add_special_tokens=False, return_tensors="pt", padding=True).input_idsmodel.eval() # Set dropouts to zeromodel_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}}
README.md+58