
Welcome to the Bangla Retrieval-Augmented Generation (RAG) Pipeline! This repository provides a pipeline for interacting with Bengali text data using natural language.
max_new_tokens, top_p, top_k, temperature, chunk_size, chunk_overlap, and k.--quantization argument to toggle between different types of model including LoRA and 4bit quantization.git clone https://github.com/Bangla-RAG/PoRAG.git
cd PoRAG
pip install -r requirements.txt
langchain==0.2.3
langchain-community==0.2.4
langchain-core==0.2.5
chromadb==0.5.0
accelerate==0.31.0
peft==0.11.1
transformers==4.40.1
bitsandbytes==0.41.3
sentence-transformers==3.0.1
rich==13.7.1
test.txt) with the Bengali text you want to use.python main.py --text_path test.txt
আপনার প্রশ্ন: রবীন্দ্রনাথ ঠাকুরের জন্মস্থান কোথায়?
উত্তর: রবীন্দ্রনাথ ঠাকুরের জন্মস্থান কলকাতার জোড়াসাঁকোর 'ঠাকুরবাড়ি'তে।
You can pass these arguments and adjust their values during each runs.
| Flag Name | Type | Description | Instructions |
|---|---|---|---|
chat_model | str | The ID of the chat model. It can be either a Hugging Face model ID or a local path to the model. | Use the model ID from the HuggingFace model card or provide the local path to the model. The default value is set to "hassanaliemon/bn_rag_llama3-8b". |
embed_model | str | The ID of the embedding model. It can be either a Hugging Face model ID or a local path to the model. | Use the model ID from the HuggingFace model card or provide the local path to the model. The default value is set to "l3cube-pune/bengali-sentence-similarity-sbert". |
k | int | The number of documents to retrieve. | The default value is set to 4. |
top_k | int | The top_k parameter for the chat model. | The default value is set to 2. |
top_p | float | The top_p parameter for the chat model. | The default value is set to 0.6. |
temperature | float | The temperature parameter for the chat model. | The default value is set to 0.6. |
max_new_tokens | int | The maximum number of new tokens to generate. | The default value is set to 256. |
chunk_size | int | The chunk size for text splitting. | The default value is set to 500. |
chunk_overlap | int | The chunk overlap for text splitting. | The default value is set to 150. |
text_path | str | The txt file path to the text file. | This is a required field. Provide the path to the text file you want to use. |
show_context | bool | Whether to show the retrieved context or not. | Use --show_context flag to enable this feature. |
quantization | bool | Whether to enable quantization(4bit) or not. | Use --quantization flag to enable this feature. |
hf_token | str | Your Hugging Face API token. | The default value is set to None. Provide your Hugging Face API token if necessary. |
hassanaliemon/bn_rag_llama3-8b for context-based QA.sagorsarker/bangla-bert-base, csebuetnlp/banglabert, and found l3cube-pune/bengali-sentence-similarity-sbert to be most effective.We welcome contributions! If you have suggestions, bug reports, or enhancements, please open an issue or submit a pull request.
This is a work-in-progress and may require further refinement. The results depend on the quality of your Bengali text corpus and the chosen models.
23 commits
1 commits
Python
100.0%

Welcome to the Bangla Retrieval-Augmented Generation (RAG) Pipeline! This repository provides a pipeline for interacting with Bengali text data using natural language.
max_new_tokens, top_p, top_k, temperature, chunk_size, chunk_overlap, and k.--quantization argument to toggle between different types of model including LoRA and 4bit quantization.git clone https://github.com/Bangla-RAG/PoRAG.git
cd PoRAG
pip install -r requirements.txt
langchain==0.2.3
langchain-community==0.2.4
langchain-core==0.2.5
chromadb==0.5.0
accelerate==0.31.0
peft==0.11.1
transformers==4.40.1
bitsandbytes==0.41.3
sentence-transformers==3.0.1
rich==13.7.1
test.txt) with the Bengali text you want to use.python main.py --text_path test.txt
আপনার প্রশ্ন: রবীন্দ্রনাথ ঠাকুরের জন্মস্থান কোথায়?
উত্তর: রবীন্দ্রনাথ ঠাকুরের জন্মস্থান কলকাতার জোড়াসাঁকোর 'ঠাকুরবাড়ি'তে।
You can pass these arguments and adjust their values during each runs.
| Flag Name | Type | Description | Instructions |
|---|---|---|---|
chat_model | str | The ID of the chat model. It can be either a Hugging Face model ID or a local path to the model. | Use the model ID from the HuggingFace model card or provide the local path to the model. The default value is set to "hassanaliemon/bn_rag_llama3-8b". |
embed_model | str | The ID of the embedding model. It can be either a Hugging Face model ID or a local path to the model. | Use the model ID from the HuggingFace model card or provide the local path to the model. The default value is set to "l3cube-pune/bengali-sentence-similarity-sbert". |
k | int | The number of documents to retrieve. | The default value is set to 4. |
top_k | int | The top_k parameter for the chat model. | The default value is set to 2. |
top_p | float | The top_p parameter for the chat model. | The default value is set to 0.6. |
temperature | float | The temperature parameter for the chat model. | The default value is set to 0.6. |
max_new_tokens | int | The maximum number of new tokens to generate. | The default value is set to 256. |
chunk_size | int | The chunk size for text splitting. | The default value is set to 500. |
chunk_overlap | int | The chunk overlap for text splitting. | The default value is set to 150. |
text_path | str | The txt file path to the text file. | This is a required field. Provide the path to the text file you want to use. |
show_context | bool | Whether to show the retrieved context or not. | Use --show_context flag to enable this feature. |
quantization | bool | Whether to enable quantization(4bit) or not. | Use --quantization flag to enable this feature. |
hf_token | str | Your Hugging Face API token. | The default value is set to None. Provide your Hugging Face API token if necessary. |
hassanaliemon/bn_rag_llama3-8b for context-based QA.sagorsarker/bangla-bert-base, csebuetnlp/banglabert, and found l3cube-pune/bengali-sentence-similarity-sbert to be most effective.We welcome contributions! If you have suggestions, bug reports, or enhancements, please open an issue or submit a pull request.
This is a work-in-progress and may require further refinement. The results depend on the quality of your Bengali text corpus and the chosen models.
23 commits
1 commits
Python
100.0%