Downloads · 30 days
0
tanuj437/bhagavat-gita-rag
bhagavat-gita-rag is a text generation model from tanuj437. Use it when you need the model to write or continue text. The card lists the license as mit.
Bhagavad Gita RAG is a release-ready dual-retriever Retrieval-Augmented Generation project for grounded question answering over the Bhagavad Gita. It combines:
Downloads · 30 days
0
Access
Public
Updated Apr 24, 2026
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 97%
From the Hugging Face model README
Bhagavad Gita RAG is a release-ready dual-retriever Retrieval-Augmented Generation project for grounded question answering over the Bhagavad Gita. It combines:
SanskritBERT for Sanskrit-first semantic retrievalMuRIL for multilingual retrieval across English, Hindi, and Devanagari queriesQwen 2.5 Instruct for answer generationThe repository is structured so the main way to run the project is through rag-run.py, while the notebook remains available for interactive exploration.
src/gita_rag/rag-run.pydual_retriever_models_clean/dual_retriever_data/rag-run.ipynbdual-model-finetuning.ipynbRun the project in one of two ways:
python rag-run.py --ui
Or ask one question directly:
python rag-run.py --question "Why is Arjuna overcome with sorrow before the war?"
pip install -r requirements.txt
dual_retriever_data/dual_retriever_models_clean/bhagavad-gita-rag/
|-- rag-run.py # Main launcher
|-- rag-run.ipynb # Notebook wrapper around the packaged pipeline
|-- dual-model-finetuning.ipynb # Archived training notebook
|-- src/gita_rag/
| |-- config.py # Paths and runtime configuration
| |-- retrieval.py # Dense retriever loading and search
| |-- generation.py # vLLM / Transformers generation backends
| |-- pipeline.py # End-to-end RAG orchestration
| |-- text.py # JSONL loading and text cleanup helpers
| `-- ui.py # Gradio interface
|-- dual_retriever_data/ # Corpus + retrieval train/dev/test files
|-- dual_retriever_models_clean/ # Fine-tuned retriever checkpoints + FAISS indices
|-- requirements.txt
`-- pyproject.toml
For every user question:
The current fusion weights favor MuRIL because the supplied evaluation file shows it is the stronger retriever on the provided multilingual benchmark, while SanskritBERT is still preserved as a Sanskrit-specialized component.
SanskritBERT is kept as the Sanskrit-aware retriever.MuRIL is kept as the multilingual retriever.Qwen/Qwen2.5-7B-Instruct is the default generation model.vLLM is unavailable, the code falls back to a standard transformers backend so the repository still runs in more environments.vLLM is typically best on Linux with CUDA. On Windows, the project will usually fall back to transformers.The repository includes dual_retriever_models_clean/comparison_clean.json, which shows the current benchmark summary:
This project is released under the MIT License.